summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/ltfsscmp.dtx
blob: b4441aa41208279e80cfce56c1cafdf09a7a7241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
% \iffalse meta-comment
%
% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file. 
% 
% This file is part of the LaTeX base system.
% -------------------------------------------
% 
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%    http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX 
% version 2003/12/01 or later.
% 
% This file has the LPPL maintenance status "maintained".
% 
% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.txt'. See also `legal.txt' for additional
% information.
% 
% The list of derived (unpacked) files belonging to the distribution 
% and covered by LPPL is defined by the unpacking scripts (with 
% extension .ins) which are part of the distribution.
% 
% \fi
% \iffalse
%%% From File: ltfsscmp.dtx
%% Copyright (C) 1989-1995 Frank Mittelbach and Rainer Sch\"opf,
%% all rights reserved.
%
%<*driver>
% \fi
% 
%
\ProvidesFile{ltfsscmp.dtx}
             [1995/08/26 v3.0c LaTeX Kernel (NFSS1 Compatibility)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
\DocInput{ltfsscmp.dtx}
\end{document}
%</driver>
% \fi
%
% \iffalse
%<+checkmem>\def\CHECKMEM{\tracingstats=2
%<+checkmem>  \newlinechar=`\^^J
%<+checkmem>  \message{^^JMemory usage: \filename}\shipout\hbox{}}
%<+checkmem>\CHECKMEM
% \fi
%
% \CheckSum{235}
%
%
% \GetFileInfo{ltfsscmp.dtx}
% \title{A new font selection scheme for \TeX{} macro packages\\
%        (Compatibility with NFSS1)\thanks
%       {This file has version number
%       \fileversion\ dated \filedate}}
%
% \author{Frank Mittelbach \and Rainer Sch\"opf}
%
% \maketitle
%
% This file contains the  implementation of commands giving
% compatibility with the original `NFSS1' release of the Font Selection
% Scheme.
%
% \begin{quote}
%   \textbf{Warning:} 
%  The macro documentation is still basically the documentation from the
%  first NFSS release and therefore in some cases probably not
%  completely accurate.
% \end{quote}
%
% \StopEventually{}
%
%
% \changes{v3.0b}{1995/06/15}
%         {(DPC) minor documentation edits}
% \changes{v3.0a}{1995/05/24}
%         {(DPC) Make file from previous file, fam.dtx 1995/05/20 v2.2d}
%
%
%
% \section{Compatibility code for NFSS release 1}
%
% There have been a couple of commands which became obsolete with NFSS2.
% In the past they have been still part of the kernel code to make it
% possible to process old packages using those commands but since they
% take up valuable space we decided to remove them and instead
% auto-load their definitions if they are actually encountered in some
% file.
%
% Thus the following code doesn't really belong to this file but I put
% it here for the moment until finally a documented version of
% \texttt{ltfss.dtx} is available.
%
% [ auto-loading not activated ]
%
% \begin{macro}{\new@fontshape}
% \begin{macro}{\subst@fontshape}
% \begin{macro}{\extra@def}
% \begin{macro}{\default@mextra}
% \begin{macro}{\define@mathalphabet}
% \begin{macro}{\define@mathgroup}
%    These macros are the interfaces in NFSS1 which shouldn't be used
%    any longer. We all define them to call the macro
%    |\scan@fontshape| which is an internal macro that loads the real
%    definitions and then to execute themselves again. Once this
%    auto-loading has happened they have the definition shown below and
%    thus execute their real code directly.
%    \begin{macrocode}
%<*autoload>
\def\new@fontshape{\scan@fontshape\new@fontshape}
\def\subst@fontshape{\scan@fontshape\subst@fontshape}
\def\extra@def{\scan@fontshape\extra@def}
\def\default@mextra{\scan@fontshape\default@mextra}
\def\define@mathalphabet{\scan@fontshape\define@mathalphabet}
\def\define@mathgroup{\scan@fontshape\define@mathgroup}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{\scan@fontshape}
%    Here is the kernel definition for |\scan@fontshape| which loads
%    the actual definitions from the file \texttt{nfsscmp.def}.
%    \begin{macrocode}
\def\scan@fontshape{\input{nfsscmp.def}}
%    \end{macrocode}
% \end{macro}
%
%
%    The following definitions are now placed into the auto-load file.
%    \begin{macrocode}
%    \end{macrocode}
%
%    Since we don't know when this file will be read in we need to
%    provide ourselves with standard |\catcode| settings. This is done
%    by placing all definitions in a group and calling
%    |\nfss@catcodes|. But this macro will also disable spaces which
%    isn't very appropriate for the following code because it contains
%    a lot of helper messages. Therefore we change this back.
%    \begin{macrocode}
\begingroup
\nfss@catcodes
\catcode`\ =10\relax
%</autoload>
%<*compat>
%    \end{macrocode}
%
% \begin{macro}{\new@fontshape}
%    The interface is now |\DeclareFontShape|.
%    \begin{macrocode}
\gdef\new@fontshape#1#2#3#4{%
     \warn@rel@i\new@fontshape\DeclareFontShape
     \expandafter\scan@fontshape\@gobble#4<\@nil><<%
     \DeclareFontShape U{#1}{#2}{#3}\reserved@f}
\@onlypreamble\new@fontshape
%    \end{macrocode}
% \end{macro}
%
%
%  \begin{macro}{\warn@rel@i}
%    The warning message used above.
%    \begin{macrocode}
\gdef\warn@rel@i#1#2{%
 \@font@warning{***  NFSS release 1 command 
               \noexpand#1found\MessageBreak 
   ***  Update by using release 2 command 
        \string#2.\MessageBreak 
   ***  Recovery is probably possible}% 
}
\@onlypreamble\warn@rel@i
%    \end{macrocode}
%  \end{macro}
%
%
%
%  \begin{macro}{\scan@fontshape}
%    This will scan the old font shape definition syntax.
%    \begin{macrocode}
\gdef\scan@fontshape{%
  \let\reserved@f\@empty
  \let\reserved@e\@empty %        holds last info
  \scan@@fontshape
}
\@onlypreamble\scan@fontshape
%    \end{macrocode}
%  \end{macro}
%
%
%  \begin{macro}{\scan@@fontshape}
%    \begin{macrocode}
\gdef\scan@@fontshape#1>#2#3<{%
  \ifx\@nil#1%
    \edef\reserved@f{\reserved@f\reserved@e}%
  \else
    \def\reserved@b{#1}%       nick names
    \def\reserved@c{#3}%
    \in@{ at}{#3}%
    \ifin@
      \in@{pt}{#3}%  not a proof but a good chance
      \ifin@
%    \end{macrocode}
%    We grap also everything after pt and discard it if people have
%    forgotten to place a percent sign there.
% \changes{v2.1d}{1994/02/10}{scan away stuff after pt}
%    \begin{macrocode}
        \def\reserved@a##1 at##2pt##3\@nil{%
           \def\reserved@b{##2}%
           \def\reserved@c{##1}%
           }%
        \reserved@a#3\@nil
      \fi
    \fi
    \ifnum 0<0#2 
      \edef\reserved@d{subf*\reserved@c}%
      \ifcase #2\or
      \or
      \else
        \errmessage{*** What's this? NFSS release 0? ***}%
      \fi   
    \else
      \edef\reserved@d{#2\reserved@c}%
    \fi
    \ifx\reserved@d\reserved@e
      \edef\reserved@f{\reserved@f<\reserved@b>}%
    \else
      \edef\reserved@f{\reserved@f\reserved@e<\reserved@b>}%add old info
      \let\reserved@e\reserved@d
    \fi
    \expandafter\scan@@fontshape
  \fi
}
\@onlypreamble\scan@@fontshape
%    \end{macrocode}
%  \end{macro}
%
%
%
% \begin{macro}{\subst@fontshape}
%    This is now also handled by the extend syntax of
%    |\DeclareFontShape|.
%    \begin{macrocode}
\gdef\subst@fontshape#1#2#3#4#5#6{%
     \warn@rel@i\subst@fontshape\DeclareFontShape
     \DeclareFontShape{U}{#1}{#2}{#3}{<->sub*#4/#5/#6}{}}
\@onlypreamble\subst@fontshape
%    \end{macrocode}
% \end{macro}
%
%
%
%  \begin{macro}{\extra@def}
%    This was replaced by |\DeclareFontFamily|.
%    \begin{macrocode}
\gdef\extra@def#1#2#3{%
     \warn@rel@i\extra@def\DeclareFontFamily
     \DeclareFontFamily{U}{#1}{}%
}
\@onlypreamble\extra@def
%    \end{macrocode}
%  \end{macro}
%
%
%
%
%  \begin{macro}{\default@mextra}
%    The new name is |\DeclareFontEncodingDefaults| but in this case
%    we don't feel comfortable with this either.
%    \begin{macrocode}
\gdef\default@mextra{%
  \warn@rel@i\default@mextra\DeclareFontEncodingDefaults
%    \end{macrocode}
%    We pick up the argument to |\default@mextra| implicitly as
%    the second argument of |\DeclareFontEncodingDefaults|.
%    \begin{macrocode}
  \DeclareFontEncodingDefaults\relax
}
\@onlypreamble\default@mextra
%    \end{macrocode}
%  \end{macro}
%
%
%
%  \begin{macro}{\preload@sizes}
%    The new interface is |\DeclarePreloadSizes|.
%    \begin{macrocode}
\gdef\preload@sizes{%
     \warn@rel@i\preload@sizes\DeclarePreloadSizes
     \DeclarePreloadSizes U%
}
\@onlypreamble\preload@sizes
%    \end{macrocode}
%  \end{macro}
%
%
%  \begin{macro}{\err@rel@i}
%    This macro is used in cases where emulation with NFSS2 features
%    is not really possible.
%    \begin{macrocode}
\gdef\err@rel@i#1#2{%
  \@latex@error{***  NFSS release 1 command \noexpand#1found%
          ^^J***  Recovery not possible. Use \string#2}% 
       {The new release of NFSS doesn't support the
        \noexpand#1command^^Jany longer.
        Please upgrade your file to the syntax of NFSS
        release 2^^Jusing the \noexpand#2command.}%
%    \end{macrocode}
%    Let's die.
%    \begin{macrocode}
  \batchmode\input.\relax
}
\@onlypreamble\err@rel@i
%    \end{macrocode}
%  \end{macro}
%
%
%
% \begin{macro}{\newmathalphabet}
% \begin{macro}{\newmathalphabet@@}
% \begin{macro}{\newmathalphabet@@@}
%    |\newmathalphabet| is the old form.
%    \begin{macrocode}
\gdef\newmathalphabet{%
  \if@no@font@opt
    \@latex@error{*** NFSS release 1 command 
                    \noexpand\newmathalphabet found%
     ^^J \space*** Automatic recovery not possible.%
     ^^J \space*** TYPE H for Help%
              }% 
       {Please look at the file usrguide.tex for hints on
        how to resolve this problem.}%
  \else
     \warn@rel@i\newmathalphabet\DeclareMathAlphabet
  \fi
  \@ifstar\newmathalphabet@@@
          \newmathalphabet@@}
\gdef\newmathalphabet@@#1{\DeclareMathAlphabet#1{U}{}{}{}}
\gdef\newmathalphabet@@@#1#2#3#4{%
       \DeclareMathAlphabet{#1}{U}{#2}{#3}{#4}}
\@onlypreamble\newmathalphabet
\@onlypreamble\newmathalphabet@@
\@onlypreamble\newmathalphabet@@@
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%  \begin{macro}{\if@no@font@opt}
%  \begin{macro}{\@no@font@optfalse}
%    \begin{macrocode}
\global\let\if@no@font@opt\iftrue
\gdef\@no@font@optfalse{\let\if@no@font@opt\iffalse}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%  \begin{macro}{\define@mathalphabet}
%    This is a case where dying is best.
%    \begin{macrocode}
\gdef\define@mathalphabet{%
      \err@rel@i\define@mathalphabet\DeclareMathAlphabet
}
\@onlypreamble\define@mathalphabet
%    \end{macrocode}
%  \end{macro}
%
%
%
%
%  \begin{macro}{\define@mathgroup}
%    And here is another one
%    \begin{macrocode}
\gdef\define@mathgroup{%
      \err@rel@i\define@mathgroup\DeclareSymbolFont
}
\@onlypreamble\define@mathgroup
%</compat>
%    \end{macrocode}
%  \end{macro}
%
%
% \begin{macro}{\addtoversion}
%    |\addtoversion| is the old form.
%    \begin{macrocode}
\def\addtoversion#1#2{%
  \warn@rel@i\addtoversion\SetMathAlphabet
  \SetMathAlphabet#2{#1}{U}}
\@onlypreamble\addtoversion
%    \end{macrocode}
% \end{macro}
%
%
%
% That finishes the definitions for the old interfaces --- but first
% we better finish the group.
%    \begin{macrocode}
%<*autoload>
\endgroup
%</autoload>
%    \end{macrocode}
%
% \Finale
%