45

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?)

5 Answers 5

45

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.

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

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

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

Rendered

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

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.

2

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.

1

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.

1
  • 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. Sep 18, 2010 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.