# Force linear scaling of subscripts and superscripts

Perhaps I am being very picky but this font that I am using uses designed fonts for subscripts and superscripts when I want it to use scaled fonts. Their designed subscript and superscript fonts are too short and fat for my liking. Does anyone care enough to devise a way to force all subscripts and superscripts to use scaling instead of designed fonts? For example, a first level subscript or superscript will be scaled to 70% of the original font, instead of using another set of fonts that were designed specifically to be a sub/superscript.

To be more clear, I was talking about sub/superscripts for math only and yes i wanted scaled fonts for second-order sub/superscripts as well. The font I am mainly interested in is Math Time Pro 2 (the lite version) but it was more of a general question. The reason why I want this behavior is because I've read some books (such as Griffiths Intro to Quantum Mechanics, McQuarrie & Simon Physical Chemistry) that uses the old Math Time I believe, but not Pro 2 version so these books have linear scaling for the sub/superscripts (instead of designed sub/superscripts) and they look a lot better.

-
Please provide more information, e.g., about the font in question, whether you're using pdf/xe/lua-latex, whether this is about math and/or text in the superscripts, and whether you need to change both first- and second-order subscripts. –  Mico Sep 27 '11 at 10:46

LaTeX chooses math font sizes with two mechanisms; the first one is through \DeclareMathSizes and fontmath.ltx (a file read in at format creation time) contains the following lines

 \DeclareMathSizes{5}{5}{5}{5}
\DeclareMathSizes{6}{6}{5}{5}
\DeclareMathSizes{7}{7}{5}{5}
\DeclareMathSizes{8}{8}{6}{5}
\DeclareMathSizes{9}{9}{6}{5}
\DeclareMathSizes{\@xpt}{\@xpt}{7}{5}
\DeclareMathSizes{\@xipt}{\@xipt}{8}{6}
\DeclareMathSizes{\@xiipt}{\@xiipt}{8}{6}
\DeclareMathSizes{\@xivpt}{\@xivpt}{\@xpt}{7}
\DeclareMathSizes{\@xviipt}{\@xviipt}{\@xiipt}{\@xpt}
\DeclareMathSizes{\@xxpt}{\@xxpt}{\@xivpt}{\@xiipt}
\DeclareMathSizes{\@xxvpt}{\@xxvpt}{\@xxpt}{\@xviipt}


The command has four arguments

1. #1 is a font size;
2. #2 is the font size to choose when \displaystyle or \textstyle are in force, that is, for common symbols in formulas;
3. #3 is the font size for first level subscripts and superscripts;
4. #4 is the font size for second (and above) level subscripts and superscripts.

If the current font size matches one declared with \DeclareFontSizes, then LaTeX uses the stated font sizes. Otherwise it uses some heuristics: more or less, it uses the same font sizes in \displaystyle or \textstyle, 70% of it for first level {sub|super}scripts and 50% for second level ones.

Control sequences are used for sizes from 10pt upwards (actually \@xipt expands to 10.95 for historical reasons, for example).

Therefore, in order to change {sub|super}script sizes at 12pt size, you can simply state, in your document preamble,

\makeatletter
\DeclareMathSizes{\@xiipt}{\@xiipt}{7}{5}
\makeatother


Other similar declarations are necessary for each font size you use and in which you typeset formulas.

The package (.sty) that accompanies MathTimePro fonts should contain some of these declarations: look at them, because they are different from those in fontmath.ltx; an old version of mathtime.sty I have around contains

\DeclareMathSizes{5}     {6}   {6}  {6}
\DeclareMathSizes{6}     {6}   {6}  {6}
\DeclareMathSizes{7}     {6.8} {6}  {6}
\DeclareMathSizes{8}     {8}   {6.8}{6}
\DeclareMathSizes{9}     {9}   {7.6}{6}
\DeclareMathSizes{10}   {10}   {7.6}{6}
\DeclareMathSizes{10.95}{10.95}{7.6}{6}
\DeclareMathSizes{12}   {12}   {9}  {7}
\DeclareMathSizes{14.4} {14.4} {10} {8}
\DeclareMathSizes{17.28}{17.28}{12} {9}
\DeclareMathSizes{20.74}{20.74}{14.4}{10}
\DeclareMathSizes{24.88}{24.88}{17.28}{12}


