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 `newlfont.dtx'.
32 %% Copyright (C) 1989-1998 Frank Mittelbach and Rainer Sch\"opf,
33 %% all rights reserved.
36 \ProvidesFile{newlfont.dtx}
38 %<package>\NeedsTeXFormat{LaTeX2e}
39 %<package>\ProvidesPackage{newlfont}
40 %<driver> \ProvidesFile{newlfont.drv}
42 % \ProvidesFile{newlfont.dtx}
43 [1998/08/17 v2.2m Standard LaTeX package]
47 \documentclass{ltxdoc}
49 \DocInput{newlfont.dtx}
57 %% {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
58 %% 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
59 %% Digits \0\1\2\3\4\5\6\7\8\9
60 %% Exclamation \! Double quote \" Hash (number) \#
61 %% Dollar \$ Percent \% Ampersand \&
62 %% Acute accent \' Left paren \( Right paren \)
63 %% Asterisk \* Plus \+ Comma \,
64 %% Minus \- Point \. Solidus \/
65 %% Colon \: Semicolon \; Less than \<
66 %% Equals \= Greater than \> Question mark \?
67 %% Commercial at \@ Left bracket \[ Backslash \\
68 %% Right bracket \] Circumflex \^ Underscore \_
69 %% Grave accent \` Left brace \{ Vertical bar \|
70 %% Right brace \} Tilde \~}
73 % \changes{v2.2a}{1994/01/17}{Added missing definitions to support
74 % newlfont in compat mode}
75 % \changes{v2.2b}{1994/01/27}{Removed if@compat test since
76 % these settings need also be executed in 2e mode.}
77 % \changes{v2.2c}{1994/03/06}{Added def for \cs{cal} and \cs{mit}}
78 % \changes{v2.2l}{1995/11/29}{Remove duplicate driver code.}
79 % \changes{v2.2m}{1998/08/17}{(RmS) Minor documentation fixes.}
81 % \providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
84 % \GetFileInfo{newlfont.dtx}
86 % \title{The file \texttt{newlfont.dtx} for use with
87 % \LaTeXe.\thanks{This file has version
88 % number \fileversion, dated \filedate.}\\[2pt]
89 % It contains the code for \texttt{newlfont.sty}}
91 % \author{Frank Mittelbach}
93 % \MaintainedByLaTeXTeam{latex}
96 % \section{Introduction}
98 % This file contains the code for the \texttt{newlfont} package
99 % which provides defines commands like |\rm| to behave as with
100 % NFSS1, i.e., to change one font attribute without resetting the
112 % We define the font commands for selecting the typeface. They are
113 % probably defined by the document class/style but we want to force
114 % the old meaning from NFSS1.
116 % \changes{v2.2g}{1994/05/11}{DPC Remove definitions of \cs{prm} etc.}
126 % We also have to define the \emph{emphasize} font change command
127 % (i.e.\ |\em|). This command will look whether the current font is
128 % sloped (i.e.\ has a positive |\fontdimen1|) and will then select
129 % either an upright or italic font.
130 % \changes{v2.2g}{1994/05/11}{DPC use \cs{DeclareProtectedCommand}}
131 % \changes{v2.2h}{1994/05/13}{DPC renamed to \cs{DeclareRobustCommand}}
133 \DeclareRobustCommand\em{%
135 \ifdim \fontdimen\@ne\font >\z@\upshape \else \itshape \fi}
138 % For compatibility with old sources we should define the following
139 % commands although their use in new documents is discouraged.
141 \let\mediumseries\mdseries
142 \let\normalshape\upshape
145 % In case \texttt{newlfont} is used in compatibility mode, eg
147 % \documentstyle[newlfont]{article}
149 % or with the \texttt{oldlfont} package already loaded
150 % we have to undo a number of settings changed by the compatibility
151 % mode for \LaTeX~2.09 documents.
153 % |\@setfontsize| should not have a |\reset@font| included.
154 % \changes{v2.2j}{1994/11/06}{Use \cs{@typeset@protect}}
156 \def\@setfontsize#1#2#3{\@nomath#1%
157 \ifx\protect\@typeset@protect
160 \fontsize{#2}{#3}\selectfont}
162 % Math alphabet identifiers should have an argument.
163 % \changes{v2.2d}{1994/03/10}{Changed \cs{begingroup}/\cs{endgroup} to
164 % \cs{bgroup}/\cs{egroup}.}
165 % \changes{v2.2f}{1994/05/05}{Added saved versions of the
166 % math-groupers, CAR}
168 \let\math@bgroup\bgroup
169 \def\math@egroup#1{#1\egroup}
170 \let \@@math@bgroup \math@bgroup
171 \let \@@math@egroup \math@egroup
173 % Warn again, if text font commands are used in math
174 % (same macro as in \texttt{lfonts.dtx}).
175 % \changes{v2.2e}{1994/04/21}{Changed error message}
176 % \changes{v2.2k}{1995/04/02}{add \cs{noexpand} to second part of message}
178 \def\not@math@alphabet#1#2{%
181 \@latex@error{Command \noexpand#1invalid in math mode}%
185 define a new math alphabet^^J%
186 if you want to use a special font in math mode%
189 % We have to add |\noexpand| below to prevent expansion of |#2|. In
190 % case of |#1| we can omit this (due to the current definition of
191 % robust commands since they do come out right there :-).
193 use the math alphabet \noexpand#2instead of
201 % In NFSS1 math alphabets had arguments so we have to change |\cal|
202 % and |\mit| which by default are defined to behave like in
211 % The NFSS1 version of \texttt{newlfont} included the \LaTeX{}
212 % symbols. And that is probably all there is.
214 \RequirePackage{latexsym}