updated
[latex2e.git] / base / oldlfont.dtx
blob99a4c55f7c9f311e1aa58946aa6f03b0d76aab37
1 % \iffalse meta-comment
3 % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
4 % The LaTeX3 Project and any individual authors listed elsewhere
5 % in this file. 
6
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
9
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.
17
18 % This file has the LPPL maintenance status "maintained".
19
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
22 % information.
23
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.
27
28 % \fi
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.
35 %<*dtx>
36           \ProvidesFile{oldlfont.dtx}
37 %</dtx>
38 %<package>\NeedsTeXFormat{LaTeX2e}
39 %<package>\ProvidesPackage{oldlfont}
40 %<driver> \ProvidesFile{oldlfont.drv}
41 %<*!latex209>
42 % \fi
43 %         \ProvidesFile{oldlfont.dtx}
44           [1994/11/29 v2.2k Standard LaTeX package]
46 % \iffalse
47 %</!latex209>
48 %<*driver>
49 \documentclass{ltxdoc}
50 \begin{document}
51 \DocInput{oldlfont.dtx}
52 \end{document}
53 %</driver>
54 % \fi
56 % \CheckSum{117}
58 %% \CharacterTable
59 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
60 %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
61 %%   Digits        \0\1\2\3\4\5\6\7\8\9
62 %%   Exclamation   \!     Double quote  \"     Hash (number) \#
63 %%   Dollar        \$     Percent       \%     Ampersand     \&
64 %%   Acute accent  \'     Left paren    \(     Right paren   \)
65 %%   Asterisk      \*     Plus          \+     Comma         \,
66 %%   Minus         \-     Point         \.     Solidus       \/
67 %%   Colon         \:     Semicolon     \;     Less than     \<
68 %%   Equals        \=     Greater than  \>     Question mark \?
69 %%   Commercial at \@     Left bracket  \[     Backslash     \\
70 %%   Right bracket \]     Circumflex    \^     Underscore    \_
71 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
72 %%   Right brace   \}     Tilde         \~}
76 % \providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
78 % \GetFileInfo{oldlfont.dtx}
80 % \title{The file \texttt{oldlfont.dtx} for use with 
81 %        \LaTeXe.\thanks{This file has version
82 %        number \fileversion, dated \filedate.}\\[2pt]
83 %        It contains the code for \texttt{oldlfont.sty}}
85 % \author{Frank Mittelbach}
87 % \maketitle
89 % \section{Introduction}
91 %    This file contains the code for the \texttt{oldlfont} package
92 %    which emulates the following \LaTeX~2.09 font commands:
93 %    \begin{itemize}
94 %    \item The two-letter font-changing commands |\rm|, etc.~are
95 %       defined to cancel each other out as they did in \LaTeX~2.09.
96 %    \item The two-letter font-changing commands are allowed in math
97 %       mode. 
98 %    \item The |latexsym| package is loaded.
99 %    \end{itemize}
100 %    For full compatibility mode, the file |latex209.def| is loaded by
101 %    |\documentstyle|.
103 % The following modules are used in the implementation to direct
104 % \dst{} in generating the external files:
105 % \begin{center}
106 % \begin{tabular}{ll}
107 %   driver   & produce a documentation driver file \\
108 %   package  & produce |oldlfont.sty| \\
109 %   latex209 & produce part of |latex209.def|
110 % \end{tabular}
111 % \end{center}
113 % \StopEventually{}
115 % \changes{v2.2k}{1995/11/29}{Remove duplicate driver code.}
117 % \section{The Code}
120 % \begin{macro}{\math@bgroup}
121 % \begin{macro}{\math@egroup}
122 %   To make \meta{math alphabet identifier} work like simple font
123 %   switches we change the meaning of |\math@bgroup| and
124 %   |\math@egroup| to |\@empty|. This emulates the behavior of
125 % \texttt{oldlfont.sty} in NFSS1 setups.  These definitions are not
126 %    part of \texttt{latex209} automatically, since to emulate 2.09
127 %    they are not necessary (all standard fonts are declared as math
128 %    symbol fonts).
129 % \changes{v2.2f}{1994/05/05}{Added saved versions of the
130 % math-groupers, CAR}
131 % \changes{v2.2g}{1994/05/09}{Moved outside latex209 part}
132 %    \begin{macrocode}
133 \let\math@bgroup\@empty
134 \let\math@egroup\@empty
135 \let \@@math@bgroup \math@bgroup
136 \let \@@math@egroup \math@egroup
137 %    \end{macrocode}
138 % \end{macro}
139 % \end{macro}
142 %    The rest of this document describes code that is used in
143 %    |oldlfont.sty| and |latex209.def|.
144 %    \begin{macrocode}
145 %<*package|latex209>
146 %    \end{macrocode}
148 %    When emulating the old settings we don't want a lot of NFSS
149 %    information being displayed. Thus we required that the
150 %    \texttt{tracefnt} package is loaded with the option
151 %    \texttt{errorshow}.
152 %    \begin{macrocode}
153 \RequirePackage[errorshow]{tracefnt}
154 %    \end{macrocode}
156 %    We define math \emph{alphabet} identifiers for the typefaces
157 %    described in the \LaTeX{} manual.  This is straightforward. Some
158 %    are already defined by the kernel code.
159 %    And here are the other ones defined by the old \LaTeX{}. They all
160 %    get declared as math symbol font alphabets. Thus we first
161 %    allocate the additional symbol fonts.
162 %    \begin{macrocode}
163 \DeclareSymbolFont{bold}{OT1}{cmr}{bx}{n}
164 \DeclareSymbolFont{sans}{OT1}{cmss}{m}{n}
165 \DeclareSymbolFont{typewriter}{OT1}{cmtt}{m}{n}
166 \DeclareSymbolFont{italic}{OT1}{cmr}{m}{it}
167 \DeclareSymbolFont{smallcaps}{OT1}{cmr}{m}{sc}
168 \DeclareSymbolFont{slanted}{OT1}{cmr}{m}{sl}
169 %    \end{macrocode}
170 %    And here are the corresponding math identifiers.
171 %    \begin{macrocode}
172 \DeclareSymbolFontAlphabet\mathbf{bold}
173 \DeclareSymbolFontAlphabet\mathsf{sans}
174 \DeclareSymbolFontAlphabet\mathtt{typewriter}
175 \DeclareSymbolFontAlphabet\mathsc{smallcaps}
176 \DeclareSymbolFontAlphabet\mathsl{slanted}
177 %    \end{macrocode}
178 %    We undefine the old |\mit| and |\cal| macros (whatever meaning
179 %    they have) and reallocate them as symbol font alphabets.
180 %    \begin{macrocode}
181 \let\mit\undefined
182 \let\cal\undefined
183 \let\mathit\undefined
184 \DeclareSymbolFontAlphabet\mathit{italic}
185 \DeclareSymbolFontAlphabet{\mit}{letters}
186 \DeclareSymbolFontAlphabet{\cal}{symbols}
187 %    \end{macrocode}
189 %    We define the font commands for selecting the typeface. They are
190 %    probably defined by the document class/style but we want to force
191 %    the old meaning.
193 %    And here are the definition as they were in \LaTeX~2.09 but
194 %    translated into NFSS2 language.
195 % \changes{v2.2h}{1994/05/11}{DPC use \cs{DeclareProtectedCommand}}
196 % \changes{v2.2i}{1994/05/13}{DPC renamed to \cs{DeclareRobustCommand}}
197 %    \begin{macrocode}
198 \DeclareRobustCommand\rm{\normalfont\rmfamily\mathgroup\symoperators}
199 \DeclareRobustCommand\sf{\normalfont\sffamily\mathgroup\symsans}
200 \DeclareRobustCommand\sl{\normalfont\slshape\mathgroup\symslanted}
201 \DeclareRobustCommand\bf{\normalfont\bfseries\mathgroup\symbold}
202 \DeclareRobustCommand\sc{\normalfont\scshape\mathgroup\symsmallcaps}
203 \DeclareRobustCommand\it{\normalfont\itshape\mathgroup\symitalic}
204 \DeclareRobustCommand\tt{\normalfont\ttfamily\mathgroup\symtypewriter}
205 %    \end{macrocode}
206 %     We also have to define the \emph{emphasize} font change command
207 %    (i.e.\ |\em|). This command will look whether the current font is
208 %    sloped (i.e.\ has a positive |\fontdimen1|) and will then select
209 %    either |\rm| or |\it|.
210 %    \begin{macrocode}
211 \DeclareRobustCommand\em{%
212   \@nomath\em
213   \ifdim \fontdimen\@ne\font>\z@\rm\else\it\fi}
214 %    \end{macrocode}
216 % \begin{macro}{\@setfontsize}
217 %    Font size changes are handled using the |\@setfontsize| command
218 %    (in new class files) or by the |@setsize| command in old document
219 %    style files. The latter is now defined to call |\@setfontsize| in
220 %    the NFSS2 kernel code.
221 %    Thus to make all size changing commands automatically return to
222 %    the normal font of the document we only have to slightly modify
223 %    the definition of |\@setfontsize| by adding a |\normalfont|
224 %    command to it.
225 % \changes{v2.2j}{1994/11/06}{Use \cs{@typeset@protect}}
226 %    \begin{macrocode}
227 \def\@setfontsize#1#2#3{\@nomath#1%
228     \ifx\protect\@typeset@protect
229       \let\@currsize#1%
230     \fi
231     \fontsize{#2}{#3}\normalfont}
232 %    \end{macrocode}
233 % \end{macro}
236 %  \begin{macro}{\non@alpherr}
237 %    Since we emulate the old syntax we also have to silently ignore
238 %    uses of a math alphabet outside math mode. Since we now use the
239 %    |\sym...| switches the following setting is not longer necessary.
240 %    \begin{macrocode}
241 %\let\non@alpherr\@gobble
242 %    \end{macrocode}
243 %  \end{macro}
245 %  \begin{macro}{\not@math@alphabet}
246 %    But we need to disable the error message that is generated from
247 %    |\bfseries| etc.
248 %    \begin{macrocode}
249 \let\not@math@alphabet\@gobbletwo
250 %    \end{macrocode}
251 %  \end{macro}
254 %    We left out the special \LaTeX{} fonts which are not automaticly
255 %    included in the base version of the font selection since these
256 %    fonts contain only a few characters which are also included in
257 %    the AMS fonts so anybody who is using these fonts doesn't need
258 %    them.  But for compatiblity reasons we will define these symbols.
260 %    \begin{macrocode}
261 \RequirePackage{latexsym}
262 %</package|latex209>
263 %    \end{macrocode}
265 % \DeleteShortVerb{\|}
266 % \Finale
267 \endinput