Recall that \@xpt is 10, \@xipt is 10.95, \@xiipt is 12, \@xivpt is 14.4, \@xviipt is 17.28, \@xxpt is 20.74, and \@xxvpt is 24.88

Here is an example, the five point size is just to show that the business works.

\documentclass[12pt]{standalone}

\DeclareMathSizes{12}{12}{5}{5}

\begin{document}
$A^{2}$---A\textsuperscript{2}
\end{document}


If the problem is not to use the optical sizes provided by MathTimePro (Lite) fonts, the document preamble should override the settings in mtpro2.sty and related files:

% From mtpro2.sty
\DeclareFontShape{LMP1}{mtt}{m}{it}{<-> mt2mit}{}
\DeclareFontShape{LMP1}{mtt}{b}{it}{<-> mt2bmit}{}
\DeclareFontShape{LMP2}{mtt}{m}{n}{<-> mt2syt}{\skewchar\font32}
\DeclareFontShape{LMP2}{mtt}{b}{n}{<-> mt2bsyt}{\skewchar\font32}
\DeclareFontShape{LMP2}{mtt}{eb}{n}{<-> mt2hsyt}{\skewchar\font32}
\DeclareFontShape{U}{mtt}{b}{n}{<-> mt2mbt}{}
\DeclareFontShape{U}{mt2sya}{m}{n}{<-> mt2syat}{}
\DeclareFontShape{U}{mt2sya}{b}{n}{<-> mt2bsyat}{}
\DeclareFontShape{U}{mt2sya}{eb}{n}{<-> mt2hsyat}{}
% From umt2bb.fd
\DeclareFontShape{U}{mt2bb}{m}{n}{<-> mt2bbt}{}
\DeclareFontShape{U}{mt2bb}{m}{it}{<-> mt2bbit}{}
\DeclareFontShape{U}{mt2bb}{b}{n}{<-> mt2bbdt}{}
% From umt2hrb.fd
\DeclareFontShape{U}{mt2hrb}{m}{n}{<-> mt2hrbt}{}
\DeclareFontShape{U}{mt2hrb}{m}{it}{<-> mt2hbit}{}
\DeclareFontShape{U}{mt2hrb}{b}{n}{<-> mt2hrbdt}{}
% From umt2mf.fd
\DeclareFontShape{U}{mt2mf}{m}{n}{<-> mt2mft}{}
\DeclareFontShape{U}{mt2mf}{b}{n}{<-> mt2bmft}{}
% From umt2ms.fd
\DeclareFontShape{U}{mt2ms}{m}{n}{<-> mt2mct}{}
\DeclareFontShape{U}{mt2ms}{m}{it}{<-> mt2mst}{}
\DeclareFontShape{U}{mt2ms}{b}{it}{<-> mt2bmst}{}


Not all font shapes may be defined in the Lite version.

-
The problem I am having is that when the superscripts take on say a size of 8pt or below it starts using a different set of fonts. This set of fonts are "designed" to be more clear so they are shorter and bolder. In your example, the "2" illustrates this: it is a much shorter looking 2 than a regular sized 2. So this is the thing I am complaining about. I want superscripts to use the same set of font as the 10pt set, only scaled by maybe 70% for the first order subscript and 50% so that the superscripts don't actually look short and fat. Sadly for me, "designed" superscripts are key features. –  Jeremy Sep 28 '11 at 9:25

For the current font, you can redefine the superscript macro. Same is possible for subscript.

\documentclass{article}
\usepackage{fixltx2e}
\begin{document}

2\textsuperscript{nd} floor H\textsubscript{2}O

\makeatletter
\def\@textsuperscript#1{%
{\m@th\ensuremath{^{\mbox{\fontsize{5pt}\z@#1}}}}}
\def\@textsubscript#1{%
{\m@th\ensuremath{_{\mbox{\fontsize{5pt}\z@#1}}}}}
\makeatother
2\textsuperscript{nd} floor H\textsubscript{2}O

\end{document}


-