# Superscript and subscript placement in adobe-utopia (mathdesign)

The vertical placement of superscripts and subscripts for inline math using the [adobe-utopia]{mathdesign} package is irregular. Here is an example.

\documentclass[12pt]{article}
\usepackage{amsmath,pstricks}

\begin{document}

Inline:

$$G_a(c^*_a,c^*_b)=c^*_a$$
\psline[linewidth=0.1pt,linecolor=red](-2,0.14)(0,0.14)
\psline[linewidth=0.1pt,linecolor=red](-2,-0.13)(0,-0.13)

$$G_a(c_a,c_b)=c_a$$
\psline[linewidth=0.1pt,linecolor=red](-2,-0.06)(0,-0.06)

$$G_a(c^*_a,c^*_{\smash{b}})=c^*_a$$
\psline[linewidth=0.1pt,linecolor=red](-2,0.14)(0,0.14)
\psline[linewidth=0.1pt,linecolor=red](-2,-0.13)(0,-0.13)

\end{document}


This file generates the following output. In the first line, the asterisks are not aligned---the second one is higher than the other two---and there is also a small misalignment of the subscripts (the b is slightly higher than the a's). When there are no superscripts (second line), the subscripts are perfectly aligned, and \smashing the b (third line) produces a perfect alignment of both subscripts and superscripts. The problem arises only for inline math: if the same expressions are displayed, the subscripts and superscripts are aligned.

I assume that this placement of the superscripts and subscripts is not intended, but is an error in the specification of the font. (The misalignment occurs when the subscript has a full-height ascender --- e.g. the lowercase letters b, d, f, h, and k, and any uppercase letter.)

My question is: what is the right way to fix the problem?

The answer by Ulrike Fischer to this question suggests that the font dimensions need to be changed, but if the placement of the superscripts and subscripts is controlled by the font dimensions, how they could be irregular to begin with? If this route is the right one, which dimensions should be specified, and what values should they take? (According to a comment on this question, the font dimensions are "clearly explained" in the TeXBook, but I find Appendix G, at least, completely opaque.)

• Yes it is fully explained in Appendix G, but is heavy slogging. The algorithm there shows how the character dimensions plus parameters in the font metrics are used to position sub/superscripts so they do not collide. I find your example odd in having SO much space between * and a, and to have b lowered less than a was. – Donald Arseneau Jun 25 '20 at 5:22