9

I am currently using the following:

\documentclass[12pt,extrafontsizes]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
I have 1,233,345.6 cats.
\end{document}

I want old-style numerals, and using

\usepackage{cfr-lm}

gives them to me universally. However, as my document is more complicated than the MWE above, I'm worried that cfr-lm does other changes besides old-style numbering. Does it?

3
  • 1
    There are several options for cfr-lm; without knowing which ones you use it's impossible to say anything. What are you worried about, precisely?
    – egreg
    Mar 28, 2014 at 21:50
  • 1
    I'm worried that the defaults would change something besides old-style numbers, i.e., all I want is my current lmodern (which is loaded by memoir by default) with old-style numbers; no other change.
    – bombcar
    Mar 28, 2014 at 21:52
  • Yes; it makes your document about 500x more awesome by using old style numbers.
    – Canageek
    Mar 30, 2014 at 19:25

2 Answers 2

6

Compare the fonts you get with or without the cfr-lm package

\documentclass{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{cfr-lm}
%\usepackage{lmodern}

\usepackage{fonttable}

\newcommand{\printfontdimen}[1]{%
  \texttt{\string\fontdimen#1: }%
  \expandafter\texttt\expandafter{\the\fontdimen#1\font}%
}

\begin{document}
\fonttable{\fontname\font}
\newpage
\noindent
\printfontdimen{1}\\
\printfontdimen{2}\\
\printfontdimen{3}\\
\printfontdimen{4}\\
\printfontdimen{5}\\
\printfontdimen{6}\\
\printfontdimen{7}

\end{document}

Here is the font table:

font table

And here is the list of font dimensions:

font dimensions

Do the comparison when lmodern is loaded instead. You'll notice that also the typewriter type font has oldstyle digits, which probably you don't want.

As the documentation reports, loading the package without options is equivalent to doing

\usepackage[
  rm={oldstyle=true,proportional=true},
  sf={oldstyle=true,proportional=true},
  tt={oldstyle=true,proportional=true,variable=true},
  qt=false,
]{cfr-lm}

so you probably want to have

  tt={lining=true,tabular=true,variable=false},

Also sans serif oldstyle figures are not recommendable, in my opinion. Here's how the font dimensions table appears with this call

enter image description here

3
  • Thanks, that's perfect. Is it possible to switch back to new style in an environment, such as a tabular?
    – bombcar
    Mar 28, 2014 at 22:12
  • @bombcar See section 7 of the documentation. If you want to have lining monowidth fonts in every tabular, use the suitable declaration within \AtBeginEnvironment{tabular}{...} (requires etoolbox).
    – egreg
    Mar 28, 2014 at 22:17
  • 1
    @bombcar Note that you would get exactly the same dimensions if you loaded neither lmodern nor cfr-lm so that Computer Modern was used. (memoir only uses Latin Modern with extrafontsizes.) This does show the font dimensions are the same and here that's enough but it does not show that the fonts are the same (although they are, as it happens).
    – cfr
    Mar 29, 2014 at 0:36
7

As egreg points out, cfr-lm with no options is equivalent to:

\usepackage[%
rm={oldstyle=true,proportional=true},%
sf={oldstyle=true,proportional=true},%
tt={oldstyle=true,proportional=true,variable=true},%
qt=false%
]{cfr-lm}

In addition to using oldstyle rather than lining figures, this means that loading cfr-lm without options will do the following:

  1. it will use virtual fonts for text rather than accessing the fonts directly
  2. it will use proportional figures for all text, rather than tabular ones
  3. it sets a variable width variant as the default \ttfamily
  4. it will define a new command \zeroslash
  5. it will set up microtype configuration if microtype is loaded
  6. it will load the following:
    1. fontenc with T1
    2. textcomp
    3. xkeyval
    4. nfssext-cfr

1 almost certainly makes no difference to you. 2 and 3 are easily changed using the appropriate options. 4 only matters if you use it. 5 is probably what you want if you use microtype and should make no difference if you don't.

6.1 you are loading anyway. Lots of packages use 6.3. 6.4 is unlikely to be problematic if you are using Latin Modern consistently. If you mix Latin Modern with other fonts, it has the potential for conflicts but it depends on the details of what you are doing. If you just use Latin Modern, it pretty much does nothing unless you use the additional commands it defines.

To access additional font shapes etc., you need to use the commands defined in nfssext-cfr. That is, cfr-lm is not compatible with fontaxes or similar.

You must log in to answer this question.

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