I am using Computer Modern font (default) with \oldstylenums command to typeset numbers in oldstyle format. However I am having trouble using it with non-numeric characters such as decimal points and hyphens.

For e.g. decimal points appear as triangles:

Master of Science, Computer Science, \oldstylenums{3.76/4.0}

appears as:

enter image description here

Also, I have trouble with hyphens, etc.

Please suggest remedies.

  • I have to point out that it's really easy to get oldstyle numbers with fontspec, meaning with XeTeX and LuaTeX and OpenType fonts (like lmodern). Oct 8, 2012 at 12:45

3 Answers 3


redefines \oldstylenumsto use the 8-bit encoding TS1 instead of the 7-bit math encoding OML.

Extended support

The following example parses the string to replace the digits by the old style variants.




Master of Science, Computer Science, \oldstyle{0-1--2---3; 7, 3.76/4.0}


  • 1
    Good things, when short, are twice as good :)
    – Fran
    Oct 7, 2012 at 2:29
  • @HeikoOberdiek: Thanks for the suggestion, it solves the decimal point problem, but hyphen is now converted to = symbol. Oct 7, 2012 at 2:30
  • 1
    @abhinavkulkarni, but on the contrary, = is converted to a long hyphen in this way.
    – Fran
    Oct 7, 2012 at 2:36
  • @Fran: Thanks. How can I get the short hyphen? Oct 7, 2012 at 2:37
  • 1
    @abhinavkulkarni, I do not know with a single key, but please see the trick of \sout in my answer. It works also with textcomp.
    – Fran
    Oct 7, 2012 at 2:57

If you want old style figures throughout your document, you have a couple of choices assuming you still want to use the Computer Modern fonts or variations thereof.

Package eco


Package cfr-lm


The second package uses the Latin Modern fonts, which are very similar to Computer Modern; the first one uses a set of virtual fonts based on European Modern, again a variation of Computer Modern. I'd favor the latter.


I suppose that the best practice would be to leave out characters other than digits.

However, I could be a little messy, but you can obtain decimal points (mid point or down point), hyphens and fractions inside \oldstylenums in this way:

\usepackage{ulem} % needed for \sout{}
\oldstylenums{3·76=4·0 \sout{~} 3:76=4:0}

Another less tangled solution could be to define a newcommand for use \oldstylenums of another font that allow the use of normal characters inside the command:

\newcommand{\oldnum}[1]{{\fontfamily{artemisia}\scshape #1}}

\oldnum{3·76/4·0 - 3.76/4.0}

Note that in this case in there are text inside \oldnum, it appear as small caps instead of italics.


You must log in to answer this question.

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