The file oldlfont.dtx for use with L^{A}TEX 2ε.^{∗} It contains the code for oldlfont.sty

Frank Mittelbach

March 27, 1996

1 Introduction

This file contains the code for the oldlfont package which emulates the following L^{A}TEX 2.09 font commands:

• The two-letter font-changing commands \rm, etc. are defined to cancel each other out as they did in L^{A}TEX 2.09.

• The two-letter font-changing commands are allowed in math mode.

• The latexsym package is loaded.

For full compatibility mode, the file latex209.def is loaded by \documentstyle.

The following modules are used in the implementation to direct docstrip in generating the external files:

driver  produce a documentation driver file
package produce oldlfont.sty
latex209 produce part of latex209.def

2 The Code

\math@bgroup \math@egroup To make ⟨math alphabet identifier⟩ work like simple font switches we change the

meaning of \math@bgroup and \math@egroup to \@empty. This emulates the

behavior of oldlfont.sty in NFSS1 setups. These definitions are not part of latex209 automatically, since to emulate 2.09 they are not necessary (all standard fonts are declared as math symbol fonts).

 1 \let\math@bgroup\@empty
 2 \let\math@egroup\@empty
 3 \let \@@math@bgroup \math@bgroup
 4 \let \@@math@egroup \math@egroup

∗This file has version number v2.2k, dated 1994/11/29.

The rest of this document describes code that is used in oldlfont.sty and

latex209.def.

5 ⟨∗package | latex209⟩

When emulating the old settings we don’t want a lot of NFSS information being displayed. Thus we required that the tracefnt package is loaded with the

option errorshow.
 6 \RequirePackage[errorshow]{tracefnt}

We define math alphabet identifiers for the typefaces described in the L^{A}TEX manual. This is straightforward. Some are already defined by the kernel code. And here are the other ones defined by the old L^{A}TEX. They all get declared as math symbol font alphabets. Thus we first allocate the additional symbol fonts.

 7 \DeclareSymbolFont{bold}{OT1}{cmr}{bx}{n}
 8 \DeclareSymbolFont{sans}{OT1}{cmss}{m}{n}
 9 \DeclareSymbolFont{typewriter}{OT1}{cmtt}{m}{n}
10 \DeclareSymbolFont{italic}{OT1}{cmr}{m}{it}
11 \DeclareSymbolFont{smallcaps}{OT1}{cmr}{m}{sc}
12 \DeclareSymbolFont{slanted}{OT1}{cmr}{m}{sl}

And here are the corresponding math identifiers.

13 \DeclareSymbolFontAlphabet\mathbf{bold}
14 \DeclareSymbolFontAlphabet\mathsf{sans}
15 \DeclareSymbolFontAlphabet\mathtt{typewriter}
16 \DeclareSymbolFontAlphabet\mathsc{smallcaps}
17 \DeclareSymbolFontAlphabet\mathsl{slanted}

We undefine the old \mit and \cal macros (whatever meaning they have) and reallocate them as symbol font alphabets.

18 \let\mit\undefined
19 \let\cal\undefined
20 \let\mathit\undefined
21 \DeclareSymbolFontAlphabet\mathit{italic}
22 \DeclareSymbolFontAlphabet{\mit}{letters}
23 \DeclareSymbolFontAlphabet{\cal}{symbols}

We define the font commands for selecting the typeface. They are probably defined by the document class/style but we want to force the old meaning.

And here are the definition as they were in L^{A}TEX 2.09 but translated into NFSS2 language.

24 \DeclareRobustCommand\rm{\normalfont\rmfamily\mathgroup\symoperators}
25 \DeclareRobustCommand\sf{\normalfont\sffamily\mathgroup\symsans}
26 \DeclareRobustCommand\sl{\normalfont\slshape\mathgroup\symslanted}
27 \DeclareRobustCommand\bf{\normalfont\bfseries\mathgroup\symbold}
28 \DeclareRobustCommand\sc{\normalfont\scshape\mathgroup\symsmallcaps}
29 \DeclareRobustCommand\it{\normalfont\itshape\mathgroup\symitalic}
30 \DeclareRobustCommand\tt{\normalfont\ttfamily\mathgroup\symtypewriter}

We also have to define the emphasize font change command (i.e. \em). This command will look whether the current font is sloped (i.e. has a positive \fontdimen1) and will then select either \rm or \it.

31 \DeclareRobustCommand\em{%
32 \@nomath\em
33 \ifdim \fontdimen\@ne\font>\z@\rm\else\it\fi}

\@setfontsize Font size changes are handled using the \@setfontsize command (in new class files) or by the @setsize command in old document style files. The latter is now defined to call \@setfontsize in the NFSS2 kernel code. Thus to make all size changing commands automatically return to the normal font of the document we only have to slightly modify the definition of \@setfontsize by adding a \normalfont command to it.

34 \def\@setfontsize#1#2#3{\@nomath#1%
35  \ifx\protect\@typeset@protect
36  \let\@currsize#1%
37  \fi
38  \fontsize{#2}{#3}\normalfont}

\non@alpherr Since we emulate the old syntax we also have to silently ignore uses of a math alphabet outside math mode. Since we now use the \sym... switches the following setting is not longer necessary.

39 %\let\non@alpherr\@gobble

\not@math@alphabet But we need to disable the error message that is generated from \bfseries etc.

40 \let\not@math@alphabet\@gobbletwo

We left out the special L^{A}TEX fonts which are not automaticly included in the base version of the font selection since these fonts contain only a few characters which are also included in the AMS fonts so anybody who is using these fonts doesn’t need them. But for compatiblity reasons we will define these symbols.

41 \RequirePackage{latexsym}

42 ⟨/package | latex209⟩