8

I have an expression like

$$\eta^{[\alpha\beta}_{\phantom{\alpha\beta}\rho}h^{\sigma]}A^\rho$$

and I would like that all the indices alpha, beta, sigma and rho appear on a same line. If someone have a suggestion it will be great!

enter image description here

Phil
  • 81
  • Welcome! Do you want those [] to be rendered? What do they mean? Please do not use $$ $$ but \[ \] as the first is deprecated since years. – LaRiFaRi Mar 17 '16 at 11:17
  • 1
    Without those brackets, \[\eta^{\alpha\beta}_{\rho}h^{\sigma}A^\rho\] should be just fine. If it isn't, you will have to show us an MWE please! – LaRiFaRi Mar 17 '16 at 11:19
  • 1
    Hmmm... I can't really parse this expression --- can't really see what it "means" mathematically. Is the $h$ multiplying $\alpha\beta$ and has a pre-subindex $\rrho$ and exponent $\sigma$? or is $\sigma$ with two left-subindex multiplying $\alpha\beta$? I suggest a rewrite ;-) – Rmano Mar 17 '16 at 12:00

4 Answers4

6

What you need is \hphantom instead of just a \phantom:

\documentclass{article}
\begin{document}
\[
   \eta^{[\alpha\beta}_{\hphantom{\alpha\beta}\rho}h^{\sigma]}A^\rho
\]
\end{document}

enter image description here

AboAmmar
  • 46,352
  • 4
  • 58
  • 127
4

If the \phantom term is omitted, the superscript terms will be aligned correctly without further ado. The following screenshot shows (a) your original expression, (b) a first alternative that features the subscript \rho term far from \eta, and (c) a second alternative where the \rho subscript is placed closer to \eta.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin {align*}
\text{Orig.}\qquad &
\eta^{[\alpha\beta}_{\phantom{\alpha\beta}\rho}h^{\sigma]}A^\rho\\
\text{Alt.\ 1} \qquad&
{\eta^{[\alpha\beta}}_{\mkern-8mu\rho} \, h^{\sigma]} A^\rho\\
\text{Alt.\ 2} \qquad&
\eta^{[\alpha\beta}_{\rho} h^{\sigma]} \! A^\rho
\end{align*}
\end{document} 
Mico
  • 506,678
2

It is not ideal, but you could add a \mystrut to every base and embrace {} the base. EDITED to address barbara's concern by making the strut a custom \mystrut that does not go below the baseline.

\documentclass{scrreprt}
\def\mystrut{\rule{0pt}{\the\ht\strutbox}}
\begin{document}
\[{\mystrut\eta}^{[\alpha\beta}_{\phantom{\alpha\beta}\rho}
  {\mystrut h}^{\sigma]}{\mystrut A}^\rho\]
\end{document}

enter image description here

1

In this particular construction, you can set the sub-script to \eta as separate sub-script to {} (nothing). The combination of the super- and sub-script is causing a vertical shift of the scripts:

enter image description here

\documentclass{article}

\begin{document}

\[
  \eta^{[\alpha\beta} \!\! {}_\rho \, h^{\sigma]} A^\rho
\]

\end{document}

I've added some horizontal spacing to simulate the [dis]association of the \rho sub-script with \eta [h], but that's up to personal preference.

Werner
  • 603,163