31

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?

1
  • 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). Jul 11, 2012 at 13:42

2 Answers 2

35

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.

2
  • 3
    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.
    – bodo
    Jul 11, 2012 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. Jul 11, 2012 at 15:46
22

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)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .