10

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.

3
  • 3
    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. Commented Mar 2, 2012 at 20:14
  • 1
    Hatcher makes global changes to sub- and superscript behavior for Algebraic Topology. The code used to make these changes is described here.
    – Zach N
    Commented Mar 3, 2012 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'
    Commented Mar 3, 2012 at 11:35

1 Answer 1

4

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?

1
  • 1
    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
    Commented Mar 3, 2012 at 15:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .