# Redefine the default depth of superscript and subscript document-wide

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.

-
the superscript positioning is determined by the font parameters, which are set by the font but can be changed after the math fonts have been loaded. – David Carlisle Mar 2 '12 at 20:14
Hatcher makes global changes to sub- and superscript behavior for Algebraic Topology. The code used to make these changes is described here. – Z Norwood Mar 3 '12 at 0:01
@ZNorwood I believe that you should make this an answer (copy the code from the page you link and include the link as well), because it seems to be what Jon seeks for. – yo' Mar 3 '12 at 11:35

Math font management in LaTeX is a bit more complex; if one needs math only for the main font size (10pt), then improving that code to \sbox0{$\relax$<the code>} will do. – egreg Mar 3 '12 at 15:37