The question can be found around but with no satisfactory answer. I want to position the subscript more down and superscript more up.
The code to test it on is simple:
$1.23_{-22.22}^{-1.23221}$
The major requirement, no phantom boxes and other ugly tricks should be used. The sub- and superscripts have to be written as suggested above. Further, I want to enable the "improved positioning" and then return to the standard positioning (I have a large table with the numbers as suggested above). There is a suggestion here. But the author does it only for subscripts and superscripts separately. For the case when both super and subscripts are used, he refers to the tex book appendix G, I tried to look at it, but I do not really have no idea how to connect the ideas, I am the latex user not developer. The mentioned text also provides a good example how I would like the super and sub scripts to look like. Also, I would like the superscript and subscript to be left aligned with each other if that is possible.
Best Answer
Your referenced article alters
\fontdimen14
for superscripts and\fontdimen16
for subscripts.You need to alter
\fontdimen17
as well, for the case of simultaneous super and subscripts (note:\textfont2
works for display and text math styles only. For the script and scriptscript styles, use\scriptfont2
and\scriptscriptfont2
, respectively).Furthermore, if you wish to retain the higher superscript in cramped modes like under a radical, you need to also alter
\fontdimen15
.To have these
\fontdimen
s set temporarily, one should save the original values and restore them as desired.Here is how it might be done, across font sizes, with switchback to original dimensions: