This answer doesn't encourage modifying the spaces, since TeX does a great job already. It merely discusses the concepts of spacing around math elements.
Spacing around math operators are discussed in the mathmode
documentation (section 11 Space, p 28). Here's an example:
\documentclass{article}
\newcommand{\func}{f(x) = x^2 + 3x_0 \cdot \sin x}% Function
\begin{document}
\[
\renewcommand{\arraystretch}{1.5}
\begin{array}{rl}
\mbox{default} & \func \\
\verb|\thinmuskip=0mu| & \setlength{\thinmuskip}{0mu} \func \\
\verb|\medmuskip=0mu| & \setlength{\medmuskip}{0mu} \func \\
\verb|\thickmuskip=0mu| & \setlength{\thickmuskip}{0mu} \func \\
\mbox{all set to zero} & \setlength{\thinmuskip}{0mu}\setlength{\medmuskip}{0mu}
\setlength{\thickmuskip}{0mu} \func
\end{array}
\]
\end{document}
To manually adjust the amount of space around a symbol, you can change it to an ordinal symbol by wrapping it in braces - for example {=}
- and then add the space your want around it: \,{=}\,
. Here's another example:
\documentclass{article}
\begin{document}
\[
\begin{array}{rc}
\mbox{default} & x = x \\
\verb|\mathbin| & x \mathbin{=} x \\
\verb|\mathrel| & x \mathrel{=} x \\
\verb|\mathord| & x \mathord{=} x \\
\verb|{ }| & x {=} x \\
\verb|\,{ }\,| & x\,{=}\,x \\
\verb|\;{ }\;| & x\;{=}\;x \\
\verb|\:{ }\:| & x\:{=}\:x
\end{array}
\]
\end{document}
Negative spaces, although not shown is obtainable via \!
. Of course, you can also use other spacing macros like \hspace
.
Also see What is the difference between \mathbin
vs. \mathrel
? for a discussion between the difference in spacing around binary and relational operators.
Since you want to use the blank next either between an opening atom (the open parenthesis) and a relation atom (\mid
) or between a relation atom and a closing atom, you can define \blank
to be a relation symbol:
\documentclass{article}
\newcommand{\blank}{\mathrel{\;\cdot\;}}
\begin{document}
$C(\blank \mid F_{t-1})$
$C(x \mid \blank)$
\end{document}
The trick is that TeX doesn't add space in cases
Open Rel Rel
or
Rel Rel Close
Best Answer
For what it's worth, this is converted from comments. I'm no expert on mathematical typography, so these are if anything suggestions.
My first idea was
which produces the same spacing as
because neither
(
nor,
is treated as an ordinary character as5
andx
would be in5 \cdot x
.If you rather want to reproduce the spacing from
5 \cdot x
you can use empty groups to fake them.does look more like something like
You can, of course, specify any space around the
\cdot
with\mspace
or the primitive\mkern
which both take dimensions inmu
(math unit:mu
=1/18 em
):I recommend to define a macro for this kind of wildcard/placeholder so that, if you ever change your opinion about the correct spacing you can just change the macro's definition (aka “The LaTeX way”).
Code
Output