[Tex/LaTex] putting two indices and exponents side to side

horizontal alignmentmath-modevertical alignment

I did not find the answer to my following question on the web. I apologize in advance if this question has already been answered somewhere. I would like to write a matrix with the two subscripts and exponents side by side, like in the following latex command.

${\left( T_{ij}\right)_{i=1}^n}_{j=1}^{p}$

However, in the command above, the indices and exponents are not at the same height. Does anyone know how to put them at the same height (while keeping them horizontally aligned)?

Best Answer

A workaround:

\documentclass{article}

\begin{document}
$ {            \left( T_{ij} \right)     _{i=1} ^{n} }
  { \vphantom{ \left( T_{ij} \right) } } _{j=1} ^{p} $
\end{document}

Result

Remark:

  • A \vphantom makes an invisible box with width zero, but the height and depth of the formula.