Improve build script for amsmath
[latex2e.git] / latex2e-20160201 / base / ltfsscmp.dtx
blob38bc95e160b7339c5909bb015e40514cce8e39c8
1 % \iffalse meta-comment
3 % Copyright 1993-2016
4 % The LaTeX3 Project and any individual authors listed elsewhere
5 % in this file.
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
22 % information.
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.
28 % \fi
29 % \iffalse
30 %%% From File: ltfsscmp.dtx
31 %% Copyright (C) 1989-1995 Frank Mittelbach and Rainer Sch\"opf,
32 %% all rights reserved.
34 %<*driver>
35 % \fi
38 \ProvidesFile{ltfsscmp.dtx}
39              [2015/06/23 v3.0f LaTeX Kernel (NFSS1 Compatibility)]
40 % \iffalse
41 \documentclass{ltxdoc}
42 \begin{document}
43 \DocInput{ltfsscmp.dtx}
44 \end{document}
45 %</driver>
46 % \fi
48 % \iffalse
49 %<+checkmem>\def\CHECKMEM{\tracingstats=2
50 %<+checkmem>  \newlinechar=`\^^J
51 %<+checkmem>  \message{^^JMemory usage: \filename}\shipout\hbox{}}
52 %<+checkmem>\CHECKMEM
53 % \fi
55 % \CheckSum{259}
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}
67 % \maketitle
69 % This file contains the  implementation of commands giving
70 % compatibility with the original `NFSS1' release of the Font Selection
71 % Scheme.
73 % \begin{quote}
74 %   \textbf{Warning:}
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.
78 % \end{quote}
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.
86 % \StopEventually{}
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}
100 %    \begin{macrocode}
101 %<*latexrelease>
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
121 \EndIncludeInRelease
122 %    \end{macrocode}
124 %    In older releases we provide the original definitions.
126 %    \begin{macrocode}
127 \IncludeInRelease{0000/00/00}{\new@fontshape}%
128                              {NFSS version1 commands}%
129 %    \end{macrocode}
131 % \begin{macro}{\new@fontshape}
132 %    The interface is now |\DeclareFontShape|.
133 %    \begin{macrocode}
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
139 %    \end{macrocode}
140 % \end{macro}
143 %  \begin{macro}{\warn@rel@i}
144 %    The warning message used above.
145 %    \begin{macrocode}
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
154 %    \end{macrocode}
155 %  \end{macro}
159 %  \begin{macro}{\scan@fontshape}
160 %    This will scan the old font shape definition syntax.
161 %    \begin{macrocode}
162 \gdef\scan@fontshape{%
163   \let\reserved@f\@empty
164   \let\reserved@e\@empty %        holds last info
165   \scan@@fontshape
167 \@onlypreamble\scan@fontshape
168 %    \end{macrocode}
169 %  \end{macro}
172 %  \begin{macro}{\scan@@fontshape}
173 %    \begin{macrocode}
174 \gdef\scan@@fontshape#1>#2#3<{%
175   \ifx\@nil#1%
176     \edef\reserved@f{\reserved@f\reserved@e}%
177   \else
178     \def\reserved@b{#1}%       nick names
179     \def\reserved@c{#3}%
180     \in@{ at}{#3}%
181     \ifin@
182       \in@{pt}{#3}%  not a proof but a good chance
183       \ifin@
184 %    \end{macrocode}
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}
188 %    \begin{macrocode}
189         \def\reserved@a##1 at##2pt##3\@nil{%
190            \def\reserved@b{##2}%
191            \def\reserved@c{##1}%
192            }%
193         \reserved@a#3\@nil
194       \fi
195     \fi
196     \ifnum 0<0#2
197       \edef\reserved@d{subf*\reserved@c}%
198       \ifcase #2\or
199       \or
200       \else
201         \errmessage{*** What's this? NFSS release 0? ***}%
202       \fi
203     \else
204       \edef\reserved@d{#2\reserved@c}%
205     \fi
206     \ifx\reserved@d\reserved@e
207       \edef\reserved@f{\reserved@f<\reserved@b>}%
208     \else
209       \edef\reserved@f{\reserved@f\reserved@e<\reserved@b>}%add old info
210       \let\reserved@e\reserved@d
211     \fi
212     \expandafter\scan@@fontshape
213   \fi
215 \@onlypreamble\scan@@fontshape
216 %    \end{macrocode}
217 %  \end{macro}
221 % \begin{macro}{\subst@fontshape}
222 %    This is now also handled by the extend syntax of
223 %    |\DeclareFontShape|.
224 %    \begin{macrocode}
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
229 %    \end{macrocode}
230 % \end{macro}
234 %  \begin{macro}{\extra@def}
235 %    This was replaced by |\DeclareFontFamily|.
236 %    \begin{macrocode}
237 \gdef\extra@def#1#2#3{%
238      \warn@rel@i\extra@def\DeclareFontFamily
239      \DeclareFontFamily{U}{#1}{}%
241 \@onlypreamble\extra@def
242 %    \end{macrocode}
243 %  \end{macro}
248 %  \begin{macro}{\default@mextra}
249 %    The new name is |\DeclareFontEncodingDefaults| but in this case
250 %    we don't feel comfortable with this either.
251 %    \begin{macrocode}
252 \gdef\default@mextra{%
253   \warn@rel@i\default@mextra\DeclareFontEncodingDefaults
254 %    \end{macrocode}
255 %    We pick up the argument to |\default@mextra| implicitly as
256 %    the second argument of |\DeclareFontEncodingDefaults|.
257 %    \begin{macrocode}
258   \DeclareFontEncodingDefaults\relax
260 \@onlypreamble\default@mextra
261 %    \end{macrocode}
262 %  \end{macro}
266 %  \begin{macro}{\preload@sizes}
267 %    The new interface is |\DeclarePreloadSizes|.
268 %    \begin{macrocode}
269 \gdef\preload@sizes{%
270      \warn@rel@i\preload@sizes\DeclarePreloadSizes
271      \DeclarePreloadSizes U%
273 \@onlypreamble\preload@sizes
274 %    \end{macrocode}
275 %  \end{macro}
278 %  \begin{macro}{\err@rel@i}
279 %    This macro is used in cases where emulation with NFSS2 features
280 %    is not really possible.
281 %    \begin{macrocode}
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.}%
289 %    \end{macrocode}
290 %    Let's die.
291 %    \begin{macrocode}
292   \batchmode\input.\relax
294 \@onlypreamble\err@rel@i
295 %    \end{macrocode}
296 %  \end{macro}
300 % \begin{macro}{\newmathalphabet}
301 % \begin{macro}{\newmathalphabet@@}
302 % \begin{macro}{\newmathalphabet@@@}
303 %    |\newmathalphabet| is the old form.
304 %    \begin{macrocode}
305 \gdef\newmathalphabet{%
306   \if@no@font@opt
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%
311               }%
312        {Please look at the file usrguide.tex for hints on
313         how to resolve this problem.}%
314   \else
315      \warn@rel@i\newmathalphabet\DeclareMathAlphabet
316   \fi
317   \@ifstar\newmathalphabet@@@
318           \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@@@
325 %    \end{macrocode}
326 % \end{macro}
327 % \end{macro}
328 % \end{macro}
330 %  \begin{macro}{\if@no@font@opt}
331 %  \begin{macro}{\@no@font@optfalse}
332 %    \begin{macrocode}
333 \global\let\if@no@font@opt\iftrue
334 \gdef\@no@font@optfalse{\let\if@no@font@opt\iffalse}%
335 %    \end{macrocode}
336 % \end{macro}
337 % \end{macro}
339 %  \begin{macro}{\define@mathalphabet}
340 %    This is a case where dying is best.
341 %    \begin{macrocode}
342 \gdef\define@mathalphabet{%
343       \err@rel@i\define@mathalphabet\DeclareMathAlphabet
345 \@onlypreamble\define@mathalphabet
346 %    \end{macrocode}
347 %  \end{macro}
352 %  \begin{macro}{\define@mathgroup}
353 %    And here is another one
354 %    \begin{macrocode}
355 \gdef\define@mathgroup{%
356       \err@rel@i\define@mathgroup\DeclareSymbolFont
358 \@onlypreamble\define@mathgroup
359 %    \end{macrocode}
360 %  \end{macro}
362 % \begin{macro}{\addtoversion}
363 %    |\addtoversion| is the old form.
364 %    \begin{macrocode}
365 \def\addtoversion#1#2{%
366   \warn@rel@i\addtoversion\SetMathAlphabet
367   \SetMathAlphabet#2{#1}{U}}%
368 \@onlypreamble\addtoversion
369 %    \end{macrocode}
370 % \end{macro}
372 % Finishing off this huge |\IncludeInRelease| argument:
373 %    \begin{macrocode}
374 \EndIncludeInRelease
375 %</latexrelease>
376 %    \end{macrocode}
378 % \Finale