TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

When I write something like

$|x_n y_n - xy|<\epsilon$

the n's in the subscripts are placed at different depths, which looks awkward in my opinion. For instance, see this post over on MathematicsSE which is where I noticed the problem (although I have run into this several times).

I think it would look best to align the n's, either moving the subscript of "y" up or that of "x" down. Can this be done? And is this considered "good practice" for pure mathematics papers?


share|improve this question
In my opinion, you should use the default way, that is, as you did. Don't change it, let TeX do it for you. – Sigur Apr 29 '14 at 0:51
@MMA: Neither the example in the question nor the formulas in the link have any superscripts and primes. – Heiko Oberdiek Apr 29 '14 at 1:01
@HeikoOberdiek But both talked about misalignment of subscripts. Retracted my close vote anyway after seeing your answer. – Masroor Apr 29 '14 at 1:22
up vote 7 down vote accepted

Too long for a comment.


The subscript can be lowered, if there is an superscript present. But both the example in the question and the examples in the link do not use superscripts.

In the following example, the subscripts are at the exact vertical position:

\showboxdepth=1000    % for \showlists
\showboxbreadth=1000  % for \showlists
\tracingonline=1      % additionally the output of \showlists is shown on the console
$|x_n y_n - xy|<\epsilon$
\showlists            % shows the boxes of the current main vertical list


An excerpt from the .log file for x_n y_n:

\OML/cmm/m/it/10 x
\hbox(3.01389+0.0)x5.44333, shifted 1.49998
.\OML/cmm/m/it/7 n
\OML/cmm/m/it/10 y
\hbox(3.01389+0.0)x5.44333, shifted 1.49998
.\OML/cmm/m/it/7 n

Both subscripts are in \hboxes, which are shifted below the baseline by the exact same value of 1.49998pt.


I think your issue is with Mathjax, screen shot from the link in the question that uses it for the formula:


share|improve this answer
Nice! What was it that made the change though? (I'm a total beginner) What do \showboxdepth, \showboxbreadth, \tracingonline do? And if I just copied that into the top of a document, would it drastically affect subscripts on everything? Would that be a bad idea? – user50612 Apr 29 '14 at 1:04
Oh the problem is just Mathjax? So I don't need to change anything? – user50612 Apr 29 '14 at 1:31
@user50612: I do not see, what you could do differently without messing up the formula entirely in the source. – Heiko Oberdiek Apr 29 '14 at 1:37
You are right, it looks fine on my computer. Cheers! – user50612 Apr 29 '14 at 1:47
Indeed, this is a bug in MathJax's HTML-CSS output, which is being fixed in the next release. See the issue tracker for this problem. – Davide Cervone Sep 14 '14 at 15:06

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.