Debian Codegraph @

texmf-dist/source/latex/base/ltfsscmp.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 1993-2025
4 % The LaTeX Project and any individual authors listed elsewhere
5 % in this file.
6 %
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
9 %
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 % https://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2008 or later.
17 %
18 % This file has the LPPL maintenance status "maintained".
19 %
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.
23 %
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.
27 %
28 % \fi
29 % \iffalse
30 %%% From File: ltfsscmp.dtx
31 %% Copyright (C) 1989-1995 Frank Mittelbach and Rainer Sch\"opf,
32 %% all rights reserved.
33 %
34 %<*driver>
35 % \fi
36 %
37 %
38 \ProvidesFile{ltfsscmp.dtx}
39 [2020/12/05 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
47 %
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
54 %
55 %
56 %
57 % \GetFileInfo{ltfsscmp.dtx}
58 % \title{A new font selection scheme for \TeX{} macro packages\\
59 % (Compatibility with NFSS1)\thanks
60 % {This file has version number
61 % \fileversion\ dated \filedate}}
62 %
63 % \author{Frank Mittelbach \and Rainer Sch\"opf}
64 %
65 % \MaintainedByLaTeXTeam{latex}
66 % \maketitle
67 %
68 % This file contains the implementation of commands giving
69 % compatibility with the original `NFSS1' release of the Font Selection
70 % Scheme.
71 %
72 % \begin{quote}
73 % \textbf{Warning:}
74 % The macro documentation is still basically the documentation from the
75 % first NFSS release and therefore in some cases probably not
76 % completely accurate.
77 % \end{quote}
78 %
79 % Version 1 of NFSS is obsolete now for about 20 years (and was
80 % ``current'' only for a short intermediate time) so with the 2015
81 % release these internal interface commands are removed from the
82 % kernel and made available via \textsf{latexrelease} package so that
83 % backward compatibility remains ensured for very old documents.
84 %
85 % \MaybeStop{}
86 %
87 %
88 % \changes{v3.0b}{1995/06/15}
89 % {(DPC) minor documentation edits}
90 % \changes{v3.0a}{1995/05/24}
91 % {(DPC) Make file from previous file, fam.dtx 1995/05/20 v2.2d}
92 % \changes{v3.0d}{2015/02/21}
93 % {Removed autoload code}
94 % \changes{v3.0e}{2015/02/22}
95 % {Moved all code into latexrelease - obsolete commands are no
96 % longer automatically part of the kernel}
97 %
98 %
99 % \begin{macrocode}
100 %<*latexrelease>
101 \IncludeInRelease{2015/01/01}{\new@fontshape}%
102 {NFSS version1 commands}%
103 \let\new@fontshape\@undefined
104 \let\warn@rel@i\@undefined
105 \let\scan@fontshape\@undefined
106 \let\scan@@fontshape\@undefined
107 \let\subst@fontshape\@undefined
108 \let\extra@def\@undefined
109 \let\default@mextra\@undefined
110 \let\preload@sizes\@undefined
111 \let\err@rel@i\@undefined
112 \let\newmathalphabet\@undefined
113 \let\newmathalphabet@\@undefined
114 \let\newmathalphabet@@@\@undefined
115 \let\if@no@font@opt\@undefined
116 \let\@no@font@optfalse\@undefined
117 \let\define@mathalphabet\@undefined
118 \let\define@mathgroup\@undefined
119 \let\addtoversion\@undefined
120 \EndIncludeInRelease
121 % \end{macrocode}
122 %
123 % In older releases we provide the original definitions.
124 %
125 % \begin{macrocode}
126 \IncludeInRelease{0000/00/00}{\new@fontshape}%
127 {NFSS version1 commands}%
128 % \end{macrocode}
129 %
130 % \begin{macro}{\new@fontshape}
131 % The interface is now |\DeclareFontShape|.
132 % \begin{macrocode}
133 \gdef\new@fontshape#1#2#3#4{%
134 \warn@rel@i\new@fontshape\DeclareFontShape
135 \expandafter\scan@fontshape\@gobble#4<\@nil><<%
136 \DeclareFontShape U{#1}{#2}{#3}\reserved@f}%
137 \@onlypreamble\new@fontshape
138 % \end{macrocode}
139 % \end{macro}
140 %
141 %
142 % \begin{macro}{\warn@rel@i}
143 % The warning message used above.
144 % \begin{macrocode}
145 \gdef\warn@rel@i#1#2{%
146 \@font@warning{*** NFSS release 1 command
147 \noexpand#1found\MessageBreak
148 *** Update by using release 2 command
149 \string#2.\MessageBreak
150 *** Recovery is probably possible}%
151 }%
152 \@onlypreamble\warn@rel@i
153 % \end{macrocode}
154 % \end{macro}
155 %
156 %
157 %
158 % \begin{macro}{\scan@fontshape}
159 % This will scan the old font shape definition syntax.
160 % \begin{macrocode}
161 \gdef\scan@fontshape{%
162 \let\reserved@f\@empty
163 \let\reserved@e\@empty % holds last info
164 \scan@@fontshape
165 }%
166 \@onlypreamble\scan@fontshape
167 % \end{macrocode}
168 % \end{macro}
169 %
170 %
171 % \begin{macro}{\scan@@fontshape}
172 % \begin{macrocode}
173 \gdef\scan@@fontshape#1>#2#3<{%
174 \ifx\@nil#1%
175 \edef\reserved@f{\reserved@f\reserved@e}%
176 \else
177 \def\reserved@b{#1}% nick names
178 \def\reserved@c{#3}%
179 \in@{ at}{#3}%
180 \ifin@
181 \in@{pt}{#3}% not a proof but a good chance
182 \ifin@
183 % \end{macrocode}
184 % We grab also everything after pt and discard it if people have
185 % forgotten to place a percent sign there.
186 % \changes{v2.1d}{1994/02/10}{scan away stuff after pt}
187 % \begin{macrocode}
188 \def\reserved@a##1 at##2pt##3\@nil{%
189 \def\reserved@b{##2}%
190 \def\reserved@c{##1}%
191 }%
192 \reserved@a#3\@nil
193 \fi
194 \fi
195 \ifnum 0<0#2
196 \edef\reserved@d{subf*\reserved@c}%
197 \ifcase #2\or
198 \or
199 \else
200 \errmessage{*** What's this? NFSS release 0? ***}%
201 \fi
202 \else
203 \edef\reserved@d{#2\reserved@c}%
204 \fi
205 \ifx\reserved@d\reserved@e
206 \edef\reserved@f{\reserved@f<\reserved@b>}%
207 \else
208 \edef\reserved@f{\reserved@f\reserved@e<\reserved@b>}%add old info
209 \let\reserved@e\reserved@d
210 \fi
211 \expandafter\scan@@fontshape
212 \fi
213 }%
214 \@onlypreamble\scan@@fontshape
215 % \end{macrocode}
216 % \end{macro}
217 %
218 %
219 %
220 % \begin{macro}{\subst@fontshape}
221 % This is now also handled by the extend syntax of
222 % |\DeclareFontShape|.
223 % \begin{macrocode}
224 \gdef\subst@fontshape#1#2#3#4#5#6{%
225 \warn@rel@i\subst@fontshape\DeclareFontShape
226 \DeclareFontShape{U}{#1}{#2}{#3}{<->sub*#4/#5/#6}{}}%
227 \@onlypreamble\subst@fontshape
228 % \end{macrocode}
229 % \end{macro}
230 %
231 %
232 %
233 % \begin{macro}{\extra@def}
234 % This was replaced by |\DeclareFontFamily|.
235 % \begin{macrocode}
236 \gdef\extra@def#1#2#3{%
237 \warn@rel@i\extra@def\DeclareFontFamily
238 \DeclareFontFamily{U}{#1}{}%
239 }%
240 \@onlypreamble\extra@def
241 % \end{macrocode}
242 % \end{macro}
243 %
244 %
245 %
246 %
247 % \begin{macro}{\default@mextra}
248 % The new name is |\DeclareFontEncodingDefaults| but in this case
249 % we don't feel comfortable with this either.
250 % \begin{macrocode}
251 \gdef\default@mextra{%
252 \warn@rel@i\default@mextra\DeclareFontEncodingDefaults
253 % \end{macrocode}
254 % We pick up the argument to |\default@mextra| implicitly as
255 % the second argument of |\DeclareFontEncodingDefaults|.
256 % \begin{macrocode}
257 \DeclareFontEncodingDefaults\relax
258 }%
259 \@onlypreamble\default@mextra
260 % \end{macrocode}
261 % \end{macro}
262 %
263 %
264 %
265 % \begin{macro}{\preload@sizes}
266 % The new interface is |\DeclarePreloadSizes|.
267 % \begin{macrocode}
268 \gdef\preload@sizes{%
269 \warn@rel@i\preload@sizes\DeclarePreloadSizes
270 \DeclarePreloadSizes U%
271 }%
272 \@onlypreamble\preload@sizes
273 % \end{macrocode}
274 % \end{macro}
275 %
276 %
277 % \begin{macro}{\err@rel@i}
278 % This macro is used in cases where emulation with NFSS2 features
279 % is not really possible.
280 % \begin{macrocode}
281 \gdef\err@rel@i#1#2{%
282 \@latex@error{*** NFSS release 1 command \noexpand#1found%
283 ^^J*** Recovery not possible. Use \string#2}%
284 {The new release of NFSS doesn't support the
285 \noexpand#1command^^Jany longer.
286 Please upgrade your file to the syntax of NFSS
287 release 2^^Jusing the \noexpand#2command.}%
288 % \end{macrocode}
289 % Let's die.
290 % \begin{macrocode}
291 \batchmode\input.\relax
292 }%
293 \@onlypreamble\err@rel@i
294 % \end{macrocode}
295 % \end{macro}
296 %
297 %
298 %
299 % \begin{macro}{\newmathalphabet}
300 % \begin{macro}{\newmathalphabet@@}
301 % \begin{macro}{\newmathalphabet@@@}
302 % |\newmathalphabet| is the old form.
303 % \begin{macrocode}
304 \gdef\newmathalphabet{%
305 \if@no@font@opt
306 \@latex@error{*** NFSS release 1 command
307 \noexpand\newmathalphabet found%
308 ^^J \space*** Automatic recovery not possible.%
309 ^^J \space*** TYPE H for Help%
310 }%
311 {Please look at the file usrguide.tex for hints on
312 how to resolve this problem.}%
313 \else
314 \warn@rel@i\newmathalphabet\DeclareMathAlphabet
315 \fi
316 \@ifstar\newmathalphabet@@@
317 \newmathalphabet@@}%
318 \gdef\newmathalphabet@@#1{\DeclareMathAlphabet#1{U}{}{}{}}%
319 \gdef\newmathalphabet@@@#1#2#3#4{%
320 \DeclareMathAlphabet{#1}{U}{#2}{#3}{#4}}%
321 \@onlypreamble\newmathalphabet
322 \@onlypreamble\newmathalphabet@@
323 \@onlypreamble\newmathalphabet@@@
324 % \end{macrocode}
325 % \end{macro}
326 % \end{macro}
327 % \end{macro}
328 %
329 % \begin{macro}{\if@no@font@opt}
330 % \begin{macro}{\@no@font@optfalse}
331 % \begin{macrocode}
332 \global\let\if@no@font@opt\iftrue
333 \gdef\@no@font@optfalse{\let\if@no@font@opt\iffalse}%
334 % \end{macrocode}
335 % \end{macro}
336 % \end{macro}
337 %
338 % \begin{macro}{\define@mathalphabet}
339 % This is a case where dying is best.
340 % \begin{macrocode}
341 \gdef\define@mathalphabet{%
342 \err@rel@i\define@mathalphabet\DeclareMathAlphabet
343 }%
344 \@onlypreamble\define@mathalphabet
345 % \end{macrocode}
346 % \end{macro}
347 %
348 %
349 %
350 %
351 % \begin{macro}{\define@mathgroup}
352 % And here is another one
353 % \begin{macrocode}
354 \gdef\define@mathgroup{%
355 \err@rel@i\define@mathgroup\DeclareSymbolFont
356 }%
357 \@onlypreamble\define@mathgroup
358 % \end{macrocode}
359 % \end{macro}
360 %
361 % \begin{macro}{\addtoversion}
362 % |\addtoversion| is the old form.
363 % \begin{macrocode}
364 \def\addtoversion#1#2{%
365 \warn@rel@i\addtoversion\SetMathAlphabet
366 \SetMathAlphabet#2{#1}{U}}%
367 \@onlypreamble\addtoversion
368 % \end{macrocode}
369 % \end{macro}
370 %
371 % Finishing off this huge |\IncludeInRelease| argument:
372 % \begin{macrocode}
373 \EndIncludeInRelease
374 %</latexrelease>
375 % \end{macrocode}
376 %
377 % \Finale
378 %