[Tex/LaTex] Subscript not aligned when there is superscript

subscriptssuperscriptsvertical alignment

For example, A_{P_{i+1} P'_{i+1} P'_i} gives me something like this:

enter image description here

Right now I just add ^{ } to the first P to solve this problem. This there a systematic way to deal with this?

Best Answer

There is no real systematic way of dealing with this, unless you wrap your scripting into macro-form where you can place content in a more consistent way.

Moreover, this is probably not something that happens often, so some manual intervention via \vphantom takes care of the problem:

enter image description here

\documentclass{article}

\begin{document}

$A_{P_{i+1} P'_{i+1} P'_i}$

$A_{P^{\prime}_{i+1} P'_{i+1} P'_i}$

$A_{P^{\vphantom{\prime}}_{i+1} P'_{i+1} P'_i}$

\end{document}
Related Question