The Computer Modern Bright fonts and the L^{A}TEX package cmbright

Walter Schmidt^{∗}

(v7.0 – 1999/05/12)

Contents

1 The CM Bright fonts 2

2 The L^{A}TEX macro package cmbright 2 2.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Package options . . . . . . . . . . . . . . . . . . . . . . . . . 2

2.2.1 The option standard-baselineskips . . . . . . . . . . . 2 2.2.2 The option slantedGreek . . . . . . . . . . . . . . . . 3

2.3 Font encoding . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.4 Scaling of the ‘large’ math symbols . . . . . . . . . . . . . . 3 2.5 Known bugs and deficiencies . . . . . . . . . . . . . . . . . 3

3 Frequently asked questions 4

4 The package code 5 4.1 Text font families . . . . . . . . . . . . . . . . . . . . . . . . 5 4.2 Mathematical fonts . . . . . . . . . . . . . . . . . . . . . . . 5 4.3 Leading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.4 Old-style numerals . . . . . . . . . . . . . . . . . . . . . . . 7 4.5 Missing symbols . . . . . . . . . . . . . . . . . . . . . . . . 8 4.6 Patches for obsolete L^{A}TEX releases . . . . . . . . . . . . . . 8 4.7 Processing the options . . . . . . . . . . . . . . . . . . . . . 9 4.8 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . 9

∗walter.schmidt@arcormail.de

1 The CM Bright fonts

‘Computer Modern Bright’ is a family of sans serif fonts, based on Donald Knuth’s CM fonts. It comprises OT1, T1 and TS1 encoded text fonts of various shapes as well as all the fonts necessary for mathematical typesetting, incl. the AMS symbols.

CM Bright has been designed as a well legible standalone font. It is ‘lighter’ and less obtrusive than CM Sans Serif, which, in contrast, is more appropriate for markup purposes within a CM Roman environment.

Together with CM Bright there comes a family of typewriter fonts, named ‘CM Typwewriter Light’, which look better in combination with CM Bright than the ordinary cmtt fonts would do.

2 The L^{A}TEX macro package cmbright

2.1 Description

The L^{A}TEX macro package cmbright supports typesetting with the font family CM Bright. Loading the package

    \usepackage{cmbright}

effects the following:

• The default sans serif font family for typesetting text and math will be cmbr, i.e. CM Bright.

• The sans serif font family will be the default for the whole document.

• A new mathematical alphabet \mathbold provides bold slanted letters, inluding uppercase and lowercase Greek.

• The default typewriter font family is changed to cmtl, i.e. CM Typewriter Light.

• The line spacing (\baselineskip) for the font sizes 8–12 pt is increased to approx. 1.25 × size.

2.2 Package options

2.2.1 The option standard-baselineskips

This option will prevent the package from enlarging the default line spacing. This may, e.g., be useful with a twocolumn layout.

2.2.2 The option slantedGreek

When the macro package is loaded using this option, uppercase Greek letters will, by default, be slanted. Regardless of the option the new commands \upDelta and \upOmega will always provide an upright Δ and Ω.

2.3 Font encoding

The package does not change the default output font encoding from OT1. It is, however, recommended to make use of CM Bright through the extended T1 and TS1 encodings, since doing so does not imply any drawback. This is enabled by the following additional commands:

\usepackage[T1]{fontenc}
\usepackage{textcomp}

2.4 Scaling of the ‘large’ math symbols

In order to achieve proper scaling of the ‘large’ math symbols, the standard L^{A}TEX package exscale can be loaded additionally. It will work in conjunction with the CM Bright math fonts, too.

2.5 Known bugs and deficiencies

• In order to enlarge the default \baselineskip, the size-changing macros have been redefined, and they are no longer as robust as the original definitions. This may result in L^{A}TEX errors with ‘moving arguments’. As a workaround, you may protect any font-related commands in moving arguments with a \protect command. In case this does not help, the package should be loaded with the option standardbaselineskips which will prevent the commands from being redefined; you will, however, have to care for an appropriate line spacing by other means then.

• There is no ‘bold’ \mathversion to bolden complete formulae. (See, however, the mathematical alphabet \mathbold.)

• The textcomp package, if required, must be input after cmbright, otherwise the symbol \begin{matrix}r \\ ◯ \end{matrix} (\textregistered) is not taken from the text companion font. The same problem might occur, if (e.g. with future versions of L^{A}TEX) the TS1 encoding is included in the L^{A}TEX format. In both cases the symbol is typeset in roman style, instead of sans serif.

