3

Consider the below single-line and multi-line subscripts.

a_{1,2,3} 
b_{
    \substack{
    1, 2, 3  \\
  + 4, 5, 6
    }
}

enter image description here

I wish to align the 1 and 4 in the multiline b subscript. Merely changing substack to an aligned environment however affects the font-size of the subscript.

b_{
    \begin{aligned}
    & 1, 2, 3  \\
  + & 4, 5, 6
    \end{aligned}
}

enter image description here

Use of aligned has increased the subscript font-size to be that of non-subscripted text. Haphazardly \scriptscriptstyle does not seem to affect the font-size.

b_{
    \scriptscriptstyle
    \begin{aligned}
    \scriptscriptstyle
    & 1, 2, 3  \\
    \scriptscriptstyle
  + & 4, 5, 6
    \end{aligned}
}

How can I create alignment in multi-line subscripts while preserving the subscript font-size?

1 Answer 1

2

Insert a \phantom component that matches the component causing the misalignment.

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
  & a_{1,2,3} \\
  & b_{
    \substack{
      \phantom{+} 1, 2, 3  \\
               +  4, 5, 6
    }}
\end{align*}

\end{document}
3
  • 2
    +1. I'd also consider inserting \!\! (two negative thinspaces) between b_{ and \substack, to "snug up" the two-line subscript material to its parent (b).
    – Mico
    Commented Jan 7, 2022 at 8:48
  • Ahh my actual use-case precludes a simple solution like phantom, since the subscripted expressions are complicated equations which need a more complicated alignment. This is the curse of stack exchange - it is impossible to create a minimum working example that satisfies the pedants while not misleading the answers! :^)
    – Anti Earth
    Commented Jan 28, 2022 at 0:52
  • @AntiEarth: Depending on your complicated setup, \phantom should still do the trick.
    – Werner
    Commented Jan 28, 2022 at 1:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .