1 % \iffalse meta-comment
3 % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
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 [1995/08/26 v3.0c 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}
68 % This file contains the implementation of commands giving
69 % compatibility with the original `NFSS1' release of the Font Selection
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.
82 % \changes{v3.0b}{1995/06/15}
83 % {(DPC) minor documentation edits}
84 % \changes{v3.0a}{1995/05/24}
85 % {(DPC) Make file from previous file, fam.dtx 1995/05/20 v2.2d}
89 % \section{Compatibility code for NFSS release 1}
91 % There have been a couple of commands which became obsolete with NFSS2.
92 % In the past they have been still part of the kernel code to make it
93 % possible to process old packages using those commands but since they
94 % take up valuable space we decided to remove them and instead
95 % auto-load their definitions if they are actually encountered in some
98 % Thus the following code doesn't really belong to this file but I put
99 % it here for the moment until finally a documented version of
100 % \texttt{ltfss.dtx} is available.
102 % [ auto-loading not activated ]
104 % \begin{macro}{\new@fontshape}
105 % \begin{macro}{\subst@fontshape}
106 % \begin{macro}{\extra@def}
107 % \begin{macro}{\default@mextra}
108 % \begin{macro}{\define@mathalphabet}
109 % \begin{macro}{\define@mathgroup}
110 % These macros are the interfaces in NFSS1 which shouldn't be used
111 % any longer. We all define them to call the macro
112 % |\scan@fontshape| which is an internal macro that loads the real
113 % definitions and then to execute themselves again. Once this
114 % auto-loading has happened they have the definition shown below and
115 % thus execute their real code directly.
118 \def\new@fontshape{\scan@fontshape\new@fontshape}
119 \def\subst@fontshape{\scan@fontshape\subst@fontshape}
120 \def\extra@def{\scan@fontshape\extra@def}
121 \def\default@mextra{\scan@fontshape\default@mextra}
122 \def\define@mathalphabet{\scan@fontshape\define@mathalphabet}
123 \def\define@mathgroup{\scan@fontshape\define@mathgroup}
133 % \begin{macro}{\scan@fontshape}
134 % Here is the kernel definition for |\scan@fontshape| which loads
135 % the actual definitions from the file \texttt{nfsscmp.def}.
137 \def\scan@fontshape{\input{nfsscmp.def}}
142 % The following definitions are now placed into the auto-load file.
146 % Since we don't know when this file will be read in we need to
147 % provide ourselves with standard |\catcode| settings. This is done
148 % by placing all definitions in a group and calling
149 % |\nfss@catcodes|. But this macro will also disable spaces which
150 % isn't very appropriate for the following code because it contains
151 % a lot of helper messages. Therefore we change this back.
160 % \begin{macro}{\new@fontshape}
161 % The interface is now |\DeclareFontShape|.
163 \gdef\new@fontshape#1#2#3#4{%
164 \warn@rel@i\new@fontshape\DeclareFontShape
165 \expandafter\scan@fontshape\@gobble#4<\@nil><<%
166 \DeclareFontShape U{#1}{#2}{#3}\reserved@f}
167 \@onlypreamble\new@fontshape
172 % \begin{macro}{\warn@rel@i}
173 % The warning message used above.
175 \gdef\warn@rel@i#1#2{%
176 \@font@warning{*** NFSS release 1 command
177 \noexpand#1found\MessageBreak
178 *** Update by using release 2 command
179 \string#2.\MessageBreak
180 *** Recovery is probably possible}%
182 \@onlypreamble\warn@rel@i
188 % \begin{macro}{\scan@fontshape}
189 % This will scan the old font shape definition syntax.
191 \gdef\scan@fontshape{%
192 \let\reserved@f\@empty
193 \let\reserved@e\@empty % holds last info
196 \@onlypreamble\scan@fontshape
201 % \begin{macro}{\scan@@fontshape}
203 \gdef\scan@@fontshape#1>#2#3<{%
205 \edef\reserved@f{\reserved@f\reserved@e}%
207 \def\reserved@b{#1}% nick names
211 \in@{pt}{#3}% not a proof but a good chance
214 % We grap also everything after pt and discard it if people have
215 % forgotten to place a percent sign there.
216 % \changes{v2.1d}{1994/02/10}{scan away stuff after pt}
218 \def\reserved@a##1 at##2pt##3\@nil{%
219 \def\reserved@b{##2}%
220 \def\reserved@c{##1}%
226 \edef\reserved@d{subf*\reserved@c}%
230 \errmessage{*** What's this? NFSS release 0? ***}%
233 \edef\reserved@d{#2\reserved@c}%
235 \ifx\reserved@d\reserved@e
236 \edef\reserved@f{\reserved@f<\reserved@b>}%
238 \edef\reserved@f{\reserved@f\reserved@e<\reserved@b>}%add old info
239 \let\reserved@e\reserved@d
241 \expandafter\scan@@fontshape
244 \@onlypreamble\scan@@fontshape
250 % \begin{macro}{\subst@fontshape}
251 % This is now also handled by the extend syntax of
252 % |\DeclareFontShape|.
254 \gdef\subst@fontshape#1#2#3#4#5#6{%
255 \warn@rel@i\subst@fontshape\DeclareFontShape
256 \DeclareFontShape{U}{#1}{#2}{#3}{<->sub*#4/#5/#6}{}}
257 \@onlypreamble\subst@fontshape
263 % \begin{macro}{\extra@def}
264 % This was replaced by |\DeclareFontFamily|.
266 \gdef\extra@def#1#2#3{%
267 \warn@rel@i\extra@def\DeclareFontFamily
268 \DeclareFontFamily{U}{#1}{}%
270 \@onlypreamble\extra@def
277 % \begin{macro}{\default@mextra}
278 % The new name is |\DeclareFontEncodingDefaults| but in this case
279 % we don't feel comfortable with this either.
281 \gdef\default@mextra{%
282 \warn@rel@i\default@mextra\DeclareFontEncodingDefaults
284 % We pick up the argument to |\default@mextra| implicitly as
285 % the second argument of |\DeclareFontEncodingDefaults|.
287 \DeclareFontEncodingDefaults\relax
289 \@onlypreamble\default@mextra
295 % \begin{macro}{\preload@sizes}
296 % The new interface is |\DeclarePreloadSizes|.
298 \gdef\preload@sizes{%
299 \warn@rel@i\preload@sizes\DeclarePreloadSizes
300 \DeclarePreloadSizes U%
302 \@onlypreamble\preload@sizes
307 % \begin{macro}{\err@rel@i}
308 % This macro is used in cases where emulation with NFSS2 features
309 % is not really possible.
311 \gdef\err@rel@i#1#2{%
312 \@latex@error{*** NFSS release 1 command \noexpand#1found%
313 ^^J*** Recovery not possible. Use \string#2}%
314 {The new release of NFSS doesn't support the
315 \noexpand#1command^^Jany longer.
316 Please upgrade your file to the syntax of NFSS
317 release 2^^Jusing the \noexpand#2command.}%
321 \batchmode\input.\relax
323 \@onlypreamble\err@rel@i
329 % \begin{macro}{\newmathalphabet}
330 % \begin{macro}{\newmathalphabet@@}
331 % \begin{macro}{\newmathalphabet@@@}
332 % |\newmathalphabet| is the old form.
334 \gdef\newmathalphabet{%
336 \@latex@error{*** NFSS release 1 command
337 \noexpand\newmathalphabet found%
338 ^^J \space*** Automatic recovery not possible.%
339 ^^J \space*** TYPE H for Help%
341 {Please look at the file usrguide.tex for hints on
342 how to resolve this problem.}%
344 \warn@rel@i\newmathalphabet\DeclareMathAlphabet
346 \@ifstar\newmathalphabet@@@
348 \gdef\newmathalphabet@@#1{\DeclareMathAlphabet#1{U}{}{}{}}
349 \gdef\newmathalphabet@@@#1#2#3#4{%
350 \DeclareMathAlphabet{#1}{U}{#2}{#3}{#4}}
351 \@onlypreamble\newmathalphabet
352 \@onlypreamble\newmathalphabet@@
353 \@onlypreamble\newmathalphabet@@@
359 % \begin{macro}{\if@no@font@opt}
360 % \begin{macro}{\@no@font@optfalse}
362 \global\let\if@no@font@opt\iftrue
363 \gdef\@no@font@optfalse{\let\if@no@font@opt\iffalse}
368 % \begin{macro}{\define@mathalphabet}
369 % This is a case where dying is best.
371 \gdef\define@mathalphabet{%
372 \err@rel@i\define@mathalphabet\DeclareMathAlphabet
374 \@onlypreamble\define@mathalphabet
381 % \begin{macro}{\define@mathgroup}
382 % And here is another one
384 \gdef\define@mathgroup{%
385 \err@rel@i\define@mathgroup\DeclareSymbolFont
387 \@onlypreamble\define@mathgroup
393 % \begin{macro}{\addtoversion}
394 % |\addtoversion| is the old form.
396 \def\addtoversion#1#2{%
397 \warn@rel@i\addtoversion\SetMathAlphabet
398 \SetMathAlphabet#2{#1}{U}}
399 \@onlypreamble\addtoversion
405 % That finishes the definitions for the old interfaces --- but first
406 % we better finish the group.