| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 1993-2025 |
| 4 |
% The LaTeX 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 |
% https://www.latex-project.org/lppl.txt |
| 15 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 16 |
% version 2008 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 ! |
| 30 |
% |
| 31 |
%% File `oldlfont.dtx'. |
| 32 |
%% Copyright (C) 1989-1995 Frank Mittelbach and Rainer Sch\"opf, |
| 33 |
%% all rights reserved. |
| 34 |
% |
| 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 |
[2014/09/29 v2.2k Standard LaTeX package] |
| 45 |
% |
| 46 |
% \iffalse |
| 47 |
%</!latex209> |
| 48 |
%<*driver> |
| 49 |
\documentclass{ltxdoc} |
| 50 |
\begin{document} |
| 51 |
\DocInput{oldlfont.dtx} |
| 52 |
\end{document} |
| 53 |
%</driver> |
| 54 |
% \fi |
| 55 |
% |
| 56 |
% |
| 57 |
% |
| 58 |
% |
| 59 |
% |
| 60 |
% \providecommand\dst{\expandafter{\normalfont\scshape docstrip}} |
| 61 |
% |
| 62 |
% \GetFileInfo{oldlfont.dtx} |
| 63 |
% |
| 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}} |
| 68 |
% |
| 69 |
% \author{Frank Mittelbach} |
| 70 |
% |
| 71 |
% \MaintainedByLaTeXTeam{latex} |
| 72 |
% \maketitle |
| 73 |
% |
| 74 |
% \section{Introduction} |
| 75 |
% |
| 76 |
% This file contains the code for the \texttt{oldlfont} package |
| 77 |
% which emulates the following \LaTeX~2.09 font commands: |
| 78 |
% \begin{itemize} |
| 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 |
| 82 |
% mode. |
| 83 |
% \item The |latexsym| package is loaded. |
| 84 |
% \end{itemize} |
| 85 |
% For full compatibility mode, the file |latex209.def| is loaded by |
| 86 |
% |\documentstyle|. |
| 87 |
% |
| 88 |
% The following modules are used in the implementation to direct |
| 89 |
% \dst{} in generating the external files: |
| 90 |
% \begin{center} |
| 91 |
% \begin{tabular}{ll} |
| 92 |
% driver & produce a documentation driver file \\ |
| 93 |
% package & produce |oldlfont.sty| \\ |
| 94 |
% latex209 & produce part of |latex209.def| |
| 95 |
% \end{tabular} |
| 96 |
% \end{center} |
| 97 |
% |
| 98 |
% \MaybeStop{} |
| 99 |
% |
| 100 |
% \changes{v2.2k}{1995/11/29}{Remove duplicate driver code.} |
| 101 |
% |
| 102 |
% \section{The Code} |
| 103 |
% |
| 104 |
% |
| 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 |
| 113 |
% symbol fonts). |
| 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} |
| 117 |
% \begin{macrocode} |
| 118 |
\let\math@bgroup\@empty |
| 119 |
\let\math@egroup\@empty |
| 120 |
\let \@@math@bgroup \math@bgroup |
| 121 |
\let \@@math@egroup \math@egroup |
| 122 |
% \end{macrocode} |
| 123 |
% \end{macro} |
| 124 |
% \end{macro} |
| 125 |
% |
| 126 |
% |
| 127 |
% The rest of this document describes code that is used in |
| 128 |
% |oldlfont.sty| and |latex209.def|. |
| 129 |
% \begin{macrocode} |
| 130 |
%<*package|latex209> |
| 131 |
% \end{macrocode} |
| 132 |
% |
| 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}. |
| 137 |
% \begin{macrocode} |
| 138 |
\RequirePackage[errorshow]{tracefnt} |
| 139 |
% \end{macrocode} |
| 140 |
% |
| 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. |
| 147 |
% \begin{macrocode} |
| 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} |
| 154 |
% \end{macrocode} |
| 155 |
% And here are the corresponding math identifiers. |
| 156 |
% \begin{macrocode} |
| 157 |
\DeclareSymbolFontAlphabet\mathbf{bold} |
| 158 |
\DeclareSymbolFontAlphabet\mathsf{sans} |
| 159 |
\DeclareSymbolFontAlphabet\mathtt{typewriter} |
| 160 |
\DeclareSymbolFontAlphabet\mathsc{smallcaps} |
| 161 |
\DeclareSymbolFontAlphabet\mathsl{slanted} |
| 162 |
% \end{macrocode} |
| 163 |
% We undefine the old |\mit| and |\cal| macros (whatever meaning |
| 164 |
% they have) and reallocate them as symbol font alphabets. |
| 165 |
% \begin{macrocode} |
| 166 |
\let\mit\undefined |
| 167 |
\let\cal\undefined |
| 168 |
\let\mathit\undefined |
| 169 |
\DeclareSymbolFontAlphabet\mathit{italic} |
| 170 |
\DeclareSymbolFontAlphabet{\mit}{letters} |
| 171 |
\DeclareSymbolFontAlphabet{\cal}{symbols} |
| 172 |
% \end{macrocode} |
| 173 |
% |
| 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 |
| 176 |
% the old meaning. |
| 177 |
% |
| 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}} |
| 182 |
% \begin{macrocode} |
| 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} |
| 190 |
% \end{macrocode} |
| 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|. |
| 195 |
% \begin{macrocode} |
| 196 |
\DeclareRobustCommand\em{% |
| 197 |
\@nomath\em |
| 198 |
\ifdim \fontdimen\@ne\font>\z@\rm\else\it\fi} |
| 199 |
% \end{macrocode} |
| 200 |
% |
| 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| |
| 209 |
% command to it. |
| 210 |
% \changes{v2.2j}{1994/11/06}{Use \cs{@typeset@protect}} |
| 211 |
% \begin{macrocode} |
| 212 |
\def\@setfontsize#1#2#3{\@nomath#1% |
| 213 |
\ifx\protect\@typeset@protect |
| 214 |
\let\@currsize#1% |
| 215 |
\fi |
| 216 |
\fontsize{#2}{#3}\normalfont} |
| 217 |
% \end{macrocode} |
| 218 |
% \end{macro} |
| 219 |
% |
| 220 |
% |
| 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. |
| 225 |
% \begin{macrocode} |
| 226 |
%\let\non@alpherr\@gobble |
| 227 |
% \end{macrocode} |
| 228 |
% \end{macro} |
| 229 |
% |
| 230 |
% \begin{macro}{\not@math@alphabet} |
| 231 |
% But we need to disable the error message that is generated from |
| 232 |
% |\bfseries| etc. |
| 233 |
% \begin{macrocode} |
| 234 |
\let\not@math@alphabet\@gobbletwo |
| 235 |
% \end{macrocode} |
| 236 |
% \end{macro} |
| 237 |
% |
| 238 |
% |
| 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. |
| 244 |
% |
| 245 |
% \begin{macrocode} |
| 246 |
\RequirePackage{latexsym} |
| 247 |
%</package|latex209> |
| 248 |
% \end{macrocode} |
| 249 |
% |
| 250 |
% \DeleteShortVerb{\|} |
| 251 |
% \Finale |
| 252 |
\endinput |