1 % \iffalse meta-comment
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
29 %\iffalse % this is a METACOMMENT !
31 %% File `oldlfont.dtx'.
32 %% Copyright (C) 1989-1995 Frank Mittelbach and Rainer Sch\"opf,
33 %% all rights reserved.
36 \ProvidesFile{oldlfont.dtx}
38 %<package>\NeedsTeXFormat{LaTeX2e}
39 %<package>\ProvidesPackage{oldlfont}
40 %<driver> \ProvidesFile{oldlfont.drv}
43 % \ProvidesFile{oldlfont.dtx}
44 [2014/09/29 v2.2k Standard LaTeX package]
49 \documentclass{ltxdoc}
51 \DocInput{oldlfont.dtx}
60 % \providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
62 % \GetFileInfo{oldlfont.dtx}
64 % \title{The file \texttt{oldlfont.dtx} for use with
65 % \LaTeXe.\thanks{This file has version
66 % number \fileversion, dated \filedate.}\\[2pt]
67 % It contains the code for \texttt{oldlfont.sty}}
69 % \author{Frank Mittelbach}
71 % \MaintainedByLaTeXTeam{latex}
74 % \section{Introduction}
76 % This file contains the code for the \texttt{oldlfont} package
77 % which emulates the following \LaTeX~2.09 font commands:
79 % \item The two-letter font-changing commands |\rm|, etc.~are
80 % defined to cancel each other out as they did in \LaTeX~2.09.
81 % \item The two-letter font-changing commands are allowed in math
83 % \item The |latexsym| package is loaded.
85 % For full compatibility mode, the file |latex209.def| is loaded by
88 % The following modules are used in the implementation to direct
89 % \dst{} in generating the external files:
92 % driver & produce a documentation driver file \\
93 % package & produce |oldlfont.sty| \\
94 % latex209 & produce part of |latex209.def|
100 % \changes{v2.2k}{1995/11/29}{Remove duplicate driver code.}
105 % \begin{macro}{\math@bgroup}
106 % \begin{macro}{\math@egroup}
107 % To make \meta{math alphabet identifier} work like simple font
108 % switches we change the meaning of |\math@bgroup| and
109 % |\math@egroup| to |\@empty|. This emulates the behavior of
110 % \texttt{oldlfont.sty} in NFSS1 setups. These definitions are not
111 % part of \texttt{latex209} automatically, since to emulate 2.09
112 % they are not necessary (all standard fonts are declared as math
114 % \changes{v2.2f}{1994/05/05}{Added saved versions of the
115 % math-groupers, CAR}
116 % \changes{v2.2g}{1994/05/09}{Moved outside latex209 part}
118 \let\math@bgroup\@empty
119 \let\math@egroup\@empty
120 \let \@@math@bgroup \math@bgroup
121 \let \@@math@egroup \math@egroup
127 % The rest of this document describes code that is used in
128 % |oldlfont.sty| and |latex209.def|.
133 % When emulating the old settings we don't want a lot of NFSS
134 % information being displayed. Thus we required that the
135 % \texttt{tracefnt} package is loaded with the option
136 % \texttt{errorshow}.
138 \RequirePackage[errorshow]{tracefnt}
141 % We define math \emph{alphabet} identifiers for the typefaces
142 % described in the \LaTeX{} manual. This is straightforward. Some
143 % are already defined by the kernel code.
144 % And here are the other ones defined by the old \LaTeX{}. They all
145 % get declared as math symbol font alphabets. Thus we first
146 % allocate the additional symbol fonts.
148 \DeclareSymbolFont{bold}{OT1}{cmr}{bx}{n}
149 \DeclareSymbolFont{sans}{OT1}{cmss}{m}{n}
150 \DeclareSymbolFont{typewriter}{OT1}{cmtt}{m}{n}
151 \DeclareSymbolFont{italic}{OT1}{cmr}{m}{it}
152 \DeclareSymbolFont{smallcaps}{OT1}{cmr}{m}{sc}
153 \DeclareSymbolFont{slanted}{OT1}{cmr}{m}{sl}
155 % And here are the corresponding math identifiers.
157 \DeclareSymbolFontAlphabet\mathbf{bold}
158 \DeclareSymbolFontAlphabet\mathsf{sans}
159 \DeclareSymbolFontAlphabet\mathtt{typewriter}
160 \DeclareSymbolFontAlphabet\mathsc{smallcaps}
161 \DeclareSymbolFontAlphabet\mathsl{slanted}
163 % We undefine the old |\mit| and |\cal| macros (whatever meaning
164 % they have) and reallocate them as symbol font alphabets.
168 \let\mathit\undefined
169 \DeclareSymbolFontAlphabet\mathit{italic}
170 \DeclareSymbolFontAlphabet{\mit}{letters}
171 \DeclareSymbolFontAlphabet{\cal}{symbols}
174 % We define the font commands for selecting the typeface. They are
175 % probably defined by the document class/style but we want to force
178 % And here are the definition as they were in \LaTeX~2.09 but
179 % translated into NFSS2 language.
180 % \changes{v2.2h}{1994/05/11}{DPC use \cs{DeclareProtectedCommand}}
181 % \changes{v2.2i}{1994/05/13}{DPC renamed to \cs{DeclareRobustCommand}}
183 \DeclareRobustCommand\rm{\normalfont\rmfamily\mathgroup\symoperators}
184 \DeclareRobustCommand\sf{\normalfont\sffamily\mathgroup\symsans}
185 \DeclareRobustCommand\sl{\normalfont\slshape\mathgroup\symslanted}
186 \DeclareRobustCommand\bf{\normalfont\bfseries\mathgroup\symbold}
187 \DeclareRobustCommand\sc{\normalfont\scshape\mathgroup\symsmallcaps}
188 \DeclareRobustCommand\it{\normalfont\itshape\mathgroup\symitalic}
189 \DeclareRobustCommand\tt{\normalfont\ttfamily\mathgroup\symtypewriter}
191 % We also have to define the \emph{emphasize} font change command
192 % (i.e.\ |\em|). This command will look whether the current font is
193 % sloped (i.e.\ has a positive |\fontdimen1|) and will then select
194 % either |\rm| or |\it|.
196 \DeclareRobustCommand\em{%
198 \ifdim \fontdimen\@ne\font>\z@\rm\else\it\fi}
201 % \begin{macro}{\@setfontsize}
202 % Font size changes are handled using the |\@setfontsize| command
203 % (in new class files) or by the |@setsize| command in old document
204 % style files. The latter is now defined to call |\@setfontsize| in
205 % the NFSS2 kernel code.
206 % Thus to make all size changing commands automatically return to
207 % the normal font of the document we only have to slightly modify
208 % the definition of |\@setfontsize| by adding a |\normalfont|
210 % \changes{v2.2j}{1994/11/06}{Use \cs{@typeset@protect}}
212 \def\@setfontsize#1#2#3{\@nomath#1%
213 \ifx\protect\@typeset@protect
216 \fontsize{#2}{#3}\normalfont}
221 % \begin{macro}{\non@alpherr}
222 % Since we emulate the old syntax we also have to silently ignore
223 % uses of a math alphabet outside math mode. Since we now use the
224 % |\sym...| switches the following setting is not longer necessary.
226 %\let\non@alpherr\@gobble
230 % \begin{macro}{\not@math@alphabet}
231 % But we need to disable the error message that is generated from
234 \let\not@math@alphabet\@gobbletwo
239 % We left out the special \LaTeX{} fonts which are not automatically
240 % included in the base version of the font selection since these
241 % fonts contain only a few characters which are also included in
242 % the AMS fonts so anybody who is using these fonts doesn't need
243 % them. But for compatibility reasons we will define these symbols.
246 \RequirePackage{latexsym}
250 % \DeleteShortVerb{\|}