[Tex/LaTex] Redefine the default depth of superscript and subscript document-wide

fontsizemath-modesubscriptssuperscripts

The behavior of subscript and supscript operator _ and ^ is like a blackbox to me, I am curious if I could redefine the behavior of them globally for a document.

I searched the forum and found several threads in which partially this question had been addressed:

  • is it possible to change the depth of subscripts?: Joseph said about the {subdepth} package, but it just adjust redefining the subscript behavior when there is no superscript, and it is not customizable.

  • How to raise a subscript?: In this thread a more customizable option is presented in the accepted answer of Harald Hanche-Olsen, in which he defined the a nice newcommand snippet that I am using right now for tuning a specific sub/super-script, the command $\Letter_{\raisemath{2pt}{subscript}}$ would do the trick locally if we add his code snippet into the preamble.

My own solution right now is to define an xsub and an xsup manually like the following:

 \newcommand{\xsub}[3]{{#1}_{\raisebox{#2}{\scriptsize$#3$}}} 

But this is somewhat way too clunky, it makes me wanna micro-adjust every subscript position manually, quite inefficient for me at times.

Here I wonder if we could redefine a document-wide _ behavior such that every time _ is used, the \raisebox{1pt} is gonna be applied, or it is not possible to change the behavior _ and ^ in mathmode at all.

Best Answer

As described here, Hatcher globally changes the positioning of sub- and superscripts. The code he provides is

\fontdimen16\textfont2=2.5pt
\fontdimen17\textfont2=2.5pt
\fontdimen14\textfont2=4.5pt
\fontdimen13\textfont2=4.5pt 

I think the numbers here might be specific to the font he's using. Perhaps a font expert will comment on this?