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?

  • 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
    Commented Sep 10, 2013 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 https://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.

  • 2
    you might try this as a "good bad example": $10x_0 + 11y_1$ Commented Sep 10, 2013 at 16:04
  • @barbarabeeton WOW! ;-)
    – egreg
    Commented Sep 10, 2013 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. Commented Sep 10, 2013 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
    Commented Sep 10, 2013 at 16:56
  • 1
    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. Commented Sep 10, 2013 at 16:56

You must log in to answer this question.

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