• Within the mathematical mode the symbol £ is treated as a text symbol, so its size and the surrounding space might be wrong under some circumstances.

• The package oldlfont cannot be used in conjunction with cmbright. (There should be no real need for doing so!)

• The package newlfont, if used in conjunction with the CM Bright fonts, must be input before cmbright.

3 Frequently asked questions

• Can I use the CM Bright fonts with a 300 dpi printing engine?

With large font sizes this is no problem at all. At 11 pt and below, however, the only advice which can be given, is: Try it out! Certain letters may be corrupt, depending on the Metafont mode; problems are known to occur with the caret accent,

• Typesetting a complete book using the CM Bright fonts, how would that look?

See the Proceedings of the Ninth European TeX Conference (1995). The fonts used were a beta release of CM Bright; the small sizes (< 10 pt) have been improved very much in the meantime. The book was printed at 600 dpi.

• Help! CM Bright does not provide ‘small capitals’.

Company names, acronyms, trade marks and similar material may be typeset capitalized instead. In order to make the result less obtrusive, the font size should be one ‘step’ smaller than the surrounding text. A ‘quick and dirty’ way to make L^{A}TEX perform this task is the following style file smcaps.sty. It defines the new command \textc, which may be used in place of \textsc:

 \ProvidesPackage{smcaps}
 \DeclareRobustCommand{\sm@ller}{%
    \dimen@\f@size\p@
    \ifdim \dimen@ > 12\p@
      \dimen@=0.83333\dimen@
    \else
      \advance \dimen@ -2\p@
    \fi
    \math@fontsfalse
    \fontsize{\the\dimen@}\z@
    \selectfont
 }
 \newcommand{\textc}[1]{{\sm@ller\uppercase{#1}}}

4 The package code

4.1 Text font families

The sans serif font family is made the default one:

1 ⟨∗cm⟩

 2 \renewcommand{\familydefault}{\sfdefault}

CM Bright is to be used as the default sans serif font family:

 3 \renewcommand{\sfdefault}{cmbr}

CM Typewriter Light is to be used as the default typewriter font family, because the cmtt fonts look too dark in combination with CM Bright:

 4 \renewcommand{\ttdefault}{cmtl}

4.2 Mathematical fonts

Default definitions which remain unchanged are commented out:

 5 \DeclareSymbolFont      {operators} {OT1}{cmbr}{m}{n}
 6 \DeclareSymbolFont        {letters} {OML}{cmbrm}{m}{it}
 7 \DeclareSymbolFont        {symbols} {OMS}{cmbrs}{m}{n}
 8 % \DeclareSymbolFont {largesymbols} {OMX}{cmex}{m}{n}
 9 %
10 % \DeclareSymbolFontAlphabet    {\mathrm} {operators}
11 % \DeclareSymbolFontAlphabet{\mathnormal} {letters}
12 % \DeclareSymbolFontAlphabet   {\mathcal} {symbols}

13 %

14 \DeclareMathAlphabet{\mathit} {OT1}{cmbr}{m}{sl}
15 \DeclareMathAlphabet{\mathbf} {OT1}{cmbr}{bx}{n}
16 \DeclareMathAlphabet{\mathtt} {OT1}{cmtl}{m}{n}

Despite its name, \mathrm is not a font with serifs, but it is, what the user expects it to be: the upright font used e.g. for operator names.

We do not set up a bold \mathversion, but we make a bold slanted mathematical alphabet available:

17 \DeclareMathAlphabet{\mathbold}{OML}{cmbrm}{b}{it}

The command \mathbold should act on lowercase greek letters, too:

18 \DeclareMathSymbol{\alpha}{\mathalpha}{letters}{11}
19 \DeclareMathSymbol{\beta}{\mathalpha}{letters}{12}
20 \DeclareMathSymbol{\gamma}{\mathalpha}{letters}{13}
21 \DeclareMathSymbol{\delta}{\mathalpha}{letters}{14}
22 \DeclareMathSymbol{\epsilon}{\mathalpha}{letters}{15}
23 \DeclareMathSymbol{\zeta}{\mathalpha}{letters}{16}
24 \DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{0}
25 \DeclareMathSymbol{\eta}{\mathalpha}{letters}{17}
26 \DeclareMathSymbol{\theta}{\mathalpha}{letters}{18}
27 \DeclareMathSymbol{\iota}{\mathalpha}{letters}{19}
28 \DeclareMathSymbol{\kappa}{\mathalpha}{letters}{20}
29 \DeclareMathSymbol{\lambda}{\mathalpha}{letters}{21}

30 \DeclareMathSymbol{\mu}{\mathalpha}{letters}{22}
31 \DeclareMathSymbol{\nu}{\mathalpha}{letters}{23}
32 \DeclareMathSymbol{\xi}{\mathalpha}{letters}{24}
33 \DeclareMathSymbol{\pi}{\mathalpha}{letters}{25}
34 \DeclareMathSymbol{\rho}{\mathalpha}{letters}{26}
35 \DeclareMathSymbol{\sigma}{\mathalpha}{letters}{27}
36 \DeclareMathSymbol{\tau}{\mathalpha}{letters}{28}
37 \DeclareMathSymbol{\upsilon}{\mathalpha}{letters}{29}
38 \DeclareMathSymbol{\phi}{\mathalpha}{letters}{30}
39 \DeclareMathSymbol{\chi}{\mathalpha}{letters}{31}
40 \DeclareMathSymbol{\psi}{\mathalpha}{letters}{32}
41 \DeclareMathSymbol{\omega}{\mathalpha}{letters}{33}
42 \DeclareMathSymbol{\varepsilon}{\mathalpha}{letters}{34}
43 \DeclareMathSymbol{\vartheta}{\mathalpha}{letters}{35}
44 \DeclareMathSymbol{\varpi}{\mathalpha}{letters}{36}
45 \DeclareMathSymbol{\varrho}{\mathalpha}{letters}{37}
46 \DeclareMathSymbol{\varsigma}{\mathalpha}{letters}{38}
47 \DeclareMathSymbol{\varphi}{\mathalpha}{letters}{39}

In case the package amsfonts is loaded additionally, we must ensure that the CM Bright versions of the AMS symbol fonts will be used:

48 \DeclareFontFamily{U}{msa}{}
49 \DeclareFontShape{U}{msa}{m}{n}{%
50 <5><6><7><8>cmbras8%
51 <9>cmbras9%
52 <10><10.95><12><14.4><17.28><20.74><24.88>cmbras10%
53 }{}
54 \DeclareFontFamily{U}{msb}{}
55 \DeclareFontShape{U}{msb}{m}{n}{%
56 <5><6><7><8>cmbrbs8%
57 <9>cmbrbs9%
58 <10><10.95><12><14.4><17.28><20.74><24.88>cmbrbs10%
59 }{}
  The slantedGreek option:
60 \DeclareOption{slantedGreek}{%
61 \DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{0}
62 \DeclareMathSymbol{\Delta}{\mathalpha}{letters}{1}
63 \DeclareMathSymbol{\Theta}{\mathalpha}{letters}{2}
64 \DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{3}
65 \DeclareMathSymbol{\Xi}{\mathalpha}{letters}{4}
66 \DeclareMathSymbol{\Pi}{\mathalpha}{letters}{5}
67 \DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{6}
68 \DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{7}
69 \DeclareMathSymbol{\Phi}{\mathalpha}{letters}{8}
70 \DeclareMathSymbol{\Psi}{\mathalpha}{letters}{9}
71 \DeclareMathSymbol{\Omega}{\mathalpha}{letters}{10}

72 }

73 \let\upOmega\Omega
74 \let\upDelta\Delta

4.3 Leading

The \baselineskip should be larger than with CM Roman. For text sizes, i.e. 8–12 pt, a value of 1.25 × size is recommended. In order to overwrite

the \baselineskip defined in the commands like \normalsize, \small,

etc., we use a trick from Frank Jensen’s package beton (v1.3). First we set up a table containing our \baselineskip values:

75 \def\bright@baselineskip@table
76 {<\@viiipt>10<\@ixpt>11.25<\@xpt>12.5<\@xipt>13.7<\@xiipt>15}

All the standard L^{A}TEX size-changing commands (\small, \large, etc.) are defined in terms of the \@setfontsize macro. This macro is called with the following three arguments: #1 is the size-changing command; #2 is the font size; #3 is the \baselineskip value. We modify this macro to check the

above \bright@baselineskip@table for an alternative \baselineskip

value:

77 \def\bright@setfontsize#1#2#3%
78 {\edef\@tempa{\def\noexpand\@tempb####1<#2}%
79  \@tempa>##2<##3\@nil{\def\bright@baselineskip@value{##2}}%
80  \edef\@tempa{\noexpand\@tempb\bright@baselineskip@table<#2}%
81  \@tempa><\@nil
82  \ifx\bright@baselineskip@value\@empty
83  \def\bright@baselineskip@value{#3}%
84  \fi
85  \old@setfontsize{#1}{#2}\bright@baselineskip@value}
Now we redefine \@setfontsize:
86 \let\old@setfontsize=\@setfontsize
87 \let\@setfontsize=\bright@setfontsize

The \baselineskip values specified in the above table should be appropriate for most purposes, i.e., for one-column material in the normal article/report/book formats. However, it is sometimes desirable to use a smaller value for \baselineskip, e.g. in two-column material. We therefore provide an option to turn off the above automatic mechanism for

\baselineskip settings:
88 \DeclareOption{standard-baselineskips}{%
89 \let\@setfontsize=\old@setfontsize}

Note that the \let-assignment has to be executed after \old@setfontsize has been defined; this is ensured by the fact that options are processed at the end of the package.

4.4 Old-style numerals

Old-style numerals are to be taken from CM Bright, too:

90 \def\oldstylenums#1{%
91 \begingroup
92  \spaceskip\fontdimen\tw@\font

 93  \usefont{OML}{cmbrm}{\f@series}{it}%
 94  \mathgroup\symletters #1%
 95 \endgroup

96 }

In the future this may change; old-style numerals could be taken from the text companion font, thus even providing ‘oldstyle bold extended’ etc.

4.5 Missing symbols

The OT1 encoded CM Bright fonts do not contain the symbol £. We must therefore redefine the commands \textsterling and \mathsterling. They will now use the roman text font family:

 97 \DeclareTextCommand{\textsterling}{OT1}{{%
 98 \rmfamily
 99 \ifdim \fontdimen\@ne\font >\z@
100  \itshape
101 \else
102  \fontshape{ui}\selectfont
103 \fi
104 \char`\$}}
105 \def\mathsterling{\textsl{\textsterling}}

Since there is no ‘caps and small caps’ font shape, the definition of \begin{matrix}r \\ ◯ \end{matrix} must be changed:

106 \DeclareTextCommandDefault{\textregistered}{%
107 \textcircled{{\rmfamily\scshape r}}}

4.6 Patches for obsolete L^{A}TEX releases

With a L^{A}TEX release previous to 1995/06/01 some macros from the L^{A}TEX kernel and the standard classes must be redefined, because they explicitely select a font with serifs:

108 ⟨∗patch⟩

109 \typeout{* This package `cmbright' contains patches}
110 \typeout{* to be used with obsolete versions of LaTeX.}
111 \typeout{* However, if your LaTeX is from 1995/06/01 or newer,}
112 \typeout{* you MUST redo the installation of the package,}
113 \typeout{* in order to generate it again, without the patches!}
114 \def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
115 \vskip \z@ \@plus.2\p@
116 {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
117  \parindent #2\relax\@afterindenttrue
118 \interlinepenalty\@M
119 \leavevmode
120 \@tempdima #3\relax
121 \advance\leftskip \@tempdima \hbox{}\hskip -\leftskip
122  {#4}\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep
123  mu$}\hfill \nobreak

124  \hbox to\@pnumwidth{\hfil\reset@font #5}\par}\fi}
125 \def\@eqnnum{{\reset@font(\theequation)}}
126 \DeclareOption{leqno}{
127 \renewcommand\@eqnnum{\hbox to .01\p@{}%
128  \rlap{\reset@font%
129  \hskip -\displaywidth(\theequation)}}}
130 \def\ps@plain{\let\@mkboth\@gobbletwo
131  \let\@oddhead\@empty\def\@oddfoot{\reset@font\hfil\thepage
132  \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
133 \pagestyle{plain}

134 ⟨/patch⟩

4.7 Processing the options

135 \ProcessOptions\relax

4.8 Initialization

We ensure that any package loaded after cmbright will find the new value of \baselineskip and the new \normalfont, which has a larger ‘em’ than CM Roman.

136 \normalfont\normalsize

137 ⟨/cm⟩

This file …

… cmbright.dtx contains the following DocStrip modules:

module: contents:

      cm  package cmbright

driver driver for documentaion
patch patches for L^{A}TEX release < June 1995

The module patch should only be selected together with cm.

The next line of code prevents DocStrip from adding the character table to all modules:

138 \endinput