Take the 2-minute tour ×
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.

If a mathematical symbol has both subscript and superscript, is there a best practice which should come first?

I have seen both, for example $\sum_{t=0}^3$ and $\sum^3_{t=0}$. AFAIK they give identical output. Personally, I find the first version much easier to read. It confuses me a lot if both versions are used in the same document.

Is one of the two forms considered best practice?

share|improve this question
7  
for whatever it's worth, in the texbook, knuth tends to place subscripts before superscripts except when using the apostrophe shorthand for \prime, or when (visual) order is important as with tensor notation (and physical separation with {} is required to preserve the order). –  barbara beeton Jul 11 '12 at 13:42
add comment

2 Answers

up vote 32 down vote accepted

TeX treats them both the same. Normally I would use _ first then ^.

In examples like you gave with \sum I'd normally say the lower bound first as in "sum from 0 to n...." and the other place where I'd use both is in subscripted variables: if it is xi squared I think x_i^2 is more natural than x^2_i.

share|improve this answer
2  
It does indeed happen, that the upper index is not a power but another dimension of indexing. So for example if you have multiple vectors in an euclidean space where the lower index enumerates the dimensions, writing (x^1_1, x^1_2, x^1_3), (x^2_1, x^2_2, x^2_3) seems more natural. Of course then it should also be spoken in that order. –  canaaerus Jul 11 '12 at 15:15
3  
yes of course (which is probably why TeX allows either way) of course sometimes the reader needs help in knowing the order and it is better to do {x^i}_j or {x_j}^i rather than x_j^i which forces the indices to be staggered into a (hopefully) semantically helpful order rather than being set tight against the base. –  David Carlisle Jul 11 '12 at 15:46
add comment

In my admittedly simplistic world-view of maths notation, it seems to me that the better order (in some sense), all else being equal, would be the order in which you "say" it (either verbally or just moving your lips as you read).

Thus:

\sum_0^1 ("Sum from 0 to 1") rather than \sum^1_0 ("Sum to 1 from 0")

or

a_i^x ("a, the ith one, to the power x") rather than a^x_i ("a to the power x, the ith one" --rather Yoda-like, I think)

(Made this answer CW -- just read Hans-Peter's comment, which says the same thing)

share|improve this answer
add comment

Your Answer

 
discard

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.