Typesetting with the Computer Modern Bright fonts

Walter Schmidt^{∗}

(v6.7 – 1998/11/14)

1 Description

The L^{A}TEX macro package cmbright supports typesetting with the font family ‘Computer Modern Bright’. See the documentation to the file cmbr.fdd for the font shapes available in this family. Loading the package

\usepackage{cmbright}

will effect the following:

• The default sans serif font family will be cmbr, i. e Computer Modern Bright. These fonts are available in OT1 (traditional) as well as in T1 (EC) encoding.

• The sans serif font family will be the default for the whole document, in both text and math mode.

• The package textcomp, if loaded additionally, will provide all text companion symbols in CM Bright style.

• A new mathematical alphabet \mathbold will provide bold slanted letters.

• The packages amsfonts or amssymb, if loaded additionally, will use the CM Bright versions of the AMS symbol fonts.

• The default typewriter font family will be cmtl, i. e. CM Typewriter Light, which blends better with CM Bright than the cmtt fonts do.

∗wschmi@ibm.net

• The \baselineskip for the font sizes 8–12 pt will be increased to approx. 1.25 × size. If you do not want the enlarged leading, e. g. with a twocolumn layout, you may load the package with the option

standard-baselineskips:
    \usepackage[standard-baselineskips]{cmbright}

2 Problems and known bugs

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

• The textcomp package, if needed, must be input after cmbright, otherwise the symbol \begin{matrix}r \\ ◯ \end{matrix} (\textregistered) will not be 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 will be of roman type, 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 The code

3.1 Text font families

The sans serif font family will be the default one:

1 ⟨∗cm⟩

2 \renewcommand{\familydefault}{\sfdefault}

CM Bright will be the default sans serif font family:

3 \renewcommand{\sfdefault}{cmbr}

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

4 \renewcommand{\ttdefault}{cmtl}

3.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 are 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 }{}

3.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:

60 \def\bright@baselineskip@table
61 {<\@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:

62 \def\bright@setfontsize#1#2#3%
63 {\edef\@tempa{\def\noexpand\@tempb####1<#2}%
64  \@tempa>##2<##3\@nil{\def\bright@baselineskip@value{##2}}%
65  \edef\@tempa{\noexpand\@tempb\bright@baselineskip@table<#2}%

66  \@tempa><\@nil
67  \ifx\bright@baselineskip@value\@empty
68  \def\bright@baselineskip@value{#3}%
69  \fi
70  \old@setfontsize{#1}{#2}\bright@baselineskip@value}
Now we redefine \@setfontsize:
71 \let\old@setfontsize=\@setfontsize
72 \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 vaue for \baselineskip, e. g. in two-column material. We therefore provide an option to turn off the above automatic mechanism for

\baselineskip settings:
73 \DeclareOption{standard-baselineskips}{%
74 \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.

3.4 Old-style numerals

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

75 \def\oldstylenums#1{%
76 \begingroup
77  \spaceskip\fontdimen\tw@\font
78  \usefont{OML}{cmbrm}{\f@series}{it}%
79  \mathgroup\symletters #1%
80 \endgroup

81 }

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

3.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:

82 \DeclareTextCommand{\textsterling}{OT1}{{%
83 \rmfamily
84 \ifdim \fontdimen\@ne\font >\z@

 85  \itshape
 86 \else
 87  \fontshape{ui}\selectfont
 88 \fi
 89 \char`\$}}
 90 \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:

 91 \DeclareTextCommandDefault{\textregistered}{%
 92 \textcircled{{\rmfamily\scshape r}}}

3.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:

93 ⟨∗patch⟩

 94 \typeout{* This package `cmbright' contains patches}
 95 \typeout{* to be used with obsolete versions of LaTeX.}
 96 \typeout{* However, if your LaTeX is from 1995/06/01 or newer,}
 97 \typeout{* you MUST redo the installation of the package,}
 98 \typeout{* in order to generate it again, without the patches!}
 99 \def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
100 \vskip \z@ \@plus.2\p@
101 {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
102  \parindent #2\relax\@afterindenttrue
103 \interlinepenalty\@M
104 \leavevmode
105 \@tempdima #3\relax
106 \advance\leftskip \@tempdima \hbox{}\hskip -\leftskip
107  {#4}\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep
108  mu$}\hfill \nobreak
109  \hbox to\@pnumwidth{\hfil\reset@font #5}\par}\fi}
110 \def\@eqnnum{{\reset@font(\theequation)}}
111 \DeclareOption{leqno}{
112 \renewcommand\@eqnnum{\hbox to .01\p@{}%
113  \rlap{\reset@font%
114  \hskip -\displaywidth(\theequation)}}}
115 \def\ps@plain{\let\@mkboth\@gobbletwo
116  \let\@oddhead\@empty\def\@oddfoot{\reset@font\hfil\thepage
117  \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
118 \pagestyle{plain}

119 ⟨/patch⟩

3.7 Processing the options

120 \ProcessOptions\relax

3.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.

121 \normalfont\normalsize

122 ⟨/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:

123 \endinput