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
    Sep 10 '13 at 19:42

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.

  • 1
    you might try this as a "good bad example": $10x_0 + 11y_1$ 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. 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. Sep 10 '13 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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