[Tex/LaTex] Subscripts in \sup and \inf showing at different heights in displaystyle

math-modesubscripts

Consider this example: \[\sup_{i\in I},\; \inf_{i\in I}\]. Upon rendering in display mode \[ \], the subscript in the supremum case is displayed significantly lower below the text than in the infimum. Is there a way to fix this? I know there exist packages that allow you to manually move stuff around, but I'm not familiar with them. Furthermore, why does this happen?

Best Answer

The subscript is lower with \sup than with \inf simply because the letter "p" goes below the baseline. You could change this behavior and define new commands where the subscript of \sup would be higher, or where the subscript of \inf would be lower.

For example,

\documentclass{article}
\usepackage{mathtools}
\newcommand{\newsup}{\mathop{\smash{\mathrm{sup}}}}
\newcommand{\newinf}{\mathop{\mathrm{inf}\vphantom{\mathrm{sup}}}}
\begin{document}
\begin{tabular}{ll}
Default:                            & \(\displaystyle \sup_{i\in I},\; \inf_{i\in I} \)    \\
Raised subscript in \verb|\sup|:    & \(\displaystyle \newsup_{i\in I},\; \inf_{i\in I} \) \\
Lowered subscript in \verb|\inf|:   & \(\displaystyle \sup_{i\in I},\; \newinf_{i\in I} \) \\
\end{tabular}
\end{document}

However, in both modified cases, it looks weird (at least in my opinion), since the subscript overlaps on the "p" in one case, and there is a lot of white space between \inf and its subscript in the other case. I agree that the default might not be entirely satisfying, but I think it's still the best.