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:

enter image description here

\usepackage{xcolor}% http://ctan.org/pkg/xcolor
  f(x,.) \quad f(x,\cdot) \quad f(x,\ast) \quad f(x,\star) \quad 
  f(x,\bullet) \quad f(x,\parm)

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.

  • 4
    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.

enter image description here

    $g(y) = f(x,\X) = f(x,\Y)= f(x,\Z)$

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


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.



enter image description here


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:

enter image description here

  • 1
    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

I use own macro:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.