6

The following looks quite terrible, because \ell, f and x all have different sizes:

\documentclass{amsart}
\begin{document}
$q_\ell^{\scriptscriptstyle {\alpha}_{c\ell}}
 q_f^{\scriptscriptstyle {\alpha}_{cf}}
 q_x^{\scriptscriptstyle {\alpha}_{cx}}
$\\[12pt]
$ c_f^{\scriptscriptstyle \beta_f} 
c_\ell^{\scriptscriptstyle \beta_\ell}
c_m^{\scriptscriptstyle \beta_m}$
\end{document}

specifically like this:

enter image description here

Not only are the vertical sizes non-uniform, but the horizontal gap between c and f is greater than between c and \ell and between c and x. Is there a way to produce output where the three lines of code produce uniform output?

2 Answers 2

3

You can adjust the sub and superscript parameters see

What do different \fontdimen<num> mean

for a full list

enter image description here

By increasing the default amount they are raised or lowered you can get them lining up, the values here just chosen by eye, the original values shown in the log are

3.62892pt
2.47217pt

With the modified file being

\documentclass{amsart}
\begin{document}
\sbox0{$x$}% force math to load

\typeout{\the\fontdimen14\textfont2}
\fontdimen14\textfont2=5pt

\typeout{\the\fontdimen17\textfont2}
\fontdimen17\textfont2=5pt

$q_\ell^{\scriptscriptstyle {\alpha}_{c\ell}}
 q_f^{\scriptscriptstyle {\alpha}_{cf}}
 q_x^{\scriptscriptstyle {\alpha}_{cx}}
$\\[12pt]
$ c_f^{\scriptscriptstyle \beta_f} 
c_\ell^{\scriptscriptstyle \beta_\ell}
c_m^{\scriptscriptstyle \beta_m}$


\bigskip


$q_\ell^{{\alpha}_{c\ell}}
 q_f^{{\alpha}_{cf}}
 q_x^{{\alpha}_{cx}}
$\\[12pt]
$ c_f^{\beta_f} 
c_\ell^{\beta_\ell}
c_m^{\beta_m}$

\end{document}

I also show the version with normal sized superscripts (which look better to me especially as they are themselves subscripted)

6

You can use a number of \vphantoms, choosing the largest component - f - and \vphantom{f} with the other, smaller elements:

enter image description here

\documentclass{amsart}

\begin{document}

$q_\ell^{\scriptscriptstyle {\alpha}_{c\ell}}
 q_f^{\scriptscriptstyle {\alpha}_{cf}}
 q_x^{\scriptscriptstyle {\alpha}_{cx}}
$\quad
$q_{\vphantom{f}\ell}^{\alpha_{c\ell\vphantom{f}}}
 q_f^{\alpha_{cf}}
 q_{\vphantom{f}x}^{\alpha_{cx\vphantom{f}}}
$

\bigskip

$c_f^{\scriptscriptstyle \beta_f} 
c_\ell^{\scriptscriptstyle \beta_\ell}
c_m^{\scriptscriptstyle \beta_m}$\quad
$c_f^{\beta_f} 
c_{\vphantom{f}\ell}^{\beta_{\ell\vphantom{f}}}
c_{\vphantom{f}m}^{\beta_{m\vphantom{f}}}$

\end{document}

The spacing can be adjusted using any of the methods suggested in What commands are there for horizontal spacing?.

1
  • Thanks very much to both of you. I accepted David's answer because it was simpler to implement. Commented Dec 25, 2020 at 19:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.