I'd like to be able to place multiple sub and superscripts (in maths mode) on an element without having them expand vertically. That is, so that in the output of ${x^2_4}^6_8$, the 2 and 6 were aligned, as were the 4 and 8 (obviously, I'd expect to do this with a macro rather than the super- and subscript commands). As a bonus, it'd be nice to be able to control whether or not this appeared like $x^{26}_{48}$ or $x^{2\phantom{4}6}_{\phantom{2}4\phantom{6}8}$. And it would be nice to truly be able to do this incrementally, so that each subscript or superscript could be added without having to know all the previous ones (useful for adding stuff via macros). Simply writing $x^2_4{}^6_8$ wouldn't work as the latter super and subscripts wouldn't know the difference between x and X and ∏.

(see also non-kludgey left subscripts)

  • 5
    +1 this would be really useful for writing tensors in Einstein notation. I've thought about trying to figure out a way but never got around to it, so I'll be interested to see what answers come up.
    – David Z
    Jul 27, 2010 at 10:48

2 Answers 2


My answer to the linked question on "non-kludgy left index" also works here. Use the tensor package. The \tensor form leaves phantom spaces, while the \tensor* form compresses everything.

  • 1
    Should've checked CTAN myself ;-) +1
    – David Z
    Jul 27, 2010 at 18:40
  • It is a bit hard to find. (Which keywords would one search for?) I came across the package a short while back by accident when I was looking for some way to typeset nuclides. Jul 27, 2010 at 19:09

You could write $x{}^2_4{}^6_8$. (Note the additional curly braces before the first superscript and subscript.) This still does not take into account the dimensions of the symbol $x$, but at least vertical alignment is consistent.

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.