Inconsistent superscript positioning

Observe the following examples of combinations of subscripts and superscripts:

  $\varphi_n$ $\varphi_n^m$ $\varphi_n^{f(n)}$ $\varphi_n^f$ $\varphi_n^($


We can see that if a superscript is added, the subscript is automatically lowered a bit. But for some reason, this doesn't happen with $\varphi_n^{f(n)}$. A quick exploration shows that the opening parenthesis is to blame.

Why doesn't the automatic lowering of the subscript work with a parenthesis? Is this a bug? How to fix it?

• As always on the site please provide a full (but minimal) example that others can copy and test as is. This may depend on several factors – daleif Jul 31 at 11:56
• You get the expected output in display math mode. In inline math mode, the excessive height+depth of the parenthesis triggers a different rule (which is somewhat unexpected, I admit). – egreg Jul 31 at 11:57
• @daleif: I've added the code. – user87690 Jul 31 at 12:04
• I think you meant $\varphi_n^{f(n)}$ – Med-Elf Jul 31 at 12:04
• @Electroelf Oh, sorry. I'm too used to type Unicode directly. :-) – user87690 Jul 31 at 12:04

\documentclass{article}
$\varphi_n$ $\varphi_n^m$ $\varphi_n^{f\smash{(n)}}$ $\varphi_n^f$ $\varphi_n^{\smash{(}}$

• +1. You may want to change $\varphi_n$ to $\varphi^{}_n$ in order to show how to lower the subscript material if there's no superscript material at all. – Mico Jul 31 at 16:38