TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two equations:

            a_x &= - \sin \alpha \cos \beta    \\
            a_y &= \cos \alpha \cos \beta

This works very nicely. However I would find the result prettier if there were a white space under the negative sign. That is, not like this:

a_x = - sin ...
a_y = cos ...

but rather like this :

a_x = - sin ...
a_y =   cos ...

So, white space problem or alignment problem? I could just place a whitespace there, like \. or \,, but I do not know how wide the negative sign is. I cannot put more & in my lines because that makes aligned think I have many equations on the same line.

What are the best practices here?

share|improve this question
up vote 15 down vote accepted

These adjustments have to be done manually, of course, because they depend on the actual interrelation between formulas.

With \hphantom{...} you can leave the space that would be occupied by the argument:

  a_x &= - \sin \alpha \cos \beta    \\
  a_y &= \hphantom{-}\cos \alpha \cos \beta

A subtle point is that \hphantom always creates an object that behaves like normal letters with respect to surrounding spaces, so sometimes one has to help TeX by telling the type of the object, putting it as the argument of \mathbin or \mathrel (if it must match an operation symbol or a relation, respectively). In this case the "minus sign" is treated as an ordinary symbol, so no adjustment is necessary.

I wouldn't use cases in this particular formula, but it doesn't harm either (it just adds an unnecessary level).

share|improve this answer
Is there a material difference between \phantom{...} and \hphantom{...} -- in the present case of adding horizontal space the width of a math-minus symbol? Just curious. – Mico Feb 15 '12 at 13:57
@Mico No, not in this particular case. But it's best to stick with \hphantom when only horizontal spacing is needed. There's a big difference between \hphantom{\sum} and \phantom{\sum}, for example; in some cases the latter should be used, when we have to take care also of the vertical spacing. – egreg Feb 15 '12 at 14:06
Invisible characters make a lot of sense, thanks for the tip. And also for pointing me to \mathbin and \mathrel, that might be handy soon. – Niriel Feb 16 '12 at 9:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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