When I add a subscript to a primed variable, the subscript is rendered lower than when it is a subscript to an unprimed variable.

For example, when I compile

$l_x l'_x l_x l'_x l_x l'_x$

I get

The subscript x is at a different height for the primed variables and the unprimed ones.

Any one have any idea why this is happening? And how I can fix this so that the subscript of the primed variable appears at the same height? (Or am I doing something wrong?)


This behaviour is intended, but not always desired. My somewhat neglected subdepth package alters this so the subscript height is constant in these situations. Just load the package.

  • 4
    FYI subdepth doesn't always ensure the subscript height is constant. For example, $l_1 l^y_1$. – Lev Bishop Sep 18 '10 at 17:10
  • Seems like the best solution. – Robin Kothari Sep 18 '10 at 19:23
  • 1
    @Lev: Hmmm, you're right. I've added a bug to the issue tracker. Thanks. – Will Robertson Sep 19 '10 at 7:06

Try this. It's a bit cumbersome, but, I think, semantically reasonable:

$l^{}_x l'_x l^{}_x l'_x l^{}_x l'_x$


  • 2
    Only just saw Will Robertson's answer (subdepth). Probably the better way to go. – Brent.Longborough Sep 18 '10 at 15:40
  • 4
    @Whoever gave this a down vote: would you care to comment? – Brent.Longborough Sep 20 '10 at 6:41

The prime is just a superscript in TeX eyes, when you have both a subscript and superscript they are positioned differently to give more room between them.


You can also use l\mathrlap{'}_x (you need to usepackage{mathtools} to get the mathrlap command), which positions the subscript exactly like in l_x.


If you put curly braces around the object you're subscripting, e.g. {l'}_x, the subscript will appear at the same height as the others. However, the spacing of the prime and the subscript will not be the same as in your example, so this may not be the solution you want. You can also put curly braces around the object on which you want a prime, e.g. {l_x}', but this also alters the spacing of the prime and the subscript.

  • Yeah, the first solution has the problem that the subscript is too far from the variable. Ideally I'd like a solution that looks exactly like the unprimed version. – Robin Kothari Sep 18 '10 at 14:17

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.