The file newlfont.dtx for use with L^{A}TEX 2ε.^{∗} It contains the code for newlfont.sty

Frank Mittelbach

March 27, 1996

1 Introduction

This file contains the code for the 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.

2 The Code

1 ⟨∗package⟩

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.

 2 \let\rm\rmfamily
 3 \let\sf\sffamily
 4 \let\tt\ttfamily
 5 \let\bf\bfseries
 6 \let\sl\slshape
 7 \let\sc\scshape
 8 \let\it\itshape

We also have to define the 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.

 9 \DeclareRobustCommand\em{%
10 \@nomath\em
11 \ifdim \fontdimen\@ne\font >\z@\upshape \else \itshape \fi}

For compatibility with old sources we should define the following commands although their use in new documents is discouraged.

12 \let\mediumseries\mdseries
13 \let\normalshape\upshape

∗This file has version number v2.2l, dated 1995/11/29.

In case newlfont is used in compatibility mode, eg

  \documentstyle[newlfont]{article}

or with the oldlfont package already loaded we have to undo a number of settings changed by the compatibility mode for L^{A}TEX 2.09 documents.

   \@setfontsize should not have a \reset@font included.
14 \def\@setfontsize#1#2#3{\@nomath#1%
15  \ifx\protect\@typeset@protect
16  \let\@currsize#1%
17  \fi
18  \fontsize{#2}{#3}\selectfont}

Math alphabet identifiers should have an argument.

19 \let\math@bgroup\bgroup
20 \def\math@egroup#1{#1\egroup}
21 \let \@@math@bgroup \math@bgroup
22 \let \@@math@egroup \math@egroup

Warn again, if text font commands are used in math. (same macro as in

lfonts.dtx).
23 \def\not@math@alphabet#1#2{%
24 \relax
25 \ifmmode
26  \@latex@error{Command \noexpand#1invalid in math mode}%
27  {%
28  Please
29  \ifx#2\relax
30  define a new math alphabet^^J%
31  if you want to use a special font in math mode%
32  \else

We have to a \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 :-).

33  use the math alphabet \noexpand#2instead of
34  the #1command%
35  \fi

36 .

37  }%
38 \fi}

In NFSS1 math alphabets had arguments so we have to change \cal and \mit which by default are defined to behave like in L^{A}TEX209.

39 \let\pcal\@undefined
40 \let\cal\mathcal
41 \let\pmit\@undefined
42 \let\mit\mathnormal

The NFSS1 version of newlfont included the L^{A}TEX symbols. And that is probably all there is.

43 \RequirePackage{latexsym}

44 ⟨/package⟩