When writing formulas regarding relativity, I often need to write tensor symbols where the ordering of the indices (in sub- and superscript) matters. That is, I want to have several sub- and superscripts with matching height. Ideally I would like to type
\[ T^\mu_\nu^\rho^\sigma_\eta \]
and get the same result as for
\[ T^\mu\vphantom{T}_\nu\vphantom{T}^\rho\vphantom{T}^\sigma\vphantom{T}_\eta \]
I imagine a solution where I make ^
and _
(math-)active to accomplish that, however I would need the height of the box preceding the first ^
or _
. As I understand it, obtaining this (at least directly) is impossible, because TeX swallows the T
before reading the ^
in my example. Is this accurate?
Is it possible to instead determine the height a sub- or superscript is lowered or elevated from within the sub-/superscript? That way I could save this height for the following sub-/superscripts.
Note: I do realize that this problem could easily be circumvented by placing a macro right before the tensor name and that that may be a cleaner TeX style. This question is more about the possibility of tweaking TeX to behave this way.