# Spacing around \cdot when used as a wildcard

I have to use \cdot as a wildcard indicator in an expression like: K(\cdot,y).

My concern is: is the spacing around the \cdot correct? should I force something in either one side or the other of it?

-
Welcome to TeX.sx! If it's a placeholder, I'd use {\cdot}. But in the example you have given, the spacing is already correct because neither ( nor , is seen as an ordinary character as would 5 and x in 5 \cdot x. (There's no harm to use {\cdot} anyway, maybe as a macro: \newcommand*\wildcard{{\cdot}}.) – Qrrbrbirlbel Oct 18 '12 at 13:21
Welcome to TeX.sx! A tip: You can use backticks ` to mark your inline code as I did in my edit. – Corentin Oct 18 '12 at 13:21
Thanks @qrrbrbirlbel. Indeed, it is used as a placeholder and unfortunately it looks (at least to me) awful (not enough space around). Thus I was wondering about about its standard use. – Acorbe Oct 18 '12 at 13:26
Thanks @Corentin for your advice. – Acorbe Oct 18 '12 at 13:27
I don't know about a standard use, but similar to the notation of a norm a spacing to what {}\cdot{} produces seem appropriate, too. I guess, it depends on typographical consensus and an author's individual choice. Either way: Use a macro for this, so you can later change its definition without having to correct your whole document manually. – Qrrbrbirlbel Oct 18 '12 at 14:20

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

K({\cdot},y)

which produces the same spacing as

K(\cdot,y)

because neither ( nor , is treated as an ordinary character as 5 and x would be in 5 \cdot x.

If you rather want to reproduce the spacing from 5 \cdot x you can use empty groups to fake them.

K({}\cdot{},y)

does look more like something like

K(x,y)

You can, of course, specify any space around the \cdot with \mspace or the primitive \mkern which both take dimensions in mu (math unit: mu = 1/18 em):

{{\mkern 2mu\cdot\mkern 2mu}}

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”).

\newcommand*\wc{{\mkern 2mu\cdot\mkern 2mu}}

### Code

\documentclass{article}
\newcommand*\wc{{}\cdot{}}
\begin{document}\noindent
$$K ( \cdot , y )$$ \\
$$K ({ \cdot} , y )$$ \\
$$K ({}\cdot{}, y )$$ \\
$$K ( \wc , y )$$ \\
$$K ( x, y )$$
\end{document}

### Output

-
The "correct" space depends on many factors; slightly less space around the dot can be obtained by \newcommand\blank{{\mkern 2mu\cdot\mkern 2mu}}. I definitely recommend using a command for it. – egreg Oct 19 '12 at 6:33
thanks to the both of you. – Acorbe Oct 19 '12 at 7:38