blob: 3dcec1bc0e1c2377ba142b835ecb60d29a3a182a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
% \iffalse meta-comment
%
% Copyright 1993-2016
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
% This file is part of the LaTeX base system.
% -------------------------------------------
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This file has the LPPL maintenance status "maintained".
%
% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.txt'. See also `legal.txt' for additional
% information.
%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
%
% \fi
%\iffalse % this is a METACOMMENT !
%
%% File `newlfont.dtx'.
%% Copyright (C) 1989-1998 Frank Mittelbach and Rainer Sch\"opf,
%% all rights reserved.
%
%<*dtx>
\ProvidesFile{newlfont.dtx}
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{newlfont}
%<driver> \ProvidesFile{newlfont.drv}
% \fi
% \ProvidesFile{newlfont.dtx}
[1998/08/17 v2.2m Standard LaTeX package]
%
% \iffalse
%<*driver>
\documentclass{ltxdoc}
\begin{document}
\DocInput{newlfont.dtx}
\end{document}
%</driver>
% \fi
%
%
%
%
% \changes{v2.2a}{1994/01/17}{Added missing definitions to support
% newlfont in compat mode}
% \changes{v2.2b}{1994/01/27}{Removed if@compat test since
% these settings need also be executed in 2e mode.}
% \changes{v2.2c}{1994/03/06}{Added def for \cs{cal} and \cs{mit}}
% \changes{v2.2l}{1995/11/29}{Remove duplicate driver code.}
% \changes{v2.2m}{1998/08/17}{(RmS) Minor documentation fixes.}
%
% \providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
%
%
% \GetFileInfo{newlfont.dtx}
%
% \title{The file \texttt{newlfont.dtx} for use with
% \LaTeXe.\thanks{This file has version
% number \fileversion, dated \filedate.}\\[2pt]
% It contains the code for \texttt{newlfont.sty}}
%
% \author{Frank Mittelbach}
%
% \MaintainedByLaTeXTeam{latex}
% \maketitle
%
% \section{Introduction}
%
% This file contains the code for the \texttt{newlfont} package
% which provides defines commands like |\rm| to behave as with
% NFSS1, i.e., to change one font attribute without resetting the
% other attributes.
%
% \StopEventually{}
%
%
% \section{The Code}
%
% \begin{macrocode}
%<*package>
% \end{macrocode}
%
% 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 from NFSS1.
%
% \changes{v2.2g}{1994/05/11}{DPC Remove definitions of \cs{prm} etc.}
% \begin{macrocode}
\let\rm\rmfamily
\let\sf\sffamily
\let\tt\ttfamily
\let\bf\bfseries
\let\sl\slshape
\let\sc\scshape
\let\it\itshape
% \end{macrocode}
% We also have to define the \emph{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 an upright or italic font.
% \changes{v2.2g}{1994/05/11}{DPC use \cs{DeclareProtectedCommand}}
% \changes{v2.2h}{1994/05/13}{DPC renamed to \cs{DeclareRobustCommand}}
% \begin{macrocode}
\DeclareRobustCommand\em{%
\@nomath\em
\ifdim \fontdimen\@ne\font >\z@\upshape \else \itshape \fi}
% \end{macrocode}
%
% For compatibility with old sources we should define the following
% commands although their use in new documents is discouraged.
% \begin{macrocode}
\let\mediumseries\mdseries
\let\normalshape\upshape
% \end{macrocode}
%
% In case \texttt{newlfont} is used in compatibility mode, eg
%\begin{verbatim}
% \documentstyle[newlfont]{article}
%\end{verbatim}
% or with the \texttt{oldlfont} package already loaded
% we have to undo a number of settings changed by the compatibility
% mode for \LaTeX~2.09 documents.
%
% |\@setfontsize| should not have a |\reset@font| included.
% \changes{v2.2j}{1994/11/06}{Use \cs{@typeset@protect}}
% \begin{macrocode}
\def\@setfontsize#1#2#3{\@nomath#1%
\ifx\protect\@typeset@protect
\let\@currsize#1%
\fi
\fontsize{#2}{#3}\selectfont}
% \end{macrocode}
% Math alphabet identifiers should have an argument.
% \changes{v2.2d}{1994/03/10}{Changed \cs{begingroup}/\cs{endgroup} to
% \cs{bgroup}/\cs{egroup}.}
% \changes{v2.2f}{1994/05/05}{Added saved versions of the
% math-groupers, CAR}
% \begin{macrocode}
\let\math@bgroup\bgroup
\def\math@egroup#1{#1\egroup}
\let \@@math@bgroup \math@bgroup
\let \@@math@egroup \math@egroup
% \end{macrocode}
% Warn again, if text font commands are used in math
% (same macro as in \texttt{lfonts.dtx}).
% \changes{v2.2e}{1994/04/21}{Changed error message}
% \changes{v2.2k}{1995/04/02}{add \cs{noexpand} to second part of message}
% \begin{macrocode}
\def\not@math@alphabet#1#2{%
\relax
\ifmmode
\@latex@error{Command \noexpand#1invalid in math mode}%
{%
Please
\ifx#2\relax
define a new math alphabet^^J%
if you want to use a special font in math mode%
\else
% \end{macrocode}
% We have to add |\noexpand| below to prevent expansion of |#2|. In
% case of |#1| we can omit this (due to the current definition of
% robust commands since they do come out right there :-).
% \begin{macrocode}
use the math alphabet \noexpand#2instead of
the #1command%
\fi
.
}%
\fi}
% \end{macrocode}
%
% In NFSS1 math alphabets had arguments so we have to change |\cal|
% and |\mit| which by default are defined to behave like in
% \LaTeX209.
% \begin{macrocode}
\let\pcal\@undefined
\let\cal\mathcal
\let\pmit\@undefined
\let\mit\mathnormal
% \end{macrocode}
%
% The NFSS1 version of \texttt{newlfont} included the \LaTeX{}
% symbols. And that is probably all there is.
% \begin{macrocode}
\RequirePackage{latexsym}
%</package>
% \end{macrocode}
%
%
% \Finale
\endinput
|