8

Is there any way to make all numbers written outside of math mode be rendered oldstyle while still using the Computer Modern font? I'm pretty partial to both, and also to not writing \oldstylenum every time I want one. Using Latex, by the way.

  • 2
    \usepackage{hfoldsty} or \usepackage{eco}? – jon Mar 31 '16 at 4:02
7

You could load the cfr-lm package, i.e., write \usepackage{cfr-lm} in the preamble. If the package is loaded in this way, old-style numerals will be used in text mode and lining numerals will be used in math mode. Latin Modern is a clone of Computer Modern; the basic glyphs (those in the ASCII set) are essentially indistinguishable from Computer Modern; you'll notice big improvements in some glyphs with accents and diacritics when using Latin Modern.

To get lining numbers, use either math mode or the package's \textl macro.

enter image description here

\documentclass{article}
\usepackage{cfr-lm}
\begin{document}
\obeylines % just for this example
\textl{0123456789}
$0123456789$
0123456789
\textbf{0123456789}
\textit{0123456789}
\textbf{\textit{0123456789}}
\textsf{0123456789}
\texttt{0123456789}
\end{document}

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.