

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer

What's the best way to write subsequences? $x_n_i$ gives an error, while $x_{n_{i}}$ works, but it just looks like $x_{ni}$ (the i isn't lowered enough below the n)...

share|improve this question
Related question: How to raise a superscript. The accepted answer there can be given a negative amount to lower the second subscript as much as you like. – Alan Munn Dec 13 '11 at 5:01
My honest answer is there are none. – percusse Dec 13 '11 at 5:08
I don't think the two questions are related. Rather, the current question is about how to group the indexing characters in order to achieve output that's both visually as well as mathematically pleasing. – Mico Dec 13 '11 at 5:59
up vote 48 down vote accepted

I'm a bit puzzled by your statement that $x_{n_i}$ would create output which "just looks like" that of $x_{ni}$ -- this is not the case in the following MWE (minimum working example). I have a hunch that what you want is $x_{n_i}$, but read on.

$x_{ni}$ or ${x_n}_i$ or $x_{n_i}$?

enter image description here

Clearly, the first expression, $x_{ni}$, can't be what you want. Note that ${x_n}_i$ and $x_{n_i}$ are both valid expressions from a purely syntactic point of view. However, they do not create the same output. In the former case, the character i is both lowered by a smaller amount and has a larger font size than is the case in the latter. (To be a bit TeXnical, in the first two expressions above, n and i are both typeset in "scriptstyle", whereas in the third expression n is in scriptstyle and i is in "scriptscriptstyle". For Computer Modern math fonts, "scriptstyle" is 30% linearly reduced from "textstyle", and "scriptscriptstyle" is 30% reduced from "scriptstyle" -- or ca 50% linearly reduced from "textstyle". Thus, if the textstyle font size is 10pt, scriptsize is 7pt and scriptscriptsize is 5pt.)

These differences in appearance are, of course, not accidental: in the middle expression above, the symbol i is a subscript/index to the subformula $x_n$, whereas in the final expression i indexes n which, in turn, indexes x. Put differently, in the final expression ${n_i}$ is a subformula that serves to index x.

If there's any chance for ambiguity as to which characters are supposed to index which other characters, you should not hesitate to use parentheses, brackets, or braces -- or whatever grouping symbols are appropriate in your math writing style -- to clarify the intended meaning of your writing.

Addendum, prompted by a follow-up communication from the OP. As the image above illustrates, there's not much visual difference in the appearance of the first and second cases, i.e., of $x_{ni}$ and ${x_n}_i$. In both cases, (a) the n and i characters are in scriptsize, and (b) the i's are set below the baseline by the same amount. The only visual difference, then, is that TeX sets the n in the second case in so-called "cramped subscript" mode, which differs from the "ordinary subscript" position by a (very) small amount.

share|improve this answer
Thanks! I think it was actually the font I was using that didn't make $x_{n_i}$ look lowered enough. – jamaicanworm Dec 13 '11 at 20:30
Just out of curiosity: Which font were you using? – Mico Dec 13 '11 at 20:57
See the addendum to my answer. – Mico Dec 13 '11 at 21:35
In arev, the letter i definitely looks very skinny, even anorexic, when it appears in the second-level subscript position. Sadly, only very few font families have so-called "multiple master" designs; if they're lacking this aspect, they'll look skinny at sizes well below the so-called "design size", and they'll look bulky at large sizes. – Mico Dec 13 '11 at 23:12
@Mico: Excellent answer. Somehow I never saw this question before, and think that this is the first time I thought I was reading an "egreg" answer and it turned out not to be one of his. – Peter Grill Apr 8 '13 at 7:01

Your Answer


