[Tex/LaTex] On the position of multiple sub and superindices

positioningsubscriptssuperscripts

In tensorial analysis, the position of covariant and contravariant indices may be relevant. The following image shows the output of {A_i}^j and {\tilde{A}_i}^j:

Index positions

But I expect the second expression (with the tilde) to have the index j at the right of the index i. Why do they behave different? How can I obtain something like the first expression?

Also, I am trying to write an expression like {{{A_i}^j}_k}^m (see following figure), but I get the error Double subscript. How can I write something like this?

awful non-latex expression

Best Answer

To separate indices, insert some blank content between them. Or, use the tensor package:

enter image description here

\documentclass{article}

\usepackage{tensor}

\begin{document}

${A_i}^j$ and ${\tilde{A}_i}\mathstrut^j$.

$T_i\mathstrut^k\mathstrut_\ell\mathstrut^m$

\noindent\hrulefill

$A\indices{_i^j}$ and $\tilde{A}\indices{_i^j}$.

$T\indices{_i^k_\ell^m}$

\end{document}