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.
30 %%% From File: ltfsscmp.dtx
31 %% Copyright (C) 1989-1995 Frank Mittelbach and Rainer Sch\"opf,
32 %% all rights reserved.
38 \ProvidesFile{ltfsscmp.dtx}
39 [2015/06/23 v3.0f LaTeX Kernel (NFSS1 Compatibility)]
41 \documentclass{ltxdoc}
43 \DocInput{ltfsscmp.dtx}
49 %<+checkmem>\def\CHECKMEM{\tracingstats=2
50 %<+checkmem> \newlinechar=`\^^J
51 %<+checkmem> \message{^^JMemory usage: \filename}\shipout\hbox{}}
58 % \GetFileInfo{ltfsscmp.dtx}
59 % \title{A new font selection scheme for \TeX{} macro packages\\
60 % (Compatibility with NFSS1)\thanks
61 % {This file has version number
62 % \fileversion\ dated \filedate}}
64 % \author{Frank Mittelbach \and Rainer Sch\"opf}
66 % \MaintainedByLaTeXTeam{latex}
69 % This file contains the implementation of commands giving
70 % compatibility with the original `NFSS1' release of the Font Selection
75 % The macro documentation is still basically the documentation from the
76 % first NFSS release and therefore in some cases probably not
77 % completely accurate.
80 % Version 1 of NFSS is obsolete now for about 20 years (and was
81 % ``current'' only for a short intermediate time) so with the 2015
82 % release these internal interface commands are removed from the
83 % kernel and made available via \textsf{latexrelease} package so that
84 % backward compatibility remains ensured for very old documents.
89 % \changes{v3.0b}{1995/06/15}
90 % {(DPC) minor documentation edits}
91 % \changes{v3.0a}{1995/05/24}
92 % {(DPC) Make file from previous file, fam.dtx 1995/05/20 v2.2d}
93 % \changes{v3.0d}{2015/02/21}
94 % {Removed autoload code}
95 % \changes{v3.0e}{2015/02/22}
96 % {Moved all code into latexrelease - obsolete commands are no
97 % longer automatically part of the kernel}
102 \IncludeInRelease{2015/01/01}{\new@fontshape}%
103 {NFSS version1 commands}%
104 \let\new@fontshape\@undefined
105 \let\warn@rel@i\@undefined
106 \let\scan@fontshape\@undefined
107 \let\scan@@fontshape\@undefined
108 \let\subst@fontshape\@undefined
109 \let\extra@def\@undefined
110 \let\default@mextra\@undefined
111 \let\preload@sizes\@undefined
112 \let\err@rel@i\@undefined
113 \let\newmathalphabet\@undefined
114 \let\newmathalphabet@\@undefined
115 \let\newmathalphabet@@@\@undefined
116 \let\if@no@font@opt\@undefined
117 \let\@no@font@optfalse\@undefined
118 \let\define@mathalphabet\@undefined
119 \let\define@mathgroup\@undefined
120 \let\addtoversion\@undefined
124 % In older releases we provide the original definitions.
127 \IncludeInRelease{0000/00/00}{\new@fontshape}%
128 {NFSS version1 commands}%
131 % \begin{macro}{\new@fontshape}
132 % The interface is now |\DeclareFontShape|.
134 \gdef\new@fontshape#1#2#3#4{%
135 \warn@rel@i\new@fontshape\DeclareFontShape
136 \expandafter\scan@fontshape\@gobble#4<\@nil><<%
137 \DeclareFontShape U{#1}{#2}{#3}\reserved@f}%
138 \@onlypreamble\new@fontshape
143 % \begin{macro}{\warn@rel@i}
144 % The warning message used above.
146 \gdef\warn@rel@i#1#2{%
147 \@font@warning{*** NFSS release 1 command
148 \noexpand#1found\MessageBreak
149 *** Update by using release 2 command
150 \string#2.\MessageBreak
151 *** Recovery is probably possible}%
153 \@onlypreamble\warn@rel@i
159 % \begin{macro}{\scan@fontshape}
160 % This will scan the old font shape definition syntax.
162 \gdef\scan@fontshape{%
163 \let\reserved@f\@empty
164 \let\reserved@e\@empty % holds last info
167 \@onlypreamble\scan@fontshape
172 % \begin{macro}{\scan@@fontshape}
174 \gdef\scan@@fontshape#1>#2#3<{%
176 \edef\reserved@f{\reserved@f\reserved@e}%
178 \def\reserved@b{#1}% nick names
182 \in@{pt}{#3}% not a proof but a good chance
185 % We grap also everything after pt and discard it if people have
186 % forgotten to place a percent sign there.
187 % \changes{v2.1d}{1994/02/10}{scan away stuff after pt}
189 \def\reserved@a##1 at##2pt##3\@nil{%
190 \def\reserved@b{##2}%
191 \def\reserved@c{##1}%
197 \edef\reserved@d{subf*\reserved@c}%
201 \errmessage{*** What's this? NFSS release 0? ***}%
204 \edef\reserved@d{#2\reserved@c}%
206 \ifx\reserved@d\reserved@e
207 \edef\reserved@f{\reserved@f<\reserved@b>}%
209 \edef\reserved@f{\reserved@f\reserved@e<\reserved@b>}%add old info
210 \let\reserved@e\reserved@d
212 \expandafter\scan@@fontshape
215 \@onlypreamble\scan@@fontshape
221 % \begin{macro}{\subst@fontshape}
222 % This is now also handled by the extend syntax of
223 % |\DeclareFontShape|.
225 \gdef\subst@fontshape#1#2#3#4#5#6{%
226 \warn@rel@i\subst@fontshape\DeclareFontShape
227 \DeclareFontShape{U}{#1}{#2}{#3}{<->sub*#4/#5/#6}{}}%
228 \@onlypreamble\subst@fontshape
234 % \begin{macro}{\extra@def}
235 % This was replaced by |\DeclareFontFamily|.
237 \gdef\extra@def#1#2#3{%
238 \warn@rel@i\extra@def\DeclareFontFamily
239 \DeclareFontFamily{U}{#1}{}%
241 \@onlypreamble\extra@def
248 % \begin{macro}{\default@mextra}
249 % The new name is |\DeclareFontEncodingDefaults| but in this case
250 % we don't feel comfortable with this either.
252 \gdef\default@mextra{%
253 \warn@rel@i\default@mextra\DeclareFontEncodingDefaults
255 % We pick up the argument to |\default@mextra| implicitly as
256 % the second argument of |\DeclareFontEncodingDefaults|.
258 \DeclareFontEncodingDefaults\relax
260 \@onlypreamble\default@mextra
266 % \begin{macro}{\preload@sizes}
267 % The new interface is |\DeclarePreloadSizes|.
269 \gdef\preload@sizes{%
270 \warn@rel@i\preload@sizes\DeclarePreloadSizes
271 \DeclarePreloadSizes U%
273 \@onlypreamble\preload@sizes
278 % \begin{macro}{\err@rel@i}
279 % This macro is used in cases where emulation with NFSS2 features
280 % is not really possible.
282 \gdef\err@rel@i#1#2{%
283 \@latex@error{*** NFSS release 1 command \noexpand#1found%
284 ^^J*** Recovery not possible. Use \string#2}%
285 {The new release of NFSS doesn't support the
286 \noexpand#1command^^Jany longer.
287 Please upgrade your file to the syntax of NFSS
288 release 2^^Jusing the \noexpand#2command.}%
292 \batchmode\input.\relax
294 \@onlypreamble\err@rel@i
300 % \begin{macro}{\newmathalphabet}
301 % \begin{macro}{\newmathalphabet@@}
302 % \begin{macro}{\newmathalphabet@@@}
303 % |\newmathalphabet| is the old form.
305 \gdef\newmathalphabet{%
307 \@latex@error{*** NFSS release 1 command
308 \noexpand\newmathalphabet found%
309 ^^J \space*** Automatic recovery not possible.%
310 ^^J \space*** TYPE H for Help%
312 {Please look at the file usrguide.tex for hints on
313 how to resolve this problem.}%
315 \warn@rel@i\newmathalphabet\DeclareMathAlphabet
317 \@ifstar\newmathalphabet@@@
319 \gdef\newmathalphabet@@#1{\DeclareMathAlphabet#1{U}{}{}{}}%
320 \gdef\newmathalphabet@@@#1#2#3#4{%
321 \DeclareMathAlphabet{#1}{U}{#2}{#3}{#4}}%
322 \@onlypreamble\newmathalphabet
323 \@onlypreamble\newmathalphabet@@
324 \@onlypreamble\newmathalphabet@@@
330 % \begin{macro}{\if@no@font@opt}
331 % \begin{macro}{\@no@font@optfalse}
333 \global\let\if@no@font@opt\iftrue
334 \gdef\@no@font@optfalse{\let\if@no@font@opt\iffalse}%
339 % \begin{macro}{\define@mathalphabet}
340 % This is a case where dying is best.
342 \gdef\define@mathalphabet{%
343 \err@rel@i\define@mathalphabet\DeclareMathAlphabet
345 \@onlypreamble\define@mathalphabet
352 % \begin{macro}{\define@mathgroup}
353 % And here is another one
355 \gdef\define@mathgroup{%
356 \err@rel@i\define@mathgroup\DeclareSymbolFont
358 \@onlypreamble\define@mathgroup
362 % \begin{macro}{\addtoversion}
363 % |\addtoversion| is the old form.
365 \def\addtoversion#1#2{%
366 \warn@rel@i\addtoversion\SetMathAlphabet
367 \SetMathAlphabet#2{#1}{U}}%
368 \@onlypreamble\addtoversion
372 % Finishing off this huge |\IncludeInRelease| argument: