# Placeholder for variable as in f(x, .)

What is the best/the usual way to typeset a placeholder for a variable in an equation?

Specifically, I want to do something like g = f(x, .) (which of course means that g is defined by g(y) = f(x,y)). I tried \cdot, but it somehow does not look right (and the spacing needs to be adjusted either). On the other hand, a \bullet seems to be too fat.

Any other suggestions?

-
Sometimes a stroke is used: $g(-) = f(x,-)$. – Gonzalo Medina Mar 6 '12 at 22:55
Why not a normal stop $g(y) = f(x,.)$? – Yiannis Lazarides Mar 6 '12 at 23:01
OK, the <code>g=f(x,\cdot)</code> does not look too bad, I mixed something up in my memory. What did not look good was something like <code>M \otimes \cdot</code> denoting the functor given by tensoring. But in my particular case, the <code>\cdot</code> is already taken for a left action on modules... I will consider the "normal" stop-dot and the asterisk – michael88 Mar 6 '12 at 23:09

Here are some considerations, since this question is open-ended:

\documentclass{article}
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\newcommand{\parm}{\mathord{\color{black!33}\bullet}}%
\begin{document}
$f(x,.) \quad f(x,\cdot) \quad f(x,\ast) \quad f(x,\star) \quad f(x,\bullet) \quad f(x,\parm)$
\end{document}​


I've included \parm which is a 33% black \bullet, perhaps a little more subtle than the full-fledged solid \bullet. Whatever you choose, best to define a command that sets such a "placeholder". If you're after something "fancy", I would suggest you peruse the tables of symbols contained in Scott Pakin's Comprehensive LaTeX Symbol List.

-
In any case I suggest to enclose the symbol in braces (equivalent to use \mathord) so it's surely treated as an ordinary math atom. For \cdot one could consider {\cdot\,} to give it more room; the same for the period. – egreg Mar 7 '12 at 0:16
I think a resized textbullet is best. That is, a textbullet reduced in size to maybe 80% looks best. – Seamus Mar 7 '12 at 17:36

How about using a ?, or putting it in a \fbox.. If you still want to use the \cdot, you could use \makebox to reserve enough space.

\documentclass{article}
\newcommand*{\X}{\textbf{?}}%
\newcommand*{\Y}{\textbf{\fbox{?}}}%
\newcommand*{\Z}{\makebox[1ex]{\textbf{$\cdot$}}}%
\begin{document}
$g(y) = f(x,\X) = f(x,\Y)= f(x,\Z)$
\end{document}

-

Based on your last comment, I suggest to use a minus sign, that's widely used in category theory:

\newcommand{\blank}{{-}}


The additional braces mask its nature of binary operator, so it's treated as an ordinary symbol. Using a personal command allows you to change the symbol by only modifying its definition.

\documentclass{article}
\newcommand{\blank}{{-}}
\begin{document}
$f(x,\blank)$

$M\otimes_{R}\blank$
\end{document}


-

A placeholder is something used to denote or reserve a place for something to come later.

We can take an inspiration from cursors in text editors. They have usually the INSERT mode and the REPLACE mode. The cursor in the REPLACE mode is the character that is telling us: "I will be replaced with a provided character". And that's exactly what the placeholder in the equation is doing!

In the REPLACE mode text editors they use either:

Of these two I recommend the underscore character as it is already well established in programming languages: Python, Prolog, Scala, Haskell, Lua and many more, as a function argument that we don't care about.

That's why I recommend an underscore:

\documentclass{article}
\begin{document}
$f(x,\_)$
\end{document}

-
The actual representation of the placeholder is a question of taste and personal preference. It's more important that one uses a macro for it, so changing the representation doesn't require chasing in the document. So, even if it's just \newcommand{\blank}{\_}, such an indirect method is preferable to using \_ in the document. – egreg Mar 1 '15 at 23:24