Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Here is my problem: I would like, as in some old maths books, use oldstyle figures as coefficients in math formulae – say in display- and textstyle, but lining figures for indices and exponents – say in script- and scriptscriptstyle. I'm not sure this is strictly equivalent, though. I guess that the use of the \mathchoice command would be useful, but I really don't know how to use it.

Does anyone know how to achieve this automatically?

Added: I forgot to say that a solution should work with any math font. It happens that the proposed solution, which works perfectly well with default TeX math fonts doesn't work with MinionPro. Maybe a specific problem of MinionPro?

share|improve this question
My solution works with all math fonts that define \mathnormal and have oldstyle digits in that font. As far as I know, MinionPro is not a math font. Without an example of what you're doing, it's impossible to tell. –  egreg Sep 10 '13 at 19:42

1 Answer 1

I wouldn't do it. Old books are not always examples of good typography.


  \AtBeginDocument{\mathcode`#1=\string"8000 }



$10x_0 + 11y_1$


enter image description here

You might want to add \scriptscriptstyle in the third argument to \mathchoice, which would give

enter image description here

or play with \DeclareMathSizes (see http://tex.stackexchange.com/a/58144/4427)

If you want to have all digits always oldstyle, change the code between \makeatletter and \makeatother into


enter image description here

Of course, this last code can be substituted with


and similar lines for the other digits.

share|improve this answer
you might try this as a "good bad example": $10x_0 + 11y_1$ –  barbara beeton Sep 10 '13 at 16:04
@barbarabeeton WOW! ;-) –  egreg Sep 10 '13 at 16:06
hmmm. now that i see the result, i think $3z_3$ or $9z_9$ would add some "interest". the likelihood that this combination of styles might be applied to material with pre-scripts is pretty low, but that could inject even more possible ambiguity. –  barbara beeton Sep 10 '13 at 16:52
@bernard Note that I changed the code (the digit 8 was missing). Try the input proposed by barbara and you'll see why I consider this bad style. –  egreg Sep 10 '13 at 16:56
one place where old-style figures are good in "math" is in tables with long strings of numbers, or the expansion of a numerical representation of $\pi$. the varying shapes helps keep one from "getting lost". but be sure (in tables) to use digits with uniform widths. in the "text" form of digits, some (such as "1") are naturally narrower. –  barbara beeton Sep 10 '13 at 16:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.