The L^{A}TEX 2ε Sources

Johannes Braams David Carlisle Alan Jeffrey Leslie Lamport Frank Mittelbach Chris Rowley Rainer Schöpf

1995/12/01

Contents

a ltdirchk.dtx 1

1 L^{A}TEX System Dependant Initialisations 1

2 Initialisation 2 2.1 INITEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Some bits of 2e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 texsys.cfg 4 3.1 texsys.cfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.2 UNIX (web2c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3 UNIX (other) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.4 MSDOS (emtex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.5 MSDOS (other) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.6 VMS (???) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.7 VMS (???) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.8 MACINTOSH (OzTeX 1.6) . . . . . . . . . . . . . . . . . . . . . . 7 3.9 MACINTOSH (other) . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.10 FAKE EXAMPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 Setting \@currdir  8
5 Setting \input@path  9

6 Filename Parsing 10

7 TEX Versions 11

8 ltxcheck.tex 12

b ltplain.dtx 21

9 Plain TEX 21

c ltvers.dtx 32

10 Version Identifictation 32

d ltdefns.dtx 33

11 Definitions 33 11.1 Initex initialisations . . . . . . . . . . . . . . . . . . . . . . . . . . 33 11.2 Saved versions of TEX primitives . . . . . . . . . . . . . . . . . . . 33 11.3 Command definitions . . . . . . . . . . . . . . . . . . . . . . . . . . 34 11.4 Robust commands and protect . . . . . . . . . . . . . . . . . . . . 41 11.5 Internal defining commands . . . . . . . . . . . . . . . . . . . . . . 43 11.6 Commands for Autoloading . . . . . . . . . . . . . . . . . . . . . . 45

e ltalloc.dtx 46

12 Counters 46

f ltcntrl.dtx 47

13 Program control structure 47

g lterror.dtx 51

14 Error handling 51 14.1 General commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 14.2 Specific errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

h ltpar.dtx 60

15 Paragraphs 60 15.1 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

i ltspace.dtx 62

16 Spacing 62 16.1 Vertical spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 16.2 Horizontal space . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

j ltlogos.dtx 70

17 Logos 70

k ltfiles.dtx 71

18 File Handling 71 18.1 Safe Input Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 18.2 Listing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

l ltoutenc.dtx 80

19 Font encodings 80 19.1 Docstrip modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 19.2 Definitions for the kernel . . . . . . . . . . . . . . . . . . . . . . . . 82

19.2.1 Declaration commands . . . . . . . . . . . . . . . . . . . . . 82 19.2.2 Hyphenation . . . . . . . . . . . . . . . . . . . . . . . . . . 88 19.2.3 Miscellania . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 19.2.4 Default encodings . . . . . . . . . . . . . . . . . . . . . . . 88 19.2.5 Math material . . . . . . . . . . . . . . . . . . . . . . . . . 90

19.3 The fontenc package . . . . . . . . . . . . . . . . . . . . . . . . . . 90 19.4 Definitions for the OT1 encoding . . . . . . . . . . . . . . . . . . . 91 19.5 Definitions for the T1 encoding . . . . . . . . . . . . . . . . . . . . 92 19.6 Definitions for the OMS encoding . . . . . . . . . . . . . . . . . . . 96 19.7 Definitions for the OML encoding . . . . . . . . . . . . . . . . . . . 97

m ltfssbas.dtx 98

20 Autoloading parts of NFSS 98

21 Preliminary macros 98

22 Macros for setting up the tables 99

23 Selecting a new font 104 23.1 Macros for the user . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 23.2 Macros for loading fonts . . . . . . . . . . . . . . . . . . . . . . . . 107

24 Assigning math fonts to versions 113

n ltfsstrc.dtx 117

25 Introduction 117

26 A driver for this document 117

27 The Implementation 118

28 Handling Options 118 29 Macros common to fam.tex and tracefnt.sty 120

29.1 General font loading . . . . . . . . . . . . . . . . . . . . . . . . . . 120 29.2 Math fonts setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

29.2.1 Outline of algorithm for math font sizes . . . . . . . . . . . 124 29.2.2 Code for math font size setting . . . . . . . . . . . . . . . . 126 29.2.3 Other code for math . . . . . . . . . . . . . . . . . . . . . . 127

30 Scaled font extraction 128 30.1 Sizefunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

o ltfsscmp.dtx 140

31 Compatibility code for NFSS release 1 140

p ltfssdcl.dtx 145

32 Interface Commands 145

q ltfssini.dtx 165

33 NFSS Initialisation 165 33.1 Providing math versions . . . . . . . . . . . . . . . . . . . . . . . . 165 33.2 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

r fontdef.dtx 171

34 Introduction 171

35 Customization 171

36 The docstrip modules 172

37 A driver for this document 172

38 The fonttext.ltx file  172

38.1 Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 38.2 Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

39 The fontmath.ltx file  175

39.1 The font encodings used . . . . . . . . . . . . . . . . . . . . . . . . 175

39.1.1 Symbolfont and Alphabet declarations . . . . . . . . . . . . 175 39.2 Math font sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 39.3 The math symbol assignments . . . . . . . . . . . . . . . . . . . . . 177

39.3.1 The letters . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 39.3.2 The digits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 39.3.3 Punctuation, brace, etc. keys . . . . . . . . . . . . . . . . . 178 39.3.4 Delimitercodes for characters . . . . . . . . . . . . . . . . . 178

39.4 Symbols accessed via control sequences . . . . . . . . . . . . . . . . 179 39.4.1 Greek letters . . . . . . . . . . . . . . . . . . . . . . . . . . 179 39.4.2 Ordinary symbols . . . . . . . . . . . . . . . . . . . . . . . 180 39.4.3 Large Operators . . . . . . . . . . . . . . . . . . . . . . . . 180 39.4.4 Binary symbols . . . . . . . . . . . . . . . . . . . . . . . . . 181 39.4.5 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 39.4.6 Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 39.4.7 Punctuation symbols . . . . . . . . . . . . . . . . . . . . . . 183 39.4.8 Math accents . . . . . . . . . . . . . . . . . . . . . . . . . . 183 39.4.9 Radicals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 39.4.10 Over and under something, etc . . . . . . . . . . . . . . . . 184 39.4.11 Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

39.5 Math versions of text commands . . . . . . . . . . . . . . . . . . . 186 39.6 Other special functions and parameters . . . . . . . . . . . . . . . 186

39.6.1 Biggggg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 39.6.2 The log-like functions . . . . . . . . . . . . . . . . . . . . . 186 39.6.3 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

s preload.dtx 187

40 Overview 187

41 Customization 187

42 Module switches for the docstrip program 188

43 A driver for this document 188

44 The code 188

t ltfntcmd.dtx 191

45 Introduction 191

46 The implementation 193

47 Initialization 198

u ltcounts.dtx 199

48 Counters and Lengths 199

v ltpageno.dtx 203

49 Page Numbering 203

w ltxref.dtx 204

50 Cross Referencing 204 50.1 Cross Referencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

x ltlength.dtx 207

51 Lengths 207

y ltmiscen.dtx 208

52 Miscellaneous Environments 208 52.1 Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 52.2 Center, Flushright, Flushleft . . . . . . . . . . . . . . . . . . . . . . 212 52.3 Verbatim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

z ltmath.dtx 216

53 Math setup 216

53.1 Math commands based on plain TEX . . . . . . . . . . . . . . . . . 216 53.1.1 The log-like functions . . . . . . . . . . . . . . . . . . . . . 216 53.1.2 Biggggg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 53.1.3 The UNSORTED Rest . . . . . . . . . . . . . . . . . . . . . 217

53.2 Math Environments . . . . . . . . . . . . . . . . . . . . . . . . . . 219 53.3 External options to the standard document classes . . . . . . . . . 222

53.3.1 Left equation numbering . . . . . . . . . . . . . . . . . . . . 222 53.3.2 Flush left equations . . . . . . . . . . . . . . . . . . . . . . 222

A ltlists.dtx 225

54 List, and related environments 225 54.1 List and Trivlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 54.2 Vertical Spacing (skips) . . . . . . . . . . . . . . . . . . . . . . . . 227 54.3 Penalties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 54.4 Horizontal Spacing (dimens) . . . . . . . . . . . . . . . . . . . . . . 227 54.5 Default Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 54.6 Itemize and Enumerate . . . . . . . . . . . . . . . . . . . . . . . . 235

B ltboxes.dtx 238

55 L^{A}TEX Box commands 238 55.1 Some low-level constructs . . . . . . . . . . . . . . . . . . . . . . . 247

C lttab.dtx 248

56 Tabbing, Tabular and Array Environments 248 56.1 tabbing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 56.2 array and tabular environments . . . . . . . . . . . . . . . . . . . . 256

D ltpictur.dtx 268

57 Picture Mode 268 57.1 Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286

E ltthm.dtx 289

58 Theorem Environments 289

F ltsect.dtx 293

59 Sectioning Commands 293 59.1 The Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 59.2 Sectioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294

59.2.1 Initializations . . . . . . . . . . . . . . . . . . . . . . . . . . 299 59.3 Table of Contents etc. . . . . . . . . . . . . . . . . . . . . . . . . . 299

59.3.1 Convention . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 59.3.2 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 299

G ltfloat.dtx 302

60 Floats 302 60.1 Floating Environments . . . . . . . . . . . . . . . . . . . . . . . . . 302 60.2 Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

H ltidxglo.dtx 317

61 Index and Glossary Generation 317

I ltbibl.dtx 319

62 Bibliography Generation 319 62.1 Default definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

J ltpage.dtx 322

63 Page styles and related commands 322 63.1 Page Style Commands . . . . . . . . . . . . . . . . . . . . . . . . . 322 63.2 marking conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 322

K ltoutput.dtx 325

64 Output Routine 325

64.1 Floats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 64.1.1 Kludgeins . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 64.1.2 Float control . . . . . . . . . . . . . . . . . . . . . . . . . . 365 64.1.3 Float placement parameters . . . . . . . . . . . . . . . . . . 374

L ltclass.dtx 377

65 Introduction 377

66 User interface 377 66.1 Option processing . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

67 Class and Package interface 378 67.1 Class name and version . . . . . . . . . . . . . . . . . . . . . . . . 378 67.2 Package name and version . . . . . . . . . . . . . . . . . . . . . . . 378 67.3 Requiring other packages . . . . . . . . . . . . . . . . . . . . . . . 379 67.4 Declaring new options . . . . . . . . . . . . . . . . . . . . . . . . . 380 67.5 Safe Input Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

68 Implementation 381 68.1 Hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 68.2 Providing shipment . . . . . . . . . . . . . . . . . . . . . . . . . . . 392

69 After Preamble 394

M lthyphen.dtx 395

N ltfinal.dtx 397

70 Final settings 397 70.1 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 70.2 Typesetting parameters . . . . . . . . . . . . . . . . . . . . . . . . 397 70.3 Hyphenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 70.4 Font loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 70.5 Input encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 70.6 Applying Patch files . . . . . . . . . . . . . . . . . . . . . . . . . . 401 70.7 Initialise file list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 70.8 Dumping the format . . . . . . . . . . . . . . . . . . . . . . . . . . 402

File a

ltdirchk.dtx

1 L^{A}TEX System Dependant Initialisations

This file implements the semi-automatic determination of various system dependant parts of the initialisation. The actual definitions may be placed in a file texsys.cfg. Thus for operating systems for which the tests here do not result in acceptable settings, a ‘hand written’ texsys.cfg may be produced.

The macros that must be defined are:

\@currdir \@currdir⟨filename⟩⟨space⟩ should expand to a form of the filename that uniquely refers to the ‘current directory’ if this is possible. (The expansion should also end with a space.) on UNIX, this is \def\@currdir{./}. For more exotic operating systems you may want to make \@currdir a macro with arguments delimited by . and/or ⟨space⟩. If the operating system has no concept of directory structure, this macro should be defined to be empty.

\input@path If the primitive \openin searches the same directories as the primitive \input, then it is possible to tell (using \ifeof) whether a file exists before trying to input it. For systems like this, \input@path should be left undefined.

If \openin does not ‘follow’ \input then \input@path must be defined to be a list of directories to search for input files. The format for each directory is as for \@currdir, normally just a prefix is required, but it may be a macro with space-delimited argument. That is, if ⟨dir⟩ is an entry in the input path, TEX will try to load the expansion of ⟨dir⟩⟨filename⟩⟨space⟩

So either ⟨dir⟩ should be defined as a macro with argument delimited by space, or it should just expand to a directory name, including the final directory separator, so that it may be concatenated with the ⟨filename⟩. This means that for UNIX-like syntax, each ⟨dir⟩ should end with a slash, /.

\input@path should expand to a list of such directories, each in a {} group.

\filename@parse After a call of the form: \filename@parse{⟨filename⟩}, the three macros

\filename@area,\filename@base,\filename@ext should be defined to be the

‘area’ (or directory), basename and extension respectively. If there was no extension specified in ⟨filename⟩, \filename@ext should be \let to \relax (so this case may be tested with \@ifundefined{filename@ext} and, perhaps a default extension substituted).

Normally one would not need to define this macro in texsys.cfg as the automatic tests can supply parsers that work with UNIX and VMS and Macintosh syntax, as well as a basic parser that will cover many other cases. However some operating systems may need a ‘hand produced’ parser in which case it should be defined in this file.

The UNIX parser also works for most MSDOS TEX versions. Currently if the UNIX, VMS or Macintosh parser is not used, \filename@parse is defined to always return an empty area, and to split the argument into basename and extension at the first ‘.’ that occurs in the name. Parsers for other formats may be defined in texsys.cfg, in which case they will be used in preference to the default definitions.

\@TeXversion \@TeXversionis now set automatically by the initialisation tests in this file. You should not need to set it in texsys.cfg, however the following documentation is left for information. L^{A}TEX does not set this variable exactly, the automatic tests set it to: 2 for any version, v, v < 3.0 3 for any version, v, 3.0 ≤ v ≤ 3.14 ⟨undefined⟩ otherwise. However these values are accurate enough for L^{A}TEX to take appropriate action for these old TEXs.

If your TEX is older than version 3.141, then you should define \@TeXversion (using \def) to be the version number. If you do not do this^{1} , L^{A}TEX will not work around a bug in old TEX versions, and so error messages will appear in a very strange format, with ^^J appearing instead of line breaks:

! LaTeX Error: \rubbish undefined.^^J^^JSee the LaTeX manual or LaTeX Companion
 for explanation.^^JType  H <return>  for immediate help.
 ...
l.3 \renewcommand{\rubbish}
                           {}
?

However if you put \def\@TeXversion{3.14} in texsys.cfg the following format will be used:

! LaTeX Error: \rubbish undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
! .
 ...
l.3 \renewcommand{\rubbish}
                           {}
?

Note that this has an extra line ! . which does not appear in error messages that use the default settings with a current version of TEX, but this should not cause any confusion we hope.

2 Initialisation

As this file is read at a very early stage, some definitions that are normally considered to be part of the format must be made here.

2.1 INITEX

1 ⟨∗dircheck⟩ 2 ⟨∗initex⟩

 3 ⟨initex⟩\ifnum\catcode`\{=1
 4 ⟨initex⟩ \errmessage
 5 ⟨initex⟩ {LaTeX must be made using an initex with no format preloaded}

1Actually if you TEX is really old, version 2, L^{A}TEX can detect this, and set \@TeXversion to 2 if it is not set in the cfg file

6 ⟨initex⟩\fi

 7 \catcode`\{=1
 8 \catcode`\}=2
 9 \catcode`\#=6
10 \catcode`\^=7
11 \chardef\active=13
12 \catcode`\@=11
13 \countdef\count@=255
14 \let\bgroup={ \let\egroup=}
15 \ifx\@@input\@undefined\let\@@input\input\fi
16 \ifx\@@end\@undefined\let\@@end\end\fi
17 \chardef\@inputcheck0
18 \chardef\sixt@@n=16
19 \newlinechar`\^^J
20 \def\typeout{\immediate\write17}
21 \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
22 \do\#\do\^\do\_\do\%\do\~}
23 \def\@makeother#1{\catcode`#1=12\relax}
24 \def\space{ }
25 \def\@tempswafalse{\let\if@tempswa\iffalse}
26 \def\@tempswatrue{\let\if@tempswa\iftrue}
27 \let\if@tempswa\iffalse
28 \def\loop#1\repeat{\def\iterate{#1\relax\expandafter\iterate\fi}%
29 \iterate \let\iterate\relax}
30 \let\repeat\fi

31 ⟨/initex⟩

2.2 Some bits of 2e

32 ⟨∗2ekernel⟩

33 \def\two@digits#1{\ifnum#1<10 0\fi\number#1}
34 \long\def\@firstoftwo#1#2{#1}
35 \long\def\@secondoftwo#1#2{#2}

This is a special version of \ProvidesFile for initex use.

36 \def\ProvidesFile#1{%
37 \begingroup
38  \catcode`\ 10 %
39  \@makeother\/%
40  \@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}}
41 \def\@providesfile#1[#2]{%
42  \wlog{File: #1 #2}%
43  \@addtofilelist{ #2}%
44  \endgroup}
45 \long\def\@addtofilelist#1{}
46 \def\@empty{}
47 \catcode`\%=12
48 \def\@percentchar{%}
49 \catcode`\%=14
50 \let\@currdir\@undefined
51 \let\input@path\@undefined
52 \let\filename@parse\@undefined
\strip@prefix

53 \def\strip@prefix#1>{}

54 ⟨/2ekernel⟩

3 texsys.cfg

As mentioned above, any site specific definitions required to describe the filename handling must be entered into a file texsys.cfg. If texsys.cfg can not be located by \openin, we write a default version out. The default version only contains comments, so we do not actually input the file in that case. The automatic tests later will, hopefully, correctly define the required macros.

The tricky code below checks to see if texsys.cfg exists. If it does not, all the text in this file between START and END is copied verbatim to a new file texsys,cfg. If texsys.cfg is found, then it is simply input. This is only done when this file is being used unstripped.

55 ⟨∗docstrip⟩

56 \openin15=texsys.cfg
57 \ifeof15
58 \typeout{** Writing a default texsys.cfg}
59 \immediate\openout15=texsys.cfg
60 \begingroup
61 \catcode`\^^M\active%
62 \let^^M\par%
63 \def\reserved@a#1^^M{%
64 \def\reserved@b{#1}%
65 \ifx\reserved@b\reserved@c\endgroup\else%
66  \immediate\write15{#1}%
67  \expandafter\reserved@a\fi}%
68 \def\reserved@d#1START^^M{\let\do\@makeother\dospecials\reserved@a}%
69 \catcode`\%=12
70 \def\reserved@c{%END}
71 \reserved@d

START

3.1 texsys.cfg

This file contains the site specific definitions of the four macros

\@currdir, \input@path, \filename@parse and \@TeXversion.

As distributed it only contains comments, however this ‘empty’ file will work on many systems because of the automatic tests built into dircheck.dtx. You are allowed to edit this file to add definitions of these macros appropriate to your system.

David Carlisle 1994/11/17

The macros that must be defined are:

\@currdir \@currdir⟨filename⟩⟨space⟩ should expand to a form of the filename that uniquely refers to the ‘current directory’ if this is possible. (The expansion should also end with a space.) on UNIX, this is \def\@currdir{./}. For more exotic operating systems you may want to make \@currdir a macro with arguments delimited by . and/or ⟨space⟩. If the operating system has no concept of directory structure, this macro should be defined to be empty.

\input@path If the primitive \openin searches the same directories as the primitive \input, then it is possible to tell (using \ifeof) whether a file exists before trying to input it. For systems like this, \input@path should be left undefined.

If \openin does not ‘follow’ \input then \input@path must be defined to be a list of directories to search for input files. The format for each directory is as for \@currdir, normally just a prefix is required, but it may be a macro with space-delimited argument. That is, if ⟨dir⟩ is an entry in the input path, TEXwill try to load the expansion of

⟨dir⟩⟨filename⟩⟨space⟩

So either ⟨dir⟩ should be defined as a macro with argument delimited by space, or it should just expand to a directory name, including the final directory separator, so that it may be concatenated with the ⟨filename⟩. This means that for UNIX-like syntax, each ⟨dir⟩ should end with a slash, /. One exception to this rule is that the input path should always contain the empty directory {} as this will allow ‘full pathnames’ to be used, and the ‘current directory’ to be searched.

\input@path should expand to a list of such directories, each in a {} group.

\filename@parse After a call of the form: \filename@parse{⟨filename⟩}, the three macros

\filename@area,\filename@base,\filename@ext should be defined to be the

‘area’ (or directory), basename and extension respectively. If there was no extension specified in ⟨filename⟩, \filename@ext should be \let to \relax (so this case may be tested with \@ifundefined{filename@ext} and, perhaps a default extension substituted).

Normally one would not need to define this macro in texsys.cfg as the automatic tests can supply parsers that work with UNIX and VMS syntax, as well as a basic parser that willcover many other cases. However some operating systems may need a ‘hand produced’ parser in which case it should be defined in this file.

The UNIX parser also works for most MSDOS TEX versions. Currently if the UNIX or VMS parser is not used, \filename@parse is defined to always return an empty area, and to split the argument into basename and extension at the first ‘.’ that occurs in the name. Parsers for other formats may be defined in texsys.cfg, in which case they will be used in preference to the default definitions.

\@TeXversion You should not need to set this macro in texsys.cfg. L^{A}TEX tests to set this

automatically. See the comments in the opening section of ltdirchk.dtx.

The following sections give examples of definitions which might work on various systems. These are currently mainly untested as I only have access to a few systems, all of which do not need this file as the automatic tests work. All the code is commented out.

3.2 UNIX (web2c)

This implementation does make \openin and \input look in the same places. Acceptable settings are made by dircheck.dtx, and so this file may be empty. The definitions below are therefore just for information.

72 %\def\@currdir{./}
73 %\let\input@path\@undefined

3.3 UNIX (other)

Apparently some commercial UNIX implementations have different paths for \openin and \input. For these one could use definitions like the following (with whatever directories are used at your site): note that the directory names should end with /.

74 % \def\@currdir{./}
75 % \def\input@path{%
76 %   {/usr/local/lib/tex/inputs/distrib/}%
77 %   {/usr/local/lib/tex/inputs/contrib/}%
78 %   {/usr/local/lib/tex/inputs/local/}%
79 % }

3.4 MSDOS (emtex)

This implementation does make \openin and \input look in the same places. Acceptable settings are made by dircheck.dtx, and so this file may be empty. The definitions below are therefore just for information.

80 % \def\@currdir{./}
81 % \let\input@path\@undefined

3.5 MSDOS (other)

Some PC implementations have different paths for \openin and \input. For these one could use definitions like the following (with whatever directories are used at your site): note that the directory names should end with /. This assumes the implementation uses UNIX style / as the directory separator.

82 % \def\@currdir{./}
83 % \def\input@path{%
84 %   {c:/tex/inputs/distrib/}%
85 %   {c:/tex/inputs/contrib/}%
86 %   {c:/tex/inputs/local/}%
87 % }

3.6 VMS (???)

This implementation does make \openin and \input look in the same places. Acceptable settings are made by dircheck.dtx, and so this file may be empty. The definitions below are therefore just for information.

88 % \def\@currdir{[]}
89 % \let\input@path\@undefined

3.7 VMS (???)

Some VMS implementations have different paths for \openin and \input. For these one could use definitions like the following:

90 % \def\@currdir{[]}
91 % \def\input@path{%
92 %   {texinputs:}%
93 %   {[SOME.TEX.DIRECTORY]}%
94 % }

3.8 MACINTOSH (OzTeX 1.6)

This implementation does make \openin and \input look in the same places. Acceptable settings are made by dircheck.dtx, and so this file may be empty. The definitions below are therefore just for information.

95 % \def\@currdir{:}
96 % \let\input@path\@undefined

3.9 MACINTOSH (other)

Some Macintosh implementations have different paths for \openin and \input. For these one could use definitions like the following (with whatever folders are used on your machine): note that the directory names should end with :, and they should contain no spaces.

97 % \def\@currdir{:}
98 % \def\input@path{%
99 %   {Hard-Disk:Applications:TeX:TeX-inputs:}%
100 %   {Hard-Disk:Applications:TeX:My-inputs:}%

101 % }

3.10 FAKE EXAMPLE

This example is for an operating system that has filenames of the form <area>name For maximum compatability with macro sets, you want name.ext to be mapped

to <ext>name. and <area>name.ext to be mapped to <area.ext>name. \input

does this mapping automatically, but \openin does not, and does not look in the same places as \input. <>name is the desired ‘current directory’ syntax.

the following code would possibly work:

102 % \def\@dir#1#2 {%
103 %   \@d@r{#1}#2..\@nil}
104 % \def\@d@r#1#2.#3.#4\@nil{%
105 %   <\ifx\@dir#1\@dir\else#1\ifx\@dir#3\@dir\else.\fi\fi#3>#2 }

106 %

107 % \def\@currdir{\@dir{}}
108 % \def\input@path{%
109 %   {\@dir{area.one}}%
110 %   {\@dir{area.two}}%

111 % }

END

112 \immediate\closeout15

If texsys.cfg did exist, then input it.

113 \else
114 \typeout{** Using the existing texsys.cfg}
115 \closein15
116 \input texsys.cfg
117 \fi

118 ⟨/docstrip⟩

If the stripped version of this file is being used (in latex2e.ltx) then texsys.cfg should be there, so just input it.

119 ⟨dircheck⟩\input texsys.cfg

4 Setting \@currdir
\@currdir \IfFileExists This is a local definition of \IfFileExists. It tries to relocate texsxys.aux. If

it succeeds, then the \@currdir syntax has been determined. If all the tests fail then \@currdir will be set to \@empty, and ltxcheck will warn of this when it checks the format.

120 \begingroup
121 \count@\time
122 \divide\count@ 60
123 \count2=-\count@
124 \multiply\count2 60
125 \advance\count2 \time

\today The current date and time stamp.

126 \edef\today{%
127 \the\year/\two@digits{\the\month}/\two@digits{\the\day}:%
128  \two@digits{\the\count@}:\two@digits{\the\count2}}

Create a file texsys.aux (hopefully in the current directory), then try to locate it again.

129 \immediate\openout15=texsys.aux
130 \immediate\write15{\today^^J}
131 \immediate\closeout15 %

#1 is the file to try, #2 is what to do on success, #3 on failure.

132 \def\IfFileExists#1#2#3{%
133 \openin\@inputcheck#1 %
134 \ifeof\@inputcheck
135  #3\relax
136 \else
137  \read\@inputcheck to \reserved@a
138  \ifx\reserved@a\today
139  \typeout{#1 found}#2\relax
140  \else
141  \typeout{BAD: old file \reserved@a (should be \today)}%
142  #3\relax
143  \fi
144 \fi
145 \closein\@inputcheck}
146 \endlinechar=-1

If \@currdir has not been pre-defined in texsys.cfg then test for UNIX, VMS and Oz-TEX-Mac. syntax.

147 \ifx\@currdir\@undefined
148 \IfFileExists{./texsys.aux}{\gdef\@currdir{./}}%
149  {\IfFileExists{[]texsys.aux}{\gdef\@currdir{[]}}%
150  {\IfFileExists{:texsys.aux}{\gdef\@currdir{:}}{}}}

If it is still undefined at this point, all the above tests failed. Earlier versions interactively prompted for a definition at this point, but it seems impossible to reliably obtain information from users at this point in the installation. This version of the file produces a format with no user-interaction. Later if the format is not suitable for the system, texsys.cfg may be edited and the format re-made.

151 \ifx\@currdir\@undefined
152  \global\let\@currdir\@empty
153  \typeout{^^J***^^J%
154  No syntax for the current directory could be found^^J%
155  ***}%
156 \fi

Otherwise \@currdir was defined in texsys.cfg. In this case check that the syntax specified works on this system. (In case a complete L^{A}TEX system has been copied from one system to another.) If the test fails, give up. The installer should remove or correct the offending texsys.cfg and try again.

157 \else
158 \IfFileExists{\@currdir texsys.aux}{}{%
159  \edef\reserved@a{\errhelp{%
160  texsys.cfg specifies the current directory syntax to be^^J%
161  \meaning\@currdir^^J%
162  but this does not work on this system.^^J%
163  Remove texsys.cfg and restart.}}\reserved@a
164  \errmessage{Bad texsys.cfg file: \noexpand\@currdir}\@@end}

The version of \@currdir in texsys.cfg looks OK.

165 \fi
166 \immediate\closeout15 %
167 \endgroup
168 \typeout{^^J***^^J%
169  \noexpand\@currdir set to:
170  \expandafter\strip@prefix\meaning\@currdir.^^J%
171  ***}

Stop here if the file is being used unstripped.

172 ⟨∗docstrip⟩

173 \relax\endinput

174 ⟨/docstrip⟩

5 Setting \input@path

Earlier versions of this file attempted to automatically test whether \input@path was required, and interactively prompt for a path if necessary. This was not found to be very reliable The first-time installer of L^{A}TEX 2ε can not be expected to have enough information to supply the correct information to the prompts. Now the interaction is omitted. After the format is made the installer can attempt to run the test document ltxcheck.tex through L^{A}TEX 2ε. This will check, amongst other things, whether texsys.cfg will need to be edited and the format remade.

\input@path Now set up the \input@path.

input@path should either be undefined, or a list of directories as described in the introduction.

175 \typeout{***^^J%
176  Assuming \noexpand\openin and \noexpand\input^^J%
177  \ifx\input@path\@undefined

\input@path has not been pre-defined.

178  have the same search path.^^J%
179  \else
 \input@path has been defined in texsys.cfg.
180  have different  search paths.^^J%
181  LaTeX will use the path specified by \noexpand\input@path:^^J%
182  \fi
183  ***}

6 Filename Parsing

\filename@parse Split a filename into its components.

184 \ifx\filename@parse\@undefined
185 \def\reserved@a{./}\ifx\@currdir\reserved@a
 \filename@parse was not specified in texsys.cfg, but \@currdir looks like

UNIX…

186  \typeout{^^J***^^JDefining UNIX/DOS style filename parser.^^J***}
187  \def\filename@parse#1{%
188  \let\filename@area\@empty
189  \expandafter\filename@path#1/\\}

Search for the last /.

190  \def\filename@path#1/#2\\{%
191  \ifx\\#2\\%
192  \def\reserved@a{\filename@simple#1.\\}%
193  \else
194  \edef\filename@area{\filename@area#1/}%
195  \def\reserved@a{\filename@path#2\\}%
196  \fi
197  \reserved@a}
198 \else\def\reserved@a{[]}\ifx\@currdir\reserved@a
 \filename@parse was not specified in texsys.cfg, but \@currdir looks like

VMS…

199  \typeout{^^J***^^JDefining VMS style filename parser.^^J***}
200  \def\filename@parse#1{%
201  \let\filename@area\@empty
202  \expandafter\filename@path#1]\\}

Search for the last ].

203  \def\filename@path#1]#2\\{%
204  \ifx\\#2\\%
205  \def\reserved@a{\filename@simple#1.\\}%
206  \else
207  \edef\filename@area{\filename@area#1]}%
208  \def\reserved@a{\filename@path#2\\}%
209  \fi
210  \reserved@a}
211 \else\def\reserved@a{:}\ifx\@currdir\reserved@a

 \filename@parse was not specified in texsys.cfg, but \@currdir looks like Mac-

intosh…

212  \typeout{^^J***^^JDefining Mac style filename parser.^^J***}
213  \def\filename@parse#1{%
214  \let\filename@area\@empty
215  \expandafter\filename@path#1:\\}

Search for the last :.

216  \def\filename@path#1:#2\\{%
217  \ifx\\#2\\%
218  \def\reserved@a{\filename@simple#1.\\}%
219  \else
220  \edef\filename@area{\filename@area#1:}%
221  \def\reserved@a{\filename@path#2\\}%
222  \fi
223  \reserved@a}
224 \else

\filename@parse was not specified in texsys.cfg. So just make a simple parser that always sets \filename@area to empty.

225  \typeout{^^J***^^JDefining generic filename parser.^^J***}
226  \def\filename@parse#1{%
227  \let\filename@area\@empty
228  \expandafter\filename@simple#1.\\}
229 \fi\fi\fi

\filename@simple is used by all three versions. Finally we can split off the extension.

230 \def\filename@simple#1.#2\\{%
231  \ifx\\#2\\%
232  \let\filename@ext\relax
233  \else
234  \edef\filename@ext{\filename@dot#2\\}%
235  \fi
236  \edef\filename@base{#1}}

Remove a final dot, added earlier.

237 \def\filename@dot#1.\\{#1}
238 \else
 Otherwise, \filename@parse was specified in texsys.cfg.
239 \typeout{^^J***^^J%
240  \noexpand\filename@parse was defined in texsys.cfg:^^J%
241  \expandafter\strip@prefix\meaning\filename@parse.^^J%
242  ***}
243 \fi

7 TEX Versions

\@TeXversion TEX versions older than than 3.141 require \@TeXversion to be set. This can be determined automatically due to a trick suggested by Bernd Raichle. (Actually this will not always get the correct version number, eg TEX3.14 would be detected as TEX3, but L^{A}TEX only needs to take account of TEX’s older than 3, or between 3 and 3.14.

244 \ifx\@TeXversion\@undefined
245 \ifx\@undefined\inputlineno
246  \def\@TeXversion{2}
247 \else
248 {\catcode`\^^J=\active
249  \def\reserved@a#1#2\@@{\if#1\string^3\fi}
250  \edef\reserved@a{\expandafter\reserved@a\string^^J\@@}
251  \ifx\reserved@a\@empty\else\gdef\@TeXversion{3}\fi}
252 \fi
253 \fi

254 ⟨/dircheck⟩

8 ltxcheck.tex

After the format has been made, and article.cls moved with the other files to the ‘standard input directory’ as specified in install.l2e, the format may be checked by running the file ltxcheck.tex.

255 ⟨∗ltxcheck⟩

256 \NeedsTeXFormat{LaTeX2e}
257 \makeatletter
258 \typeout{^^J%
259 LaTeX2e installation check file^^J%
260 ===============================}

261

262 \typeout{^^J%
263 Before running this file through LaTeX2e you should have installed^^J%
264 the Standard LaTeX files in their final `system' directories.^^J%
265 This file should *not* be run in a directory that contains article.cls}
266 \def\pause{%
267 \typeout{}%
268 \message{** Hit return to continue: }%
269 \read -1  to \xxx
270 \typeout{}}
271 \typeout{^^J%
272 After certain tests, LaTeX will pause so that you can read the^^J%
273 output without it scrolling off the screen.^^J%
274 When you are ready just hit <return> and LaTeX will continue.^^J%
275 When LaTeX pauses, you will see a prompt like the one below.^^J^^J%
276 If a test fails, a message will be displayed followed by^^J%
277 an error message starting `! BAD'.^^J%
278 LaTeX will quit if you try to scroll past some error messages.}
279 \pause
280 \typeout{^^J%
281 Checking the current directory syntax^^J%
282 =====================================}
283 \newif\iftest\testfalse

284 \ifx\@currdir\@undefined
285 \typeout{^^J%
286 \noexpand\@currdir is undefined !!^^J%
287 Something is seriously wrong with the LaTeX2e initialisation.^^J%
288 Either you have corrupted files or this is a LaTeX bug.}
289 \errmessage{BAD LaTeX2e system!!}
290 \expandafter\@@end
291 \fi
292 \ifx\@currdir\@empty
293 \typeout{^^J%
294 \noexpand\@currdir is defined to be empty.^^J%
295 This means that LaTeX can not distinguish between a file^^J%
296 aaaaa.tex^^J%
297 that exists in the current directory, and  a file aaaaa.tex^^J%
298 in another directory.^^J%
299 It may be that this Operating System has no concept of `directory'^^J%
300 in which case the setting is correct. If however it is possible to^^J%
301 uniquely refer to a file then a suitable definition of
302  \noexpand\@currdir^^J%
303 should be added to texsys.cfg, and the format remade.}
304 \pause
305 \else
306 \typeout{^^J%
307 \noexpand\@currdir is defined as
308  \expandafter\strip@prefix\meaning\@currdir^^J%
309 (Testing...)}
310 \begingroup
311 \endlinechar=-1
312 \count@\time
313 \divide\count@ 60
314 \count2=-\count@
315 \multiply\count2 60
316 \advance\count2 \time
317 \edef\today{%
318 \the\year/\two@digits{\the\month}/\two@digits{\the\day}:%
319  \two@digits{\the\count@}:\two@digits{\the\count2}}
320 \immediate\openout15=ltxcheck.aux
321 \immediate\write15{\today^^J}
322 \immediate\closeout15 %
323 \openin\@inputcheck\@currdir ltxcheck.aux %
324 \ifeof\@inputcheck
325  \typeout{\@currdir ltxcheck.aux  not found}%
326 \else
327  \read\@inputcheck to \reserved@a
328  \ifx\reserved@a\today
329  \typeout{\@currdir ltxcheck.aux found}
330  \testtrue
331  \else
332  \typeout{BAD: old file \reserved@a(should be \today)}%
333  \testfalse
334  \fi
335 \fi

336 \closein\@inputcheck
337 \iftest
338  \endgroup
339  \typeout{\noexpand \@currdir OK!}
340 \else
341 \endgroup
342 \typeout{^^J%
343  The LaTeX2e installation has defined \noexpand\@currdir^^J%
344  to be \expandafter\strip@prefix\meaning\@currdir.^^J%
345  This appears to be incorrect.^^J%
346  You should add a correct definition to texsys.cfg^^J%
347  and rebuild the format.}
348 \errmessage{BAD LaTeX2e system!!}
349 \expandafter\expandafter\expandafter\@@end
350 \fi
351 \pause
352 \fi
353 \typeout{^^J%
354 Checking the filename parser^^J%
355 ============================}
356 \filename@parse{article.cls}
357 \def\reserved@a{article}
358 \testtrue
359 \ifx\filename@base\reserved@a
360 \ifx\filename@ext\@clsextension
361 \else
362  \testfalse
363 \fi
364 \else
365 \testfalse
366 \fi
367 \iftest
368 \typeout{filename parser OK!}\pause
369 \else
370 \typeout{^^J%
371  The LaTeX2e installation has defined \noexpand\filename@parse.^^J%
372  This appears to be incorrect.^^J%
373  You should remove the incorrect definition from texsys.cfg^^J%
374  and rebuild the format.}
375 \errmessage{BAD LaTeX2e system!!}
376 \expandafter\expandafter\expandafter\@@end
377 \fi

378 %

379 \typeout{^^J%
380 Checking the input path^^J%
381 =======================^^J}
382 \begingroup
383 \let\input@path\@undefined
384 \ifx\@currdir\@empty\else
385 \IfFileExists{\@currdir article.cls}

386 {\typeout{%
387  article.cls appears to be in current directory!^^J^^J%
388  If this is the case, install article.cls into a^^J%
389  `standard input directory'^^J%
390  and copy ltxcheck.tex to another directory before^^J%
391  processing with LaTeX.^^J%
392  ^^J%
393  If article.cls is not in the current directory,^^J%
394  then you need to edit texsys.cfg.^^J%
395  Read the comments in that file. If nothing else works, add:^^J%
396  \string\let\string\@currdir\string\@empty^^J}%
397  \errhelp{Move files, or edit texsys.cfg}
398  \def\ArticleClassFoundInCurrentDirectory{%
399  This file should not be run in a `standard input directory'}
400  \errmessage{BAD: \ArticleClassFoundInCurrentDirectory}}

401 {}

402 \fi
403 \endgroup
404 \IfFileExists{article.cls}
405 {\typeout{input path OK!}}
406 {\typeout{^^J%
407  LaTeX claims that article.cls is not on the system.^^J%
408  Either LaTeX has been incorrectly installed, or the
409  \noexpand\input@path^^J%
410  is incorrect. A correct definition should be added to^^J%
411  texsys.cfg, and the format remade.}
412 \pause
413 \typeout{^^J%
414  Typical definitions of \noexpand\input@path include:^^J^^J%
415  \string\let\string\input@path=\noexpand\@undefined
416  (the default definition)^^J^^J%
417  \string\def\string\input@path{\@percentchar^^J
418  {/usr/lib/tex/inputs/} {/usr/local/lib/tex/inputs/} }^^J^^J%
419  \string\def\string\input@path{\@percentchar^^J
420  {c:/tex/inputs/} {a:/} }^^J^^J%
421  \string\def\string\input@path{\@percentchar^^J
422  {tex_inputs:} {[SOMEWHERE.TEX.INPUTS]} }^^J}%
423 \pause
424 \typeout{^^J%
425  Note that \noexpand\input@path should be undefined
426  unless your^^J%
427  TeX installation does not make
428  \noexpand\openin and \noexpand\input^^J%
429  search the same directories.^^J%
430  If \noexpand\input@path is defined, entries should be^^J%
431  in the same syntax as \noexpand\@currdir^^J%
432  ie full directory names that may be concatenated with the^^J%
433  basename (note the final / and ] in the above examples).^^J%
434  Some systems may need more complicated settings.^^J%
435  See texsys.cfg for more examples.^^J%
436  ! BAD \noexpand\input@path!!}
437 \@@end}%
438 \pause

439 \typeout{^^J%
440 Checking the TeX version^^J%
441 ========================}
442 \dimen@\ifx\@TeXversion\@undefined4\else\@TeXversion\fi\p@%
443 \ifx\noboundary\relax
444 \typeout{^^J%
445  This is TeX 2. You will not be able to use all the new features^^J%
446  of LaTeX2e with such an old TeX.^^J%
447  The current version (1995/12/11) is TeX 3.14159.^^J%
448  Consider upgrading your TeX.}
449 \ifdim\dimen@<3\p@\else
450  \errhelp{Check that texsys.cfg has not defined \@TeXversion}
451  \def\OldTeX{%
452  BAD: \noexpand\@TeXversion is incorrect: \meaning\@TeXversion}
453  \errmessage{\OldTeX}
454 \fi
455 \else
456  \ifdim\dimen@>3.14\p@
457  \typeout{This appears to be a recent version of TeX!^^J%
458  If the following `lines' all appear on the same line,^^J%
459  separated by \string^\string^J %
460  then there has been an incorrect installation.}
461  \else
462  \typeout{^^J%
463  This appears to be a TeX between 3.0 and 3.14^^J%
464  but the current version (1995/12/11) is TeX 3.14159^^J%
465  consider upgrading your TeX.^^J%
466  The following `lines' will appear on the same line,^^J%
467  separated by \string^\string^J;^^J%
468  the same problem may affect other messages from LaTeX.}
469  \fi
470 \message{line1^^Jline2^^Jline3}
471 \pause
472 \fi

To check that the L^{A}TEX fonts have been installed, the well known trick of going into \batchmode, and testing for \nullfont is used. Not all fonts are tested, just a representative sample.

473 \typeout{^^J%
474 Checking fonts^^J%
475 =====================================}
476 \def\checkfont#1{%
477 \batchmode
478 \font\test=#1\relax
479 \errorstopmode
480 \ifx\test\nullfont
481  \typeout{\@spaces! BAD: #1.tfm not found!}
482  \@tempswatrue
483 \else
484  \typeout{\@spaces OK: #1.tfm found}
485 \fi}

486 \typeout{^^JChecking Standard TeX fonts...}
487 \@tempswafalse
488 \checkfont{cmr10}
489 \checkfont{cmr12}
490 \checkfont{cmmi10}
491 \if@tempswa
492 \errhelp{Obtain a complete standard TeX font distribution.}
493 \errmessage{BAD: Missing Standard Fonts}
494 \else
495 \pause
496 \fi
497 \typeout{^^JChecking LaTeX Picture Mode fonts...}
498 \@tempswafalse
499 \checkfont{lcircle10}
500 \checkfont{lcirclew10}
501 \if@tempswa
502 \@tempswafalse
503 \checkfont{circle10}
504 \checkfont{circlew10}
505 \if@tempswa
506  \typeout{^^J! BAD: You do not have the picture mode fonts:^^J%
507  lcircle10 and lcirclew10}
508 \else
509  \typeout{^^J! BAD:%
510  You have the picture mode fonts with their old names:^^J%
511  circle10 and circlew10 have been renamed to^^J%
512  lcircle10 and lcirclew10}
513 \fi
514 \errhelp{Obtain a complete standard LaTeX font distribution.}
515 \errmessage{BAD: Missing LaTeX Fonts}
516 \else
517 \pause
518 \fi
519 \typeout{^^JChecking Extra LaTeX Computer Modern fonts...}
520 \@tempswafalse
521 \checkfont{cmmib5}
522 \checkfont{cmmib7}
523 \checkfont{cmex7}
524 \if@tempswa
525 \typeout{! BAD:^^J%
526 LaTeX2e uses a few `extra' Computer Modern fonts produced by^^J%
527 The American Mathematical Society.^^J%
528 If you install The AMSFONTS font collection, then these, and other,^^J%
529 fonts will be available to LaTeX.^^J%
530 Although installing AMSFONTS is recommended, LaTeX does not require^^J%
531 The full collection; you may obtain a minimal set of extra LaTeX^^J%
532 fonts from any CTAN archive, in: tex-archive/macros/latex/fonts/}
533 \errhelp{Obtain LaTeX fonts or  the AMSFONTS collection.}
534 \errmessage{BAD: Missing LaTeX Fonts}
535 \else
536 \pause
537 \fi
538 \typeout{^^JChecking T1 encoded Computer Modern (dc) fonts...}

This command looks for the string dcr17< in the font tables for T1/cmr. If it is there, then the T1 fd files match the old dc fonts, for dc release 1.1 or earlier. If not then presumably new fd files are being used.

539 \def\dcrseventeen{%
540 \begingroup
541  \escapechar-1
542  \xdef\reserved@a{%
543  \noexpand\in@
544  {\expandafter\string\csname dcr17\endcsname<}%
545  {\expandafter\expandafter\expandafter
546  \string\csname T1/cmr/m/n\endcsname<}}%
547 \endgroup
548 \reserved@a}

Remove the “! BAD” typeout while checking for dc fonts so as not to worry sites with just the new ones.

549 \def\checkfont#1{%
550 \batchmode
551 \font\test=#1\relax
552 \errorstopmode
553 \ifx\test\nullfont
554  \typeout{\@spaces\@spaces #1.tfm not found}
555  \@tempswatrue
556 \else
557  \typeout{\@spaces OK: #1.tfm found}
558 \fi}
559 \@tempswafalse
560 \checkfont{dcr10}
561 \if@tempswa
562 \@tempswafalse
563 \checkfont{tcr1000}
564 \if@tempswa

No dc fonts at all.

565  \typeout{^^J%
566 ! BAD: No dc fonts found!!^^J%
567 LaTeX does not require the use of dc fonts^^J%
568 however they are strongly recommended.^^J%
569 The dc fonts are available in a more natural range of sizes^^J%
570 and allow better hyphenation and kerning than the^^J%
571 old fonts such as cmr10.^^J%
572 These dc fonts may be obtained from CTAN archives, in:^^J%
573 tex-archive/fonts/dc}
574 \else

No old dc fonts, but new ones installed. First check whether the latest patch has been applied.

575  \font\testdc=dcr1000
576  \testdc
577  \setbox0\hbox{-\char127}
578  \setbox2=\hbox{\char127}
579  \ifdim\wd0=\wd2
580  \typeout{^^J%
581 OK: dc fonts newer than 1.2 patch level 1.}

582  \else
583  \typeout{^^J%
584 ! BAD dc fonts 1.2 patch level 0 installed.^^J%
585 Current release (1995/12/11) is 1.2 patch level 1^^J%
586 These dc fonts may be obtained from CTAN archives, in:^^J%
587 tex-archive/fonts/dc}
588  \fi
589  \font\testdc=dcr1000
590  \testdc
591  \setbox0\hbox{-\char127}
592  \setbox2=\hbox{\char127}
593  \ifdim\wd0=\wd2
594  \typeout{^^J%
595 OK: dc fonts newer than 1.2 patch level 1}
596  \else
597  \typeout{^^J%
598 ! BAD dc fonts 1.2 patch level 0 installed.^^J%
599 Current release (1995/12/11) is 1.2 patch level 1^^J%
600 These dc fonts may be obtained from CTAN archives, in:^^J%
601 tex-archive/fonts/dc}
602  \fi

603

604  \dcrseventeen
605  \ifin@
606  \typeout{^^J%
607 The fd files for the obsolete release 1.1 of the^^J%
608 dc fonts have been loaded into the LaTeX format.^^J%
609 However, you appear to have the current release 1.2 of the dc fonts.^^J%
610 You should generate suitable fd files by running:^^J%
611 latex newdc.ins^^J%
612 and then rebuild the format by rerunning:^^J%
613 initex latex.ltx}
614  \errmessage{BAD LaTeX2e system!!}
615  \else
616  \typeout{^^J%
617  DC fonts OK!}
618  \fi
619 \fi
620 \else
621 \@tempswafalse
622 \checkfont{tcr1000}
623 \if@tempswa

Old DC fonts, but no new ones.

624  \typeout{^^J%
625 Old dc fonts found!!^^J%
626 Only the original dc fonts are on your system.^^J%
627 The latest release, 1.2, of the dc fonts introduced^^J%
628 many improvements and are strongly recommended.^^J%
629 They may be obtained from CTAN archives, in:^^J%
630 tex-archive/fonts/dc}
631  \pause
632  \dcrseventeen
633  \ifin@\else
634  \typeout{^^J%

635 The LaTeX2e installation has installed fd files for^^J%
636 release 1.2 of the dc fonts.^^J%
637 However, you appear to have only release 1.1 of these fonts.^^J%
638 You must now generate the correct fd files by running:^^J%
639 latex olddc.ins^^J%
640 and then rebuild the format by rerunning:^^J%
641 initex latex.ltx}
642  \errmessage{BAD LaTeX2e system!!}
643  \fi
644 \else

Both old and new DC fonts.

645  \font\testdc=dcr1000
646  \testdc
647  \setbox0\hbox{-\char127}
648  \setbox2=\hbox{\char127}
649  \ifdim\wd0=\wd2
650  \typeout{^^J%
651 OK: dc fonts newer than 1.2 patch level 1}
652  \else
653  \typeout{^^J%
654 ! BAD dc fonts 1.2 patch level 0 installed.^^J%
655 Current release (1995/12/11) is 1.2 patch level 1^^J%
656 These dc fonts may be obtained from CTAN archives, in:^^J%
657 tex-archive/fonts/dc}
658  \fi

659

660  \dcrseventeen
661  \ifin@
662  \typeout{^^J%
663 The fd files for the obsolete release 1.1 of the^^J%
664 dc fonts have been loaded into the LaTeX format.^^J%
665 However, you appear to have the current release 1.2 of the dcfonts.^^J%
666 You should use generate suitable fd files by running:^^J%
667 latex newdc.ins^^J%
668 and then rebuild the format by running:^^J%
669 initex latex.ltx^^J%
670 Otherwise LaTeX will always use the older fonts.}
671  \errmessage{BAD LaTeX2e system!!}
672  \else
673  \typeout{^^J%
674 DC fonts OK!.^^J%
675 (Both old and new dc font releases are installed.)}
676  \fi
677 \fi
678 \fi
679 \@@end

680 ⟨/ltxcheck⟩

File b

ltplain.dtx

9 Plain TEX

L^{A}TEX includes almost all of the functionality of Knuth’s original ‘Basic Macros’ That is, the plain TEX format described in Appendix B of the TEXBook.

L^{A}TEX font definitions are done using NFSS2 (file ltfss.dtx) so all of PLAIN’s font definitions are removed.

L^{A}TEX has its own tabbing environment, so PLAIN’s is disabled.

Macro definitions for math have been moved to some other file so that they are grouped together.

L^{A}TEX uses its own output routine, so most of the plain one was removed. A lot of individual macros are now moved to the relevant L^{A}TEX files so that

this file will gradually vanish.

1 ⟨∗2ekernel | autoload⟩

 2 \catcode`\{=1 % left brace is begin-group character
 3 \catcode`\}=2 % right brace is end-group character
 4 \catcode`\$=3 % dollar sign is math shift
 5 \catcode`\&=4 % ampersand is alignment tab
 6 \catcode`\#=6 % hash mark is macro parameter character
 7 \catcode`\^=7 % circumflex and uparrow are for superscripts
 8 \catcode`\_=8 % underline and downarrow are for subscripts
 9 \catcode`\^^I=10 % ascii tab is a blank space
10 \chardef\active=13 \catcode`\~=\active % tilde is active
11 \catcode`\^^L=\active \outer\def^^L{\par}% ascii form-feed is \outer\par
12 \message{catcodes,}

We had to define the \catcodes right away, before the message line, since \message uses the { and } characters. When INITEX (the TEX initializer) starts up, it has defined the following \catcode values: \catcode`\^^@=9 % ascii null is ignored \catcode`\^^M=5 % ascii return is end-line \catcode`\\=0 % backslash is TeX escape character \catcode`\%=14 % percent sign is comment character \catcode`\ =10 % ascii space is blank space \catcode`\^^?=15 % ascii delete is invalid

\catcode`\A=11 ... \catcode`\Z=11 % uppercase letters
\catcode`\a=11 ... \catcode`\z=11 % lowercase letters

all others are type 12 (other)

Here is a list of the characters that have been specially catcoded:

13 \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
14 \do\#\do\^\do\_\do\%\do\~}

(not counting ascii null, tab, linefeed, formfeed, return, delete) Each symbol in the list is preceded by , which can be defined if you want to do something to every item in the list.

We make @ signs act like letters, temporarily, to avoid conflict between user names and internal control sequences of plain format.

15 \catcode`@=11

To make the plain macros more efficient in time and space, several constant values are declared here as control sequences. If they were changed, anything could happen; so they are private symbols.

\@ne \tw@ \thr@@ \sixt@@n \@cclv Small constants are defined using \chardef.
16 \chardef\@ne=1
17 \chardef\tw@=2
18 \chardef\thr@@=3
19 \chardef\sixt@@n=16
20 \chardef\@cclv=255
\@cclvi \@m \@M \@MM Constants above 255 defined using \mathchardef.
21 \mathchardef\@cclvi=256
22 \mathchardef\@m=1000
23 \mathchardef\@M=10000
24 \mathchardef\@MM=20000

Allocation of registers

Here are macros for the automatic allocation of \count, \box, \dimen, \skip, \muskip, and \toks registers, as well as \read and \write stream numbers, \fam codes, \language codes, and \insert numbers.

25 \message{registers,}

When a register is used only temporarily, it need not be allocated; grouping can be used, making the value previously in the register return after the close of the group. The main use of these macros is for registers that are defined by one macro and used by others, possibly at ifferent nesting levels. All such registers should be defined through these macros; otherwise conflicts may occur, especially when two or more more macro packages are being used at once. The following counters are reserved:

0 to 9 page numbering 10 count allocation 11 dimen allocation 12 skip allocation 13 muskip allocation 14 box allocation 15 toks allocation 16 read file allocation 17 write file allocation 18 math family allocation 19 language allocation 20 insert allocation 21 the most recently allocated number 22 constant -1

New counters are allocated starting with 23, 24, etc. Other registers are allocated starting with 10. This leaves 0 through 9 for the user to play with safely, except that counts 0 to 9 are considered to be the page and subpage numbers (since they are displayed during output). In this scheme, \count 10 always contains the number of the highest-numbered counter that has been allocated, \count 14 the highest-numbered box, etc. Inserts are given numbers 254, 253, etc., since they require a \count, \dimen, \skip, and \box all with the same number; \count 20 contains the lowest-numbered insert that has been allocated. Of course, \box255 is reserved for \output; \count255, \dimen255, and \skip255 can be used freely.

It is recommended that macro designers always use \global assignments with respect to registers numbered 1, 3, 5, 7, 9, and always non-\global assignments with respect to registers 0, 2, 4, 6, 8, 255. This will prevent “save stack buildup” that might otherwise occur.

26 \count10=22 % allocates \count registers 23, 24, ...
27 \count11=9 % allocates \dimen registers 10, 11, ...
28 \count12=9 % allocates \skip registers 10, 11, ...
29 \count13=9 % allocates \muskip registers 10, 11, ...
30 \count14=9 % allocates \box registers 10, 11, ...
31 \count15=9 % allocates \toks registers 10, 11, ...
32 \count16=-1 % allocates input streams 0, 1, ...
33 \count17=-1 % allocates output streams 0, 1, ...
34 \count18=3 % allocates math families 4, 5, ...
35 \count19=0 % allocates \language codes 1, 2, ...
36 \count20=255 % allocates insertions 254, 253, ...

\insc@unt \allocationnumber The insertion counter and most recent allocation.

37 \countdef\insc@unt=20
38 \countdef\allocationnumber=21

\m@ne The constant −1.

39 \countdef\m@ne=22 \m@ne=-1

\wlog Write on log file (only)

40 \def\wlog{\immediate\write\m@ne}

\count@ \dimen@ \dimen@i \dimen@ii \skip@ \toks@ Here are abbreviations for the names of scratch registers that don’t need to be allocated.

41 \countdef\count@=255
42 \dimendef\dimen@=0
43 \dimendef\dimen@i=1 % global only
44 \dimendef\dimen@ii=2
45 \skipdef\skip@=0
46 \toksdef\toks@=0
\newcount \newdimen \newskip \newmuskip \newbox \newhelp \newtoks Now, we define \newcount, \newbox, etc. so that you can say \newcount\foo and

\foo will be defined (with \countdef) to be the next counter.

To find out which counter \foo is, you can look at \allocationnumber.

Since there’s no \boxdef command, \chardef is used to define a \newbox,

\newinsert, \newfam, and so on.

L^{A}TEX change: remove \outer from \newcount and \newdimen (FMi) This is necessary to use \newcount inside \if... later on. Also remove from \newskip, \newbox \newwrite and \newfam (DPC) to save later redefinition.

47 \def\newcount{\alloc@0\count\countdef\insc@unt}
48 \def\newdimen{\alloc@1\dimen\dimendef\insc@unt}
49 \def\newskip{\alloc@2\skip\skipdef\insc@unt}
50 \def\newmuskip{\alloc@3\muskip\muskipdef\@cclvi}
51 \def\newbox{\alloc@4\box\chardef\insc@unt}

52 \def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
53 \def\newtoks{\alloc@5\toks\toksdef\@cclvi}
\newread \newwrite
54 \def\newread{\alloc@6\read\chardef\sixt@@n}
55 \def\newwrite{\alloc@7\write\chardef\sixt@@n}
   L^{A}TEX defines \newfam in ltfss.dtx.
\def\newfam{\alloc@8\fam\chardef\sixt@@n}
\newlanguage
56 \def\newlanguage{\alloc@9\language\chardef\@cclvi}
\alloc@
57 \def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne
58 \ch@ck#1#4#2% make sure there's still room
59 \allocationnumber\count1#1%
60 \global#3#5\allocationnumber
61 \wlog{\string#5=\string#2\the\allocationnumber}}
\newinsert
62 \def\newinsert#1{\global\advance\insc@unt \m@ne
63 \ch@ck0\insc@unt\count
64 \ch@ck1\insc@unt\dimen
65 \ch@ck2\insc@unt\skip
66 \ch@ck4\insc@unt\box
67 \allocationnumber\insc@unt
68 \global\chardef#1\allocationnumber
69 \wlog{\string#1=\string\insert\the\allocationnumber}}
\ch@ck

70 ⟨/2ekernel | autoload⟩ 71 ⟨∗2ekernel | autoload | autoerr⟩

72 \gdef\ch@ck#1#2#3{%
73 \ifnum\count1#1<#2\else
74 ⟨!autoload⟩ \errmessage{No room for a new #3}%
75 ⟨autoload⟩  \@autoerr\ch@ck#1#2#3%
76 \fi}

77 ⟨/2ekernel | autoload | autoerr⟩ 78 ⟨∗2ekernel | autoload⟩

\maxdimen \hideskip Here are some examples of allocation.

79 \newdimen\maxdimen \maxdimen=16383.99999pt % the largest legal <dimen>
80 \newskip\hideskip \hideskip=-1000pt plus 1fill % negative but can grow
\p@ \z@ \z@skip \voidb@x
81 \newdimen\p@ \p@=1pt % this saves macro space and time
82 \newdimen\z@ \z@=0pt % can be used both for 0pt and 0
83 \newskip\z@skip \z@skip=0pt plus0pt minus0pt
84 \newbox\voidb@x % permanently void box register
85 \message{compatibility for TeX 2, }

If this file is used in an old TEX we define the new features of TEX 3.0 as simple macros or counters so that files that uses these features can be processed in such an environment (They will however produce some other results).

 86 \ifx\@undefined\inputlineno
 87 \newcount\inputlineno

This could be used to detect that an old TEX is in force

 88 \inputlineno-1

Extra test for MLTeX 2, RmS 91/11/07.

 89 \ifx\@undefined\language
 90  \newcount\language
 91 \fi
 92 \newcount\lefthyphenmin
 93 \newcount\righthyphenmin
 94 \newcount\errorcontextlines
 95 \newcount\holdinginserts
 96 \newdimen\emergencystretch
 97 \newcount\badness
 98 \let\noboundary\relax
 99 \newcount\setlanguage
100 \fi

Assign initial values to TEX’s parameters

101 \message{parameters,}

All of TEX’s numeric parameters are listed here, but the code is commented out if no special value needs to be set. INITEX makes all parameters zero except where noted.

102 \pretolerance=100
103 \tolerance=200 % INITEX sets this to 10000
104 \hbadness=1000
105 \vbadness=1000
106 \linepenalty=10
107 \hyphenpenalty=50
108 \exhyphenpenalty=50
109 \binoppenalty=700
110 \relpenalty=500
111 \clubpenalty=150
112 \widowpenalty=150
113 \displaywidowpenalty=50
114 \brokenpenalty=100
115 \predisplaypenalty=10000
  \postdisplaypenalty=0
  \interlinepenalty=0
  \floatingpenalty=0, set during \insert
  \outputpenalty=0, set before TeX enters \output
116 \doublehyphendemerits=10000
117 \finalhyphendemerits=5000
118 \adjdemerits=10000

\looseness=0, cleared by TeX after each paragraph

  \pausing=0

\holdinginserts=0
\tracingonline=0
\tracingmacros=0
\tracingstats=0
\tracingparagraphs=0
\tracingpages=0
\tracingoutput=0
119 \tracinglostchars=1
\tracingcommands=0
\tracingrestores=0
\language=0
120 \uchyph=1
\lefthyphenmin=2 \righthyphenmin=3 set below
\globaldefs=0
\maxdeadcycles=25 % INITEX does this

\hangafter=1 % INITEX does this, also TeX after each paragraph

\fam=0

\mag=1000 % INITEX does this

\escapechar=‘\\ % INITEX does this
121 \defaulthyphenchar=`\-
122 \defaultskewchar=-1
\endlinechar=‘\^^M % INITEX does this

\newlinechar=-1 \LaTeX\ sets this in ltdefns.dtx.

123 \delimiterfactor=901

\time=now % TeX does this at beginning of job \day=now % TeX does this at beginning of job \month=now % TeX does this at beginning of job \year=now % TeX does this at beginning of job

In L^{A}TEX we don’t want box information in the transcript unless we do a full tracing.

124 \showboxbreadth=-1
125 \showboxdepth=-1
126 \errorcontextlines=-1
127 \hfuzz=0.1pt
128 \vfuzz=0.1pt
129 \overfullrule=5pt
130 \hsize=6.5in
131 \vsize=8.9in
132 \maxdepth=4pt
133 \splitmaxdepth=\maxdimen
134 \boxmaxdepth=\maxdimen
\lineskiplimit=0pt, changed by \normalbaselines
135 \delimitershortfall=5pt
136 \nulldelimiterspace=1.2pt
137 \scriptspace=0.5pt

  \mathsurround=0pt

\predisplaysize=0pt, set before TeX enters $$ \displaywidth=0pt, set before TeX enters $$ \displayindent=0pt, set before TeX enters $$

138 \parindent=20pt

\hangindent=0pt, zeroed by TeX after each paragraph

  \hoffset=0pt
  \voffset=0pt
  \baselineskip=0pt, changed by \normalbaselines
  \lineskip=0pt, changed by \normalbaselines
139 \parskip=0pt plus 1pt
140 \abovedisplayskip=12pt plus 3pt minus 9pt
141 \abovedisplayshortskip=0pt plus 3pt
142 \belowdisplayskip=12pt plus 3pt minus 9pt
143 \belowdisplayshortskip=7pt plus 3pt minus 4pt
  \leftskip=0pt
  \rightskip=0pt
144 \topskip=10pt
145 \splittopskip=10pt
  \tabskip=0pt
  \spaceskip=0pt
  \xspaceskip=0pt
146 \parfillskip=0pt plus 1fil
\normalbaselineskip \normallineskip \normallineskiplimit We also define special registers that function like parameters:
147 \newskip\normalbaselineskip \normalbaselineskip=12pt
148 \newskip\normallineskip \normallineskip=1pt
149 \newdimen\normallineskiplimit \normallineskiplimit=0pt
\interfootlinepenalty
150 \newcount\interfootnotelinepenalty \interfootnotelinepenalty=100

Definitions for preloaded fonts

\magstephalf
\magstep
151 \def\magstephalf{1095 }
152 \def\magstep#1{\ifcase#1 \@m\or 1200\or 1440\or 1728\or
153  2074\or 2488\fi\relax}

Macros for setting ordinary text

\frenchspacing
\nonfrenchspacing
154 \def\frenchspacing{\sfcode`\.\@m \sfcode`\?\@m \sfcode`\!\@m
155 \sfcode`\:\@m \sfcode`\;\@m \sfcode`\,\@m}
156 \def\nonfrenchspacing{\sfcode`\.3000\sfcode`\?3000\sfcode`\!3000%
157 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 }

\normalbaselines
158 \def\normalbaselines{\lineskip\normallineskip
159 \baselineskip\normalbaselineskip \lineskiplimit\normallineskiplimit}

{\M \atop \I} Save a bit of space by using \let here.

160 \def\^^M{\ } % control <return> = control <space>
161 \let\^^I\^^M % same for <tab>

{\lq \atop \rq}

162 \def\lq{`}
163 \def\rq{'}
\lbrack \rbrack
164 \def\lbrack{[}
165 \def\rbrack{]}
\endgraf \endline
166 \let\endgraf=\par
167 \let\endline=\cr
\space
168 \def\space{ }

\empty This probably ought to go altogether, but let it to the L^{A}TEX version to save space.

169 \let\empty\@empty
\null
170 \def\null{\hbox{}}
\bgroup \egroup
171 \let\bgroup={
172 \let\egroup=}
\obeylines \obeyspaces In \obeylines, we say \let^^M=\par instead of \def^^M{\par} since this allows,
 for example, \let\par=\cr \obeylines \halign{...
173 {\catcode`\^^M=\active % these lines must end with %
174 \gdef\obeylines{\catcode`\^^M\active \let^^M\par}%
175 \global\let^^M\par} % this is in case ^^M appears in a \write
176 \def\obeyspaces{\catcode`\ \active}
177 {\obeyspaces\global\let =\space}

\loop \iterate \repeat We use Kabelschacht’s method of doing loops, see TUB 8#2 (1987). (unless that breaks something :-). It turned out to need an extra \relax: see pr/642 (\loop could do one iteration too much in certain cases).

178 \long\def \loop #1\repeat{%
179 \def\iterate{#1\relax  % Extra \relax
180  \expandafter\iterate\fi

181 }%

182 \iterate
183 \let\iterate\relax

184 }

This setting of \repeat is needed to make \loop...\if...\repeat skippable within another \if....

185 \let\repeat=\fi
    L^{A}TEX defines \smallskip, etc. in ltspace.dtx.
\nointerlineskip
\offinterlineskip
186 \def\nointerlineskip{\prevdepth-\@m\p@}
187 \def\offinterlineskip{\baselineskip-\@m\p@
188 \lineskip\z@ \lineskiplimit\maxdimen}
\vglue \hglue
189 \def\vglue{\afterassignment\vgl@\skip@=}
190 \def\vgl@{\par \dimen@\prevdepth \hrule \@height\z@
191 \nobreak\vskip\skip@ \prevdepth\dimen@}
192 \def\hglue{\afterassignment\hgl@\skip@=}
193 \def\hgl@{\leavevmode \count@\spacefactor \vrule \@width\z@
194 \nobreak\hskip\skip@ \spacefactor\count@}

L^{A}TEX defines ~ in ltdefns.dtx.

\slash
195 \def\slash{/\penalty\exhyphenpenalty} % a `/' that acts like a `-'
\break \nobreak \allowbreak
196 \def\break{\penalty-\@M}
197 \def\nobreak{\penalty \@M}
198 \def\allowbreak{\penalty \z@}
\filbreak \goodbreak
199 \def\filbreak{\par\vfil\penalty-200\vfilneg}
200 \def\goodbreak{\par\penalty-500 }

\eject Define \eject as in plain TEX but only define \supereject in compatibility file.

201 \def\eject{\par\break}
\removelastskip
202 \def\removelastskip{\ifdim\lastskip=\z@\else\vskip-\lastskip\fi}
\smallbreak \medbreak \bigbreak
203 \def\smallbreak{\par\ifdim\lastskip<\smallskipamount
204 \removelastskip\penalty-50\smallskip\fi}
205 \def\medbreak{\par\ifdim\lastskip<\medskipamount
206 \removelastskip\penalty-100\medskip\fi}
207 \def\bigbreak{\par\ifdim\lastskip<\bigskipamount
208 \removelastskip\penalty-200\bigskip\fi}
\m@th
209 \def\m@th{\mathsurround\z@}

\underbar Due to L^{A}TEX’s redefinition of \underline plain TEX’s \underbar can be done in a simpler fashion (but do we need it at all?).

210 \def\underbar#1{\underline{\sbox\tw@{#1}\dp\tw@\z@\box\tw@}}

\strutbox \strut L^{A}TEX sets \strutbox in \set@fontsize.
211 \newbox\strutbox
212 \def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}

\hidewidth For alignment entries that can stick out.

213 \def\hidewidth{\hskip\hideskip}

\narrower
214 \def\narrower{%
215 \advance\leftskip\parindent
216 \advance\rightskip\parindent}

L^{A}TEX defines \ae and similar commands elsewhere.

217 \chardef\%=`\%
218 \chardef\&=`\&
219 \chardef\#=`\#

Most text commands are actually encoding specific and therefore defined later, so commented out or removed from this file.

\leavevmode begins a paragraph, if necessary

220 \def\leavevmode{\unhbox\voidb@x}
\mathhexbox
221 \def\mathhexbox#1#2#3{\mbox{$\m@th \mathchar"#1#2#3$}}
\ialign
222 \def\ialign{\everycr{}\tabskip\z@skip\halign} % initialized \halign
\oalign \o@lign \ooalign
223 \def\oalign#1{\leavevmode\vtop{\baselineskip\z@skip \lineskip.25ex%
224 \ialign{##\crcr#1\crcr}}}
225 \def\o@lign{\lineskiplimit\z@ \oalign}
226 \def\ooalign{\lineskiplimit-\maxdimen \oalign}
\sh@ft
227 \def\sh@ft#1{\dimen\z@.00#1ex\multiply\dimen\z@\fontdimen1\font
228 \kern-.0156\dimen\z@} % compensate for slant in lowered accents

L^{A}TEX change: \d, \b, \c, \copyright, \TeX defined elsewhere.

L^{A}TEX change: Make \t work in a moving argument. Now defined elsewhere.

\hrulefill \dotfill L^{A}TEX change: \kern\z@ added to end of \hrulefill and \dotfill to make them

work in ‘tabular’ and ‘array’ environments. (Change made 24 July 1987). L^{A}TEX change: \leavevmode added at begining of \dotfill and \hrulefill so that they work as expected in vertical mode.

229 \def\hrulefill{\leavevmode\leaders\hrule\hfill\kern\z@}
230 \def\dotfill{\leavevmode\cleaders
231  \hbox{$\m@th \mkern1.5mu.\mkern1.5mu$}\hfill\kern\z@}

INITEX sets \sfcode x=1000 for all x, except that \sfcode`X=999 for uppercase letters. The following changes are needed:

232 \sfcode`\)=0 \sfcode`\'=0 \sfcode`\]=0

The \nonfrenchspacing macro will make further changes to \sfcode values. Definitions related to output \magnification doesn’t work in L^{A}TEX.

 \def\magnification{\afterassignment\m@g\count@}
 \def\m@g{\mag\count@
   \hsize6.5truein\vsize8.9truein\dimen\footins8truein}

\showoverfull The following commands are used in debugging:

233 \def\showoverfull{\tracingonline\@ne}
\showoutput

234 ⟨/2ekernel | autoload⟩ 235 ⟨∗2ekernel | autoerr⟩

236 \gdef\showoutput{\tracingoutput\@ne
237  \showboxbreadth\maxdimen\showboxdepth\maxdimen\errorstopmode
238  \showoverfull}

239 ⟨/2ekernel | autoerr⟩

240 ⟨autoload⟩\def\showoutput{\@autoerr\showoutput}
\tracingall

241 ⟨∗2ekernel | autoerr⟩

242 \gdef\tracingall{\tracingcommands\tw@\tracingstats\tw@
243 \tracingpages\@ne\tracinglostchars\@ne
244 \tracingmacros\tw@\tracingparagraphs\@ne\tracingrestores\@ne
245 \errorcontextlines\maxdimen\showoutput}

246 ⟨/2ekernel | autoerr⟩

247 ⟨autoload⟩\def\tracingall{\@autoerr\tracingall}

L^{A}TEX change: \showhyphens Defined later.

punctuation affects the spacing

248 ⟨∗2ekernel | autoload⟩

249 \nonfrenchspacing

250 ⟨/2ekernel | autoload⟩

File c

ltvers.dtx

10 Version Identifictation

First we identify the date and version number of this release of L^{A}TEX, and set \everyjob so that it is printed at the start of every L^{A}TEX run.

\fmtname \fmtversion

1 ⟨∗2ekernel⟩

 2 \def\fmtname{LaTeX2e}
 3 \edef\fmtversion{1995/12/01}

Check that the format being made is not too old.

 4 \def\reserved@a#1/#2/#3\@nil{%
 5 \count@\year
 6 \advance\count@-#1\relax
 7 \multiply\count@ by 12\relax
 8 \advance\count@\month
 9 \advance\count@-#2\relax}
10 \expandafter\reserved@a\fmtversion\@nil

\count@ is now the age of this file in months.

11 \ifnum\count@>12
12 \typeout{^^J%
13 ******************************************************************^^J%
14 *  You are attempting to make a LaTeX format from a source file^^J%
15 *  That is more than one year old.^^J%
16 *^^J%
17 *  If you enter <return> to scroll past this message then the format^^J%
18 *  will be built, but please consider obtaining newer source files^^J%
19 *  before continuing to build LaTeX.^^J%
20 *^^J%
21 *  LaTeX is re-issued every 6 months June and December.^^J%
22 ******************************************************************^^J%

23 }

24 \errhelp{To avoid this error message, obtain new LaTeX sources.}
25 \errmessage{LaTeX source files more than 1 year old!}
26 \fi
27 \let\reserved@a\relax

This startup banner may be further modified by the code in ltfinal.dtx if a patch file is present.

28 \everyjob{\typeout{\fmtname
29 ⟨autoload⟩\space(autoload version)%
30  \space<\fmtversion>}}
31 \immediate\write16{\fmtname
32 ⟨autoload⟩\space(autoload version)%
33  \space<\fmtversion>}

34 ⟨/2ekernel⟩

File c: ltvers.dtx Date: 1995/05/12 Version v1.0e 32

File d

ltdefns.dtx

11 Definitions

This section contains commands used in defining other macros.

1 ⟨∗2ekernel⟩

11.1 Initex initialisations

\two@digits Prefix a number less than 10 with ‘0’.

 2 \def\two@digits#1{\ifnum#1<10 0\fi\number#1}

\typeout Display something on the terminal.

 3 \def\typeout#1{\begingroup\set@display@protect
 4  \immediate\write\@unused{#1}\endgroup}

\newlinechar A char to be used as new-line in output to files.

 5 \newlinechar`\^^J

11.2 Saved versions of TEX primitives

The TeX primitive \foo is saved as \@@foo. The following primitives are handled in this way:

\@@par
 6 \let\@@par=\par
 7 %\let\@@input=\input    %%% moved earlier
 8 %\let\@@end=\end        %%%

{\@@hyph \atop \-} The following comment was added when these commands were first set up, 19 April 1986: the \- command is redefined to allow it to work in the \ttfamily type style, where automatic hyphenation is suppressed by setting \hyphenchar to -1. The original primitive TEX definition is saved as \@@hyph just in case anyone needs it.

There is a need for a robust command for a discretionary hyphen since its exact representation depends on the glyphs available in the current font. For example, with suitable fonts and the T1 font encoding it is possible to use hanging hyphens.

A suitable robust definition that allows for many possible types of font and encoding may be as follows:

  \DeclareRobustCommand {\-}{%
    \discretionary {%
      \char \ifnum\hyphenchar\font<\z@
              \defaulthyphenchar
            \else
              \hyphenchar\font
            \fi
                    }{}{}%
  }

The redefinition (via \let) of \- within tabbing also makes the use of a robust command advisable since then any redefinition of \- via \DeclareRobustCommand will not cause a conflict.

Therefore, macro writers should be hereby warned that these internals will probably change! It is likely that a future release of L^{A}TEX will make \- effectively an encoding specific text command.

 9 \let\@@hyph=\-        % Save original primitive definition
10 \def\-{\discretionary{-}{}{}}
\@dischyph
11 \let\@dischyph=\-

\@@italiccorr Save the original italic correction.

12 \let\@@italiccorr=\/

\@height \@depth \@width \@minus \@plus The following definitions save token space. E.g., using \@height instead of height saves 5 tokens at the cost in time of one macro expansion.

13 \def\@height{height} \def\@depth{depth} \def\@width{width}
14 \def\@minus{minus}
15 \def\@plus{plus}

\hb@xt@ The next one is another 100 tokens worth.

16 \def\hb@xt@{\hbox to}
17 \message{hacks,}

11.3 Command definitions

This section defines the following commands:

\@namedef      {⟨NAME⟩}

Expands to \def\{⟨NAME⟩}, except name can contain any characters.

\@nameuse      {⟨NAME⟩}

Expands to \{⟨NAME⟩}.

\@ifnextchar  X{⟨YES⟩}{⟨NO⟩}

Expands to ⟨YES⟩ if next character is an ‘X’, and to ⟨NO⟩ otherwise. (Uses \reserved@a–\reserved@c.) NOTE: GOBBLES ANY SPACE FOLLOWING IT.

\@ifstar      {⟨YES⟩}{⟨NO⟩}

Gobbles following spaces and then tests if next the character is a ’*’. If it is, then it gobbles the ‘*’ and expands to ⟨YES⟩, otherwise it expands to ⟨NO⟩.

\@dblarg      {⟨CMD⟩}{⟨ARG⟩}

Expands to \{⟨CMD⟩}[⟨ARG⟩]{⟨ARG⟩}. Use \@dblarg\CS when \CS takes arguments [ARG1]{ARG2}, where default is ARG1 = ARG2.

\@ifundefined      {⟨NAME⟩}{⟨YES⟩}{⟨NO⟩}

: If \NAME is undefined then it executes ⟨YES⟩, otherwise it executes ⟨NO⟩. More precisely, true if \NAME either undefined or = \relax.

\@ifdefinable \NAME{⟨YES⟩} Executes ⟨YES⟩ if the user is allowed to define \NAME, otherwise it gives an error. The user can define \NAME if \@ifundefined{NAME} is true, ’NAME’ ≠ ’relax’ and the first three letters of ’NAME’ are not ’end’, and if \endNAME is not defined.

\newcommand      *{⟨\FOO ⟩}[⟨i⟩]{⟨TEXT ⟩}

User command to define \FOO to be a macro with i arguments (i = 0 if missing) having the definition ⟨TEXT ⟩. Produces an error if \FOO already defined.

Normally the command is defined to be \long (ie it may take multiple paragraphs in its argument). In the star-form, the command is not defined as \long and a blank line in any argument to the command would generate an error.

\renewcommand      *{⟨\FOO ⟩}[⟨i⟩]{⟨TEXT ⟩}

Same as \newcommand, except it checks if \FOO already defined.

\newenvironment      *{⟨FOO⟩}[⟨i⟩]{⟨DEF1 ⟩}{⟨DEF2 ⟩}

equivalent to:

\newcommand{\FOO}[i]{DEF1} \def{\endFOO}{DEF2}

(or the appropriate star forms).

\renewenvironment

Obvious companion to \newenvironment. \@cons : See description of \output routine.

\@car      \@car T1 T2 ... Tn\@nil == T1 (unexpanded)
\@cdr      \@cdr T1 T2 ... Tn\@nil == T2 ... Tn (unexpanded)
\typeout      {⟨message⟩}

Produces a warning message on the terminal.

\typein      {⟨message⟩}

Types message, asks the user to type in a command, then executes it

\typein      [⟨\CS ⟩]{⟨MSG⟩}

Same as above, except defines \CS to be the input instead of executing it.

\typein
18 \def\typein{%
19 \let\@typein\relax
20 \@testopt\@xtypein\@typein}
21 \def\@xtypein[#1]#2{%
22 \typeout{#2}%
23 \advance\endlinechar\@M
24 \read\@inputcheck to#1%
25 \advance\endlinechar-\@M
26 \@typein}
\@namedef
27 \def\@namedef#1{\expandafter\def\csname #1\endcsname}
\@nameuse
28 \def\@nameuse#1{\csname #1\endcsname}
\@cons
29 \def\@cons#1#2{\begingroup\let\@elt\relax\xdef#1{#1\@elt #2}\endgroup}

{\@car \atop \@cdr}

30 \def\@car#1#2\@nil{#1}
31 \def\@cdr#1#2\@nil{#2}
\@carcube  \@carcube T1 ... Tn\@nil = T1 T2 T3 , n > 3
32 \def\@carcube#1#2#3#4\@nil{#1#2#3}

\@onlypreamble \@preamblecmds This macro adds its argument to the list of commands stored in \@preamblecmds to be disabled after \begin{document}. These commands are redefined to generate \@notprerr at this point.

33 \def\@preamblecmds{}
34 \def\@onlypreamble#1{%
35 \expandafter\gdef\expandafter\@preamblecmds\expandafter{%
36  \@preamblecmds\do#1}}
37 \@onlypreamble\@onlypreamble
38 \@onlypreamble\@preamblecmds

\@star@or@long Look ahead for a *. If present reset \l@ngrel@x so that the next definition, #1, will be non-long.

39 \def\@star@or@long#1{%
40 \@ifstar
41 {\let\l@ngrel@x\relax#1}%
42 {\let\l@ngrel@x\long#1}}

\l@ngrel@x This is either \relax or \long depending on whether the *-form of a definition command is being executed.

43 \let\l@ngrel@x\relax
\newcommand User level \newcommand.
44 \def\newcommand{\@star@or@long\new@command}
\new@command
45 \def\new@command#1{%
46 \@testopt{\@newcommand#1}0}
\@newcommand \@argdef \@xargdef Handling arguments for \newcommand.
47 \def\@newcommand#1[#2]{%
48 \@ifnextchar [{\@xargdef#1[#2]}%
49  {\@argdef#1[#2]}}

Define #1 if it is definable.

50 \long\def\@argdef#1[#2]#3{%
51 \@ifdefinable #1{\@yargdef#1\@ne{#2}{#3}}}

Handle the second optional argument.

52 \long\def\@xargdef#1[#2][#3]#4{%
53 \@ifdefinable#1{%

Define the actual command to be:

\def\foo{\@protected@testopt\foo\\foo{default}}

where \\foo is a csname generated from applying \csname and \string to \foo, ie the actual name contains a backslash and therefore can’t clash easily with exisiting command names. “Default” is the contents of the second optional argument of

\(re)newcommand.

The \aut@global command below is only used in the autoload format. If it is \global then a global definition will be made.

54 ⟨autoload⟩\aut@global

55  \expandafter\def\expandafter#1\expandafter{%
56  \expandafter
57  \@protected@testopt

58  \expandafter
59  #1%
60  \csname\string#1\expandafter\endcsname
61  {#3}}%

Now we define the internal macro (ie \\foo which is supposed to pick up all arguments (optional and mandatory).

62  \expandafter\@yargdef
63  \csname\string#1\endcsname
64  \tw@
65  {#2}%
66  {#4}}}

\@testopt This macro encapsulates the most common call to \@ifnextchar, saving several tokens each time it is used in the definition of a command with an optional argument. #1 The code to execute in the case that there is a [ need not be a single token but can be any sequence of commands that ‘expects’ to be followed by [. If this command were only used in \newcommand definitions then #1 would be a single token and the braces could be omitted from {#1} in the definition below, saving a bit of memory.

67 \def\@testopt#1#2{%
68 \@ifnextchar[{#1}{#1[#2]}}

\@protected@testopt Robust version of \@testopt. The extra argument (#1) must be a single token. If protection is needed the call expands to \protect applied to this token, and the 2nd and 3rd arguments are discarded. Otherwise \@testopt is called on 2nd and 3rd arguments.

This method of making commands robust avoids the need for using up two csnames per command, the price is the extra expansion time for the \ifx test.

69 \def\@protected@testopt#1{%%
70 \ifx\protect\@typeset@protect
71  \expandafter\@testopt
72 \else
73  \@x@protect#1%
74 \fi}

\@yargdef Generate a primitive argument specification, from a L^{A}TEX [⟨num⟩] form.

   Reorganised slightly so that \renewcommand[1]{\reserved@a}{foo} works.

I am not sure this is worth it, as a following \newcommand would over-write the definition of \reserved@a. L^{A}TEX2.09 goes into an infinite loop with

\renewcommand[1]{\@tempa}{foo}.

(DPC 6 October 93)

75 \long\def\@yargdef#1#2#3{%
76 \@tempcnta#3\relax
77 \advance \@tempcnta \@ne
78 \let\@hash@\relax
79 \edef\reserved@a{\ifx#2\tw@ [\@hash@1]\fi}%
80 \@tempcntb #2%
81 \@whilenum\@tempcntb <\@tempcnta
82  \do{%
83  \edef\reserved@a{\reserved@a\@hash@\the\@tempcntb}%
84  \advance\@tempcntb \@ne}%
85 \let\@hash@##%

86 ⟨autoload⟩\aut@global

87 \l@ngrel@x\expandafter\def\expandafter#1\reserved@a}
\@reargdef
88 \long\def\@reargdef#1[#2]#3{%
89 \@yargdef#1\@ne{#2}{#3}}

\renewcommand Check the command name is already used. If not give an error message. Then temporarily disable \@ifdefinable then call \newcommand. (Previous version \let#1=\relax but this does not work too well if #1 is \@tempa–e.)

90 \def\renewcommand{\@star@or@long\renew@command}
\renew@command
91 \def\renew@command#1{%
92 {\escapechar\m@ne\xdef\@gtempa{{\string#1}}}%
93 \expandafter\@ifundefined\@gtempa
94  {\@latex@error{\string#1 undefined}\@ehc}%
95  {}%
96 \let\@ifdefinable\@rc@ifdefinable
97 \new@command#1}

\@ifdefinable \@@ifdefinable \@rc@ifdefinable Test is user is allowed to define a command.
98 \long\def\@ifdefinable #1#2{%
99  \edef\reserved@a{\expandafter\@gobble\string #1}%
100  \@ifundefined\reserved@a
101  {\edef\reserved@b{\expandafter\@carcube \reserved@a xxx\@nil}%
102  \ifx \reserved@b\@qend \@notdefinable\else
103  \ifx \reserved@a\@qrelax \@notdefinable\else
104  #2%
105  \fi
106  \fi}%
107  \@notdefinable}

Saved definition of \@ifdefinable.

108 \let\@@ifdefinable\@ifdefinable

Version of \@ifdefinable for use with \renewcommand. Does not do the check this time, but restores the normal definition.

109 \long\def\@rc@ifdefinable#1#2{%
110 \let\@ifdefinable\@@ifdefinable
111 #2}

\newenvironment Define a new user environment. #1 is the environment name. #2# Grabs all the tokens up to the first {. These will be any optional arguments. They are not parsed at this point, but are just passed to \@newenv which will eventually call \newcommand. Any optional arguments will then be parsed by \newcommand as it defines the command that executes the ‘begin code’ of the environment.

This #2# trick removed with version 1.2i as it fails if a { occurs in the optional argument. Now use \@ifnextchar directly.

112 \def\newenvironment{\@star@or@long\new@environment}

\new@environment
113 \def\new@environment#1{%
114 \@testopt{\@newenva#1}0}
115 \def\@newenva#1[#2]{%
116 \@ifnextchar [{\@newenvb#1[#2]}{\@newenv{#1}{[#2]}}}
117 \def\@newenvb#1[#2][#3]{\@newenv{#1}{[#2][#3]}}
\renewenvironment Redefine an environment. For \renewenvironment disable \@ifdefinable and

then call \newenvironment. It is OK to \let the argument to \relax here as there should not be a @temp… environment.

118 \def\renewenvironment{\@star@or@long\renew@environment}
\renew@environment
119 \def\renew@environment#1{%
120 \@ifundefined{#1}%
121  {\@latex@error{Environment #1 undefined}\@ehc
122  }{}%
123 \expandafter\let\csname#1\endcsname\relax

124 ⟨autoload⟩\aut@global

125 \expandafter\let\csname end#1\endcsname\relax
126 \new@environment{#1}}
\@newenv The internal version of \newenvironment.

Call \newcommand to define the ⟨begin-code⟩ for the environment. \def is used for the ⟨end-code⟩ as it does not take arguments. (but may contain \pars)

Make sure that an attempt to define a ‘graf’ or ‘group’ environment fails.

127 \long\def\@newenv#1#2#3#4{%
128 \@ifundefined{#1}%
129  {\expandafter\let\csname#1\expandafter\endcsname
130  \csname end#1\endcsname}%
131  \relax
132 \expandafter\new@command
133  \csname #1\endcsname#2{#3}%

134 ⟨autoload⟩\aut@global

135  \l@ngrel@x\expandafter\def\csname end#1\endcsname{#4}}

\newif And here’s a different sort of allocation: For example, \newif\iffoo creates

 \footrue, \foofalse to go with \iffoo.
136 \def\newif#1{%
137 \count@\escapechar \escapechar\m@ne

138 ⟨autoload⟩\aut@global

139  \let#1\iffalse
140  \@if#1\iftrue
141  \@if#1\iffalse
142 \escapechar\count@}
\@if
143 \def\@if#1#2{%

144 ⟨autoload⟩\aut@global

145 \expandafter\def\csname\expandafter\@gobbletwo\string#1%
146  \expandafter\@gobbletwo\string#2\endcsname
147  {\let#1#2}}

File d: ltdefns.dtx Date: 1995/12/13 Version v1.2x 39

\providecommand  \providecommand takes the same arguments as \newcommand, but discards them

if #1 is already defined, Otherwise it just acts like \newcommand. This implementation currently leaves any discarded definition in \reserved@a (and possibly \\reserved@a) this wastes a bit of space, but it will be reclaimed as soon as these scratch macros are redefined.

148 \def\providecommand{\@star@or@long\provide@command}
\provide@command
149 \def\provide@command#1{%
150 {\escapechar\m@ne\xdef\@gtempa{{\string#1}}}%
151 \expandafter\@ifundefined\@gtempa
152  {\def\reserved@a{\new@command#1}}%
153  {\def\reserved@a{\renew@command\reserved@a}}%
154 \reserved@a}%
\CheckCommand  \CheckCommand takes the same arguments as \newcommand. If the command

already exists, with the same definition, then nothing happens, otherwise a warning is issued. Useful for checking the current state befor a macro package starts redefining things. Currently two macros are considered to have the same definition if they are the same except for different default arguments. That is, if the old definition was: \newcommand\xxx[2][a]{(#1)(#2)} then

\CheckCommand\xxx[2][b]{(#1)(#2)} would not generate a warning, but, for
instance \CheckCommand\xxx[2]{(#1)(#2)} would.
155 \def\CheckCommand{\@star@or@long\check@command}

\CheckCommand is only available in the preamble part of the document.

156 \@onlypreamble\CheckCommand
\check@command
157 \def\check@command#1#2#{\@check@c#1{#2}}
158 \@onlypreamble\check@command

\@check@c \CheckCommand itself just grabs all the arguments we need, without actually looking for [ optional argument forms. Now define \reserved@a. If \\reserved@a is then defined, compare it with the “\#1’ otherwise compare \reserved@a with #1.

159 \long\def\@check@c#1#2#3{%
160 \expandafter\let\csname\string\reserved@a\endcsname\relax
161 \renew@command\reserved@a#2{#3}%
162 \@ifundefined{\string\reserved@a}%
163 {\@check@eq#1\reserved@a}%
164 {\expandafter\@check@eq
165  \csname\string#1\expandafter\endcsname
166  \csname\string\reserved@a\endcsname}}
167 \@onlypreamble\@check@c

\@check@eq Complain if #1 and #2 are not \ifx equal.

168 \def\@check@eq#1#2{%
169 \ifx#1#2\else
170  \@latex@warning@no@line
171  {Command \noexpand#1 has
172  changed.\MessageBreak
173  Check if current package is valid}%
174 \fi}
175 \@onlypreamble\@check@eq

\@gobble \@gobbletwo \@gobblefour The \@gobble macro is used to get rid of its argument.
176 \long\def \@gobble #1{}
177 \long\def \@gobbletwo #1#2{}
178 \long\def \@gobblefour #1#2#3#4{}
\@firstofone \@firstoftwo \@secondoftwo Some argument-grabbers.
179 \long\def\@firstofone#1{#1}
180 \long\def\@firstoftwo#1#2{#1}
181 \long\def\@secondoftwo#1#2{#2}

\@iden \@iden is another name for \@firstofone for compatibility reasons.

182 \let\@iden\@firstofone

\@expandtwoargs A macro to totally expand two arguments to another macro

183 \def\@expandtwoargs#1#2#3{%
184 \edef\reserved@a{\noexpand#1{#2}{#3}}\reserved@a}

\@backslashchar A category code 12 backslash.

185 \edef\@backslashchar{\expandafter\@gobble\string\\}

11.4 Robust commands and protect

Fragile and robust commands are one of the thornier issues in L^{A}TEX’s commands. Whilst typesetting documents, L^{A}TEX makes use of many of TEX’s features, such as arithmetic, defining macros, and setting variables. However, there are (at least) three different ocassions when these commands are not safe. These are called ‘moving arguments’ by L^{A}TEX, and consist of:

• writing information to a file, such as indexes or tables of contents.

• writing information to the screen.

• inside an \edef, \message, \mark, or other command which evaluates its argument fully.

The method L^{A}TEX uses for making fragile commands robust is to precede them with \protect. This can have one of five possible values:

• \relax, for normal typesetting. So \protect\foo will execute \foo.

• \string, for writing to the screen. So \protect\foo will write \foo.

• \noexpand, for writing to a file. So \protect\foo will write \foo followed by a space.

• \@unexpandable@protect, for writing a moving argument to a file. So \protect\foo will write \protect\foo followed by a space. This value is also used inside \edefs, \marks and other commands which evaluate their arguments fully.

• \@unexpandable@noexpand, for performing a deferred write inside an \edef. So \protect\foo will write \foo followed by a space. If you want

  \protect\foo to be written, you should use \@unexpandable@protect.

(Removed as never used).

\@unexpandable@protect \@unexpandable@noexpand These commands are used for setting \protect inside \edefs.
186 \def\@unexpandable@protect{\noexpand\protect\noexpand}
187 %\def\@unexpandable@noexpand{\noexpand\noexpand\noexpand}

\DeclareRobustCommand \declare@robustcommand This is a package-writers command, which has the same syntax as \newcommand,

but which declares a protected command. It does this by having

\DeclareRobustCommand\foo
define \foo to be \protect\foo<space>,
and then use \newcommand\foo<space>.

Since the internal command is \foo<space>, when it is written to an auxiliary file, it will appear as \foo.

We have to be a bit cleverer if we’re defining a short command, such as \_, in order to make sure that the auxiliary file does not include a space after the command, since \_a and \_a aren’t the same. In this case we define \_to be:

    \x@protect\_\protect\_<space>

which expands to:

    \ifx\protect\@typeset@protect\else
       \@x@protect@\_
    \fi
    \protect\_<space>

Then if \protect is \@typeset@protect (normally \relax) then we just perform \_<space>, and otherwise \@x@protect@ gobbles everything up and expands to

\protect\_.

Note: setting \protect to any value other than \relax whilst in ‘typesetting’ mode will cause commands to go into an infinite loop! In particular, setting \relax to \@empty will cause \_to loop forever. It will also break lots of other things, such as protected \ifmmodes inside \haligns. If you really really have to do such a thing, then please set \@typeset@protect to be \@empty as well. (This is what the code for \patterns does, for example.)

   More fun with \expandafter and \csname.
188 \def\DeclareRobustCommand{\@star@or@long\declare@robustcommand}
189 \def\declare@robustcommand#1{%
190 \ifx#1\@undefined\else\ifx#1\relax\else
191  \@latex@info{Redefining \string#1}%
192 \fi\fi
193 \edef\reserved@a{\string#1}%
194 \def\reserved@b{#1}%
195 \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%

196 ⟨autoload⟩\aut@global

197 \edef#1{%
198  \ifx\reserved@a\reserved@b
199  \noexpand\x@protect
200  \noexpand#1%
201  \fi
202  \noexpand\protect
203  \expandafter\noexpand\csname
204  \expandafter\@gobble\string#1 \endcsname

205 }%

206 \let\@ifdefinable\@rc@ifdefinable
207 \expandafter\new@command\csname
208  \expandafter\@gobble\string#1 \endcsname

209 }

\@x@protect \x@protect
210 \def\x@protect#1{%
211 \ifx\protect\@typeset@protect\else
212  \@x@protect#1%
213 \fi

214 }

215 \def\@x@protect#1\fi#2#3{%
216 \fi\protect#1%

217 }

\@typeset@protect
218 \let\@typeset@protect\relax

\set@display@protect \set@typeset@protect These macros set \protect appropriately for typesetting or displaying.

219 \def\set@display@protect{\let\protect\string}
220 \def\set@typeset@protect{\let\protect\@typeset@protect}
\protected@edef \protected@xdef \unrestored@protected@xdef \restore@protect The commands \protected@edef and \protected@xdef perform ‘safe’ \edefs

and \xdefs, saving and restoring \protect appropriately. For cases where restoring \protect doesn’t matter, there’s an ‘unsafe’ \unrestored@protected@xdef, useful if you know what you’re doing!

221 \def\protected@edef{%
222 \let\@@protect\protect
223 \let\protect\@unexpandable@protect
224 \afterassignment\restore@protect
225 \edef

226 }

227 \def\protected@xdef{%
228 \let\@@protect\protect
229 \let\protect\@unexpandable@protect
230 \afterassignment\restore@protect
231 \xdef

232 }

233 \def\unrestored@protected@xdef{%
234 \let\protect\@unexpandable@protect
235 \xdef

236 }

237 \def\restore@protect{\let\protect\@@protect}

\protect The normal meaning of \protect

238 \set@typeset@protect

11.5 Internal defining commands

These commands are used internally to define other L^{A}TEX commands.

File d: ltdefns.dtx Date: 1995/12/13 Version v1.2x 43 \@ifundefined Check if first arg is undefined or \relax and execute second or third arg depending,

239 \def\@ifundefined#1{%
240 \expandafter\ifx\csname#1\endcsname\relax
241  \expandafter\@firstoftwo
242 \else
243  \expandafter\@secondoftwo
244 \fi}

\@qend \@qrelax The following define \@qend and \@qrelax to be the strings ‘end’ and ‘relax’ with the characters \catcoded 12.

245 \edef\@qend{\expandafter\@cdr\string\end\@nil}
246 \edef\@qrelax{\expandafter\@cdr\string\relax\@nil}

\@ifnextchar \@ifnextchar peeks at the following character and compares it with its first argument. If both are the same it executes its second argument, otherwise its third.

247 \def\@ifnextchar#1#2#3{%
248 \let\reserved@d=#1%
249 \def\reserved@a{#2}\def\reserved@b{#3}%
250 \futurelet\@let@token\@ifnch}

\@ifnch \@ifnch is a tricky macro to skip any space tokens that may appear before the character in question. If it encounters a space token, it calls xifnch.

251 \def\@ifnch{%
252 \ifx\@let@token\@sptoken
253  \let\reserved@c\@xifnch
254 \else
255  \ifx\@let@token\reserved@d
256  \let\reserved@c\reserved@a
257  \else
258  \let\reserved@c\reserved@b
259  \fi
260 \fi
261 \reserved@c}

\@sptoken The following code makes \@sptoken a space token. It is important here that the control sequence \: consists of a non-letter only, so that the following whitespace is significant. Together with the fact that the equal sign in a \let may be followed by only one optional space the desired effect is achieved. NOTE: the following hacking must precede the definition of \: as math medium space.

262 \def\:{\let\@sptoken= } \:  % this makes \@sptoken a space token

\@xifnch In the following definition of \@xifnch, \: is again used to get a space token as delimiter into the definition.

263 \def\:{\@xifnch} \expandafter\def\: {\futurelet\@let@token\@ifnch}

\makeatletter \makeatother Make internal control sequences accessible or inaccessible.

264 \def\makeatletter{\catcode`\@11\relax}
265 \def\makeatother{\catcode`\@12\relax}

\@ifstar The new implementation below avoids passing the ⟨true code⟩ Through one more \def than the ⟨false code⟩, which previously meant that # had to be written as #### in one argument, but ## in the other. The * is gobbled by \@firstoftwo.

266 \def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}}

\@dblarg \@xdblarg
267 \long\def\@dblarg#1{\@ifnextchar[{#1}{\@xdblarg{#1}}}
268 \long\def\@xdblarg#1#2{#1[{#2}]{#2}}

\@sanitize The command \@sanitize changes the catcode of all special characters except for braces to ‘other’. It can be used for commands like \index that want to write their arguments verbatim. Needless to say, this command should only be executed within a group, or chaos will ensue.

269 \def\@sanitize{\@makeother\ \@makeother\\\@makeother\$\@makeother\&%
270 \@makeother\#\@makeother\^\@makeother\_\@makeother\%\@makeother\~}

\@onelevel@sanitize This makes the whole “meaning” of #1 (its one-level expansion) into catcode 12

tokens: it could be used in \DeclareRobustCommand.

If it is to be used on default float specifiers, this should be done when they are defined.

271 \def \@onelevel@sanitize #1{%
272 \edef #1{\expandafter\strip@prefix
273  \meaning #1}%

274 }

275 ⟨/2ekernel⟩

11.6 Commands for Autoloading

276 ⟨∗autoload⟩

\aut@global This command is only defined in the ‘autoload’ format. It is normally \relax but may be set to \global, in which case \newif and the commands based on \newcommand will all make global definitions.

277 \let\aut@global\relax

\@autoload This macro is only defined in the ‘autoload’ format. It inputs a package ‘auto#1.sty’ within a local group, and with normalised catcodes. \aut@global is set to \global so that \newif \newcommand and related commands make global definitions.

278 \def\@autoload#1{%
279 \begingroup
280 \makeatletter
281 \let\aut@global\global
282 \nfss@catcodes
283 \catcode`\ =10
284 \let\@latex@e@error\@gobble
285 \@@input auto#1.sty\relax
286 \endgroup}

287 ⟨/autoload⟩

File e

ltalloc.dtx

12 Counters

This section deals with counter and other variable allocation.

1 ⟨∗2ekernel⟩

THE FOLLOWING ARE FROM PLAIN: \z@ : A zero dimen or number. It’s more efficient to write

              \parindent\z@ than \parindent 0pt.

\@ne : The number 1. \m@ne : The number -1. \tw@ : The number 2. \sixt@@n : The number 16. \@m : The number 1000. \@MM : The number 20000.

\@xxxii The constant 32.

2 \chardef\@xxxii=32
\@Mi \@Mii \@Miii \@miv Constants 1001–1004.
3 \mathchardef\@Mi=10001
4 \mathchardef\@Mii=10002
5 \mathchardef\@Miii=10003
6 \mathchardef\@Miv=10004

\@tempcnta \@tempcntb Scratch count registers used by L^{A}TEX kernel commands.

7 \newcount\@tempcnta
8 \newcount\@tempcntb

\if@tempswa General boolean switch used by L^{A}TEX kernel commands.

9 \newif\if@tempswa\@tempswatrue

\@tempdima \@tempdimb \@tempdimc Scratch dimen registers used by L^{A}TEX kernel commands.

10 \newdimen\@tempdima
11 \newdimen\@tempdimb
12 \newdimen\@tempdimc

\@tempboxa Scratch box register used by L^{A}TEX kernel commands.

13 \newbox\@tempboxa

\@tempskipa \@tempskipb Scratch skip registers used by L^{A}TEX kernel commands.

14 \newskip\@tempskipa
15 \newskip\@tempskipb

\@temptokena Scratch token register used by L^{A}TEX kernel commands.

16 \newtoks\@temptokena
\@flushglue Glue used for \right- & \leftskip = 0pt plus 1fil
17 \newskip\@flushglue \@flushglue = 0pt plus 1fil

18 ⟨/2ekernel⟩

File f

ltcntrl.dtx

13 Program control structure

This section defines a number of control structure macros, such as while-loops and for-loops.

1 ⟨∗2ekernel⟩

2 \message{control,}
\@whilenum TEST \do {BODY}

\@whiledim TEST \do {BODY} : These implement the loop

while TEST do BODY od where TEST is a TeX \ifnum or \ifdim test, respectively. They are optimized for the normal case of TEST initially false.

\@whilesw SWITCH \fi {BODY} : Implements the loop

while SWITCH do BODY od

Optimized for normal case of SWITCH initially false.

\@for NAME := LIST \do {BODY} : Assumes that LIST expands to A1,A2,

... ,An . Executes BODY n times, with NAME = Ai on the i-th

iteration.

Optimized for the normal case of n = 1. Works for n=0.

\@tfor NAME := LIST \do {BODY} if, before expansion, LIST = T1 ... Tn where each Ti is a token or {...}, then executes BODY n times, with NAME = Ti on the i-th iteration. Works for n=0.

NOTES: 1. These macros use no \@temp sequences. 2. These macros do not work if the body contains anything that looks syntactically to TeX like an improperly balanced \if

   \else \fi.
\@whilenum TEST \do {BODY} ==

BEGIN

if TEST

then BODY

      \@iwhilenum{TEST \relax BODY}

END

\@iwhilenum {TEST BODY} ==

BEGIN

if TEST then BODY

           \@nextwhile = def(\@iwhilenum)
     else \@nextwhile = def(\@whilenoop)

fi

   \@nextwhile {TEST BODY}

END

\@whilesw SWITCH \fi {BODY} ==

BEGIN

if SWITCH then BODY

          \@iwhilesw {SWITCH BODY}\fi

fi END

\@iwhilesw {SWITCH BODY} \fi ==

BEGIN

if SWITCH then BODY

          \@nextwhile = def(\@iwhilesw)
     else \@nextwhile = def(\@whileswnoop)

fi

   \@nextwhile {SWITCH BODY} \fi

END

\@whilenoop \@whilenum \@iwhilenum
3 \long\def\@whilenum#1\do #2{\ifnum #1\relax #2\relax\@iwhilenum{#1\relax
4  #2\relax}\fi}
5 \long\def\@iwhilenum#1{\ifnum #1\expandafter\@iwhilenum
6  \else\expandafter\@gobble\fi{#1}}
\@whiledim \@iwhiledim
7 \long\def\@whiledim#1\do #2{\ifdim #1\relax#2\@iwhiledim{#1\relax#2}\fi}
8 \long\def\@iwhiledim#1{\ifdim #1\expandafter\@iwhiledim
9  \else\expandafter\@gobble\fi{#1}}
\@whileswnoop
\@whilesw
\@iwhilesw

10 \long\def\@whilesw#1\fi#2{#1#2\@iwhilesw{#1#2}\fi\fi}
11 \long\def\@iwhilesw#1\fi{#1\expandafter\@iwhilesw
12  \else\@gobbletwo\fi{#1}\fi}

\@for NAME := LIST \do {BODY} ==

BEGIN \@forloop expand(LIST),\@nil,\@nil \@@ NAME {BODY} END

\@forloop CAR, CARCDR, CDRCDR \@@ NAME {BODY} ==

BEGIN NAME = CAR if def(NAME) = def(\@nnil)

else BODY; NAME = CARCDR if def(NAME) = def(\@nnil)

else BODY

                   \@iforloop CDRCDR \@@ NAME \do {BODY}

fi fi

END

\@iforloop CAR, CDR \@@ NAME {BODY} = NAME = CAR if def(NAME) = def(\@nnil)

        then \@nextwhile = def(\@fornoop)

else BODY ;

              \@nextwhile = def(\@iforloop)

fi

     \@nextwhile name cdr {body}

\@tfor NAME := LIST \do {BODY}

    = \@tforloop LIST \@nil \@@ NAME {BODY}
 \@tforloop car cdr \@@ name {body} =

name = car

if def(name) = def(\@nnil)

        then \@nextwhile == \@fornoop

else body ;

              \@nextwhile == \@forloop

fi

     \@nextwhile name cdr {body}
\@nnil
13 \def\@nnil{\@nil}
\@empty
14 \def\@empty{}
\@fornoop
15 \def\@fornoop#1\@@#2#3{}
\@for
16 \long\def\@for#1:=#2\do#3{%
17 \expandafter\def\expandafter\@fortmp\expandafter{#2}%
18 \ifx\@fortmp\@empty \else
19  \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}\fi}
\@forloop
20 \long\def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else
21  #5\def#4{#2}\ifx #4\@nnil \else#5\@iforloop #3\@@#4{#5}\fi\fi}
\@iforloop
22 \long\def\@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil
23  \expandafter\@fornoop \else
24  #4\relax\expandafter\@iforloop\fi#2\@@#3{#4}}

\@tfor
25 \def\@tfor#1:={\@tf@r#1 }
26 \long\def\@tf@r#1#2\do#3{\def\@fortmp{#2}\ifx\@fortmp\space\else
27  \@tforloop#2\@nil\@nil\@@#1{#3}\fi}
28 \long\def\@tforloop#1#2\@@#3#4{\def#3{#1}\ifx #3\@nnil
29  \expandafter\@fornoop \else
30  #4\relax\expandafter\@tforloop\fi#2\@@#3{#4}}

\@break@tfor Break out of a \@tfor loop. This should be called inside the scope of an \if. See

\@iffileonpath for an example.
31 \long\def\@break@tfor#1\@@#2#3{\fi\fi}

\@removeelement Removes an element from a comma-separated list and puts it into a control sequence, called as \@removeelement{⟨element⟩}{⟨list⟩}{⟨cs⟩}.

32 \def\@removeelement#1#2#3{%
33 \def\reserved@a##1,#1,##2\reserved@a{##1,##2\reserved@b}%
34 \def\reserved@b##1,\reserved@b##2\reserved@b{%
35  \ifx,##1\@empty\else##1\fi}%
36 \edef#3{%
37  \expandafter\reserved@b\reserved@a,#2,\reserved@b,#1,\reserved@a}}

38 ⟨/2ekernel⟩

File g

lterror.dtx

14 Error handling

This section defines L^{A}TEX’s error commands.

The ‘2ekernel’ code ensures that a \usepackage{autoerr} is essentially ignored if a ‘full’ format is being used that has picture mode already in the format.

 1 ⟨2ekernel⟩\expandafter\let\csname ver@autoerr.sty\endcsname\fmtversion

2 ⟨∗2ekernel | autoload⟩

14.1 General commands

\MessageBreak This command prints a new-line inside a messaage, followed by a continuation line begun with \@msg@continuation. Normally it is defined to be \relax, but inside messages, it is let to \@message@break.

 3 \let\MessageBreak\relax

\GenericInfo This takes two arguments: a continuation and a message, and sends the result to the log file.

 4 \DeclareRobustCommand{\GenericInfo}[2]{%
 5 \begingroup
 6  \def\MessageBreak{^^J#1}%
 7  \set@display@protect
 8  \immediate\write\m@ne{#2\on@line.}%
 9 \endgroup

10 }

\GenericWarning This takes two arguments: a continuation and a message, and sends the result to the screen.

11 \DeclareRobustCommand{\GenericWarning}[2]{%
12 \begingroup
13  \def\MessageBreak{^^J#1}%
14  \set@display@protect
15  \immediate\write\@unused{^^J#2\on@line.^^J}%
16 \endgroup

17 } 18 ⟨/2ekernel | autoload⟩

\GenericError This macro takes four arguments: a continuation, an error message, where to go for further information, and the help information. It displays the error message, and sets the error help (the result of typing h to the prompt), and does a horrible hack to turn the last context line (which by default is the only context line) into just three dots. This could be made more efficient.

19 ⟨autoload⟩\def\GenericError{\@autoerr\GenericError}

20 ⟨∗2ekernel | def⟩

21 \bgroup
22 \lccode`\@=`\ %
23 \lccode`\~=`\ %

24 \lccode`\}=`\ %
25 \lccode`\{=`\ %
26 \lccode`\T=`\T%
27 \lccode`\H=`\H%
28 \catcode`\ =11\relax%
29 \lowercase{%
30 \egroup%

Unfortunately TEX versions older than 3.141 have a bug which means that ^^J does not force a linebreak in \message and \errmessage commands. So for these old TEX’s we use \typeout to produce the message, and then have an empty \errmessage command. This causes an extra line of the form

! .

To appear on the terminal, but if you do not like it, you can always upgrade your TEX! In order for your format to use this version, you must define the macro \@TeXversion to be the version number, e.g., 3.14 of the underlying TEX. See the

comments in ltdircheck.dtx.
31 \dimen@\ifx\@TeXversion\@undefined4\else\@TeXversion\fi\p@%
32 \ifdim\dimen@>3.14\p@%

First the ‘standard case’.

33 \DeclareRobustCommand{\GenericError}[4]{%
34 \begingroup%
35 \immediate\write\@unused{}%
36 \def\MessageBreak{^^J}%
37 \set@display@protect%
38 \edef%
39 %    %<-------------------do not delete this space!------------------->%
40 \@err@                                                                 %
41 {{#4}}%
42 \errhelp
43 %    %<-------------------do not delete this space!------------------->%
44 \@err@                                                                 %
45 \let
46 %    %<-------------------do not delete this space!------------------->%
47 \@err@                                                                 %
48 \@empty
49 \def\MessageBreak{^^J#1}%
50 \def~{\errmessage{%
51 #2.^^J^^J%
52 #3^^J%
53 Type  H <return>  for immediate help%
54 %    %<-------------------do not delete this space!------------------->%
55 \@err@                                                                 %
56 }}%
57 ~%
58 \endgroup}%
59 \else%

Secondly the version for old TEX’s.

60 \DeclareRobustCommand{\GenericError}[4]{%
61 \begingroup%
62 \immediate\write\@unused{}%

63 \def\MessageBreak{^^J}%
64 \set@display@protect%
65 \edef%
66 %    %<-------------------do not delete this space!------------------->%
67 \@err@                                                                 %
68 {{#4}}%
69 \errhelp
70 %    %<-------------------do not delete this space!------------------->%
71 \@err@                                                                 %
72 \let
73 %    %<-------------------do not delete this space!------------------->%
74 \@err@                                                                 %
75 \errmessage
76 \def\MessageBreak{^^J#1}%
77 \def~{\typeout{! %
78 #2.^^J^^J%
79 #3^^J%
80 Type  H <return>  for immediate help.}%
81 %    %<-------------------do not delete this space!------------------->%
82 \@err@                                                                 %
83 {}}%
84 ~%
85 \endgroup}%
86 \fi}%

87 ⟨/2ekernel | def⟩

\PackageError \PackageWarning \PackageWarningNoLine \PackageInfo \ClassError \ClassWarning \ClassWarningNoLine \ClassInfo These commands are intended for use by package and class writers, to give infor-

mation to authors. The syntax is:

\PackageError{⟨package⟩}{⟨error⟩}{⟨help⟩}

     \PackageWarning{⟨package⟩}{⟨warning⟩}
     \PackageWarningNoLine{⟨package⟩}{⟨warning⟩}
     \PackageInfo{⟨package⟩}{⟨info⟩}

and similarly for classes. The Error commands print the ⟨error⟩ message, and present the interactive prompt; if the author types h, then the ⟨help⟩ information is displayed. The Warning commands produce a warning but do not present the interactive prompt. The WarningNoLine commands do the same, but don’t print the input line number. The Info commands write the message to the log file. Within the messages, the command \MessageBreak can be used to break a line, \protect can be used to protect command names, and \space is a space, for example:

    \newcommand{\foo}{FOO}
    \PackageWarning{ethel}{%
       Your hovercraft is full of eels,\MessageBreak
       and \protect\foo\space is \foo}

produces:

    Package ethel warning: Your hovercraft is full of eels,
    (ethel)                and \foo is FOO on input line 54.

 88 ⟨autoload⟩\def\PackageError{\@autoerr\PackageError}

89 ⟨∗2ekernel | def⟩

 90 \gdef\PackageError#1#2#3{%
 91 \GenericError{%
 92  (#1)\@spaces\@spaces\@spaces\@spaces
 93 }{%
 94  Package #1 Error: #2%
 95 }{%
 96  See the #1 package documentation for explanation.%
 97 }{#3}%

98 } 99 ⟨/2ekernel | def⟩

100 ⟨∗2ekernel | autoload⟩

101 \def\PackageWarning#1#2{%
102 \GenericWarning{%
103  (#1)\@spaces\@spaces\@spaces\@spaces
104 }{%
105  Package #1 Warning: #2%

106 }% 107 }

108 \def\PackageWarningNoLine#1#2{%
109 \PackageWarning{#1}{#2\@gobble}%

110 }

111 \def\PackageInfo#1#2{%
112 \GenericInfo{%
113  (#1) \@spaces\@spaces\@spaces
114 }{%
115  Package #1 Info: #2%

116 }% 117 } 118 ⟨/2ekernel | autoload⟩

119 ⟨autoload⟩\def\ClassError{\@autoerr\ClassError}

120 ⟨∗2ekernel | def⟩

121 \gdef\ClassError#1#2#3{%
122 \GenericError{%
123  (#1) \space\@spaces\@spaces\@spaces
124 }{%
125  Class #1 Error: #2%
126 }{%
127  See the #1 class documentation for explanation.%
128 }{#3}%

129 } 130 ⟨/2ekernel | def⟩

131 ⟨∗2ekernel | autoload⟩

132 \def\ClassWarning#1#2{%
133 \GenericWarning{%
134  (#1) \space\@spaces\@spaces\@spaces
135 }{%
136  Class #1 Warning: #2%

137 }% 138 }

139 \def\ClassWarningNoLine#1#2{%
140 \ClassWarning{#1}{#2\@gobble}%

142 \def\ClassInfo#1#2{%
143 \GenericInfo{%
144  (#1) \space\space\@spaces\@spaces
145 }{%
146  Class #1 Info: #2%

147 }% 148 } 149 ⟨/2ekernel | autoload⟩

\@latex@error \@latex@warning \@latex@warning@no@line \@latex@info \@latex@info@no@line Errors and other info, for use in the L^{A}TEX core.
150 ⟨autoload⟩\def\@latex@error{\@autoerr\@latex@error}

151 ⟨∗2ekernel | def⟩

152 \gdef\@latex@error#1#2{%
153 \GenericError{%
154  \space\space\space\@spaces\@spaces\@spaces
155 }{%
156  LaTeX Error: #1%
157 }{%
158  See the LaTeX manual or LaTeX Companion for explanation.%
159 }{#2}%

160 } 161 ⟨/2ekernel | def⟩

162 ⟨∗2ekernel | autoload⟩

163 \def\@latex@warning#1{%
164 \GenericWarning{%
165  \space\space\space\@spaces\@spaces\@spaces
166 }{%
167  LaTeX Warning: #1%

168 }% 169 }

170 \def\@latex@warning@no@line#1{%
171 \@latex@warning{#1\@gobble}}
172 \def\@latex@info#1{%
173 \GenericInfo{%
174  \@spaces\@spaces\@spaces
175 }{%
176  LaTeX Info: #1%

177 }% 178 }

179 \def\@latex@info@no@line#1{%
180 \@latex@info{#1\@gobble}}

\@font@warning and \@font@info are defined later since they have to be redefined by the tracefnt package.

 \def\@font@warning#1{%
    \GenericWarning{%
       {(font)\@spaces\@spaces}%
       {Font Warning: #1}%
  }
 \def\@font@info#1{%
    \GenericInfo{%

       (font)\space\@spaces
    }{%
       Font Info: #1%
    }%
  }

\c@errorcontextlines \errorcontextlines as a L^{A}TEX counter, so that it may be be manipulated with \setcounter (once it is defined :-)

181 \let\c@errorcontextlines\errorcontextlines
182 \c@errorcontextlines=-1

\on@line The message ‘ on input line n’, if possible.

183 \ifnum\inputlineno=\m@ne
184 \let\on@line\@empty
185 \else
186 \def\on@line{ on input line \the\inputlineno}
187 \fi

\@warning \@@warning \@latexerr Older L^{A}TEX messages. For the moment, these \let to the new message commands. They may be changed later, once only obsolete packages and classes contain them.

188 \let\@warning\@latex@warning
189 \let\@@warning\@latex@warning@no@line

190 ⟨/2ekernel | autoload⟩

191 \global\let\@latexerr\@latex@error

\@spaces Four spaces.

192 ⟨∗2ekernel | autoload⟩

193 \def\@spaces{\space\space\space\space}

194 ⟨/2ekernel | autoload⟩

14.2 Specific errors

\@eha \@ehb \@ehc \@ehd The more common error help messages.

195 ⟨∗2ekernel | def⟩

196 \gdef\@eha{%
197 Your command was ignored.\MessageBreak
198 Type \space I <command> <return> \space to replace it %
199 with another command,\MessageBreak
200 or \space <return> \space to continue without it.}
201 \gdef\@ehb{%
202 You've lost some text. \space \@ehc}
203 \gdef\@ehc{%
204 Try typing \space <return> %
205 \space to proceed.\MessageBreak
206 If that doesn't work, type \space X <return> \space to quit.}
207 \gdef\@ehd{%
208 You're in trouble here.  \space\@ehc}

209 ⟨/2ekernel | def⟩

As \latex@error triggers the autoload, these definitions should not be needed in the autoload format, but just to be safe…

210 ⟨∗autoload⟩

211 \let\@eha\@empty\let\@ehb\@empty\let\@ehc\@empty\let\@ehd\@empty

212 ⟨/autoload⟩

Here are most of the error message-generating commands of L^{A}TEX.

\@autoerr Make this autoload command robust, as it may be read in at unpredicatble times.

213 ⟨autoload⟩\def\@autoerr{\protect\@autoload{err}\protect}

\@notdefinable Error message generated in \@ifdefinable from calls to one of the commands \newcommand, \newlength or \newtheorem specifying an already-defined command name.

214 \gdef\@notdefinable{%
215 ⟨!autoload⟩ \@latex@error{%
216 ⟨!autoload⟩ Command \@backslashchar\reserved@a\space already defined%

217 ⟨!autoload⟩}\@eha}

218 ⟨autoload⟩ \@autoerr\@notdefinable}

\@nolnerr Generated by \newline and \\ when called in vertical mode.

219 \gdef\@nolnerr{%
220 ⟨!autoload⟩ \@latex@error{There's no line here to end}\@eha}
221 ⟨autoload⟩ \@autoerr\@nolnerr}
\@nocounterr Generated by \setcounter, \addtocounter or \newcounter if applied to an un-

defined counter ⟨cnt⟩.

\@nocnterr Obsolete error message generated in L^{A}TEX2.09 by \setcounter, \addtocounter or \newcounter for undefined counter. DO NOT use for L^{A}TEX 2ε it MIGHT vanish! Use \@nocounterr{⟨cnt⟩} instead.

222 \gdef\@nocounterr#1{%
223 ⟨!autoload⟩ \@latex@error{No counter '#1' defined}\@eha}
224 ⟨autoload⟩ \@autoerr\@nocounterr}
225 \gdef\@nocnterr{\@nocounterr?}

\@ctrerr Called when trying to print the value of a counter numbered by letters that’s greater than 26.

226 \gdef\@ctrerr{%
227 ⟨!autoload⟩ \@latex@error{Counter too large}\@ehb}
228 ⟨autoload⟩ \@autoerr\@ctrerr}

\@nodocument Error produced if paragraphs are typeset in the preamble.

229 \gdef\@nodocument{%
230 ⟨!autoload⟩ \@latex@error{Missing \protect\begin{document}}\@ehd}
231 ⟨autoload⟩ \@autoerr\@nodocument}

\@badend Called by \end that doesn’t match its \begin. RmS 1992/08/24: added code to \@badend to display position of non-matching \begin. FMi 1993/01/14: missing space added.

232 \gdef\@badend#1{%
233 ⟨!autoload⟩ \@latex@error{\protect\begin{\@currenvir}\@currenvline
234 ⟨!autoload⟩  \space ended by \protect\end{#1}}\@eha}
235 ⟨autoload⟩ \@autoerr\@badend}

\@badmath Called by \[, \], \( or \) when used in wrong mode.

236 \gdef\@badmath{%
237 ⟨!autoload⟩ \@latex@error{Bad math environment delimiter}\@eha}
238 ⟨autoload⟩ \@autoerr\@badmath}

\@toodeep Called by a list environment nested more than six levels deep, or an enumerate or itemize nested more than four levels.

239 \gdef\@toodeep{%
240 ⟨!autoload⟩ \@latex@error{Too deeply nested}\@ehd}
241 ⟨autoload⟩ \@autoerr\@toodeep}
\@badpoptabs Called by \endtabbing when not enough \poptabs have occurred, or by \poptabs

when too many have occurred.

242 \gdef\@badpoptabs{%
243 ⟨!autoload⟩ \@latex@error{\protect\pushtabs\space and \protect\poptabs
244 ⟨!autoload⟩  \space don't match}\@ehd}
245 ⟨autoload⟩ \@autoerr\@badpoptabs}

\@badtab Called by \>, \+ , \- or \< when stepping to an undefined tab.

246 \gdef\@badtab{%
247 ⟨!autoload⟩ \@latex@error{Undefined tab position}\@ehd}
248 ⟨autoload⟩ \@autoerr\@badtab}

\@preamerr This error is special: it appear in places where we normally have to \protect expansions. However, to prevent a protection of the error message itself (which would result in the message getting printed not issued on the terminal) we need to locally reset \protect to \relax.

249 \gdef\@preamerr#1{%
250 \begingroup
251  \let\protect\relax

252 ⟨∗!autoload⟩

253  \@latex@error{\ifcase #1 Illegal character\or
254  Missing @-exp\or Missing p-arg\fi\space
255  in array arg}\@ehd

256 ⟨/!autoload⟩

257 ⟨autoload⟩ \@autoerr\@preamerr{#1}%
258 \endgroup}

\@badlinearg Occurs in \line and \vector command when a bad slope argument is encountered.

259 \gdef\@badlinearg{%
260 ⟨!autoload⟩ \@latex@error{%
261 ⟨!autoload⟩  Bad \protect\line\space or \protect\vector
262 ⟨!autoload⟩  \space argument}\@ehb}
263 ⟨autoload⟩ \@autoerr\@badlinearg}

\@parmoderr Occurs in a float environment or a \marginpar when encountered in inner vertical mode.

264 \gdef\@parmoderr{%
265 ⟨!autoload⟩ \@latex@error{Not in outer par mode}\@ehb}
266 ⟨autoload⟩ \@autoerr\@parmoderr}

\@fltovf Occurs in float environment or \marginpar when there are no more free boxes for storing floats.

267 \gdef\@fltovf{%
268 ⟨!autoload⟩ \@latex@error{Too many unprocessed floats}\@ehb}
269 ⟨autoload⟩ \@autoerr\@fltovf}

\@latexbug Occurs in output routine. This is bad news.

270 \gdef\@latexbug{%
271 ⟨!autoload⟩ \@latex@error{This may be a LaTeX bug}{Call for help}}
272 ⟨autoload⟩ \@autoerr\@latexbug}

\@badcrerr This error was removed and replaced by \@nolnerr.

273 %\def\@badcrerr {\@latex@error{Bad use of \protect\\}\@ehc}

\@noitemerr \addvspace or \addpenalty was called when not in vmode. Probably caused by a missing \item.

274 \gdef\@noitemerr{%
275 ⟨!autoload⟩ \@latex@error{Something's wrong--perhaps a missing %
276 ⟨!autoload⟩  \protect\item}\@ehc}
277 ⟨autoload⟩ \@autoerr\@noitemerr}

\@notprerr A command that can be used only in the preamble appears after the command

\begin{document}.
278 \gdef\@notprerr{%
279 ⟨!autoload⟩ \@latex@error{Can be used only in preamble}\@eha}
280 ⟨autoload⟩ \@autoerr\@notprerr}

\@inmatherr Issued by commands that don’t work correctly within math (like \item). There is no real error recovery happening, e.g., the user might get additional errors afterwards.

281 \gdef\@inmatherr#1{%
282 \relax
283 \ifmmode
284 ⟨!autoload⟩ \@latex@error{Command \protect#1 invalid in math mode}\@ehc
285 ⟨autoload⟩ \@autoerr\@inmatherr#1%
286 \fi}

\@invalidchar An error for use with invalid characters. This is commented out, since we decided to use chatcode 15 instead.

287 %\def\@invalidchar{\@latex@error{Invalid character in input}\@ehc}

As well as the above error commands some error messages are directly coded to save space. The Messages alrerady present in L^{A}TEX2.09 included:

   Environment --- undefined

Issued by \begin for undefined environment.

   tab overflow

Occurs in \= when maximum number of tabs exceeded.

   \< in mid line

Occurs in \< when it appears in middle of line.

   Float(s) lost

In output routine, caused by a float environment or \marginpar occurring in inner vertical mode.

File h

ltpar.dtx

15 Paragraphs

This section of the kernel declares the commands used to set \par and \everypar when ever their function needs to be changed for a long time.

15.1 Implementation

There are two situations in which \par may be changed:

• Long-term changes, in which the new value is to remain in effect until the current environment is left. The environments that change \par in this way are the following:

– All list environments (itemize, quote, etc.)

– Environments that turn \par into a noop: tabbing, array and tabular.

• Temporary changes, in which \par is restored to its previous value the next time it is executed. The following are all such uses.

– \end when preceded by \@endparenv, which is called by \endtrivlist

– The mechanism for avoiding page breaks and getting the spacing right after section heads.

\@setpar To permit the proper interaction of these two situations, long-term changes are made by the \@setpar{⟨VAL⟩} command. It’s function is:

To set \par. It \def’s \par and \@par to ⟨VAL⟩.

\@restorepar Short-term changes are made by the usual \def\par commands. The original

values are restored after a short-term change by the \@restorepar commands. \@@par \@@par always is defined to be the original TEX \par.

\everypar \everypar is changed only for the short term. Whenever \everypar is set

non-null, it should restore itself to null when executed.

The following commands change \everypar in this way:

• \item

• \end when preceded by \@endparenv, which is called by endtrivlist

• \minipage

When dealing with \par and \everypar remember the following two warnings:

1. Commands that make short-term changes to \par and \everypar must take account of the possibility that the new commands and the ones that do the restoration may be executed inside a group. In particular, \everypar is executed inside a group whenever a new paragraph begins with a left brace. The \everypar command that restores its definition should be local to the current group (in case the command is inside a minipage used inside someplace where \everypar has been redefined). Thus, if \everypar is redefined to do an \everypar{} it could take several executions of \everypar before the restoration “holds”. This usually causes no problem. However, to prevent the extra executions from doing harm, use a global switch to keep anything harmful in the new \everypar from being done twice.

2. Commands that change \everypar should remember that \everypar might be supposed to set the following switches false:

  • @nobreak
  • @minipage

they should do the setting if necessary.

1 ⟨∗2ekernel⟩

2 \message{par,}

\@setpar \@par Initiate a long-term change to \par.

3 \def\@setpar#1{\def\par{#1}\def\@par{#1}}

The default definition of \@par will ensure that if \@restorepar defines \par to execute \@par it will redefine itself to the primitive \@@par after one iteration.

4 \def\@par{\let\par\@@par\par}

5 ⟨/2ekernel⟩

\@restorepar Restore from a short-term change to \par.

6 \def\@restorepar{\def\par{\@par}}

File i

ltspace.dtx

16 Spacing

This section deals with spacing, and line- and page-breaking.

USER COMMANDS: \nopagebreak[i] : i = 0,...,4. Default argument = 4. Puts a penalty

into the vertical list output as follows: 0 : penalty = 0

                  1 : penalty = \@lowpenalty
                  2 : penalty = \@medpenalty
                  3 : penalty = \@highpenalty

4 : penalty = 10000

\pagebreak[i] : same as \nopagebreak except negatives of its penalty

\linebreak[i], \nolinebreak[i] : analogs of the above

\samepage : inhibits page breaking most places by setting the

following penalties to 10000

                   \interlinepenalty
                   \postdisplaypenalty
                   \interdisplaylinepenalty
                   \@beginparpenalty
                   \@endparpenalty
                   \@itempenalty
                   \@secpenalty
                   \interfootnotelinepenalty
\obeycr  : defines <CR> == \\\relax.

\restorecr : restores <CR> to its usual meaning.

\\ : initially defined to be \newline \\[LENGTH] : initially defined to be \vspace{LENGTH}\newline

             Note: \\* adds a \vadjust{\penalty 10000}

1 ⟨∗2ekernel⟩

2 \message{spacing,}
\pagebreak
\nopagebreak
3 \def\pagebreak{\@testopt{\@no@pgbk-}4}
4 \def\nopagebreak{\@testopt\@no@pgbk4}
\@no@pgbk
5 \def\@no@pgbk#1[#2]{\ifvmode \penalty #1\@getpen{#2}\else
6 \@bsphack\vadjust{\penalty #1\@getpen{#2}}\@esphack\fi}

\nolinebreak
\@nolnbk
 7 \def\nolinebreak{\@testopt\@nolnbk4}
 8 \def\@nolnbk[#1]{\ifvmode \@nolnerr\else \@tempskipa\lastskip
 9  \unskip \penalty \@getpen{#1}\ifdim \@tempskipa >\z@
10  \hskip\@tempskipa\ignorespaces\fi\fi}
\linebreak \@lnbk
11 \def\linebreak{\@testopt\@lnbk4}
12 \def\@lnbk[#1]{\ifvmode \@nolnerr\else
13  \unskip\penalty -\@getpen{#1}\fi}
\samepage
14 \def\samepage{\interlinepenalty\@M
15 \postdisplaypenalty\@M
16 \interdisplaylinepenalty\@M
17 \@beginparpenalty\@M
18 \@endparpenalty\@M
19 \@itempenalty\@M
20 \@secpenalty\@M
21 \interfootnotelinepenalty\@M}

\newline \nobreak added to \newline to prevent null lines when \newline ends an overfull line. Change made 24 May 89 as suggested by Frank Mittelbach and Rainer Schöpf

22 \def\newline{\ifvmode \@nolnerr \else
23  \unskip\nobreak\hfil\break\fi}

\\ \@normalcr The internal definition of the ‘normal’ definition of \\.

24 \DeclareRobustCommand\\{%
25 \@ifstar
26  {\vadjust{\penalty\@M}\@xnewline}%
27  \@xnewline}
28 \expandafter\let\expandafter\@normalcr
29  \csname\expandafter\@gobble\string\\ \endcsname
\@xnewline
30 \def\@xnewline{\@ifnextchar[\@newline\newline}
\@newline
31 \def\@newline[#1]{\ifhmode\unskip\fi\vspace{#1}\newline}
\@getpen
32 \def\@getpen#1{\ifcase #1 \z@ \or \@lowpenalty\or
33  \@medpenalty \or \@highpenalty
34  \else \@M \fi}

@nobreak : Switch used to avoid page breaks caused by \label after a section heading, etc. It should be GLOBALLY set true after the \nobreak and GLOBALLY set false by the next invocation of

      \everypar.

Commands that reset \everypar should globally set it false if appropriate.

35 \newif\if@nobreak \@nobreakfalse

 \@bsphack ... \@esphack

used by macros such as \index and \begin{@float} ... \end{@float} that want to be invisible – i.e., not leave any extra space when used in the middle of text. Such a macro should begin with \@bsphack and end with \@esphack The macro in question should not create any text, nor change the mode.

\@Esphack is a variant of \@esphack that sets the @ignore switch to true (as \@esphack used to do previously). This is currently used only for float and similar environments.

36 \newdimen\@savsk
37 \newcount\@savsf

\@bsphack \@esphack These are generalised hacks which attempt to do sensible things when ‘invisible

commands’ appear in vmode too.

They need to cope with space in both hmode (plus spacefactor) and vmode, and also cope with breaks etc. In vmode this means ensuring that any following \addvspace, etc sees the correct glue in \lastskip.

In fact, these improved versions should be used for other cases of ‘whatsits, thingies etc’ which should be invisible. They are only for commands, not environments (see notes on \@Esphack).

BTW, anyone know why the standard hacks are surrounded by \ifmmode\else rather than simply \ifhmode?

And are there any cases where saving the spacefactor is essential? I have some extensions where it is, but it does not appear to be so in the standard uses.

38 %\def \@bsphack{%
39 %  \relax \ifvmode
40 %    \@savsk \lastskip
41 %    \ifdim \lastskip=\z@
42 %    \else
43 %      \vskip -\lastskip
44 %    \fi
45 %  \else
46 %    \ifhmode
47 %      \@savsk \lastskip
48 %      \@savsf \spacefactor
49 %    \fi
50 %  \fi
51 %}

I think that, in vmode, it is the safest to put in a \nobreak immediately after such things since writes, inserts etc followed by glue give valid breakpoints and, in general, it is possible to create breaks but impossible to destroy them.

52 %\def \@esphack{%
53 %   \relax \ifvmode
54 %     \nobreak
55 %     \ifdim \@savsk=\z@
56 %     \else
57 %       \vskip\@savsk
58 %     \fi

59 %   \else
60 %     \ifhmode
61 %       \spacefactor \@savsf
62 %       \ifdim \@savsk>\z@
63 %         \ignorespaces
64 %       \fi
65 %     \fi
66 %   \fi
67 %}

For the moment we are going to ignore the vertical versions until they are correct.

68 \def \@bsphack{%
69 \relax \ifhmode
70  \@savsk \lastskip
71  \@savsf \spacefactor
72 \fi

73 }

74 \def \@esphack{%
75  \relax \ifhmode
76  \spacefactor \@savsf
77  \ifdim \@savsk>\z@
78  \ignorespaces
79  \fi
80  \fi

81 }

82 \def \@Esphack{%
83  \relax \ifhmode
84  \spacefactor \@savsf
85  \ifdim \@savsk>\z@
86  \global\@ignoretrue
87  \ignorespaces
88  \fi
89  \fi

90 }

\@vbsphack Another variant which is useful for invisible things which should not live in vmode

(this is how some people feel about marginals).

If it occurs in vmode then it enters hmode and ensures that \@savsk is nonzero so that the \ignorespaces is put in later. It is not used at present.

91 % \def \@vbsphack{ %
92 %    \relax \ifvmode
93 %      \leavevmode
94 %      \@savsk 1sp
95 %      \@savsf \spacefactor
96 %    \else
97 %      \ifhmode
98 %        \@savsk \lastskip
99 %        \@savsf \spacefactor
100 %      \fi
101 %    \fi

102 % }

16.1 Vertical spacing

LaTeX supports the PLAIN TeX commands \smallskip, \medskip and

\bigskip.

However, it redefines them using \vspace instead of \vskip.

Extra vertical space is added by the command command

\addvspace{SKIP},

which adds a vertical skip of SKIP to the document. The sequence

        \addvspace{S1} \addvspace{S2}

is equivalent to

\addvspace{maximum of S1, S2}.

\addvspace should be used only in vertical mode, and gives an error if it’s not. The \addvspace command does NOT add vertical space if @minipage = T. The minipage environment uses this to inhibit the addition of extra vertical space at the beginning.

Penalties are put into the vertical list with the \addpenalty{PENALTY} command. It works properly when \addpenalty and \addvspace commands are mixed.

The @nobreak switch is set true used when in vertical mode and no page break should occur. (Right now, it is used only by the section heading commands to inhibit page breaking after a heading.)

\addvspace{SKIP} ==

BEGIN if vmode

then if @minipage

           else if \lastskip =0

then \vskip SKIP

                   else if \lastskip < SKIP
                            then \vskip -\lastskip
                                  \vskip SKIP

else if SKIP < 0 and \lastskip >= 0

                                   then \vskip -\lastskip
                                        \vskip \lastskip + SKIP

fi  fi  fi  fi

else useful error message (CAR). fi END

103 \def\@xaddvskip{\ifdim \lastskip <\@tempskipb\vskip-\lastskip\vskip
104  \@tempskipb
105  \else  \ifdim \@tempskipb<\z@
106  \ifdim \lastskip <\z@
107  \else \advance\@tempskipb\lastskip
108  \vskip -\lastskip \vskip \@tempskipb

109  \fi\fi\fi}
\addvspace
110 \def\addvspace#1{%
111 \ifvmode
112  \if@minipage\else
113  \ifdim \lastskip =\z@
114  \vskip #1\relax
115  \else
116  \@tempskipb#1\relax
117  \@xaddvskip
118  \fi
119  \fi
120 \else
121  \@noitemerr
122 \fi

123 }

\addpenalty
124 \def\addpenalty#1{%
125 \ifvmode
126  \if@minipage
127  \else
128  \if@nobreak
129  \else
130  \ifdim\lastskip=\z@
131  \penalty#1\relax
132  \else
133  \@tempskipb\lastskip
134  \vskip -\lastskip
135  \penalty#1%
136  \vskip\@tempskipb
137  \fi
138  \fi
139  \fi
140 \else
141  \@noitemerr
142 \fi

143 }

\vspace \@vspace \@vspacer The new code for these commands depends on the following facts:

• The value of prevdepth is changed only when a box or rule is created and added to a vertical list;

• The value of prevdepth is used only when a box is created and added to a vertical list;

• The value of prevdepth is always local to the building of one vertical list.

144 \def\vspace{\@ifstar\@vspacer\@vspace}
145 \def\@vspace #1{%
146 \ifvmode
147  \vskip #1

148  \vskip\z@skip
149 \else
150  \@bsphack
151  \vadjust{\@restorepar
152  \vskip #1
153  \vskip\z@skip

154 }%

155  \@esphack
156 \fi

157 }

158 \def\@vspacer #1{%
159 \ifvmode
160  \dimen@\prevdepth
161  \hrule \@height\z@
162  \nobreak
163  \vskip #1
164  \vskip\z@skip
165  \prevdepth\dimen@
166 \else
167  \@bsphack
168  \vadjust{\@restorepar
169  \hrule \@height\z@
170  \nobreak
171  \vskip #1
172  \vskip\z@skip

173 }%

174  \@esphack
175 \fi

176 }

\smallskip \medskip \bigskip
177 \def\smallskip{\vspace\smallskipamount}
178 \def\medskip{\vspace\medskipamount}
179 \def\bigskip{\vspace\bigskipamount}
\smallskipamount
\medskipamount
\bigskipamount

180 \newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt
181 \newskip\medskipamount   \medskipamount  =6pt plus 2pt minus 2pt
182 \newskip\bigskipamount   \bigskipamount =12pt plus 4pt minus 4pt

16.2 Horizontal space

\nobreakspace This is a robust command that produces a horizontal space at which, in paragraphmode, a line-break is not possible. We then define an active ~ to expand to it since this is the documented behaviour of ~. One reason for introducing this is that some 8-bit input encodings have a slot for such a space and we do not want to use active characters as the L^{A}TEX internal commands.

The braces in the definition of ~ are needed to ensure that a following space is preserved when reading to/from internal files.

183 \DeclareRobustCommand{\nobreakspace}{%
184 \leavevmode\nobreak\ }
185 \catcode `\~=13
186 \def~{\nobreakspace{}}

\, Used in paragraph mode produces a \thinspace. It has the ordinary definition in math mode. Useful for quotes inside quotes, as in ``\,`Foo', he said.''

187 \DeclareRobustCommand{\,}{%
188 \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi

189 }

\@ Placed before a ’.’, makes it a sentence-ending period. Does the right thing for other punctuation marks as well. Does this by setting spacefactor to 1000.

190 \def\@{\spacefactor\@m}
\hspace
191 \DeclareRobustCommand\hspace{\@ifstar\@hspacer\@hspace}
\@hspace
192 \def\@hspace#1{\hskip #1\relax}
\@hspacer
193 \def\@hspacer#1{\vrule \@width\z@\nobreak
194  \hskip #1\hskip \z@skip}
195  % extra \hskip 0pt added 12/17/85 to guard
196  % against a following \unskip
197  % \relax added 13 Oct 88 for usual TeX lossage
198  % replaced both changes by \hskip\z@skip 27 Nov 91
\fill
199 \newskip\fill
200 \fill = 0pt plus 1fill
\stretch
201 \def\stretch#1{\z@ \@plus #1fill\relax}
\thinspace
\negthinspace
\enspace

202 \def\thinspace{\kern .16667em }
203 \def\negthinspace{\kern-.16667em }
204 \def\enspace{\kern.5em }
\enskip \quad \qquad
205 \def\enskip{\hskip.5em\relax}
206 \def\quad{\hskip1em\relax}
207 \def\qquad{\hskip2em\relax}

The following definitions will probably get deleted or moved to compatibility mode soon.

208 {\catcode`\^^M=13 \gdef\obeycr{\catcode`\^^M13 \def^^M{\\\relax}%
209  \@gobblecr}%
210 {\catcode`\^^M=13 \gdef\@gobblecr{\@ifnextchar
211 \@gobble\ignorespaces}}
212 \gdef\restorecr{\catcode`\^^M5 }}

213 ⟨/2ekernel⟩

File j

ltlogos.dtx

17 Logos

Various logos are defined here.

\TeX The TEX logo, adjusted so that a full stop after the logo counts as ending a sentence.

1 ⟨∗2ekernel⟩

2 \def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@}

\LaTeX The L^{A}TEX logo.

3 \DeclareRobustCommand{\LaTeX}{L\kern-.36em%
4  {\sbox\z@ T%
5  \vbox to\ht0{\hbox{$\m@th$%
6  \csname S@\f@size\endcsname
7  \fontsize\sf@size\z@
8  \math@fontsfalse\selectfont
9  A}%
10  \vss}%
11  }%
12  \kern-.15em%
13  \TeX}

\LaTeXe The L^{A}TEX 2ε logo as proposed by A-W designers.

14 \DeclareRobustCommand{\LaTeXe}{\mbox{%
15 \if b\expandafter\@car\f@series\@nil\boldmath\fi
16 \LaTeX\kern.15em2$_{\textstyle\varepsilon}$}}

17 ⟨/2ekernel⟩

File j: ltlogos.dtx Date: 1994/07/20 Version v1.1e 70

File k

ltfiles.dtx

18 File Handling

The following user commands are defined in this part:

\document  (ie \begin{document})

Reads in the .AUX files and \catcode’s @ to 12.

\nofiles

Suppresses all file output by setting \@filesw false.

\includeonly {⟨NAME1, ... ,NAMEn⟩} Causes only parts NAME1, ... ,NAMEn to be read by their \include commands. Works by setting partsw true and setting \@partlist to NAME1, ... ,NAMEn.

\include      {⟨NAME⟩}

Does an \input NAME unless \partsw is true and NAME is not in \@partlist. If \@filesw is true, then it directs .AUX output to NAME.AUX, including a checkpoint at the end.

\input      {⟨NAME⟩}

The same as TeX’s \input, except it allows optional braces around the file name. In L^{A}TEX 2ε, it also avoids the primiive ‘missing file’ error, if the file can not be found.

\IfFileExists      {⟨NAME⟩}{⟨then⟩}{⟨else⟩}

If the file exists on the system, execute then otherwise execute else.

\InputIfFileExists      {⟨NAME⟩}{⟨then⟩}{⟨else⟩}

If the file exists on the system, execute then and input NAME otherwise execute else.

1 ⟨∗2ekernel | autoload⟩

 2 \message{files,}

VARIABLES, SWITCHES AND INTERNAL COMMANDS: \@mainaux : Output file number for main .AUX file. \@partaux : Output file number for current part’s .AUX file.

    \@auxout  : Either \@mainout or \@partout, depending on

which .AUX file output goes to.

\@input{foo} : If file foo exists, then \input's it,

otherwise types a warning message.

@filesw : Switch – set false if no .AUX, .TOC, .IDX etc files are to be written @partsw : Set true by a \includeonly command. \@partlist : Set to the argument of the \includeonly command.

\cp@FOO : The checkpoint for \include'd file FOO.TEX, written by \@writeckpt at the end of file FOO.AUX

 \includeonly{FILELIST} ==

BEGIN

\@partsw := T
\@partlist := FILELIST

END

\include{FILE} ==

BEGIN

\clearpage
if \@filesw = T
  then \immediate\write\@mainaux{\string\@input{FILE.AUX}}

fi

if \@partsw = T
  then \@tempswa := F
       \reserved@b == FILE
       for \reserved@a := \@partlist
           do if eval(\reserved@a) = eval(\reserved@b)
                then \@tempswa := T  fi

od

fi

if \@tempswa = T
   then \@auxout := \@partaux
        if \@filesw = T
          then \immediate\openout\@partaux{FILE.AUX}
                \immediate\write\@partaux{\relax}

fi

        \@input{FILE.TEX}
        \clearpage
        \@writeckpt{FILE}
        if @filesw then \closeout \@partaux fi
        \@auxout := \@mainaux
   else \cp@FILE

fi END

\@writeckpt{FILE} ==

BEGIN

 if \@filesw = T
     \immediate\write on file \@partaux:
               \@setckpt{FILE}{                  %% }
     for \reserved@a := \cl@@ckpt
        do \immediate\write on file \@partaux:
                \global\string\setcounter
{eval(\reserved@a)}{eval(\c@eval(\reserved@a))}
        od  %% {
     \immediate\write on file \@partaux:  }

fi END

\@setckpt{FILE}{LIST} ==

BEGIN

    G \cp@FILE := LIST

END

INITIALIZATION

    \@tempswa := T

\@inputcheck \@unused Allocate read stream for testing and output stream.

 3 \newread\@inputcheck
 4 \newwrite\@unused
\@mainaux \@partaux
 5 \newwrite\@mainaux
 6 \newwrite\@partaux
\if@filesw \if@partsw
 7 \newif\if@filesw \@fileswtrue
 8 \newif\if@partsw \@partswfalse
\@clubpenalty
 9 \newcount\@clubpenalty

FMi & RmS 1991/08/26 set \@noskipsec switch to true in the preamble and to false by \begin{document} to catch lists in the preamble, i.e., to produce a “nodocument” error when things like \maketitle appear before

\begin{document}.

\@noskipsectrue set below where switch is defined

1991/03/26 FMi: \process@table added to support NFSS. This will also work with old lfonts if no other style defines \process@table.

\document Cancel the \begingroup from \begin
10 \def\document{\endgroup

If some options on \documentclass haven’t been used by any package we will now give a warning since this is most certainly a misspelling.

11 \ifx\@unusedoptionlist\@empty\else
12  \@latex@warning@no@line{Unused global option(s):^^J%
13  \@spaces[\@unusedoptionlist]}%
14 \fi
15 \@colht\textheight
16 \@colroom\textheight \vsize\textheight
17 \columnwidth\textwidth
18 \@clubpenalty\clubpenalty
19 \if@twocolumn
20  \advance\columnwidth -\columnsep
21  \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
22 \fi
23 \hsize\columnwidth \linewidth\hsize
24 \begingroup\@floatplacement\@dblfloatplacement
25  \makeatletter\let\@writefile\@gobbletwo

26  \global \let \@multiplelabels \relax
27  \@input{\jobname.aux}%
28 \endgroup
29 \if@filesw
30  \immediate\openout\@mainaux\jobname.aux
31  \immediate\write\@mainaux{\relax}%
32 \fi
33 \process@table
34 \let\glb@currsize\@empty  %% Force math initialisation.
35 \normalsize
36 \everypar{}\@noskipsecfalse
37 \let \@refundefined \relax

Just before disabling the preamble commands we execute the begin document hook which contains any code contributed by \AtBeginDocument. Also disable the gathering of the file list, if no \listfiles has been issued. Since a value of exactly 0pt for \topskip causes \twocolumn[] to misbehave, we add this check, hoping that it will not cause any problems elsewhere.

38 \@begindocumenthook

Most of the following assignments will be done globally in case the user adds something like \begin{multicols} to the document hook, ie starts are group in

\begin{document}.
39 \ifdim\topskip< 1sp\global\topskip 1sp\relax\fi
40 \global\@maxdepth\maxdepth
41 \global\let\@begindocumenthook\@undefined
42 \ifx\@listfiles\@undefined
43  \global\let\@filelist\relax
44  \global\let\@addtofilelist\@gobble
45 \fi

At the very end we disable all preamble commands. This has to happen after the begin document hooks was executed so that this hook can still use such commands.

\AtBeginDocument.
46 \gdef\do##1{\global\let ##1\@notprerr}%
47 \@preamblecmds

The next line is a pure safty measure in case a do list is ever expanded at the wrong place. In addition it will save a few tokens to get rid of the above definition.

48 \global\let\do\noexpand

Use of \AtBeginDocument hook might mean that we are already in horizontal mode, so ignore the space after \begin{document}.

49 \ignorespaces}
50 \@onlypreamble\document
\nofiles
51 \def\nofiles{\@fileswfalse
52 \typeout{No auxiliary output files.^^J}%
53 \long\def\protected@write##1##2##3{}%
54 \let\makeindex\relax
55 \let\makeglossary\relax}
56 \@onlypreamble\nofiles

\protected@write This takes three arguments: an output stream, some initialization code, and some text to write. It then writes this, with appropriate handling of \protect and

\thepage.
57 \long\def \protected@write#1#2#3{%
58  \begingroup
59  \let\thepage\relax
60  #2%
61  \let\protect\@unexpandable@protect
62  \edef\reserved@a{\write#1{#3}}%
63  \reserved@a
64  \endgroup
65  \if@nobreak\ifvmode\nobreak\fi\fi

66 }

67 \let\@auxout=\@mainaux
\includeonly
68 \def\includeonly#1{\@partswtrue
69  \edef\@partlist{\zap@space#1 \@empty}}
70 \@onlypreamble\includeonly
\include In the definition of \include, \def\reserved@b changed to \edef\reserved@b

to be consistent with the \edef in \includeonly. (Suggested by Rainer Schöpf & Frank Mittelbach. Change made 20 Jul 88.)

Changed definition of \include to allow space at end of file name — otherwise, typing \include{foo } would cause L^{A}TEX to overwrite foo.tex. Change made 24 May 89, suggested by Rainer Schöpf and Frank Mittelbach

Made \include check for being used inside an \include’d file, as this will not work and cause surprising results.

71 \def\include#1{\relax
72 \ifnum\@auxout=\@partaux
73  \@latex@error{\string\include\space cannot be nested}\@eha
74 \else \@include#1 \fi}
75 \def\@include#1 {%
76 \clearpage
77 \if@filesw
78  \immediate\write\@mainaux{\string\@input{#1.aux}}%
79 \fi
80 \@tempswatrue
81 \if@partsw
82  \@tempswafalse
83  \edef\reserved@b{#1}%
84  \@for\reserved@a:=\@partlist\do
85  {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
86 \fi
87 \if@tempswa
88  \let\@auxout\@partaux
89  \if@filesw
90  \immediate\openout\@partaux #1.aux
91  \immediate\write\@partaux{\relax}%
92  \fi
93  \@input@{#1.tex}%
94  \clearpage

 95  \@writeckpt{#1}%
 96  \if@filesw
 97  \immediate\closeout\@partaux
 98  \fi
 99 \else
100  \@nameuse{cp@#1}%
101 \fi
102 \let\@auxout\@mainaux}
103 \def\@writeckpt#1{\if@filesw
104 \immediate\write\@partaux{\string\@setckpt{#1}\@charlb}%
105 {\let\@elt\@wckptelt \cl@@ckpt}\immediate\write\@partaux{\@charrb}\fi}
106 \def\@wckptelt#1{\immediate\write\@partaux
107 {\string\setcounter{#1}{\the\@nameuse{c@#1}}}}

RmS 93/08/31: introduced \@setckpt

108 \def\@setckpt#1{\global\@namedef{cp@#1}}

The following defines \@charlb and \@charrb to be { and }, respectively with

 \catcode 11.
109 {\catcode`[=1 \catcode`]=2
110 \catcode`{=11 \catcode`}=11
111 \gdef\@charlb[{]
112 \gdef\@charrb[}]
113 ]% }brace matching

18.1 Safe Input Macros

\IfFileExists
114 \long\def \IfFileExists#1#2#3{%
115 \openin\@inputcheck#1 %
116 \ifeof\@inputcheck
117  \ifx\input@path\@undefined
118  \def\reserved@a{#3}%
119  \else
120  \def\reserved@a{\@iffileonpath{#1}{#2}{#3}}%
121  \fi
122 \else
123  \closein\@inputcheck
124  \edef\@filef@und{#1 }%
125  \def\reserved@a{#2}%
126 \fi
127 \reserved@a}

\@iffileonpath If the file is not found by \openin, and \input@path is defined, look in all the directories specified in \input@path.

128 \long\def \@iffileonpath#1#2#3{%
129 \def\reserved@a{#3}%
130 \expandafter\@tfor\expandafter\reserved@b\expandafter
131  :\expandafter=\input@path\do{%
132  \openin\@inputcheck\reserved@b#1 %
133  \ifeof\@inputcheck\else
134  \edef\@filef@und{\reserved@b#1 }%
135  \def\reserved@a{#2}%

136  \closein\@inputcheck
137  \@break@tfor
138  \fi}%
139 \reserved@a}

\InputIfFileExists Now define \InputIfFileExists to input #1 if it seems to exist. Immediately prior to the input, #2 is executed. If the file #1 does not exist, execute ‘#3’.

140 \long\def \InputIfFileExists#1#2{%
141 \IfFileExists{#1}%
142  {#2\@addtofilelist{#1}\@@input \@filef@und}}

\input Input a file: if argument is given in braces use save input macros, otherwise use TEX’s primitive \input command (which is called \@@input in L^{A}TEX).

143 \def\input{\@ifnextchar\bgroup\@iinput\@@input}
\@iinput Define \@iinput (i.e., \input) in terms of \InputIfIfileExists.
144 \def\@iinput#1{%
145 \InputIfFileExists{#1}{}%
146 {\filename@parse{#1}%
147 \edef\reserved@a{\noexpand\@missingfileerror
148  {\filename@area\filename@base}%
149  {\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
150 \reserved@a}}

\@input Define \@input in terms of \IfIfileExists. So this is a ‘safe input’ command,

but the files input are not listed by \listfiles.

We don’t want .aux, .toc files etc be listed by \listfiles. However, something like .bbl probably should be listed and thus should be implemented not by

 \@input.
151 \def\@input#1{%
152 \IfFileExists{#1}{\@@input\@filef@und}{\typeout{No file #1.}}}

\@input@ Version of \@input that does add the file to \@filelist.

153 \def\@input@#1{\InputIfFileExists{#1}{}{\typeout{No file #1.}}}

\@missingfileerror This ‘error’ command avoids TEX’s primitive missing file loop.

Missing file error. Prompt for a new filename, offering a default extension.

154 ⟨autoload⟩\def\@missingfileerror{\@autoerr\@missingfileerror}

155 ⟨/2ekernel | autoload⟩ 156 ⟨∗2ekernel | autoerr⟩

157 \gdef\@missingfileerror#1#2{%
158  \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J%
159  Type X to quit or <RETURN> to proceed,^^J%
160  or enter new name. (Default extension: #2)^^J}%
161  \message{Enter file name: }%
162  {\endlinechar\m@ne
163  \global\read\m@ne to\@gtempa}%
164  \ifx\@gtempa\@empty
165  \else
166  \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
167  \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
168  \filename@parse\@gtempa
169  \edef\filename@ext{%

170  \ifx\filename@ext\relax#2\else\filename@ext\fi}%
171  \edef\reserved@a{%
172  \noexpand\InputIfFileExists
173  {\filename@area\filename@base.\filename@ext}%
174  {}%
175  {\noexpand\@missingfileerror
176  {\filename@area\filename@base}{\filename@ext}}}%
177  \reserved@a
178  \fi}

179 ⟨/2ekernel | autoerr⟩ 180 ⟨∗2ekernel | autoload⟩

\@obsoletefile For compatibility with L^{A}TEX 2.09 document styles, we distribute files called

 article.sty, book.sty, report.sty, slides.sty and letter.sty. These use

the command \@obsoletefile, which produces a warning message.

181 \def\@obsoletefile#1#2{%
182 \@latex@warning@no@line{inputting `#1' instead of obsolete `#2'}}
183 \@onlypreamble\@obsoletefile

18.2 Listing files

\@filelist A list of files input so far. The initial value of \@gobble eats the comma before the first file name.

184 \let\@filelist\@gobble

\@addtofilelist Add to the list of files input so far. This ‘real’ definition is only used for ‘cfg’ files during initex. An initial definition of \@gobble has already been set.

185 %\def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}

\listfiles A preamble command to cause \end{document} to list files input from the main file.

186 \def\listfiles{%
187 \let\listfiles\relax
188 \def\@listfiles##1##2##3##4##5##6##7##8##9\@@{%
189  \def\reserved@d{\\}%
190  \@tfor\reserved@c:=##1##2##3##4##5##6##7##8\do{%
191  \ifx\reserved@c\reserved@d
192  \edef\filename@area{ \filename@area}%
193  \fi}}%
194 \def\@dofilelist{%
195  \typeout{^^J *File List*}%
196  \@for\@currname:=\@filelist\do{%
197  \filename@parse\@currname
198  \edef\reserved@a{%
199  \filename@base.%
200  \ifx\filename@ext\relax tex\else\filename@ext\fi}%
201  \expandafter\let\expandafter\reserved@b
202  \csname ver@\reserved@a\endcsname
203  \expandafter\expandafter\expandafter\@listfiles\expandafter
204  \filename@area\filename@base\\\\\\\\\\\\\\\\\\\@@
205  \typeout{%
206  \filename@area\reserved@a

207  \ifx\reserved@b\relax\else\@spaces\reserved@b\fi}}%
208  \typeout{ ***********^^J}}}

The \@filelist will be de-activated if \listfiles does not appear in the preamble. \begin{document} contains code equivalent to the following:

  \AtBeginDocument{%
    \ifx\@listfiles\@undefined
      \let\@filelist\relax
      \let\@addtofilelist\@gobble
    \fi}
209 \@onlypreamble\listfiles
\@dofilelist
210 \let\@dofilelist\relax

211 ⟨/2ekernel | autoload⟩

File l

ltoutenc.dtx

19 Font encodings

This section of the kernel contains commands for declaring encoding-specific commands, such as accents. It also contains the code for the OMLenc.def, OMSenc.def, T1enc.def and OT1enc.def files, which define the OLM, OMS, T1 and OT1 encodings, and the fontenc package for selecting encodings.

The fontenc package has options for encodings, of which the last option is the default encoding. For example, to use the OT2, OT3 and T1 encodings, with T1 as the default, you say:

    \usepackage[OT2,OT3,T1]{fontenc}

The syntax for declaring encoding-specific commands is:

     \DeclareTextCommand{⟨command⟩}{⟨encoding⟩}

[⟨number⟩][⟨default⟩]{⟨commands⟩}

This command is like \newcommand, except that it defines a command which is specific to one encoding. The resulting command is always robust, even if its definition is fragile. For example, the definition of \aa in the OT1 encoding is:

    \DeclareTextCommand{\aa}{OT1}{{\accent23a}}

\DeclareTextCommand takes the same optional arguments as \newcommand.

     \ProvideTextCommand{⟨command⟩}{⟨encoding⟩}

[⟨number⟩][⟨default⟩]{⟨commands⟩}

This acts like \DeclareTextCommand, but does nothing if the command is already defined.

\DeclareTextSymbol{⟨command⟩}{⟨encoding⟩}{⟨slot⟩} This command defines a text symbol, with a particular slot in that encoding. The commands:

    \DeclareTextSymbol{\ss}{OT1}{25}
    \DeclareTextCommand{\ss}{OT1}{{\char25}}

have the same effect, but the \DeclareTextSymbol is faster.

\DeclareTextAccent{⟨command⟩}{⟨encoding⟩}{⟨slot⟩} This command declares a text accent. The commands:

    \DeclareTextAccent{\"}{OT1}{127}
    \DeclareTextCommand{\"}{OT1}[1]{{\accent127#1}}

have the same effect.

     \DeclareTextComposite{⟨command⟩}{⟨encoding⟩}{⟨slot⟩}

This command declares a composite letter, for example in the T1 encoding \'{a} is slot 225, which is declared by:

    \DeclareTextComposite{\'}{T1}{a}{225}

The command should have been declared with \DeclareTextAccent, or as a one-

argument \DeclareTextCommand.

\DeclareTextComposite is the most common example of using the declaration \DeclareTextCompositeCommand, which can define a composite to be an arbitrary piece of text.

     \DeclareTextCompositeCommand{⟨command⟩}{⟨encoding⟩}{⟨text⟩}

For example, you can declare that \'i is the same as \'\i by saying:

    \DeclareTextCompositeCommand{\'}{OT1}{i}{\'\i}

The command should have been declared with \DeclareTextAccent, or as a one-

argument \DeclareTextCommand.

The commands defined using the above commands can be used in two ways. Normally they can used by just calling the command in the appropriate encoding, for example \ss. However, sometimes you may wish to use a command in an encoding where it is not defined. If the command has no arguments, then you can use it in another encoding by calling \UseTextSymbol:

\UseTextSymbol{⟨encoding⟩}{⟨command⟩}

For example, \UseTextSymbol{\ss}{OT1} has the same effect as:

    {\fontencoding{OT1}\selectfont\ss}

If the command has one argument then you can use it in another encoding by

calling \UseTextAccent:

\UseTextAccent{⟨encoding⟩}{⟨command⟩}{⟨text⟩}

For example, if the current encoding is OT2 then \UseTextAccent{OT1}{\'}{a} has the same effect as:

    {\fontencoding{OT1}\selectfont\'{\fontencoding{OT2}\selectfont a}}

You can also declare a default definition for a text command, which will be used if the current encoding has no appropriate definition.

     \DeclareTextCommandDefault{⟨command⟩}{⟨definition⟩}

For example, the default definition of the command \textonequarter (which produces the fraction \frac{1}{4}) is built using math mode:

    \DeclareTextCommandDefault{\textonequarter}{$\frac14$}

There is a matching \Provide command which will not override an existing default definition:

     \ProvideTextCommandDefault{⟨command⟩}{⟨definition⟩}

The most common use for these commands is to use symbols from other encodings, so there are some optimizations provided:

     \DeclareTextSymbolDefault{⟨command⟩}⟨encoding⟩}
     \DeclareTextAccentDefault{⟨command⟩}⟨encoding⟩}

are short for:

     \DeclareTextCommandDefault{⟨command⟩}
                         {\UseTextSymbol{⟨encoding⟩}{⟨command⟩}}
     \DeclareTextCommandDefault[1]{⟨command⟩}
                     {\UseTextAccent{⟨encoding⟩}{⟨command⟩}{#1}}

For example, to make OT1 the default encoding for \ss and \' you say:

    \DeclareTextSymbolDefault{\ss}{OT1}
    \DeclareTextAccentDefault{\'}{OT1}

Note that you can use these commands on any zero- or one-argument commands declared with \DeclareText* or \ProvideText*, not just those defined using

\DeclareTextSymbol or \DeclareTextAccent.

19.1 Docstrip modules

This .dtx file is be used to generate several related files containing font encoding definitions. The mutually exculsive docstrip options are:

T1  generates T1enc.def for the Cork encoding,
OT1  generates OT1enc.def for Knuth’s CM encoding,
OMS  generates OMSenc.def for Knuth’s math symbol encoding,
OML  generates OMLenc.def for Knuth’s math letters encoding,
package generates fontenc.sty for selecting encodings,
2ekernel for the kernel commands.
autoload for the ‘autoload’ kernel commands.
autoerr for autoerr.sty error message autoload file

19.2 Definitions for the kernel

19.2.1 Declaration commands

This section contains definitions for commands such as accents which depend on the current encoding. These commands will usually be kept in .def files, for example OT1enc.def contains the definitions for the OT1 encoding.

1 ⟨∗2ekernel | autoload⟩

 2 \message{font encodings,}
\DeclareTextCommand \ProvideTextCommand \DeclareTextSymbol \@dec@text@cmd \@changed@cmd \@changed@x \TextSymbolUnavailable \@inmathwarn If you say:
    \DeclareTextCommand{\foo}{T1}...

then \foo is defined to be \T1-cmd \foo \T1\foo, where \T1\foo is one control sequence, not two! We then call \newcommand to define \T1\foo.

 3 \def\DeclareTextCommand{%
 4 \@dec@text@cmd\newcommand
 5 }
 6 \def\ProvideTextCommand{%

7 \@dec@text@cmd\providecommand
8 }
9 \def\DeclareTextSymbol#1#2#3{%
10 \@dec@text@cmd\chardef#1{#2}#3\relax

11 }

12 \def\@dec@text@cmd#1#2#3{%
13 \expandafter\def\expandafter#2%
14  \expandafter{%
15  \csname#3-cmd\expandafter\endcsname
16  \expandafter#2%
17  \csname#3\string#2\endcsname
18  }%
19 \let\@ifdefinable\@rc@ifdefinable
20 \expandafter#1\csname#3\string#2\endcsname

21 }

The declarations are only available before \begin{document}.

22 \@onlypreamble\DeclareTextCommand
23 \@onlypreamble\DeclareTextSymbol

The sneaky bit in all this is what \T1-cmd \foo \T1\foo does. There’s five possibilities, depending on the current values of \protect, \cf@encoding and

\ifmmode:
• If \protect is \@typeset@protect and \cf@encoding is T1, then we execute

\T1\foo. This should be the normal behaviour, and is optimized for speed.

• If \protect is \@typeset@protect, \cf@encoding is (say) OT1, and

\OT1\foo is defined, then we execute \OT1\foo.

• If \protect is \@typeset@protect, \cf@encoding is (say) OT1, we’re in

text mode, and \OT1\foo is undefined, then we define \OT1\foo to be the default value of \foo, and execute \OT1\foo.

• If \protect is \@typeset@protect, \cf@encoding is (say) OT1, we’re in

math mode, and \OT1\foo is undefined, then we execute the default value of \foo. (This is necessary so that things like $X_\copyright$ work properly.)

• If \protect is not \@typeset@protect then we execute \noexpand\foo.

For example, if we are writing to a file, then this results in \foo being written. If we are in a \mark, then \foo will be put in the mark—since \foo is robust, it will then survive all the things which may happen to it whilst it’s a \mark.

So after all that, we will either execute the appropriate definition of \foo for the current encoding, or we will execute \noexpand\foo.

The default value of \foo is \?\foo if it is defined, and an error message otherwise.

When the encoding is changed from T1 to OT1, \T1-cmd is defined to be

\@changed@cmd and \OT1-cmd is defined to be \@current@cmd. This means that

the test for what the current encoding is can be performed quickly.

24 \def\@current@cmd#1{%
25 \ifx\protect\@typeset@protect
26  \@inmathwarn#1%
27 \else

28  \noexpand#1\expandafter\@gobble
29 \fi

30 }

31 \def\@changed@cmd#1#2{%
32 \ifx\protect\@typeset@protect
33  \@inmathwarn#1%
34  \expandafter\ifx\csname\cf@encoding\string#1\endcsname\relax
35  \expandafter\ifx\csname ?\string#1\endcsname\relax
36  \expandafter\def\csname ?\string#1\endcsname{%
37  \TextSymbolUnavailable#1%
38  }%
39  \fi
40  \global\expandafter\let
41  \csname\cf@encoding \string#1\expandafter\endcsname
42  \csname ?\string#1\endcsname
43  \fi
44  \csname\cf@encoding\string#1%
45  \expandafter\endcsname
46 \else
47  \noexpand#1%
48 \fi

49 }

50 ⟨/2ekernel | autoload⟩ 51 ⟨∗2ekernel | autoerr⟩

52 \gdef\TextSymbolUnavailable#1{%
53 \@latex@error{%
54  Command \protect#1 unavailable in encoding \cf@encoding%
55 }\@eha

56 } 57 ⟨/2ekernel | autoerr⟩

58 ⟨autoload⟩\gdef\TextSymbolUnavailable{\@autoerr\TextSymbolUnavailable}

59 ⟨∗2ekernel | autoload⟩

The command \@inmathwarn produces a warning message if we are currently in math mode. Note that since this command is used inside text commands, it can’t call \relax before the \ifmmode. This means that it is possible for the warning to fail to be issued at the beginning of a row of an halign whose template enters math mode. This is probably a bad feature, but there’s not much that can be done about it, since adding a \relax would break ligatures and kerning between text symbols.

A more efficient solution would be to make \@inmathwarn and \@inmatherr equal to \@empty and \relax by default, and to have \everymath reset them to their usual definitions. This is left for future investigation (for example it may break some third party code).

60 \def\@inmathwarn#1{%
61 \ifmmode
62  \@latex@warning{Command \protect#1 invalid in math mode}%
63 \fi

64 }

\DeclareTextCommandDefault \ProvideTextCommandDefault These define commands with encoding ?.

Note that \DeclareTextCommandDefault can only be used in the preamble, but that the \Provide version is allowed in inputenc .def files, so is allowed anywhere.

65 \def\DeclareTextCommandDefault#1{%
66 \DeclareTextCommand#1?%

67 }

68 \def\ProvideTextCommandDefault#1{%
69 \ProvideTextCommand#1?%

70 }

71 \@onlypreamble\DeclareTextCommandDefault
72 %\@onlypreamble\ProvideTextCommandDefault

They require \?-cmd to be initialized as \@changed@cmd.

73 \expandafter\let\csname?-cmd\endcsname\@changed@cmd

\DeclareTextAccent This is just a disguise for defining a TEX \accent command.

74 \def\DeclareTextAccent#1#2#3{%
75 \DeclareTextCommand#1{#2}[1]{{\accent#3 ##1}}

76 }

77 \@onlypreamble\DeclareTextAccent

\DeclareTextCompositeCommand \DeclareTextComposite \@text@composite \@text@composite@x \@strip@args Another amusing game to play with \expandafter, \csname, and \string.
   When you say \DeclareTextCompositeCommand{\foo}{T1}{a}{bar}, we first

check to make sure that \T1\foo is a one-argument macro, by making sure that its \meaning begins macro:#1-, and call an error if it isn’t. Assuming all’s well, we look to see if the expansion of \T1\foo begins with \@text@composite, and if it doesn’t, we redefine \T1\foo to be:

    #1 -> \@text@composite \T1\foo #1\@empty \@text@composite {...}

where ... is the previous definition of \T1\foo. Finally, we define \\T1\foo-a to expand to bar.

78 \def\DeclareTextCompositeCommand#1#2#3#4{%
79 \expandafter\let\expandafter\reserved@a\csname#2\string#1\endcsname
80 \edef\reserved@b{\string##1}%
81 \edef\reserved@c{%
82  \expandafter\@strip@args\meaning\reserved@a:-\@strip@args}%
83 \ifx\reserved@b\reserved@c
84  \expandafter\expandafter\expandafter\ifx
85  \expandafter\@car\reserved@a\relax\relax\@nil
86  \@text@composite
87  \else
88  \edef\reserved@b##1{%
89  \def\expandafter\noexpand
90  \csname#2\string#1\endcsname####1{%
91  \noexpand\@text@composite
92  \expandafter\noexpand\csname#2\string#1\endcsname
93  ####1\noexpand\@empty\noexpand\@text@composite
94  {##1}%
95  }%
96  }%
97  \expandafter\reserved@b\expandafter{\reserved@a{##1}}%

98  \fi
99  \expandafter\def\csname\expandafter\string\csname
100  #2\endcsname\string#1-\string#3\endcsname{#4}%
101 \else
102  \@latex@error{%
103  \string\DeclareTextCompositeCommand\space used on
104  inappropriate command \protect#1%
105  }\@eha
106 \fi

107 }

108 \@onlypreamble\DeclareTextCompositeCommand

This all works because:

    \@text@composite \T1\foo A\@empty \@text@composite {...}

expands to \\T1\foo-A if \\T1\foo-A has been defined, and {...} otherwise.

Note that \@text@composite grabs the first token of the argument and puts just that in the csname. This is so that \'{\textit{e}} will work—it checks whether \\T1\'-\textit is defined (which presumbaly it isn’t) and so expands

to {\accent 1 \textit{e}}.

This trick won’t always work, for example \'{{\itshape e}} will expand to (with spaces added for clarity):

    \csname \string \T1\' - \string {\itshape e} \@empty \endcsname

which will die pretty horribly. Unfortunately there’s not much can be done about this if we’re going to use \csname lookups as a fast way of accessing composites.

This has an unfortunate ‘malfeature’ though, which is that in the T1 encoding, \'{aa} produces á. This is not the expected behaviour, and should perhaps be fixed if the fix doesn’t affect performance too badly.

Finally, it’s worth noting that the \@empty is used in \@text@composite so that accents will work even when the argument is empty. If you say \'{} then this looks up \\T1\'-\@empty, which ought to be \relax, and so all is well. If we didn’t include the \@empty, then \'{} would expand to:

    \csname \string \T1\' - \string \endcsname

so the \endcsname would be \string’ed and the whole of the rest of the document would be put inside the \csname. This would not be good.

109 \def\@text@composite#1#2#3\@text@composite{%
110 \expandafter\@text@composite@x
111  \csname\string#1-\string#2\endcsname

112 }

113 \def\@text@composite@x#1#2{%
114 \ifx#1\relax
115  #2%
116 \else
117  #1%
118 \fi

119 }

The \@strip@args command just strips the arguments part out of the \meaning of a description macro:...->....

120 \def\@strip@args#1:#2-#3\@strip@args{#2}

The command \DeclareTextComposite uses these commands to declare a command which expands out to a letter.

121 \def\DeclareTextComposite#1#2#3#4{%
122 \def\reserved@a{\DeclareTextCompositeCommand#1{#2}{#3}}%
123 \bgroup
124  \lccode`\@=#4%
125  \lowercase{%
126 \egroup
127  \reserved@a @%

128 }% 129 }

130 \@onlypreamble\DeclareTextComposite

\UseTextSymbol \UseTextAccent \@use@text@encoding These fragile commands access glyphs from different encodings. They use grotty low-level calls to the font selection scheme for speed, and in order to make sure that \UseTextSymbol doesn’t do anything which you’re not allowed to do between an \accent and its glyph.

131 \def\UseTextSymbol#1#2{%
132 \def\@wrong@font@char{\MessageBreak for \noexpand\symbol`\string#2'}%
133 \let\@curr@enc\cf@encoding
134 \@use@text@encoding{#1}%
135 #2%
136 \let\@wrong@font@char\@empty
137 \@use@text@encoding\@curr@enc

138 }

139 \def\UseTextAccent#1#2#3{%
140 \let\@curr@enc\cf@encoding
141 \@use@text@encoding{#1}%
142 #2{\@use@text@encoding\@curr@enc\selectfont#3}%
143 \@use@text@encoding\@curr@enc

144 }

145 \def\@use@text@encoding#1{%
146 \edef\f@encoding{#1}%
147 \xdef\font@name{%
148  \csname\curr@fontshape/\f@size\endcsname

149 }%

150 \pickup@font
151 \font@name
152 \@@enc@update

153 }

\DeclareTextSymbolDefault \DeclareTextAccentDefault Some syntactic sugar. Again, these should probably be optimized for speed.

154 \def\DeclareTextSymbolDefault#1#2{%
155 \DeclareTextCommandDefault#1{\UseTextSymbol{#2}#1}%

156 }

157 \def\DeclareTextAccentDefault#1#2{%
158 \DeclareTextCommandDefault#1{\UseTextAccent{#2}#1}%

159 }

160 \@onlypreamble\DeclareTextSymbolDefault
161 \@onlypreamble\DeclareTextAccentDefault

19.2.2 Hyphenation

\patterns \@@patterns \hyphenation \@@hyphenation We redefine \patterns and \hyphenation to allow the use of commands declared

with \DeclareText* to be used inside them.

162 %\let\@@patterns\patterns
163 %\let\@@hyphenation\hyphenation
164 %\def\patterns{%
165 %   \bgroup
166 %      \let\protect\@empty
167 %      \let\@typeset@protect\@empty
168 %      \let\@changed@x\@changed@x@mouth
169 %   \afterassignment\egroup
170 %   \@@patterns

171 %}

172 %\def\hyphenation{%
173 %   \bgroup
174 %      \let\protect\@empty
175 %      \let\@typeset@protect\@empty
176 %      \let\@changed@x\@changed@x@mouth
177 %   \afterassignment\egroup
178 %   \@@hyphenation

179 %}

19.2.3 Miscellania

\a The \a command is used to access the accent commands even when they have been redefined (for example by the tabbing environment). Its internal name is

\@tabacckludge.
180 \def\@tabacckludge#1{\expandafter\@changed@cmd\csname#1\endcsname\relax}
181 \let\a=\@tabacckludge

19.2.4 Default encodings

We define the default encodings for most commands to be either OT1 or OMS.

The naming conventions in the kernel are not what we would use if we were starting from scratch… Those defined by DEK (like \ae and \ss) or by the TEX Users Group Technical Working Group on multi-lingual typesetting (like \th and \ng) have short names. Those which were added to the kernel in 1993 and early 1994 are named after their Adobe glyph names (like \guillemotleft and \quotedblbase). Unfortunately, this naming scheme won’t work for all glyphs, since some names (like \space) are already used, and some (like \endash) are very likely to be defined by users. So we’re now using the naming scheme of \text followed by the Adobe name, (like \textendash and \textsterling). Except that some glyphs don’t have Adobe names, so we’re using the names used by fontinst for those (like \textcompwordmark). Sigh.

Some accents from OT1:

182 \DeclareTextAccentDefault{\"}{OT1}
183 \DeclareTextAccentDefault{\'}{OT1}
184 \DeclareTextAccentDefault{\.}{OT1}
185 \DeclareTextAccentDefault{\=}{OT1}
186 \DeclareTextAccentDefault{\H}{OT1}

187 \DeclareTextAccentDefault{\^}{OT1}
188 \DeclareTextAccentDefault{\`}{OT1}
189 \DeclareTextAccentDefault{\b}{OT1}
190 \DeclareTextAccentDefault{\c}{OT1}
191 \DeclareTextAccentDefault{\d}{OT1}
192 \DeclareTextAccentDefault{\r}{OT1}
193 \DeclareTextAccentDefault{\u}{OT1}
194 \DeclareTextAccentDefault{\v}{OT1}
195 \DeclareTextAccentDefault{\~}{OT1}

Some symbols from OT1:

196 \DeclareTextSymbolDefault{\AA}{OT1}
197 \DeclareTextSymbolDefault{\AE}{OT1}
198 \DeclareTextSymbolDefault{\L}{OT1}
199 \DeclareTextSymbolDefault{\OE}{OT1}
200 \DeclareTextSymbolDefault{\O}{OT1}
201 \DeclareTextSymbolDefault{\aa}{OT1}
202 \DeclareTextSymbolDefault{\ae}{OT1}
203 \DeclareTextSymbolDefault{\i}{OT1}
204 \DeclareTextSymbolDefault{\j}{OT1}
205 \DeclareTextSymbolDefault{\l}{OT1}
206 \DeclareTextSymbolDefault{\oe}{OT1}
207 \DeclareTextSymbolDefault{\o}{OT1}
208 \DeclareTextSymbolDefault{\ss}{OT1}
209 \DeclareTextSymbolDefault{\textdollar}{OT1}
210 \DeclareTextSymbolDefault{\textemdash}{OT1}
211 \DeclareTextSymbolDefault{\textendash}{OT1}
212 \DeclareTextSymbolDefault{\textexclamdown}{OT1}
213 %\DeclareTextSymbolDefault{\texthyphenchar}{OT1}
214 %\DeclareTextSymbolDefault{\texthyphen}{OT1}
215 \DeclareTextSymbolDefault{\textquestiondown}{OT1}
216 \DeclareTextSymbolDefault{\textquotedblleft}{OT1}
217 \DeclareTextSymbolDefault{\textquotedblright}{OT1}
218 \DeclareTextSymbolDefault{\textquoteleft}{OT1}
219 \DeclareTextSymbolDefault{\textquoteright}{OT1}
220 \DeclareTextSymbolDefault{\textsterling}{OT1}

Some symbols from OMS:

221 \DeclareTextSymbolDefault{\textbackslash}{OMS}
222 \DeclareTextSymbolDefault{\textbar}{OMS}
223 \DeclareTextSymbolDefault{\textbraceleft}{OMS}
224 \DeclareTextSymbolDefault{\textbraceright}{OMS}
225 \DeclareTextSymbolDefault{\textbullet}{OMS}
226 \DeclareTextSymbolDefault{\textdaggerdbl}{OMS}
227 \DeclareTextSymbolDefault{\textdagger}{OMS}
228 \DeclareTextSymbolDefault{\textparagraph}{OMS}
229 \DeclareTextSymbolDefault{\textperiodcentered}{OMS}
230 \DeclareTextSymbolDefault{\textsection}{OMS}
231 \DeclareTextAccentDefault{\textcircled}{OMS}

Some symbols from OML:

232 \DeclareTextSymbolDefault{\textless}{OML}
233 \DeclareTextSymbolDefault{\textgreater}{OML}
234 \DeclareTextAccentDefault{\t}{OML}

Some defaults we can fake: For historical reasons \copyright needs {} around the definition. The interface for defining this will CHANGE, but currently use \expandafter to add braces at the appropriate points.

235 \DeclareTextCommandDefault{\copyright}{\textcircled{c}}
236 \expandafter\def\expandafter
237  \copyright\expandafter{\expandafter{\copyright}}
238 \DeclareTextCommandDefault{\textasciicircum}{\^{}}
239 \DeclareTextCommandDefault{\textasciitilde}{\~{}}
240 \DeclareTextCommandDefault{\textcompwordmark}{\kern\z@}
241 \DeclareTextCommandDefault{\textunderscore}{%
242 \leavevmode\mathunderscore

243 }

244 \DeclareTextCommandDefault{\textvisiblespace}{%
245 \mbox{\kern.06em\vrule \@height.3ex}%
246 \vbox{\hrule \@width.3em}%
247 \hbox{\vrule \@height.3ex}%

248 }

249 \DeclareTextCommandDefault{\textellipsis}{%
250 .\kern\fontdimen3\font
251 .\kern\fontdimen3\font
252 .\kern\fontdimen3\font

253 }

254 \DeclareTextCommandDefault{\textregistered}{\textcircled{\textsc r}}
255 \DeclareTextCommandDefault{\texttrademark}{\textsuperscript{TM}}
256 \DeclareTextCommandDefault{\SS}{SS}

19.2.5 Math material

Some commands can be used in both text and math mode:

257 \DeclareRobustCommand{\$}{\ifmmode\mathdollar\else\textdollar\fi}
258 \DeclareRobustCommand{\{}{\ifmmode\lbrace\else\textbraceleft\fi}
259 \DeclareRobustCommand{\}}{\ifmmode\rbrace\else\textbraceright\fi}
260 \DeclareRobustCommand{\P}{\ifmmode\mathparagraph\else\textparagraph\fi}
261 \DeclareRobustCommand{\S}{\ifmmode\mathsection\else\textsection\fi}
262 \DeclareRobustCommand{\dag}{\ifmmode{\dagger}\else\textdagger\fi}
263 \DeclareRobustCommand{\ddag}{\ifmmode{\ddagger}\else\textdaggerdbl\fi}
264 \DeclareRobustCommand{\_}{%
265 \ifmmode\mathunderscore\else\textunderscore\fi

266 }

267 \DeclareRobustCommand{\pounds}{%
268 \ifmmode\mathsterling\else\textsterling\fi

269 }

270 \DeclareRobustCommand{\dots}{%
271 \ifmmode\mathellipsis\else\textellipsis\fi

272 }

273 \let\ldots\dots

274 ⟨/2ekernel | autoload⟩

19.3 The fontenc package

This package allows authors to specify which encodings they will use. For each encoding FOO, the package looks to see if the encoding FOO has already been declared. If it hasn’t, the file FOOenc.def is loaded. The default encoding is set to

 be FOO.

275 ⟨∗package⟩

276 \NeedsTeXFormat{LaTeX2e}
277 \ProvidesPackage{fontenc}[1994/12/14 v1.7f Standard LaTeX package]
278 \DeclareOption*{%
279 \let\encodingdefault\CurrentOption
280 \InputIfFileExists{\CurrentOption enc.def}{}{%
281  \@warning{Encoding file `\CurrentOption enc.def' not found}%

282 }% 283 }

284 \ProcessOptions*
285 \fontencoding\encodingdefault\selectfont

286 ⟨/package⟩

19.4 Definitions for the OT1 encoding

The definitions for the ‘TEX text’ (OT1) encoding.

287 ⟨∗OT1⟩

288 \ProvidesFile{OT1enc.def}[1994/12/14 Standard LaTeX file]

Declare the encoding.

289 \DeclareFontEncoding{OT1}{}{}

Declare the accents.

290 \DeclareTextAccent{\"}{OT1}{127}
291 \DeclareTextAccent{\'}{OT1}{19}
292 \DeclareTextAccent{\.}{OT1}{95}
293 \DeclareTextAccent{\=}{OT1}{22}
294 \DeclareTextAccent{\^}{OT1}{94}
295 \DeclareTextAccent{\`}{OT1}{18}
296 \DeclareTextAccent{\~}{OT1}{126}
297 \DeclareTextAccent{\H}{OT1}{125}
298 \DeclareTextAccent{\u}{OT1}{21}
299 \DeclareTextAccent{\v}{OT1}{20}
300 \DeclareTextAccent{\r}{OT1}{23}

Some accents have to be built by hand:

301 \DeclareTextCommand{\b}{OT1}[1]
302 {{\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
303  \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}}
304 \DeclareTextCommand{\c}{OT1}[1]
305 {\leavevmode\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1%
306  \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
307 \DeclareTextCommand{\d}{OT1}[1]
308 {{\o@lign{\relax#1\crcr\hidewidth\sh@ft{10}.\hidewidth}}}

Declare the text symbols.

309 \DeclareTextSymbol{\AE}{OT1}{29}
310 \DeclareTextSymbol{\OE}{OT1}{30}
311 \DeclareTextSymbol{\O}{OT1}{31}
312 \DeclareTextSymbol{\ae}{OT1}{26}
313 \DeclareTextSymbol{\i}{OT1}{16}
314 \DeclareTextSymbol{\j}{OT1}{17}

315 \DeclareTextSymbol{\oe}{OT1}{27}
316 \DeclareTextSymbol{\o}{OT1}{28}
317 \DeclareTextSymbol{\ss}{OT1}{25}
318 \DeclareTextSymbol{\textemdash}{OT1}{124}
319 \DeclareTextSymbol{\textendash}{OT1}{123}
320 \DeclareTextSymbol{\textexclamdown}{OT1}{60}
321 %\DeclareTextSymbol{\texthyphenchar}{OT1}{`\-}
322 %\DeclareTextSymbol{\texthyphen}{OT1}{`\-}
323 \DeclareTextSymbol{\textquestiondown}{OT1}{62}
324 \DeclareTextSymbol{\textquotedblleft}{OT1}{92}
325 \DeclareTextSymbol{\textquotedblright}{OT1}{`\"}
326 \DeclareTextSymbol{\textquoteleft}{OT1}{`\`}
327 \DeclareTextSymbol{\textquoteright}{OT1}{`\'}

Some symbols which are faked from others:

328 \DeclareTextCommand{\aa}{OT1}
329 {{\accent23a}}
330 \DeclareTextCommand{\L}{OT1}
331 {\leavevmode\setbox\z@\hbox{L}\hb@xt@\wd\z@{\hss\@xxxii L}}
332 \DeclareTextCommand{\l}{OT1}
333 {{\@xxxii l}}
334 \DeclareTextCommand{\AA}{OT1}
335 {\leavevmode\setbox\z@\hbox{h}\dimen@\ht\z@\advance\dimen@-1ex%
336  \rlap{\raise.67\dimen@\hbox{\char23}}A}

In the OT1 encoding, £ and $ share a slot.

337 \DeclareTextCommand{\textdollar}{OT1}{{%
338 \ifdim \fontdimen\@ne\font >\z@
339  \slshape
340 \else
341  \upshape
342 \fi
343 \char`\$}}
344 \DeclareTextCommand{\textsterling}{OT1}{{%
345 \ifdim \fontdimen\@ne\font >\z@
346  \itshape
347 \else
348  \fontshape{ui}\selectfont
349 \fi
350 \char`\$}}

351 ⟨/OT1⟩

19.5 Definitions for the T1 encoding

The definitions for the ‘Extended TEX text’ (T1) encoding.

352 ⟨∗T1⟩

353 \ProvidesFile{T1enc.def}[1994/12/14 Standard LaTeX file]

Declare the encoding.

354 \DeclareFontEncoding{T1}{}{}

Declare the accents.

355 \DeclareTextAccent{\`}{T1}{0}
356 \DeclareTextAccent{\'}{T1}{1}
357 \DeclareTextAccent{\^}{T1}{2}

358 \DeclareTextAccent{\~}{T1}{3}
359 \DeclareTextAccent{\"}{T1}{4}
360 \DeclareTextAccent{\H}{T1}{5}
361 \DeclareTextAccent{\r}{T1}{6}
362 \DeclareTextAccent{\v}{T1}{7}
363 \DeclareTextAccent{\u}{T1}{8}
364 \DeclareTextAccent{\=}{T1}{9}
365 \DeclareTextAccent{\.}{T1}{10}

Some accents have to be built by hand:

366 \DeclareTextCommand{\b}{T1}[1]
367 {{\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
368  \vbox to.2ex{\hbox{\char9}\vss}\hidewidth}}}
369 \DeclareTextCommand{\c}{T1}[1]
370 {\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent11 #1%
371  \else{\ooalign{\hidewidth\char11\hidewidth
372  \crcr\unhbox\z@}}\fi}
373 \DeclareTextCommand{\d}{T1}[1]
374 {{\o@lign{\relax#1\crcr\hidewidth\sh@ft{10}.\hidewidth}}}
375 \DeclareTextCommand{\k}{T1}[1]
376 {\oalign{\null#1\crcr\hidewidth\char12}}

Declare the text symbols.

377 \DeclareTextSymbol{\AA}{T1}{197}
378 \DeclareTextSymbol{\AE}{T1}{198}
379 \DeclareTextSymbol{\DH}{T1}{208}
380 \DeclareTextSymbol{\DJ}{T1}{208}
381 \DeclareTextSymbol{\L}{T1}{138}
382 \DeclareTextSymbol{\NG}{T1}{141}
383 \DeclareTextSymbol{\OE}{T1}{215}
384 \DeclareTextSymbol{\O}{T1}{216}
385 \DeclareTextSymbol{\SS}{T1}{223}
386 \DeclareTextSymbol{\TH}{T1}{222}
387 \DeclareTextSymbol{\aa}{T1}{229}
388 \DeclareTextSymbol{\ae}{T1}{230}
389 \DeclareTextSymbol{\dh}{T1}{240}
390 \DeclareTextSymbol{\dj}{T1}{158}
391 \DeclareTextSymbol{\guillemotleft}{T1}{19}
392 \DeclareTextSymbol{\guillemotright}{T1}{20}
393 \DeclareTextSymbol{\guilsinglleft}{T1}{14}
394 \DeclareTextSymbol{\guilsinglright}{T1}{15}
395 \DeclareTextSymbol{\i}{T1}{25}
396 \DeclareTextSymbol{\j}{T1}{26}
397 \DeclareTextSymbol{\l}{T1}{170}
398 \DeclareTextSymbol{\ng}{T1}{173}
399 \DeclareTextSymbol{\oe}{T1}{247}
400 \DeclareTextSymbol{\o}{T1}{248}
401 \DeclareTextSymbol{\quotedblbase}{T1}{18}
402 \DeclareTextSymbol{\quotesinglbase}{T1}{13}
403 \DeclareTextSymbol{\ss}{T1}{255}
404 \DeclareTextSymbol{\textasciicircum}{T1}{`\^}
405 \DeclareTextSymbol{\textasciitilde}{T1}{`\~}
406 \DeclareTextSymbol{\textbackslash}{T1}{`\\}
407 \DeclareTextSymbol{\textbar}{T1}{`\|}
408 \DeclareTextSymbol{\textbraceleft}{T1}{`\{}

409 \DeclareTextSymbol{\textbraceright}{T1}{`\}}
410 \DeclareTextSymbol{\textcompwordmark}{T1}{23}
411 \DeclareTextSymbol{\textdollar}{T1}{`\$}
412 \DeclareTextSymbol{\textemdash}{T1}{22}
413 \DeclareTextSymbol{\textendash}{T1}{21}
414 \DeclareTextSymbol{\textexclamdown}{T1}{189}
415 \DeclareTextSymbol{\textgreater}{T1}{`\>}
416 %\DeclareTextSymbol{\texthyphenchar}{T1}{127}
417 %\DeclareTextSymbol{\texthyphen}{T1}{`\-}
418 \DeclareTextSymbol{\textless}{T1}{`\<}
419 \DeclareTextSymbol{\textquestiondown}{T1}{190}
420 \DeclareTextSymbol{\textquotedblleft}{T1}{16}
421 \DeclareTextSymbol{\textquotedblright}{T1}{17}
422 \DeclareTextSymbol{\textquotedbl}{T1}{`\"}
423 \DeclareTextSymbol{\textquoteleft}{T1}{`\`}
424 \DeclareTextSymbol{\textquoteright}{T1}{`\'}
425 \DeclareTextSymbol{\textsection}{T1}{159}
426 \DeclareTextSymbol{\textsterling}{T1}{191}
427 \DeclareTextSymbol{\textunderscore}{T1}{95}
428 \DeclareTextSymbol{\textvisiblespace}{T1}{32}
429 \DeclareTextSymbol{\th}{T1}{254}

Declare the composites.

430 \DeclareTextComposite{\.}{T1}{i}{`\i}
431 \DeclareTextComposite{\u}{T1}{A}{128}
432 \DeclareTextComposite{\k}{T1}{A}{129}
433 \DeclareTextComposite{\'}{T1}{C}{130}
434 \DeclareTextComposite{\v}{T1}{C}{131}
435 \DeclareTextComposite{\v}{T1}{D}{132}
436 \DeclareTextComposite{\v}{T1}{E}{133}
437 \DeclareTextComposite{\k}{T1}{E}{134}
438 \DeclareTextComposite{\u}{T1}{G}{135}
439 \DeclareTextComposite{\'}{T1}{L}{136}
440 \DeclareTextComposite{\v}{T1}{L}{137}
441 \DeclareTextComposite{\'}{T1}{N}{139}
442 \DeclareTextComposite{\v}{T1}{N}{140}
443 \DeclareTextComposite{\H}{T1}{O}{142}
444 \DeclareTextComposite{\'}{T1}{R}{143}
445 \DeclareTextComposite{\v}{T1}{R}{144}
446 \DeclareTextComposite{\'}{T1}{S}{145}
447 \DeclareTextComposite{\v}{T1}{S}{146}
448 \DeclareTextComposite{\c}{T1}{S}{147}
449 \DeclareTextComposite{\v}{T1}{T}{148}
450 \DeclareTextComposite{\c}{T1}{T}{149}
451 \DeclareTextComposite{\H}{T1}{U}{150}
452 \DeclareTextComposite{\r}{T1}{U}{151}
453 \DeclareTextComposite{\"}{T1}{Y}{152}
454 \DeclareTextComposite{\'}{T1}{Z}{153}
455 \DeclareTextComposite{\v}{T1}{Z}{154}
456 \DeclareTextComposite{\.}{T1}{Z}{155}
457 \DeclareTextComposite{\.}{T1}{I}{157}
458 \DeclareTextComposite{\u}{T1}{a}{160}
459 \DeclareTextComposite{\k}{T1}{a}{161}
460 \DeclareTextComposite{\'}{T1}{c}{162}
461 \DeclareTextComposite{\v}{T1}{c}{163}

462 \DeclareTextComposite{\v}{T1}{d}{164}
463 \DeclareTextComposite{\v}{T1}{e}{165}
464 \DeclareTextComposite{\k}{T1}{e}{166}
465 \DeclareTextComposite{\u}{T1}{g}{167}
466 \DeclareTextComposite{\'}{T1}{l}{168}
467 \DeclareTextComposite{\v}{T1}{l}{169}
468 \DeclareTextComposite{\'}{T1}{n}{171}
469 \DeclareTextComposite{\v}{T1}{n}{172}
470 \DeclareTextComposite{\H}{T1}{o}{174}
471 \DeclareTextComposite{\'}{T1}{r}{175}
472 \DeclareTextComposite{\v}{T1}{r}{176}
473 \DeclareTextComposite{\'}{T1}{s}{177}
474 \DeclareTextComposite{\v}{T1}{s}{178}
475 \DeclareTextComposite{\c}{T1}{s}{179}
476 \DeclareTextComposite{\v}{T1}{t}{180}
477 \DeclareTextComposite{\c}{T1}{t}{181}
478 \DeclareTextComposite{\H}{T1}{u}{182}
479 \DeclareTextComposite{\r}{T1}{u}{183}
480 \DeclareTextComposite{\"}{T1}{y}{184}
481 \DeclareTextComposite{\'}{T1}{z}{185}
482 \DeclareTextComposite{\v}{T1}{z}{186}
483 \DeclareTextComposite{\.}{T1}{z}{187}
484 \DeclareTextComposite{\`}{T1}{A}{192}
485 \DeclareTextComposite{\'}{T1}{A}{193}
486 \DeclareTextComposite{\^}{T1}{A}{194}
487 \DeclareTextComposite{\~}{T1}{A}{195}
488 \DeclareTextComposite{\"}{T1}{A}{196}
489 \DeclareTextComposite{\r}{T1}{A}{197}
490 \DeclareTextComposite{\c}{T1}{C}{199}
491 \DeclareTextComposite{\`}{T1}{E}{200}
492 \DeclareTextComposite{\'}{T1}{E}{201}
493 \DeclareTextComposite{\^}{T1}{E}{202}
494 \DeclareTextComposite{\"}{T1}{E}{203}
495 \DeclareTextComposite{\`}{T1}{I}{204}
496 \DeclareTextComposite{\'}{T1}{I}{205}
497 \DeclareTextComposite{\^}{T1}{I}{206}
498 \DeclareTextComposite{\"}{T1}{I}{207}
499 \DeclareTextComposite{\~}{T1}{N}{209}
500 \DeclareTextComposite{\`}{T1}{O}{210}
501 \DeclareTextComposite{\'}{T1}{O}{211}
502 \DeclareTextComposite{\^}{T1}{O}{212}
503 \DeclareTextComposite{\~}{T1}{O}{213}
504 \DeclareTextComposite{\"}{T1}{O}{214}
505 \DeclareTextComposite{\`}{T1}{U}{217}
506 \DeclareTextComposite{\'}{T1}{U}{218}
507 \DeclareTextComposite{\^}{T1}{U}{219}
508 \DeclareTextComposite{\"}{T1}{U}{220}
509 \DeclareTextComposite{\'}{T1}{Y}{221}
510 \DeclareTextComposite{\`}{T1}{a}{224}
511 \DeclareTextComposite{\'}{T1}{a}{225}
512 \DeclareTextComposite{\^}{T1}{a}{226}
513 \DeclareTextComposite{\~}{T1}{a}{227}
514 \DeclareTextComposite{\"}{T1}{a}{228}
515 \DeclareTextComposite{\r}{T1}{a}{229}

516 \DeclareTextComposite{\c}{T1}{c}{231}
517 \DeclareTextComposite{\`}{T1}{e}{232}
518 \DeclareTextComposite{\'}{T1}{e}{233}
519 \DeclareTextComposite{\^}{T1}{e}{234}
520 \DeclareTextComposite{\"}{T1}{e}{235}
521 \DeclareTextComposite{\`}{T1}{i}{236}
522 \DeclareTextComposite{\`}{T1}{\i}{236}
523 \DeclareTextComposite{\'}{T1}{i}{237}
524 \DeclareTextComposite{\'}{T1}{\i}{237}
525 \DeclareTextComposite{\^}{T1}{i}{238}
526 \DeclareTextComposite{\^}{T1}{\i}{238}
527 \DeclareTextComposite{\"}{T1}{i}{239}
528 \DeclareTextComposite{\"}{T1}{\i}{239}
529 \DeclareTextComposite{\~}{T1}{n}{241}
530 \DeclareTextComposite{\`}{T1}{o}{242}
531 \DeclareTextComposite{\'}{T1}{o}{243}
532 \DeclareTextComposite{\^}{T1}{o}{244}
533 \DeclareTextComposite{\~}{T1}{o}{245}
534 \DeclareTextComposite{\"}{T1}{o}{246}
535 \DeclareTextComposite{\`}{T1}{u}{249}
536 \DeclareTextComposite{\'}{T1}{u}{250}
537 \DeclareTextComposite{\^}{T1}{u}{251}
538 \DeclareTextComposite{\"}{T1}{u}{252}
539 \DeclareTextComposite{\'}{T1}{y}{253}

540 ⟨/T1⟩

19.6 Definitions for the OMS encoding

The definitions for the ‘TEX math symbol’ (OMS) encoding. Even though this is meant to be a math font, it includes some of the standard L^{A}TEX text symbols.

541 ⟨∗OMS⟩

542 \ProvidesFile{OMSenc.def}[1994/12/14 Standard LaTeX file]

Declare the encoding.

543 \DeclareFontEncoding{OMS}{}{}

Declare the symbols.

544 \DeclareTextSymbol{\textbackslash}{OMS}{"6E}
545 \DeclareTextSymbol{\textbar}{OMS}{"6A}
546 \DeclareTextSymbol{\textbraceleft}{OMS}{"66}
547 \DeclareTextSymbol{\textbraceright}{OMS}{"67}
548 \DeclareTextSymbol{\textbullet}{OMS}{"0F}
549 \DeclareTextSymbol{\textdaggerdbl}{OMS}{"7A}
550 \DeclareTextSymbol{\textdagger}{OMS}{"79}
551 \DeclareTextSymbol{\textparagraph}{OMS}{"7B}
552 \DeclareTextSymbol{\textperiodcentered}{OMS}{"01}
553 \DeclareTextSymbol{\textsection}{OMS}{"78}
554 \DeclareTextCommand{\textcircled}{OMS}[1]{{%
555 \ooalign{%
556  \hfil \raise .07ex\hbox {\upshape#1}\hfil \crcr
557  \char"0D

558 }% 559 }} 560 ⟨/OMS⟩

19.7 Definitions for the OML encoding

The definitions for the ‘TEX math italic’ (OML) encoding. Even though this is meant to be a math font, it includes some of the standard L^{A}TEX text symbols.

561 ⟨∗OML⟩

562 \ProvidesFile{OMLenc.def}[1994/12/14 Standard LaTeX file]

Declare the encoding.

563 \DeclareFontEncoding{OML}{}{}

Declare the symbols.

564 \DeclareTextSymbol{\textless}{OML}{`\<}
565 \DeclareTextSymbol{\textgreater}{OML}{`\>}
566 \DeclareTextAccent{\t}{OML}{"7F}

567 ⟨/OML⟩

File m

ltfssbas.dtx

This file contains the main implementation of the ‘low level’ font selection commands. See other parts of the L^{A}TEX distribution, or The L^{A}TEX Companion for higher level documentation of the L^{A}TEX ‘New’ Font Selection Scheme.

Warning: The macro documentation is still basically the documentation from the first NFSS release and therefore in some cases probably not completely accurate.

20 Autoloading parts of NFSS

This code is set up in a way that some parts of it can be kept separate and will only be loaded if needed.

If we are producing an autoload version of L^{A}TEX 2ε then all those parts with def1 or def2 docstrip guards will be placed into the autoloadable files autofss1.sty

and autofss2.sty.

The ‘2ekernel’ code ensures that a \usepackage{autofss1} is essentially ignored if a ‘full’ format is being used that has picture mode already in the format.

Note the autofss2 loading is currently disabled.

 1 ⟨2ekernel⟩\expandafter\let\csname ver@autofss1.sty\endcsname\fmtversion

The autoload file autofss2 is a specialty because it contains code which will be completely local, ie loaded every time again.

21 Preliminary macros

We define a number of macros that will be used later.

\@nomath \@nomath is used by most macros that will have no effect in math mode. It issues a warning message.

2 ⟨∗2ekernel | autoload⟩

 3 \def\@nomath#1{\relax\ifmmode
 4 \@font@warning{Command \noexpand#1invalid in math mode}\fi}

5 ⟨/2ekernel | autoload⟩

\no@alphabet@error The macro \no@alphabet@error is called whenever the user requests a math alphabet that is not available in the current version. In math mode an error message is produced otherwise the command keeps silent. The argument is the name of the control sequence that identifies the math alphabet. The \relax at the beginning is necessary to prevent TEX from scanning too far in certain situations.

6 ⟨∗2ekernel | def1⟩

 7 \gdef\no@alphabet@error#1{\relax \ifmmode
 8  \@latex@error{Math\space alphabet\space identifier\space
 9  \noexpand#1is\space undefined\space in\space math\space
10  version\space `\math@version'}%

11  {Your\space requested\space math\space alphabet\space
12  is\space undefined\space in\space the\space current\space
13  math\space version.^^JCheck\space the\space spelling\space
14  or\space use\space the\space \noexpand\SetMathAlphabet\space
15  command.}
16  \fi}

17 ⟨/2ekernel | def1⟩ 18 ⟨∗autoload⟩

19 \gdef\no@alphabet@error{\relax \ifmmode
20  \expandafter\try@sizes\expandafter\no@alphabet@error \fi}

21 ⟨/autoload⟩

\new@mathgroup \mathgroup We also give a new name to \newfam and \fam to avoid verbal confusion (see the introduction).^{2}

22 ⟨∗2ekernel | autoload⟩

23 \def\new@mathgroup{\alloc@8\mathgroup\chardef\sixt@@n}
24 \let\mathgroup\fam
25 \let\newfam\new@mathgroup
26 \@onlypreamble\new@mathgroup

22 Macros for setting up the tables

\DeclareFontShape The macro \DeclareFontShape takes 6 arguments:
27 \def\DeclareFontShape{\begingroup

First we restore the catcodes of all characters used in the syntax.

28 \nfss@catcodes

We use \expandafter\endgroup to restore catcode in case something goes wrong with the argument parsing (suggested by Tim Van Zandt)

\DeclareFontShape
29 \expandafter\endgroup
30 \DeclareFontShape@}
31 \def\DeclareFontShape@#1#2#3#4#5#6{%
32 \expandafter\ifx\csname #1+#2\endcsname\relax
33  \@latex@error{Font family `#1+#2' unknown}\@eha
34 \else
35  \expandafter
36  \xdef\csname#1/#2/#3/#4\endcsname{\expandafter\noexpand
37  \csname #5\endcsname}%
38  \def\reserved@a{#6}%
39  \global
40  \expandafter\let\csname#5\expandafter\endcsname
41  \ifx\reserved@a\@empty
42  \@empty
43  \else
44  \reserved@a
45  \fi
46 \fi

47 }

2For the same reason it seems advisable to \let\fam and \newfam equal to \relax, but this is commented out to retain compatibility to existing style files.

\DeclareFixedFont Define a direct font switch that avoids all overhead.

48 \def\DeclareFixedFont#1#2#3#4#5#6{%
49 \begingroup
50  \math@fontsfalse
51  \every@math@size{}%
52  \fontsize{#6}\z@
53  \usefont{#2}{#3}{#4}{#5}%
54  \global\expandafter\let\expandafter#1\the\font
55 \endgroup

56 } 57 ⟨/2ekernel | autoload⟩

\do@subst@correction

58 ⟨∗2ekernel | autoload⟩

59 \def\do@subst@correction{%
60  \xdef\subst@correction{%
61  \font@name
62  \global\expandafter\font
63  \csname \curr@fontshape/\f@size\endcsname
64  \noexpand\fontname\font
65  \relax}%

Calling \subst@correction after the current group means calling it after we have loaded the substitution font which is done inside a group.

66  \aftergroup\subst@correction

67 }

\DeclareFontFamily
68 \def\DeclareFontFamily#1#2#3{%

If we want fast checking for the encoding scheme we can just check for \T@.. being defined.

69 % \@tempswafalse
70 % \def\reserved@b{#1}%
71 % \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
72 %      \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
73 % \cdp@list
74 % \if@tempswa
75 \@ifundefined{T@#1}%
76  {%
77  \@latex@error{Encoding scheme  `#1' unknown}\@eha
78  }%
79  {%

Now we have to define the macro \⟨#1 ⟩+⟨#2 ⟩ to contain #3. But since most of the time #3 will be empty we use \let in a tricky way rather than a simple \def since this will save internal memory. We store the argument #3 in a temporary

macro \reserved@a.
80  \def\reserved@a{#3}%

We compare \reserved@a with \@empty If these two are the same we \let the ‘extra’ macro equal to \@empty which is not the same a doing a \let to \reserved@a — the latter would blow one extra memory location rather then reusing the one

from \@empty.

81  \global
82  \expandafter\let\csname #1+#2\expandafter\endcsname
83  \ifx \reserved@a\@empty
84  \@empty
85  \else \reserved@a
86  \fi
87  }%

88 }

\cdp@list We initialize the code page list to be empty.

89 \let\cdp@list\@empty
90 \@onlypreamble\cdp@list
\cdp@elt
91 \let\cdp@elt\relax
92 \@onlypreamble\cdp@elt
\DeclareFontEncoding
93 \def\DeclareFontEncoding{%

First we start with ignoring all blanks and newlines since every surplus space in the second or third argument will come out in a weird place in the document.

94 \begingroup
95 \nfss@catcodes
96 \expandafter\endgroup
97 \DeclareFontEncoding@}
98 \@onlypreamble\DeclareFontEncoding
99 \def\DeclareFontEncoding@#1#2#3{%
100 \expandafter
101 \ifx\csname T@#1\endcsname\relax
102  \def\cdp@elt{\noexpand\cdp@elt}%
103  \xdef\cdp@list{\cdp@list\cdp@elt{#1}%
104  {\default@family}{\default@series}%
105  {\default@shape}}%

To support encoding dependent commands (like accents) we initialise the command \⟨encoding⟩-cmd to be \@changed@cmd. (See ltoutenc.dtx for details.)

106  \expandafter\let\csname#1-cmd\endcsname\@changed@cmd
107 \else
108  \@font@info{Redeclaring font encoding #1}%
109 \fi
110 \global\@namedef{T@#1}{#2}%
111 \global\@namedef{M@#1}{\default@M#3}%

112 }

113 \@onlypreamble\DeclareFontEncoding@
\DeclareFontSubstitution
114 \def\DeclareFontSubstitution#1#2#3#4{%
115 \expandafter
116 \ifx\csname T@#1\endcsname\relax
117  \@latex@error{Encoding scheme  `#1' unknown}\@eha
118 \else

119  \begingroup
120  \def\reserved@a{#1}%
121  \toks@{}%
122  \def\cdp@elt##1##2##3##4{%
123  \def\reserved@b{##1}%
124  \ifx\reserved@a\reserved@b
125  \addto@hook\toks@{\cdp@elt{#1}{#2}{#3}{#4}}%
126  \else
127  \addto@hook\toks@{\cdp@elt{##1}{##2}{##3}{##4}}%
128  \fi}%
129  \cdp@list
130  \xdef\cdp@list{\the\toks@}%
131  \endgroup
132  \global
133  \@namedef{D@#1}{%
134  \def\default@family{#2}%
135  \def\default@series{#3}%
136  \def\default@shape{#4}%

137 }%

138 \fi

139 }

140 \@onlypreamble\DeclareFontSubstitution
\DeclareFontEncodingDefaults
141 \def\DeclareFontEncodingDefaults#1#2{%
142 \ifx\relax#1\else
143  \ifx\default@T\@empty\else
144  \@font@info{Overwriting encoding scheme text defaults}%
145  \fi
146  \gdef\default@T{#1}%
147 \fi
148 \ifx\relax#2\else
149  \ifx\default@M\@empty\else
150  \@font@info{Overwriting encoding scheme math defaults}%
151  \fi
152  \gdef\default@M{#2}%
153 \fi

154 }

155 \@onlypreamble\DeclareFontEncodingDefaults
\default@T \default@M
156 \let\default@T\@empty
157 \let\default@M\@empty
\DeclarePreloadSizes
158 \def\DeclarePreloadSizes#1#2#3#4#5{%
159 \@ifundefined{T@#1}%
160 {\@latex@error{Encoding scheme  `#1' unknown}\@eha}%

161 {%

Don’t know at the moment what this group here does!

162 \begingroup

We define a macro \reserved@f^{3} that grabs the next size and loads the corresponding font. This is done by delimiting \reserved@f’s only argument by the token , (comma).

163  \def\reserved@f##1,{%

The end of the list will be detected when there are no more elements, i.e. when \reserved@f’s argument is empty. The trick used here is explained in Appendix D of the TEXbook: if the argument is empty the \if will select the first clause and \let \reserved@f equal to \relax. (We use the > character here since it cannot appear in font file names.)

164  \if>##1>%
165  \let\reserved@f\relax
166  \else

Otherwise, we define \font@name appropriately and call \pickup@font to do the work. Note that the requested \curr@fontshape combination must have been defined, or you will get an error. The definition of \font@name is carried out globally to be consistent with the rest of the code in this file.

167  \xdef\font@name{\csname#1/#2/#3/#4/##1\endcsname}%
168  \pickup@font

Now we forget the name of the font just loaded. More precisely, we set the corresponding control sequence to \relax. This means that later on, when the font is first used, the macro \define@newfont is called again to execute the ‘extra’ macro for this font.

169  \global\expandafter\let\font@name\relax
170  \fi

Finally we call \reserved@f again to process the next size. If \reserved@f was \let equal to \relax this will end the macro.

171  \reserved@f}%

We finish with reinserting the list of sizes after the \reserved@f macro and appending an empty element so that the end of the list is recognized properly.

172  \reserved@f#5,,%
173 \endgroup

174 }% 175 }

176 \@onlypreamble\DeclarePreloadSizes

\ifmath@fonts We need a switch to decide if we have to switch math fonts. For this purpose we provide \ifmath@fonts that can be set to true or false by the \S@... macros depending on if math fonts are provided for this size or not. The default is of course to switch all fonts.

177 \newif\ifmath@fonts \math@fontstrue
\DeclareMathSizes \DeclareMathSizes*  \DeclareMathSizes takes the text size, math text size, math script size, and math

scriptscript size as arguments and defines the right \S@… macro.

178 \def\DeclareMathSizes{%
179 \@ifstar{\@DeclareMathSizes\math@fontsfalse}%
180  {\@DeclareMathSizes{}}}
181 \@onlypreamble\DeclareMathSizes

3We cannot use \@tempa since it is needed in \pickup@font.

\@DeclareMathSizes
182 \def\@DeclareMathSizes#1#2#3#4#5{%
183  \@defaultunits\dimen@#2pt\relax\@nnil
184  \def\reserved@a{#3}%
185  \ifx\reserved@a\@empty
186  \expandafter \let
187  \csname S@\strip@pt\dimen@\endcsname
188  \math@fontsfalse
189  \else
190  \expandafter \gdef
191  \csname S@\strip@pt\dimen@\endcsname
192  {\gdef\tf@size{#3}\gdef\sf@size{#4}%
193  \gdef\ssf@size{#5}%
194  #1%

195 }%

196  \fi}
197 \@onlypreamble\@DeclareMathSizes

23 Selecting a new font

23.1 Macros for the user

\fontencoding \f@encoding As we said in the introduction a font is described by four parameters. We first define macros to specify the wanted family, series, or shape. These are simply recorded in internal macros \f@family, \f@series, and \f@shape, resp. We use \edef’s so that the arguments can also be macros.

198 \DeclareRobustCommand\fontencoding[1]{%
199  \expandafter\ifx\csname T@#1\endcsname\relax
200  \@latex@error{Encoding scheme `#1' unknown}\@eha
201  \else
202  \edef\f@encoding{#1}%
203  \ifx\cf@encoding\f@encoding

If the new encoding is the same as the old encoding we have nothing to do. However, in case we had a sequence of several encoding changes without a \selectfont inbetween we can save processing by making sure that \enc@update is \relax.

204  \let\enc@update\relax
205  \else

If current and new encoding differ we define the macro \enc@update to contain all updates necessary at \selectfont time.

206  \let\enc@update\@@enc@update
207  \fi
208  \fi

209 }

\@@enc@update
210 \def\@@enc@update{%

When \@@enc@update is executed \f@encoding holds the encoding name for the new encoding and \cf@encoding the name of the last active encoding.

We start by setting the init command for encoding dependent macros to

\@changed@cmd.

211  \expandafter
212  \let
213  \csname\cf@encoding -cmd\endcsname
214  \@changed@cmd

Then we turn the one for the new encoding to \@current@cmd (see ltoutenc.dtx for further explanations).

215  \expandafter
216  \let
217  \csname\f@encoding-cmd\endcsname
218  \@current@cmd

We execute the default settings \default@T, followed by the one for the new encoding.

219  \default@T
220  \csname T@\f@encoding\endcsname

Finally we change the default substitution values, disable \enc@update and make \f@encoding officially the current encoding.

221  \csname D@\f@encoding\endcsname
222  \let\enc@update\relax
223  \let\cf@encoding\f@encoding

224 }

\enc@update The default action in \selectfont is to do nothing.

225 \let\enc@update\relax
\fontfamily
\f@family
\fontseries
\f@series
\fontshape
\f@shape

226 \DeclareRobustCommand\fontfamily[1]{\edef\f@family{#1}}
227 \DeclareRobustCommand\fontseries[1]{\edef\f@series{#1}}
228 \DeclareRobustCommand\fontshape [1]{\edef\f@shape{#1}}

Some handy abbreviation if you want to get some particular font in the current size. If also the size should change one has to issue a \fontsize comand first.

229 \def\usefont#1#2#3#4{\fontencoding{#1}\fontfamily{#2}%
230  \fontseries{#3}\fontshape{#4}\selectfont
231  \ignorespaces}
\linespread The comand \linespread changes the current \baselinestretch by calling
\set@fontsize. The values for \f@size and \f@baselineskip will be left un-

changed.

232 \DeclareRobustCommand\linespread[1]
233 {\set@fontsize{#1}\f@size\f@baselineskip}

\fontsize We also define a macro that allows to specify a size. In this case, however, we also need the value of \baselineskip. As the first argument to \set@fontsize we pass the current value of \baselinestretch. This will either match the internal value (in which case nothing changes, or it will be an updated value due to a user change of that macro using \renewcommand. If we would pass the internal \f@linespread such a change would be efectively overwritten by a size change.

234 \DeclareRobustCommand\fontsize[2]
235 {\set@fontsize\baselinestretch{#1}{#2}}

\f@linespread This macro holds the current internal value for \baselinestretch.

236 \let\f@family\@empty
237 \let\f@series\@empty
238 \let\f@shape\@empty
239 \let\f@size\@empty
240 \let\f@baselineskip\@empty
241 \let\f@linespread\@empty
\cf@encoding
242 \let\f@encoding\@empty
243 \let\cf@encoding\@empty

\@defaultunits The function \@defaultunits when wrapped around a dimen or skip assignment

supplies default units. Usage:

   \@defaultunits\dimen@=#1pt\relax\@nnil

Note: the \relax is *important*. Other units can be substituted for the ‘pt’ if desired.

We use \remove@to@nnil as an auxiliary macros for \@defaultunits. It just has to gobble the supplied default unit ‘pt’ or whatever, if it wasn’t used in the assignment.

244 \def\@defaultunits{\afterassignment\remove@to@nnil}

\strip@pt \rem@pt This macro strips the characters pt produced by using \the on a dimen register.

245 \begingroup
246 \catcode`P=12
247 \catcode`T=12
248 \lowercase{
249  \def\x{\def\rem@pt##1.##2PT{##1\ifnum##2>\z@.##2\fi}}}
250 \expandafter\endgroup\x
251 \def\strip@pt{\expandafter\rem@pt\the}
\mathversion \math@version  \mathversion takes the math version name as argument, defines \math@version

appropriately and switches to the font selected forcing a call to \glb@settings if the version is known to the system.

252 \DeclareRobustCommand\mathversion[1]
253  {\@nomath\mathversion
254  \expandafter\ifx\csname mv@#1\endcsname\relax
255  \@latex@error{Math version `#1' is not defined}\@eha\else
256  \edef\math@version{#1}%

We need to force a math font setup both now and at the point where we return to the previous math version. Forcing a math font setup can simply be done by setting \glb@currsize to an invalid value since this will trigger the setup when the formula starts.

257  \gdef\glb@currsize{}%

When the scope of the current \mathversion ends we need to restore the old setup. However this time we need to force it directly at least if we are inside math, otherwise we could wait. Another way to enhance this code here is todo the setting only if the version really has changed after all. This might be interesting

in case of amstext and boldsymbol.
258  \aftergroup\glb@settings
259  \fi}

If TEX would support a hook just before the end of a formula (opposite of \everymath so to speak) the implementation of the algorithm would be much simpler because in that case we would set up the correct math fonts at this point without having to worry about incorrect settings due to nesting. The same would be true if in L^{A}TEX the use of $ (as the primitive TEX command) would be impossible and instead only a higher-level interface would be available. Note that this does not mean that a $ couldn’t be the short-hand for starting and stopping that higher-level interface, it only means that the direct TEX function must be hidden.

Anyway, since we don’t have this and won’t have it in L^{A}TEX 2ε we need to implement it in a somewhat slower way.

We test for the current math font setup on entry of a formula, i.e., on the hooks \everymath and \everydisplay. But since these hooks may contain user data we provide ourselves with an internal version of these hooks which stays frozen.

\frozen@everymath \frozen@everydisplay New internal names for \everymath and \everydisplay.
260 \let\frozen@everymath\everymath
261 \let\frozen@everydisplay\everydisplay

\everymath \everydisplay Now we provide now user hooks that will be called in the frozen internals.

262 \newtoks\everymath
263 \newtoks\everydisplay

\frozen@everymath Now we define the behaviour of the frozen hooks: first check the math setup then call the user hook.

264 \frozen@everymath = {\check@mathfonts
265  \the\everymath}

\frozen@everydisplay Ditto for the display hook.

266 \frozen@everydisplay = {\check@mathfonts
267  \the\everydisplay}

\if@inmath To detect nested formulae we need a switch.

268 \newif\if@inmath

\curr@math@size This holds locally the current math size.

269 \let\curr@math@size\@empty

23.2 Macros for loading fonts

\pickup@font The macro \pickup@font which is used in \selectfont is very simple: if the font name is undefined (i.e. not known yet) it calls \define@newfont to load it.

270 \def\pickup@font{%
271  \expandafter \ifx \font@name \relax
272  \define@newfont
273  \fi}

\split@name \pickup@font assumes that \font@name is set but it is sometimes called when

\f@family, \f@series, \f@shape, or \f@size may have the wrong settings (see,

e.g., the definition of \getanddefine@fonts). Therefore we need a macro to extract font family, series, shape, and size from the font name. To this end we define \split@name which takes the font name as a list of characters of \catcode 12 (without the backslash at the beginning) delimited by the special control sequence \@nil. This is not very complicated: we first ensure that / has the right

\catcode
274 {\catcode`\/=12

and define \split@name so that it will define our private \f@encoding, \f@family,

\f@series, \f@shape, and \f@size macros.
275 \gdef\split@name#1/#2/#3/#4/#5\@nil{\def\f@encoding{#1}%
276  \def\f@family{#2}%
277  \def\f@series{#3}%
278  \def\f@shape{#4}%
279  \def\f@size{#5}}}

\curr@fontshape Abbreviation which may get removed again for speed.

280 \def\curr@fontshape{\f@encoding/\f@family/\f@series/\f@shape}

281 ⟨/2ekernel | autoload⟩

\define@newfont Now we can tackle the problem of defining a new font.

282 ⟨∗2ekernel | def2 | autoload⟩

283 \def\define@newfont{%

We have already mentioned that the token list that \split@name will get as argument must not start with a backslash. To reach this goal we will set the \escapechar to −1 so that the \string primitive will not generate an escape character. To keep this change local we open a group. We use \begingroup for this purpose since \define@newfont might be called in math mode, and an empty \bgroup… \egroup would add an empty Ord atom to the math list and thus affect the spacing.

Also locally redefine \typeout so that ‘No file ...fd’ Warnings become Font Info message just sent to the log file.

284 \begingroup
285  \let\typeout\@font@info
286  \escapechar\m@ne

Then we extract encoding scheme, family, series, shape, and size from the font name. Note the four \expandafter’s so that \font@name is expanded first, then

\string, and finally \split@name.
287  \expandafter\expandafter\expandafter
288  \split@name\expandafter\string\font@name\@nil

If the \curr@fontshape combination is not available, (i.e. undefined) we call the macro \wrong@fontshape to take care of this case. Otherwise \extract@font will load the external font for us.

289 %    \expandafter\ifx
290 %        \csname\curr@fontshape\endcsname \relax
291  \try@load@fontshape % try always
292 %    \fi
293  \expandafter\ifx
294  \csname\curr@fontshape\endcsname \relax
295  \wrong@fontshape\else

To allow substitution we call the curr@fontshape macro which usually will expand to \relax but may hold code for substitution (see \subst@fontshape definition).

296 %      \csname\curr@fontshape\endcsname
297  \extract@font\fi

We are nearly finished and must only restore the \escapechar by closing the group.

298 \endgroup}

299 ⟨/2ekernel | def2 | autoload⟩

As autofss2.sty only makes local definitions it is re-loaded for each font, to save some string memory in the kernel, and to speed up the loading of some packages which may load fonts The code is actually pre-loaded into the kernel and removed at \begin{document}. The \ifx test below ensures that if \usepackage{autofss2} apears in the preamble, then the code is not removed at this time. Can not use \AtBeginDocument here as it is not defined yet! Listing all the commands like this is not ideal as any changes to the autofss2.sty need to be reflected here, but this seems the most memory efficient mechanism as it avoids the use of an extra csname to store the list.

This is currently disabled, so the ‘autofss2’ code remains in the kernel, and autofss2.sty is not generated in the current public release.

300 ⟨∗autoloadxxx⟩

301 \expandafter\def\expandafter\@begindocumenthook\expandafter{%
302 \expandafter\ifx\csname ver@autofss2.sty\endcsname\relax
303 \gdef\define@newfont{%
304  \begingroup
305  \makeatletter\nfss@catcodes
306  \catcode`\#6\relax
307  \@@input autofss2.sty\relax\define@newfont
308  \endgroup}%
309 \begingroup
310  \def\do##1{\global\let##1\@undefined}%
311  \do\extract@sizefn
312  \do\try@simple@size
313  \do\set@simple@size@args
314  \do\extract@rangefontinfo
315  \do\is@range
316  \do\check@range
317  \do\check@single
318  \do\set@size@funct@args
319  \do\set@size@funct@args@
320  \do\try@size@range
321  \do\empty@sfcnt
322  \do\gen@sfcnt
323  \do\genb@sfcnt
324  \do\sub@sfcnt
325  \do\subf@sfcnt
326  \do\fixed@sfcnt
327 \endgroup
328 \fi}

329 ⟨/autoloadxxx⟩

330 ⟨∗2ekernel | autoload⟩

331 \def\try@load@fontshape{%
332 \expandafter
333 \ifx\csname \f@encoding+\f@family\endcsname\relax
334  \@font@info{Try loading font information for
335  \f@encoding+\f@family}%

We predefine this combination to be \@empty which means that next time we don’t try again unnecessary in case we don’t find a .fd file. If the file contains a \DeclareFontFamily command than this setting will be overwritten.

336  \global\expandafter\let
337  \csname\f@encoding+\f@family\endcsname\@empty
338  \makeatletter

Set the catcodes used in the syntax, but do it only once (this will be restored at the end of the font loading group).

339  \nfss@catcodes
340  \let\nfss@catcodes\relax
341  \@input@{\f@encoding\f@family.fd}%
342 \fi

343 }

\nfss@catcodes This macro should contain the standard \catcode assignments to all characters which are used in the commands found in an .fd file and which might have special \catcodes in the middle of a document. If necessary, this list can be extended in a package file using a suitable number of \expandafter, i.e.,

  \expandafter\def\expandafter\nfss@catcodes
        \expandafter{\nfss@catcodes <additional settings>}

Note, that this macro might get executed several times since it is also called by \DeclareFontShape, thus it probably should not be misused as a general purpose hook.

344 \def\nfss@catcodes{%

First we start with ignoring all blanks and newlines.

345  \catcode`\ 9\relax
346  \catcode`\^^I9\relax
347  \catcode`\^^M9\relax

Then we set up \, {, }, # and % in case an .fd file is loaded during a verbatim environment.

348  \catcode`\\\z@
349  \catcode`\{\@ne
350  \catcode`\}\tw@
351  \catcode`\#6\relax
352  \catcode`\^7\relax
353  \catcode`\%14\relax

The we make sure that the important syntax parts have the right \catcode.

354 \@makeother\<%
355 \@makeother\>%
356 \@makeother\*%
357 \@makeother\.%
358 \@makeother\-%
359 \@makeother\/%
360 \@makeother\[%
361 \@makeother\]%

362 }

\DeclareErrorFont Declare the last resort shape! We assume that in this fontshape there is a 10pt font but it doesn’t really matter. We only loose one macro name if the assumption is false. But at least the font should be there!

363 \def\DeclareErrorFont#1#2#3#4#5{%
364  \xdef\error@fontshape{%
365  \noexpand\expandafter\noexpand\split@name\noexpand\string
366  \expandafter\noexpand\csname#1/#2/#3/#4/#5\endcsname
367  \noexpand\@nil}%

Initialize all those internal variables which may or may not have values in the first seconds of NFSS’ bootstraping process. Later on such values will be updated when an encoding is selected, etc.

We definitely don’t want to set \f@encoding; we can set all the others since if they are left “blank” any selection would grap “error default values” as well. However, this probably should go also.

368 %      \gdef\f@encoding{#1}%
369  \gdef\default@family{#2}%
370  \gdef\default@series{#3}%
371  \gdef\default@shape{#4}%
372  \global\let\f@family\default@family
373  \global\let\f@series\default@series
374  \global\let\f@shape\default@shape
375  \gdef\f@size{#5}%
376  \gdef\f@baselineskip{#5pt}%

377 }

378 \@onlypreamble\DeclareErrorFont

\wrong@fontshape Before we come to the macro \extract@font we have to take care of unknown \curr@fontshape combinations. The general strategy is to issue a warning and to try a default shape, then a default series, and finally a default family. If this last one also fails TEX will go into an infinite loop. But if the defaults are set incorrectly one deserves nothing else!

379 \def\wrong@fontshape{%
380  \csname D@\f@encoding\endcsname      % install defaults if in math

We remember the wanted \curr@fontshape combination which we will need in a moment.

381  \edef\reserved@a{\csname\curr@fontshape\endcsname}%
382 \ifx\last@fontshape\reserved@a
383  \errmessage{Corrupted NFSS tables}%
384  \error@fontshape
385 \else

Then we warn the user about the mess and set the shape to its default.

386  \let\f@shape\default@shape

If the combination is not known, try the default series.

387  \expandafter\ifx\csname\curr@fontshape\endcsname\relax
388  \let\f@series\default@series

If this is still undefined, try the default family. Otherwise give up. We never try to change the encoding scheme!

389  \expandafter
390  \ifx\csname\curr@fontshape\endcsname\relax
391  \let\f@family\default@family
392  \fi \fi
393 \fi

At this point a valid \curr@fontshape combination must have been found. We inform the user about this fact.

The \expandafter\string here stops TEX adding the space that it usually puts after command names in messages. The similar construction with \@undefined just produces ‘undefined’, but saves a few tokens.

\@wrong@font@char is locally redefined in \UseTextSymbol from its normal (empty) definition, to report the symbol generating the font switch.

394  \@font@warning{Font shape `\expandafter\string\reserved@a'
395  \expandafter\@gobble\string\@undefined\MessageBreak
396  using `\curr@fontshape' instead\@wrong@font@char}%
397  \global\let\last@fontshape\reserved@a

We change \@defaultsubs to produce a warning at the end of the document. The macro \@defaultsubs is initially \relax but gets changed here if some default font substitution happens. It is then executed in \enddocument.

398  \gdef\@defaultsubs{%
399  \@font@warning{Some font shapes were not available, defaults
400  substituted.\@gobbletwo}}%

If we substitute a \curr@fontshape combination by the default one we don’t want the warning to be printed out whenever this (unknown) combination is used. Therefore we globally \let the macro corresponding to the wanted combination equal to its substitution. This requires the use of four \expandafter’s since \csname… \endcsname has to be expanded before \reserved@a (i.e. the requested combination), and this must happen before the \let is executed.

401  \global\expandafter\expandafter\expandafter\let
402  \expandafter\reserved@a
403  \csname\curr@fontshape\endcsname

Now we can redefine \font@name accordingly. This must be done globally since it might occur in the group opened by \define@newfont. If we would this definition were local the closing \endgroup there would restore the old meaning of \font@name and then switch to the wrong font at the end of \selectfont although the correct font was loaded.

404  \xdef\font@name{%
405  \csname\curr@fontshape/\f@size\endcsname}%

The last thing this macro does is to call \pickup@font again to load the font if it is not defined yet. At this point this code will loop endlessly if the defaults are not well defined.

406  \pickup@font}

\@wrong@font@char Normally empty but redefined in \UseTextSymbol so that the Font shape undefined message can refer to the symbol causing the problem.

407 \let\@wrong@font@char\@empty
\@@defaultsubs \@defaultsubs See above.
408 \let\@defaultsubs\relax

\strip@prefix In \extract@font we will need a way to recover the replacement text of a macro. This is done by the primitive \meaning together with the macro \strip@prefix (for the details see appendix D of the TEXbook, p. 382).

409 \def\strip@prefix#1>{}

24 Assigning math fonts to versions

\install@mathalphabet This is just another name for \gdef but we can redefine it if necessary later on.

410 \let\install@mathalphabet\gdef
\math@fonts
411 \let\math@fonts\@empty

\select@group \select@group has four arguments: the new ⟨math alphabet identifier⟩ (a control sequence), the ⟨math group number⟩, the extra macro for math mode and the \curr@fontshape definition macro name. We first check if we are in math mode.

412 %\def\select@group#1#2#3{\relax\ifmmode

We do these things locally using \begingroup instead of \bgroup to avoid the appearance of an empty Ord atom on the math list.

413 %  \begingroup

We set the math fonts for the family in question by calling \getanddefine@fonts in the correct environment.

414 %     \escapechar\m@ne
415 %    \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%

We globally select the math fonts…

416 %    \globaldefs\@ne  \math@fonts

… and close the group to restore \globaldefs and \escapechar.

417 %  \endgroup

As long as no size or version change occurs the ⟨math alphabet identifier⟩ should simply switch to the installed math group instead of calling \select@group unnecessarily. So we globally redefine the first argument (the new ⟨math alphabet identifier⟩) to expand into a \mathgroup switch and then select this alphabet. Note that this redefinition will be overwritten by the next call to a version macro. The original code for the end of \select@group was

  \gdef#1{#3\mathgroup #2}#1\fi}

i.e. first redefining the ⟨math alphabet identifier⟩ and then calling the new definition to switch to the wanted ⟨math group⟩. Now we define the ⟨math alphabet identifier⟩ as a call to the \use@mathgroup command.

418 %  \xdef#1{\noexpand\use@mathgroup\noexpand#2%
419 %          {\number\csname c@mv@\math@version\endcsname}}%

But this is not sufficient, as we learned the hard way. The problem here is that the loading of the fonts that comprise the alphabet identifier #1, as well as the necessary math font assignments is deferred until it is used. This is OK so far, but if the fonts are switched within the current formula (which may happen if a sub-formula is a box that contains a math version switch) the font assignments for #1 are not restored unless #1 is used again. This is disastrous since TeX sees the wrong fonts at the end of the math formula, when it converts the math list into a horizontal list.

This is taken into account as follows: When a math alphabet identifier is used for the first time in a certain version it modifies the corresponding macro \mv@⟨version⟩ so that it calls \getanddefine@fonts directly in future as well.

We use the macro \extract@alph@from@version to do this. It takes the math alphabet identifer #1 and the math version macro as arguments.

420 %     \expandafter\extract@alph@from@version
421 %        \csname mv@\math@version\expandafter\endcsname
422 %       \expandafter{\number\csname c@mv@\math@version\endcsname}%
423 %       #1%
424 %     \stepcounter{mv@\math@version}%

Finally, it is not possible to simply call the new definition since we have an argument (the third argument of \use@mathgroup or more exactly the argument od \math@egroup if the margid option is in force) which would swallow our closing \fi. So we use the \expandafter technique to remove the \fi before the

\use@mathgroup is expanded.
425 %\expandafter #1\fi}
\extract@alph@from@version We proceed to the definition of the macro \extract@alph@from@version. As

stated above, it takes a math alphabet identifier and a math version macro (e.g. \mv@normal) as its arguments.

426 \def\extract@alph@from@version#1#2#3{%

To extract and replace the definition of math alphabet identifier #3 in macro #1 we have to recall how this definition looks like: Somewhere in the replacement text of #1 there is the sequence

\install@mathalphabet⟨math alphabet identifier⟩ #3{%

⟨Definitions for ⟩#3} Hence, the first thing we do is to extract the tokens preceding this definitions, the definition itself, and the tokens following it. To this end we define one auxiliary

macro \reserved@a.
427  \def\reserved@a##1\install@mathalphabet#3##2##3\@nil{%

When \reserved@a is expanded, it will have the tokens preceding the definition in question in its first argument (##1), the following tokens in its third argument (##3), and the replacement text for the math alphabet identifier #3 in its second argument. (##2). This is then recorded for later use in a temporary macro

\reserved@b.
428  \def\reserved@b{##2}%

Additionally, we define a macro \reserved@c to reconstruct the definitions for the math version in question from the tokens that will remain unchanged (##1 and ##3) and the yet to build new definitions for the math alphabet identifier #3.

429  \def\reserved@c####1{\gdef#1{##1####1##3}}}%

Then we execute our auxiliary macro.

430  \expandafter\reserved@a#1\@nil

OK, so now we have to build the new definition for #3. To do so, we first extract the interesting parts out of the old one. The old definition looks like: \select@group⟨math alphabet identifier⟩

⟨math group number⟩⟨math extra part⟩

⟨curr@fontshape definition⟩

So we define a new temporary macro \reserved@a that extracts these parts.

431  \def\reserved@a\select@group#3##1##2\@nil{%

This macro can now directly rebuild the math version definition by calling

 \reserved@c:
432  \reserved@c{%
433  \getanddefine@fonts{#2}##2%
434  \install@mathalphabet#3{%
435  \relax\ifmmode \else \non@alpherr#3\fi
436  \use@mathgroup##1{#2}}}%

In addtion it defines the alphabet the way it should be used from now on.

437  \gdef#3{\relax\ifmmode \else \non@alpherr#3\fi
438  \use@mathgroup##1{#2}}}%

Finally, we only have to call this macro \reserved@a on the old definitions

 recorded in \reserved@b:
439  \expandafter\reserved@a\reserved@b\@nil

440 }

\math@bgroup \math@egroup Here are the default definitions for \math@bgroup and \math@egroup. We use

\bgroup instead of \begingroup to avoid ‘leaking out’ of style changes. This has the side effect of always producing mathord atoms.

441 \let\math@bgroup\bgroup
442 \def\math@egroup#1{#1\egroup}

443 ⟨/2ekernel | autoload⟩

\calculate@math@sizes Here is the default definition for \calculate@math@sizes a more elaborate interface is under testing in mthscale.sty.

444 ⟨∗2ekernel | def1⟩

445 \gdef\calculate@math@sizes{%
446 \@font@info{Calculating\space math\space sizes\space for\space
447  size\space <\f@size>}%
448 \dimen@\f@size \p@
449 \@tempdimb \defaultscriptratio \dimen@
450 \dimen@ \defaultscriptscriptratio \dimen@
451 \expandafter\xdef\csname S@\f@size\endcsname{%
452  \gdef\noexpand\tf@size{\f@size}%
453  \gdef\noexpand\sf@size{\strip@pt\@tempdimb}%
454  \gdef\noexpand\ssf@size{\strip@pt\dimen@}%
455  \noexpand\math@fontstrue}}

456 ⟨/2ekernel | def1⟩ 457 ⟨∗autoload⟩

458 \def\calculate@math@sizes{\try@sizes\calculate@math@sizes}

459 ⟨/autoload⟩

\defaultscriptratio \defaultscriptscriptratio The default ratio for math sizes is:
 1 to \defaultscriptratio to \defaultscriptscriptratio.

By default this is 1 to .7 to .5.

460 ⟨∗2ekernel | autoload⟩

461 \def\defaultscriptratio{.7}
462 \def\defaultscriptscriptratio{.5}

\noaccents@ If we don’t have a definition for \noaccents@ we provide a dummy.

463 \ifx\noaccents@\@undefined
464 \let\noaccents@\@empty
465 \fi

\showhyphens  \showhyphens must be redefined since the version in plain.tex uses \tenrm.

466 ⟨/2ekernel | autoload⟩ 467 ⟨∗2ekernel | autoerr⟩

468 \gdef\showhyphens#1{%
469 \setbox0\vbox{%
470  \color@begingroup
471  \parfillskip\z@skip\hsize\maxdimen
472  \normalfont
473  \pretolerance\m@ne\tolerance\m@ne\hbadness\z@\showboxdepth\z@\ #1%
474  \color@endgroup}}

475 ⟨/2ekernel | autoerr⟩

476 ⟨autoload⟩\def\showhyphens{\@autoerr\showhyphens}

477 ⟨∗2ekernel | autoload⟩

\addto@hook We need a macro to add tokens to a hook.

478 \long\def\addto@hook#1#2{#1\expandafter{\the#1#2}}
\@vpt
479 \def\@vpt{5}
\@vipt
480 \def\@vipt{6}
\@viipt
481 \def\@viipt{7}
\@viiipt
482 \def\@viiipt{8}
\@ixpt
483 \def\@ixpt{9}
\@xpt
484 \def\@xpt{10}
\@xipt
485 \def\@xipt{10.95}
\@xiipt
486 \def\@xiipt{12}
\@xivpt
487 \def\@xivpt{14.4}
\@xviipt
488 \def\@xviipt{17.28}
\@xxpt
489 \def\@xxpt{20.74}
\@xxvpt
490 \def\@xxvpt{24.88}

491 ⟨/2ekernel | autoload⟩

File n

ltfsstrc.dtx

25 Introduction

This package contains the code for tracing font loading and font changes. It basically overlays some of the low-level functions of NFSS with additional code used for tracing.

The package accepts the following options:

errorshow Write all information about font changes etc. only to the transcript file unless an error happens. This means that information about font substitution will not be shown on the terminal.

warningshow Show all NFSS warnings on the terminal. This setting corresponds to the default behaviour of NFSS if the tracefnt package is not loaded!

infoshow Show all NFSS warning and all NFSS info messages (that are normally only written to the transcript file) also on the terminal. This is the default if the tracefnt package is loaded.

debugshow In addition to infoshow show also changing of math fonts as far as possible (this option can produce a large amount of output.

loading Show the name of external fonts when they are loaded. This option shows only “newly” loaded fonts not those already preloaded in the format or the class file before the tracefnt package became active.

pausing Turn all font warnings into errors so that L^{A}TEX will stop.

26 A driver for this document

The next bit of code contains the documentation driver file for TEX, i.e., the file that will produce the documentation you are currently reading. It will be extracted from this file by the DocStrip program.

When this file is processed directly by L^{A}TEX this will produce the documentation as well.

1 ⟨∗driver⟩

 2 \documentclass{ltxdoc}

3 4

 5 %\OnlyDescription  % comment out for implementation details

6

 7 \begin{document}
 8 \DocInput{ltfsstrc.dtx}
 9 \end{document}

10 ⟨/driver⟩

27 The Implementation

Warning: Read the macro documentation with a grain of salt. It is still basically the documentation from the first NFSS release and therefore in some cases probably not completely accurate.

If we are making a package file it is a good idea to test whether we are running under 2e. This code is actually placed at the very beginning of this file for easier maintenance, thus commented out here.

11 ⟨∗package⟩

12 %\NeedsTeXFormat{LaTeX2e}
13 %\ProvidesPackage{tracefnt}[??/??/?? v?.??
14 %                           Standard LaTeX package (font tracing)]

15 ⟨/package⟩

The debug module makes use of commands contained in a special package file

named trace.sty.^{4}
16 ⟨+debug⟩ \input trace.sty

28 Handling Options

\tracingfonts Here is the definition of the integer register for the font trace. As a default in a package file we use 1 to give error messages if fonts are substituted. If this code is used for debugging or tracing reasons in the format file (i.e. in fam.dtx) we use 0 as the default. But if no font trace is used we build a definition that will produce a warning message.

17 ⟨∗2ekernel | autoload⟩

18 \def\tracingfonts{%
19 \@font@warning{Command \noexpand\tracingfonts
20  not provided.\MessageBreak
21  Use the `tracefnt' package.\MessageBreak Command found:}%
22  \count@}

23 ⟨/2ekernel | autoload⟩

The \count@ in the line above will remove the number after \tracingfonts. Note that this definition will be overwritten be the next line if one of these modules are included.

24 ⟨∗package, trace, debug⟩

25 \newcount\tracingfonts
26 \tracingfonts=0

27 ⟨/package, trace, debug⟩

The option errorshow turns off all warnings so that only real errors are shown. warningshow corresponds to the NFSS default (when tracefnt is not loaded). infoshow is the default for this package here; and debugshow, loading, and pausing extend the amount of information even further.

28 ⟨∗package⟩

29 \DeclareOption{errorshow}{%
30 \def\@font@info#1{%
31  \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%

4This package is not in distribution at the moment (and probably doesn’t any longer work).

Think of this part of the code as being historical artefacts.

32  {LaTeX Font Info: \space\space\space#1}}%
33  \def\@font@warning#1{%
34  \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
35  {LaTeX Font Warning: #1}}%

36 }

37 \DeclareOption{warningshow}{%
38 \def\@font@info#1{%
39  \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
40  {LaTeX Font Info: \space\space\space#1}}%
41  \def\@font@warning#1{%
42  \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
43  {LaTeX Font Warning: #1}}%

44 }

45 \DeclareOption{infoshow}{%
46 \def\@font@info#1{%
47  \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
48  {LaTeX Font Info: \space\space\space#1}}%
49  \def\@font@warning#1{%
50  \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
51  {LaTeX Font Warning: #1}}%

52 }

53 \DeclareOption{loading}{%
54  \tracingfonts\tw@

55 }

56 \DeclareOption{debugshow}{%
57  \ExecuteOptions{infoshow}%
58  \tracingfonts\thr@@

59 }

60 \DeclareOption{pausing}{%
61  \def\@font@warning#1{%
62  \GenericError
63  {(Font)\@spaces\@spaces\@spaces\space\space}%
64  {LaTeX Font Warning: #1}%
65  {See the LaTeX Companion for details.}%
66  {I'll stop for every LaTeX Font Warning because
67  you requested\\the `pausing' option
68  to the tracefnt package.}}%

69 }

We make infoshow the default, which in turn defines \font@warning and

\font@info.
70 \ExecuteOptions{infoshow}
71 \ProcessOptions

72 ⟨/package⟩

We also need a default definition inside the kernel:

73 ⟨∗2ekernel | autoload⟩

74 \def\@font@info#1{%
75  \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
76  {LaTeX Font Info: \space\space\space#1}}%
77 \def\@font@warning#1{%
78  \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
79  {LaTeX Font Warning: #1}}%

80 ⟨/2ekernel | autoload⟩

29 Macros common to fam.tex and tracefnt.sty

In the first versions of tracefnt.dtx some macros of fam.dtx^{5} were redefined to included the extra tracing information. Now these macros are all defined in this file (i.e. removed from fam.dtx) and different production versions can be obtained simply by specifying a different set of modules to include when generating

ltfss.dtx.

29.1 General font loading

\extract@font This macro organizes the font loading. It first calls \get@external@font which will return in \external@font the name of the external font file (the .tfm) as it was determined by the NFSS tables.

81 ⟨∗2ekernel | package | autoload⟩

82 \def\extract@font{%
83 \get@external@font

Then the external font is loaded and assigned to the font identifier stored inside

\font@name (for this reason we need \expandafter).
84 \global\expandafter\font\font@name\external@font\relax

When tracing we typeout the internal and external font name.

85 ⟨∗trace⟩

86  \ifnum \tracingfonts >\@ne
87  \@font@info{External font `\external@font'
88  loaded as\MessageBreak \font@name}\fi

89 ⟨/trace⟩

Finally we call the corresponding “loading action” macros to finish things. First the font is locally selected to allow the use of \font inside the loading action macros.

90  \font@name \relax

The next two lines execute the “loading actions” for the family and then for the individual font shape.

91  \csname \f@encoding+\f@family\endcsname
92  \csname\curr@fontshape\endcsname
93  \relax

94 } 95 ⟨/2ekernel | package | autoload⟩

The \relax at the end needs to be explained. This is inserted to prevent TEX from scanning too far when it is executing the replacement text of the loading code macros.

\get@external@font This function tries to find an external font name. It will place the name into the macro \external@font. If no font is found it will return the one that was defined

via \DeclareErrorFont.

96 ⟨∗2ekernel | autoload⟩

97 \def\get@external@font{%

5This file is currently not distributed in documented form. Its code is part of ltfss.dtx.

We don’t know the external font name at the beginning.

98 \let\external@font\@empty
99 \edef\font@info{\expandafter\expandafter\expandafter\string
100  \csname \curr@fontshape \endcsname}%
101 \try@size@range

If this failed, we’ll try to substitute another size of the same font. This is done

by the \try@size@substitution macro. It “knows about” \do@extract@font,
\font@name, \f@size, and so on.
102 \ifx\external@font\@empty
103  \try@size@substitution
104  \ifx\external@font\@empty
105  \@latex@error{Font \expandafter \string\font@name\space
106  not found}\@eha
107  \error@fontshape
108  \get@external@font
109 \fi\fi

110 } 111 ⟨/2ekernel | autoload⟩

\selectfont The macro \selectfont is called whenever a font change must take place.

112 ⟨∗2ekernel | package | autoload⟩

113 \DeclareRobustCommand\selectfont

114 {%

When debug is specified we actually want something like ‘undebug’. The font selection is now stable so that using \tracingall on some other macros will show us a lot of unwanted information about font loading. Therefore we disable tracing during font loading as long as \tracingfonts is less than 4.

115 ⟨+debug⟩ \pushtracing
116 ⟨+debug⟩ \ifnum\tracingfonts<4 \tracingoff
117 ⟨+debug⟩ \else \tracingon\p@selectfont \fi

If \baselinestretch was redefined by the user it will not longer match its internal counterpart \f@linespread. If so we call \set@fontsize to prepare

\size@update.
118  \ifx\f@linespread\baselinestretch \else
119  \set@fontsize\baselinestretch\f@size\f@baselineskip \fi

Then we generate the internal name of the font by concatenating family, series, shape, and current size, with slashes as delimiters between them. This is much more readable than standard L^{A}TEX’s \twfbf, etc. We define \font@name globally, as always. The reason for this is explained later on.

120  \xdef\font@name{%
121  \csname\curr@fontshape/\f@size\endcsname}%

We call the macro \pickup@font which will load the font if necessary.

122  \pickup@font

Then we select the font.

123  \font@name

If \tracingfonts is greater than 2 we also show the font switch. We do this before \glb@settings is called since this macro might redefine \font@name.

124 ⟨∗trace⟩

125  \ifnum \tracingfonts>\tw@
126  \@font@info{Switching to \font@name}\fi

127 ⟨/trace⟩

Finally we call \size@update. This macro is normally empty but will contain actions (like setting the \baselineskip) that have to be carried out when the font size, the base \baselineskip or the \baselinestretch have changed.

128  \size@update

A similar function is called to handle anything related to encoding updates. This

one is changed from \relax by \fontencoding.
129  \enc@update

Just before ending this macro we have to pop the tracing stack if it was pushed before.

130 ⟨+debug⟩ \poptracing

131 }

\set@fontsize The macro \set@fontsize does the actual work. First it assigns new values to

\f@size, \f@baselineskip and \f@linespread.
132 \def\set@fontsize#1#2#3{%
133  \@defaultunits\@tempdimb#2pt\relax\@nnil
134  \edef\f@size{\strip@pt\@tempdimb}%
135  \@defaultunits\@tempskipa#3pt\relax\@nnil
136  \edef\f@baselineskip{\the\@tempskipa}%
137  \edef\f@linespread{#1}%

For backward compatibility and for later testing within \selectfont the internal

value of \f@linespread is passed back to \baselinestretch.
138  \let\baselinestretch\f@linespread

Additional processing will happen within \selectfont. For this reason the macro \size@update (which will be called in \selectfont) will be defined to be:

139  \def\size@update{%

First calculate the new \baselineskip and also store it in normalbaselineskip

140  \baselineskip\f@baselineskip\relax
141  \baselineskip\f@linespread\baselineskip
142  \normalbaselineskip\baselineskip

then to set up a new \strutbox

143  \setbox\strutbox\hbox{%
144  \vrule\@height.7\baselineskip
145  \@depth.3\baselineskip
146  \@width\z@}%

We end with a bit of tracing information.

147 ⟨∗trace⟩

148 \ifnum \tracingfonts>\tw@
149  \ifx\f@linespread\@empty
150  \let\reserved@a\@empty
151  \else
152  \def\reserved@a{\f@linespread x}%
153  \fi
154  \@font@info{Changing size to \f@size/\reserved@a
155  \f@baselineskip}%
156  \aftergroup\type@restoreinfo \fi

157 ⟨/trace⟩

When all this is processed \size@update redefines itself to \relax so that in later calls of \selectfont no extra code will be executed.

158  \let\size@update\relax}%

159 }

Instead of defining this macro internally we might speed things up by placing the code into a separate macro and use \let!

\size@update Normally this macro does nothing; it will be redefined by \set@fontsize to initiate an update.

160 \let\size@update\relax

\type@restoreinfo This macro produces some info when a font size and/or baseline change will get restored.

161 ⟨∗trace⟩

162 \def\type@restoreinfo{%
163  \ifx\f@linespread\@empty
164  \let\reserved@a\@empty
165  \else
166  \def\reserved@a{\f@linespread x}%
167  \fi
168  \@font@info{Restoring size to
169  \f@size/\reserved@a\f@baselineskip}}

170 ⟨/trace⟩

\glb@settings \glb@currsize The macro \glb@settings globally selects all math fonts for the current size if necessary.

171 \def\glb@settings{%

When \glb@settings gains control a size change was requested and all previous font assignments need to be replaced. Therefore the old values of the fonts are no longer needed. For every math group the new assignments are appended to \math@fonts. But this happens only if the math@fonts switch is set to true. However, we always set up the correct math sizes for script and scriptscript fonts since they may be needed even if we don’t set up the whole math machinery.

Here we set the math size, script size and scriptscript size. If the S@… macro is not defined we have to first calculate the three sizes.

172  \expandafter\ifx\csname S@\f@size\endcsname\relax
173  \calculate@math@sizes
174  \fi

The effect of this is that \calculate@math@sizes may or may not define the S@… macro. In the first case the next time the same size is requested this macro is used, otherwise \calculate@math@sizes is called again. This also sets the math@fonts switch. If it is true we must switch the math fonts.

175  \csname S@\f@size\endcsname
176  \ifmath@fonts

177 ⟨∗trace⟩

178  \ifnum \tracingfonts>\tw@
179  \@font@info{Setting up math fonts for
180  \f@size/\f@baselineskip}\fi

181 ⟨/trace⟩

Inside a group we execute the macro for the current math version. This sets

\math@fonts to a list of \textfont. . . assignments. \getanddefine@fonts

(which may be called at this point) needs the \escapechar parameter to be set to −1.

182  \begingroup
183  \escapechar\m@ne
184  \csname mv@\math@version \endcsname

Then we set \globaldefs to 1 so that all following changes are done globally. The math font assignments recorded in \math@fonts are executed and \glb@currsize is set equal to \f@size. This signals that the fonts for math in this size are set up.

185  \globaldefs\@ne
186  \math@fonts
187  \let \glb@currsize \f@size
188  \endgroup

Finally we execute any code that is supposed to happen whenever the math font setup changes. This register will be executed in local mode which means that everything that is supposed to have any effect should be done globally inside. We can’t execute it within \globaldefs\@ne as we don’t know what ends up inside this register, e.g., it might contain calculations which use some local registers to calculate the final (global) value.

189  \the\every@math@size

Otherwise we announce that the math fonts are not set up for this size.

190 ⟨∗trace⟩

191  \else
192  \ifnum \tracingfonts>\tw@
193  \@font@info{No math setup for
194  \f@size/\f@baselineskip}\fi

195 ⟨/trace⟩

196  \fi

197 } 198 ⟨/2ekernel | package | autoload⟩

\baselinestretch In \selectfont we used \baselinestretch as a factor when assigning a value to

\baselineskip. We use 1 as a default (i.e. no stretch).

199 ⟨∗2ekernel | autoload⟩

200 \def\baselinestretch{1}
\every@math@size We must still define the hook \every@math@size we used in \glb@settings. We

initialize it to nothing. It is important to remember that everything that goes into this hook should to global updates, local changes will have weird effects.

201 \newtoks\every@math@size
202 \every@math@size={}

203 ⟨/2ekernel | autoload⟩

29.2 Math fonts setup

29.2.1 Outline of algorithm for math font sizes

TEX uses the the math fonts that are current when the end of a formula is reached. If we don’t want to keep font setups local to every formula (which would result in an enormous overhead, we have to be careful not to end up with the wrong setup in case formulas are nested, e.g., we need to be able to handle

$ a=b+c \mbox{ \small for all $b$ and $c\in Z$}$

Here the inner formulae b and c\in Z are typeset in \small but we have to return to \normalsize before we reach the closing $ of the outer formula.

This is handled in the following way:

1. At any point in the document the global variable \gbl@currsize contains the point size for which the math fonts currently are set up.

2. Whenever we start a formula we compare its value with the local variable \f@size that describes the current text font size.

3. If both are the same we assume that we can use the current math font setup without adjustment.

4. If they differ we call \gbl@settings which changes the math font setup and

updates \gbl@currsize.

(a) If we are recursively inside another formula (\if@inmath) we ensure that \gbl@settings is executed again in the outer formula, so that the old setup is automatically restored.

(b) Otherwise, we set the switch @inmath locally to true so that all nested formulae will be able to detect that they are nested in some outer formula.

The above algorithm has the following features:

• For sizes which are not containing any formula no math setup is done. Compared to the original algorithm of NFSS this results in the following savings:

– No unnecessary loading of math fonts for sizes that are not used to typeset any math formulae (explicit or implicit ones).

– No time overhead due to unnecessary changes of the math font setup on entrance and exit of the text font size.

• Math font setup changes for top-level formulae will survive (there is no restoration after the formula) thus any following formula in the same size will be directly typesetable. Compared to original implementation in NFSS2 the new algorithm has the overhead of one test per formula to see if the current math setup is valid (in the original algorithm the setup was always valid, thus no test was necessary).

• In nested formulae the math font setup is restored in the outer formula by a series of \aftergroup commands and checks. Compared to the original algorithm this involves additional checks (2 × ⟨non-math levels⟩ per inner formula).

29.2.2 Code for math font size setting

\check@mathfonts In the \check@mathfonts macros we implement the steps 2 to 4.

204 ⟨∗2ekernel | package | autoload⟩

205 \def\check@mathfonts{%
206 \ifx \glb@currsize \f@size

207 ⟨∗trace⟩

208  \ifnum \tracingfonts>\thr@@
209  \@font@info{*** MATH: no change \f@size\space
210  curr/global (\curr@math@size/\glb@currsize)}\fi

211 ⟨/trace⟩

212 \else

213 ⟨∗trace⟩

214  \ifnum \tracingfonts>\thr@@
215  \@font@info{*** MATH: setting up \f@size\space
216  curr/global (\curr@math@size/\glb@currsize)}\fi

217 ⟨/trace⟩

218  \glb@settings
219  \if@inmath
220  \aftergroup\restglb@settings

221 ⟨∗trace⟩

222  \else
223  \ifnum \tracingfonts>\thr@@
224  \@font@info{*** MATH: no resetting (not in
225  nested math)}\fi

226 ⟨/trace⟩

227  \fi
228 \fi
229 \let\curr@math@size\f@size
230 \@inmathtrue

231 }

\restglb@settings This macro will be executed the first time after the current formula.

232 \def\restglb@settings{%

233 ⟨∗trace⟩

234  \ifnum \tracingfonts>\thr@@
235  \@font@info{*** MATH: restoring}\fi

236 ⟨/trace⟩

237  \begingroup
238  \let\f@size\curr@math@size
239  \ifx\glb@currsize \f@size

240 ⟨∗trace⟩

241  \ifnum \tracingfonts>\thr@@
242  \@font@info{*** MATH: ... already okay (\f@size)}\fi

243 ⟨/trace⟩

244  \else

245 ⟨∗trace⟩

246  \ifnum \tracingfonts>\thr@@
247  \@font@info{*** MATH: ... to \f@size}\fi

248 ⟨/trace⟩

249  \glb@settings
250  \fi
251  \endgroup

252 }

29.2.3 Other code for math

\use@mathgroup The \use@mathgroup macro should be used in user macros to select a math group. Depending on whether or not the margid option is in force it has two or three arguments. For this reason it should be called as the last macro.

First we test if we are inside math mode since we don’t want to apply a useless definition.

253 \def\use@mathgroup#1#2{\relax\ifmmode

254 ⟨∗trace⟩

255 \ifnum \tracingfonts>\tw@
256  \count@#2\relax
257  \@font@info{Using \noexpand\mathgroup
258  (\the\count@) #2}\fi

259 ⟨/trace⟩

If so we first call the ‘=’ macro (i.e. argument three) to set up special things for the selected math group. Then we call \mathgroup to select the group given by argument two and finally we place #1 (i.e. the argument of the ⟨math alphabet identifier⟩ at the end. This part of the code is surrounded by two commands which behave like \begingroup and \endgroup if we want ⟨math alphabet identifier⟩s but will expand into \@empty if we want simply switches to a new math group. Since argument number 2 may be a digit instead of a control sequence we add a \relax. Otherwise something like \mit{1} would switch to math group 11 (and back) instead of printing an oldstyle 1.

260  \math@bgroup
261  \expandafter\ifx\csname M@\f@encoding\endcsname#1\else
262  #1\fi
263  \mathgroup#2\relax

Before we reinsert the swallowed token (arg. three) into the input stream, in the case that the ⟨math alphabet identifier⟩ isn’t called in math mode, we remove the \fi with the \expandafter trick. This is necessary if the token is actually an macro with arguments. In such a case the \fi will be misinterpreted as the first argument which would be disastrous.

264  \expandafter\math@egroup\fi}%

The surrounding macros equal \begingroup and \endgroup. But using internal names makes it possible to overwrite their meaning in certain cases. This is for example used in AMS-TEX macros for placing accents.

\math@egroup If the margid option is in force (which can be tested by looking at the definition of \math@bgroup we change the \math@egroup command a bit to display the current ⟨math group number⟩ after it closes the scope of ⟨math alphabet⟩ with \endgroup.

265 ⟨∗trace⟩

266 \ifx\math@bgroup\begingroup
267  \def\math@egroup#1{#1\endgroup
268  \ifnum \tracingfonts>\tw@
269  \@font@info{Restoring \noexpand\mathgroup
270  (\ifnum\mathgroup=\m@ne default\else \the\mathgroup \fi)%
271  }\fi}
272 \fi

273 ⟨/trace⟩

\getanddefine@fonts \getanddefine@fonts has two arguments: the ⟨math group number⟩ and the family/series/shape name as a control sequence.

274 \def\getanddefine@fonts#1#2{%

First we turn of tracing when \tracingfonts is less than 4.

275 ⟨+debug⟩ \pushtracing
276 ⟨+debug⟩ \ifnum\tracingfonts<4 \tracingoff
277 ⟨+debug⟩ \else \tracingon\getanddefine@fonts \fi

278 ⟨∗trace⟩

279 \ifnum \tracingfonts>\tw@
280 \count@#1\relax
281  \@font@info{\noexpand\mathgroup (\the\count@) #1 :=\MessageBreak
282  \string#2 \tf@size/\sf@size/\ssf@size}\fi

283 ⟨/trace⟩

We append the current \tf@size to #2 to obtain the font name.^{6} Again, font@name is defined globally, for the reasons explained in the description of

 \wrong@fontshape.
284 \xdef\font@name{\csname \string#2/\tf@size\endcsname}%

Then we call \pickup@font to load it if necessary. We remember the internal

 name as \textfont@name.
285 \pickup@font \let\textfont@name\font@name
 Same game for \scriptfont and \scriptscriptfont:
286 \xdef\font@name{\csname \string#2/\sf@size\endcsname}%
287 \pickup@font \let\scriptfont@name\font@name
288 \xdef\font@name{\csname \string#2/\ssf@size\endcsname}%
289 \pickup@font

Then we append the new \textfont… assignments to the \math@fonts.

290 \edef\math@fonts{\math@fonts
291  \textfont#1\textfont@name
292  \scriptfont#1\scriptfont@name
293  \scriptscriptfont#1\font@name}%

Just before ending this macro we have to pop the tracing stack if it was pushed before.

294 ⟨+debug⟩ \poptracing

295 } 296 ⟨/2ekernel | package | autoload⟩

30 Scaled font extraction

\ifnot@nil We begin with a simple auxiliary macro. It checks whether its argument is the token \@nil. If so, it expands to \@gobble which discards the following argument, otherwise it expands to \@firstofone which reproduces it argument.

297 ⟨∗2ekernel | autoload⟩

298 \def\ifnot@nil#1{\def\reserved@a{#1}%
299 \ifx\reserved@a\@nnil \expandafter\@gobble
300 \else \expandafter\@firstofone\fi}

6One might ask why this expansion does not generate a macro name that starts with an additional \ character. The solution is that \escapechar is set to −1 before \getanddefine@fonts is called.

\remove@to@nnil \remove@angles \remove@star Three other auxiliary macros will be needed in the following: \remove@to@nnil

gobbles up everything up to, and including, the next \@nnil token, and \remove@angles and \remove@star do the same for the character > and *, respectively, instead of \@nnil.

301 \def\remove@to@nnil#1\@nnil{}
302 \def\remove@angles#1>{\set@simple@size@args}
303 \def\remove@star#1*{#1}

304 ⟨/2ekernel | autoload⟩

\extract@sizefn This macro takes a size specification and parses it into size function and the optional and mandatory arguments.

305 ⟨∗2ekernel | def2 | autoload⟩

306 \def\extract@sizefn#1*#2\@nil{%
307 \if>#2>\set@size@funct@args#1\@nil
308  \let\sizefn@info\@empty
309 \else\expandafter\set@size@funct@args\remove@star#2\@nil
310  \def\sizefn@info{#1}\fi

311 }

\try@simple@size This function tries to extract the given size (specified by \f@size) for the requested font shape. The font information must already be present in \font@info. The central macro that does the real work is \extract@fontinfo. We will first give a simple example how this macro works, and describe it in full generality later.

Assume that the requested parameters are: encoding scheme ‘OT1’, family ‘cm’, series ‘sansserif’, shape ‘normal’, and size ‘12’. The correspondign font definitions have already been extracted from the macro \OT1/cm/sansserif/normal and stored in font@info. (Otherwise \extract@fontinfo doesn’t get called.) This information consists of a token list made of characters of category code 12 of the form

       <10*>cmss10<12*>cmss12<17*>cmss17

For reasonable packages one usually needs more sizes but this is sufficient to get the flavour. We will define a macro \extract@fontinfo to find the external font name (‘cmss12’) for us:

      \def\extract@fontinfo#1<12*#2>#3<#4\@nnil{%
          \set@simple@size@args#3<#4\@nnil
          \execute@size@function{#2}}

so that when it gets called via

      \extract@fontinfo<10*>cmss10<12*>cmss12<17*>cmss17\@nnil

#1 will contain all characters before <12*>, #2 will be empty, #3 will be exactly cmss12, and #3 will be 17>cmss17. The expansion is therefore

      \set@simple@size@args cmss12<17*>cmss17\@nnil
      \execute@size@function{}

This means: the default (empty) size function will be executed, with its optional argument argument set to empty and its mandatory argument set to cmss12 by \set@simple@size@args. As we discussed earlier, the effect of the default size function is to load the given external font (cmss12) at the specified size (12)— which is exactly what was intended.

But this is only part of the whole story. It may be that the size requested does not occur in the token list \font@info. And the simple definition of \extract@fontinfo we gave above does not allow to specify give more than one size specification in front of the external font name.

Let’s address these two problems separately. The first one is solved with the following trick: We define \extract@fontinfo as follows:

      \def\extract@fontinfo#1<12*#2>#3<#4\@nnil{%
        \ifnot@nil{#3}%
          {\set@simple@size@args#3<#4\@nnil
           \execute@size@function{#2}%
          }}%

How does this work? We call \extract@fontinfo via

      \expandafter\extract@fontinfo\font@info<12*>\@nil<\@nnil

i.e. by appending <12*>\@nil<\@nnil. If the size (‘12’ in this case) appears in \font@info everything works as explained above, the only difference being that argument #4 of \extract@fontinfo additionally gets the tokens <12*>\@nil<\@nnil. However, if the size is not found everything up to the final <12*> is in argument #1, #3 gets \@nil, and #2 and #4 are empty. The macro \ifnot@nil will discard the calls to \set@simple@size@args and execute@size@function, and hence \font@info will continue to be equal to \@empty. This means that no simple size specification matching the requested size could be found.

The second problem (more than one simple size specification for one external font name) will be addressed in \set@simple@size@args below.

The macros are hidden inside other control sequences so that we have to build

\extract@fontinfo in several steps.

So here’s the actual definition of \extract@font in \try@simple@size.

312 % % this could be replaced by \try@size@range making the subst slower!
313 \def\try@simple@size{%

\reserved@a is made an abbreviation for the head of the definition of the macro

\extract@fontinfo.
314  \def\reserved@a{\def\extract@fontinfo####1}%

Now we can define \extract@fontinfo. Here we handle a small but convenient variation: in case of the default (empty) size function it is allowed to omit the * character.

315  \expandafter\reserved@a\expandafter<\f@size>##2<##3\@nnil{%
316  \ifnot@nil{##2}%
317  {\set@simple@size@args##2<##3\@nnil
318  \execute@size@function\sizefn@info
319  }}%

Now we call \extract@fontinfo. Note the <\@nil tokens at the end.

320  \expandafter\expandafter
321  \expandafter\extract@fontinfo\expandafter\font@info
322  \expandafter<\f@size>\@nil<\@nnil

323 }

\set@simple@size@args As promised above, the macro \set@simple@size@args will handle the case of several size specifications in a row. If another size specification follows, the very first token of its argument list is the character <. By starting the definition as follows,

324 \def\set@simple@size@args#1<{%

parameter #1 is empty in this case, and contains the size function’s arguments otherwise. We distinguish these two cases (Note that the character < cannot

appear in #1) by calling \remove@angles for empty #1 and \extract@sizefn

otherwise. In the latter case we have to take care of the remaining character tokens and discard them. This is done by \remove@to@nnil. Note also the use of Kabelschacht’s method.

325  \if<#1<%
326  \expandafter\remove@angles
327  \else
328  \extract@sizefn#1*\@nil
329  \expandafter\remove@to@nnil
330  \fi}

Now, we are through with the case of a simple size, except for calling the size function. This will be handled later, as it is the same mechanism for all types of size specification. We will now proceed to macors for extraction of size range specification.

\extract@rangefontinfo \extract@rangefontinfo goes through a font shape definition in the input until it recognizes the tokens <\@nil->. It looks for font ranges with font size functions. It’s operation is rather simple: it discards everything up to the next size specification and passes this on to \is@range for inspection. The specification (parameter #2 is inserted again, in case it is needed later.

331 \def\extract@rangefontinfo#1<#2>{%
332  \is@range#2->\@nil#2>}

\is@range \is@range is again a sort of dispatcher macro: if the size specification it is looking at is not a range specification it discards it and calls \extract@rangefontinfo to continue the search. Otherwise it calls \check@range to check the requested size against the specified range.

   From the way \is@range is called inside \extract@rangefontinfo we see

that #2 is the character > if the size specification found is a simple one (as it does not contain a - character. This is checked easily enough and \extract@rangefontinfo called again. Note that the extra tokens inserted after the \@nil in the call to \is@range appear at the beginning of the first argument

to \extract@rangefontinfo and are hence ignored.
333 \def\is@range#1-#2\@nil{%
334 \if>#2\expandafter\check@single\else
335  \expandafter\check@range\fi}

\check@range \check@range takes lower bound as parameter #1, upper bound as #2, size function as #3 and the size function’s arguments as #4. If #3 is the special token \@nil \font@info is exhausted and we can stop searching.

336 \def\check@range#1-#2>#3<#4\@nnil{%
337 \ifnot@nil{#3}{%

If #3 wasn’t \@nil we have a range. We start by assuming that we have to recurse. Note that we have to reinsert an < as it was already removed by scanning.

338  \def\reserved@f{\extract@rangefontinfo<#4\@nnil}%

We have to make sure that both boundaries are present, if not we have to set them. Here we check the upper bound. If \upper@bound is zero after the assignment we set it to \maxdimen (upper open range). We need to use a ⟨dimen⟩ register for the scan since we may have a decimal number as the boundary.

339  \upper@bound0#2\p@
340  \ifdim\upper@bound=\z@ \upper@bound\maxdimen\fi

Now we check the upper boundary against \f@size. If it is larger or equal than \f@size this range is no good and we have to recurse.

341  \ifdim \f@size \p@<\upper@bound

Otherwise we have to check the lower bound. This time it is not necessary to scan the boundary value into a register because if it is empty we get zero as desired. We could even omit the 0 which would result in 1pt as default lower boundary. If \f@size is smaller than the boundary we have to recurse.

342  \lower@bound0#1\p@
343  \ifdim \f@size \p@<\lower@bound
344  \else

If both tests are passed we can try executing the size function.

345  \set@simple@size@args#3<#4\@nnil
346  \execute@size@function\sizefn@info

If the function was successful it should have left an external font name in \external@font. We use this to see if we can stop scanning. Otherwise we recurse.

347  \ifx\external@font\@empty
348  \else
349  \let\reserved@f\@empty
350  \fi
351  \fi
352  \fi
353  \reserved@f}}

354 ⟨/2ekernel | def2 | autoload⟩

\lower@bound \upper@bound We use two dimen registers \lower@bound and \upper@bound to store the lower

and upper endpoints of the range we found.

355 ⟨∗2ekernel | autoload⟩

356 \newdimen\lower@bound
357 \newdimen\upper@bound

358 ⟨/2ekernel | autoload⟩

\check@single \check@single takes the size as parameter #1, size function as #2 and the size function’s arguments as #3. We can assume that there is always something in the pipeline since the very last entry is a faked range (see above).

359 ⟨∗2ekernel | def2 | autoload⟩

360 \def\check@single#1>#2<#3\@nnil{%

We start by assuming that we have to recurse. Note that we have to reinsert an < as it was already removed by scanning.

361  \def\reserved@f{\extract@rangefontinfo<#3\@nnil}%

Now we check the the size against \f@size. If it is not equal \f@size it is no good and we have to recurse.

362  \ifdim \f@size \p@=#1\p@

Otherwise if this test is passed we can try executing the size function.

363  \set@simple@size@args#2<#3\@nnil
364  \execute@size@function\sizefn@info

If the function was successful it should have left an external font name in \external@font. We use this to see if we can stop scanning. Otherwise we recurse.

365  \ifx\external@font\@empty
366  \else
367  \let\reserved@f\@empty
368  \fi
369  \fi
370  \reserved@f}

\set@size@funct@args \set@size@funct@args@ This macro sets the optional and mandatory arguments for a size function. If the optional argument is not present it is set to the empty token list. The mandatory argument is delimited by the token \@nil.

371 \def\set@size@funct@args{\@ifnextchar[%
372 \set@size@funct@args@{\set@size@funct@args@[]}}
373 \def\set@size@funct@args@[#1]#2\@nil{%
374 \def\mandatory@arg{#2}%
375 \def\optional@arg{#1}}

376 ⟨/2ekernel | def2 | autoload⟩

\DeclareSizeFunction This function defines a new size function hiding the internal from the designer. The body of the size function may use \optional@arg and \mandatory@arg denoting the optional and mandatory argument that may follow the size specification <...>.

377 ⟨∗2ekernel | autoload⟩

378 \def\DeclareSizeFunction#1#2{\@namedef{s@fct@#1}{#2}}
379 \@onlypreamble\DeclareSizeFunction

380 ⟨/2ekernel | autoload⟩

\execute@size@function This macro is very simple. The only point worth noting is that calling an undefined size function will do nothing (actually execute a \relax).

381 ⟨∗2ekernel | package | autoload⟩

382 \def\execute@size@function#1{%    %%% could be added to autoload as well

383 ⟨∗trace⟩

384  \@ifundefined{s@fct@#1}%
385  {\errmessage{Undefined font size function #1}%
386  \s@fct@}%
387  {\csname s@fct@#1\endcsname}%

388 ⟨/trace⟩

389 ⟨−trace⟩  \csname s@fct@#1\endcsname

390 } 391 ⟨/2ekernel | package | autoload⟩

\try@size@range This macro tries to find a suitable range for requested size (specified by \f@size)

in \font@info. All the relevant action is done in \extract@rangefontinfo.

All that needs to be done is to stuff in the token list in \font@info so that \extract@rangefontinfo can inspect it. Note the <-*\@nil>< token at the end to stop scanning.

392 ⟨∗2ekernel | def2 | autoload⟩

393 \def\try@size@range{%
394  \expandafter\extract@rangefontinfo\font@info <-*>\@nil<\@nnil

395 } 396 ⟨/2ekernel | def2 | autoload⟩

\try@size@substitution This is the last thing that can be tried. If the desired \f@size is found neither among the simple size specifications nor in one of the ranges the whole list of size specifications is searched for a nearby simple size.

397 ⟨∗2ekernel | def1⟩

398 \gdef\try@size@substitution{%

First we do some initializations. \@tempdimb will hold the difference between the wanted size and the best solution found so far, so we initialise it with \maxdimen. The macro \best@size will hold the best size found, nothing found is indicated by the empty value.

399 \@tempdimb \maxdimen
400 \let \best@size \@empty

Now we loop over the specification

401 \expandafter \try@simples \font@info <\number\@M>\@nil<\@nnil

402 } 403 ⟨/2ekernel | def1⟩ 404 ⟨∗autoload⟩

405 \def\try@size@substitution{\try@simples\try@size@substitution}

406 ⟨/autoload⟩

\font@submax \fontsubfuzz The macro \font@submax records the maximal deviation from the desired size encountered so far. Its value is used in a warning message at \end{coument}. The macro \fontsubfuzz contains the amount that will not cause terminal warnings (warnings still go into the transcript file).

407 ⟨∗2ekernel | autoload⟩

408 \def\font@submax{0pt}
409 \def\fontsubfuzz{.4pt}

410 ⟨/2ekernel | autoload⟩

411 ⟨+package⟩\def\fontsubfuzz{0pt}

\try@simples \try@simples goes through a font shape definition in the input until it recognizes the tokens <*\@nil><. It looks for simple sizes to determine the two closest sizes. It is assumed that simple sizes are in increasing order.

412 ⟨∗2ekernel | def1⟩

413 \gdef\try@simples#1<#2>{%
414 \tryif@simple#2->\tryif@simple}

415 ⟨/2ekernel | def1⟩ 416 ⟨∗autoload⟩

417 \def\try@simples{\@autoload{fss1}}

418 ⟨/autoload⟩

\tryis@simple \tryis@simple is similar to \is@range. If it sees a simple size, it checks it against

the value of \f@size and sets \lower@font@size or \higher@font@size. In the

latter case, it stops the iteration. By adding <\number\@M> at the end of the line we always have an end point. This is a hack which probably should be corrected.

First it checks whether it is finished already, then whether the size specification in question is a simple one.

419 ⟨∗2ekernel | def1⟩

420 \gdef\tryif@simple#1-#2\tryif@simple{%

Most common case for \reserved@f first:

421 \let \reserved@f \try@simples
422 \if>#2%

If so, it compares it to the value of \f@size. This is done using a dimen register since there may be fractional numbers.

423  \dimen@ #1\p@
424  \ifdim \dimen@<\@M\p@

If \dimen@ is \@M\p@ we have reached the end of the fontspec (hopefully) otherwise we compare the value with \f@size and compute in \@tempdimc the absolute value of the difference between the two values.

425  \ifdim \f@size\p@<\dimen@
426  \@tempdimc \dimen@
427  \advance\@tempdimc -\f@size\p@
428  \else
429  \@tempdimc \f@size\p@
430  \advance\@tempdimc -\dimen@
431  \fi

The result is then compared with the smallest difference we have encountered, if the new value (in \@tempdimc is smaller) we have found a size which is a better approximation so we make it the \best@size and adjust \@tempdimb.

432  \ifdim \@tempdimc<\@tempdimb
433  \@tempdimb \@tempdimc
434  \def \best@size{#1}%
435  \fi

When we have reached the end of the fontspec we substitute the best size found (if any). We code this inline to save macro space; in the past this was done by a macro called \subst@size.

436  \else

\subst@size This macro substitutes the size recorded in \best@size for the unavailable size \f@size. \font@submax records the maximum difference between desired size and selected size in the whole run.

437 % %\subst@size             %% coded inline
438 % %\def\subst@size{%
439 \ifx \external@font\@empty
440  \ifx \best@size\@empty
441  \else
442  \ifdim \@tempdimb>\font@submax \relax
443  \xdef \font@submax {\the\@tempdimb}%
444  \fi
445  \let \f@user@size \f@size

446  \let \f@size \best@size
447  \ifdim \@tempdimb>\fontsubfuzz\relax
448  \@font@warning{Font\space shape\space
449  `\curr@fontshape'\space in\space size\space
450  <\f@user@size>\space not\space available\MessageBreak
451  size\space <\f@size>\space substituted}%
452  \fi
453  \try@simple@size
454  \do@subst@correction
455  \fi
456 \fi
457 % %}

This brings us back into the main part of \tryif@simple. Finally we get rid of any rubbish left over on the input stack.

458  \let \reserved@f \remove@to@nnil
459  \fi
460 \fi

If it’s a range iterate also.

461 \reserved@f}

462 ⟨/2ekernel | def1⟩

30.1 Sizefunctions

In the following we define some useful size functions.

\s@fct@ This is the default size function. Mandatory argument is an external font name, optinal argument a scale factor. The font is scaled to \f@size if no optional argument is present, and to \f@size multiplied by the optional argument otherwise.

463 ⟨∗2ekernel | autoload⟩

464 \DeclareSizeFunction{}{\empty@sfcnt\@font@warning}
465 \DeclareSizeFunction{s}{\empty@sfcnt\@font@info}

466 ⟨/2ekernel | autoload⟩

467 ⟨∗2ekernel | def2 | autoload⟩

468 \def\empty@sfcnt#1{%
469  \@tempdimb \f@size\p@
470  \ifx\optional@arg\@empty
471  \else
472  \@tempdimb \optional@arg\@tempdimb
473  #1{Font\space shape\space `\curr@fontshape'\space
474  will\space be\MessageBreak
475  scaled\space to\space size\space \the\@tempdimb}%
476  \fi
477  \edef\external@font{\mandatory@arg\space at\the\@tempdimb}}

478 ⟨/2ekernel | def2 | autoload⟩

\s@fct@gen \s@fct@sgen This size function generates the external name from the mandatory argument and the requested user size, and thus can be used for external names where the size is encoded in the font name. The optinal argument a scale factor. The font is scaled to \f@size if no optional argument is present, and to \f@size multiplied by the optional argument otherwise.

479 ⟨∗2ekernel | autoload⟩

480 \DeclareSizeFunction{gen}{\gen@sfcnt\@font@warning}
481 \DeclareSizeFunction{sgen}{\gen@sfcnt\@font@info}

482 ⟨/2ekernel | autoload⟩

483 ⟨∗2ekernel | def2 | autoload⟩

484 \def\gen@sfcnt{%
485  \edef\mandatory@arg{\mandatory@arg\f@size}%
486  \empty@sfcnt}

487 ⟨/2ekernel | def2 | autoload⟩

\s@fct@genb \s@fct@sgenb This size function is similar to gen, but for fonts where the size is encoded in the font name in centipoints, as in the DC fonts version 1.2. The font is scaled to \f@size if no optional argument is present, and to \f@size multiplied by the optional argument otherwise.

488 ⟨∗2ekernel | autoload⟩

489 \DeclareSizeFunction{genb}{\genb@sfcnt\@font@warning}
490 \DeclareSizeFunction{sgenb}{\genb@sfcnt\@font@info}

491 ⟨/2ekernel | autoload⟩

492 ⟨∗2ekernel | def2 | autoload⟩

493 \def\genb@sfcnt{%
494  \edef\mandatory@arg{\mandatory@arg\expandafter\genb@x\f@size..\@@}%
495  \empty@sfcnt}

496 ⟨/2ekernel | def2 | autoload⟩

\genb@x \genb@y The auxiliary macros \genb@x and \genb@y are used to convert the \f@size into centipoints.

497 ⟨∗2ekernel | def2 | autoload⟩

498 \def\genb@x#1.#2.#3\@@{\two@digits{#1}\genb@y#200\@@}
499 \def\genb@y#1#2#3\@@{#1#2}

500 ⟨/2ekernel | def2 | autoload⟩

\s@fct@sub This size function handles font substitution. The mandatory argument is a family/series/shape combination, the optional argument (if present) is ignored. The font encoding scheme cannot be changed. Therefore, the first thing we do is to prepend the encoding scheme.

501 ⟨∗2ekernel | autoload⟩

502 \DeclareSizeFunction{sub}{\sub@sfcnt\@font@warning}
503 \DeclareSizeFunction{ssub}{\sub@sfcnt\@font@info}

504 ⟨/2ekernel | autoload⟩

505 ⟨∗2ekernel | def2 | autoload⟩

506 \def\sub@sfcnt#1{%
507  \edef\mandatory@arg{\f@encoding/\mandatory@arg}%

Next action is split the arg into its individual components and allow for a late font shape load.

508  \begingroup
509  \expandafter\split@name\mandatory@arg/\@nil
510  \try@load@fontshape
511  \endgroup

Then we record the current \f@size since it may get clobbered.

512  \let\f@user@size\f@size

Then we check whether this new combination is defined and give an error message if not. In this case we also switch to \error@fontshape.

513  \expandafter
514  \ifx\csname\mandatory@arg\endcsname\relax
515  \errmessage{No\space declaration\space for\space
516  shape\space \mandatory@arg}%
517  \error@fontshape
518  \else

Otherwise we warn the user about the substitution taking place.

519  #1{Font\space shape\space `\curr@fontshape'\space in\space
520  size\space <\f@size>\space not\space available\MessageBreak
521  Font\space shape\space `\mandatory@arg'\space tried\space
522  instead}%
523  \expandafter\split@name\mandatory@arg/\@nil
524  \fi

Then we restart the font specification scan by calling \get@external@font.

525  \edef\f@size{\f@user@size}%
526  \get@external@font

Finally \do@subst@correction is called to get the font name right.

527  \do@subst@correction

528 } 529 ⟨/2ekernel | def2 | autoload⟩

\s@fct@subf The subf size function allows substitution of another font. The mandatory argument is the external name of the font to be substituted, the optional argument a size scaling factor like in the default size function. The main difference to the default size function is the warning message.

530 ⟨∗2ekernel | autoload⟩

531 \DeclareSizeFunction{subf}{\subf@sfcnt\@font@warning}
532 \DeclareSizeFunction{ssubf}{\subf@sfcnt\@font@info}

533 ⟨/2ekernel | autoload⟩

534 ⟨∗2ekernel | def2 | autoload⟩

535 \def\subf@sfcnt#1{%
536  #1{Font\space shape\space `\curr@fontshape'\space in\space
537  size\space \f@size\space not\space available\MessageBreak
538  external\space font\space `\mandatory@arg'\space used}%
539  \empty@sfcnt#1%

540 } 541 ⟨/2ekernel | def2 | autoload⟩

\s@fct@fixed The fixed size function is for using a font at a different size than requested. A warning message is printed, and the external font to be used is taken from the mandatory argument. If an optional argument is present it is used as the ‘at’ size for the font. Otherwise the font is loaded at its design size.

542 ⟨∗2ekernel | autoload⟩

543 \DeclareSizeFunction{fixed}{\fixed@sfcnt\@font@warning}
544 \DeclareSizeFunction{sfixed}{\fixed@sfcnt\@font@info}

545 ⟨/2ekernel | autoload⟩

546 ⟨∗2ekernel | def2 | autoload⟩

547 \def\fixed@sfcnt#1{%

548 \ifx\optional@arg\@empty
549  \let\external@font\mandatory@arg
550 \else
551  \edef\external@font{\mandatory@arg\space at\optional@arg pt}%
552 \fi
553 #1{External\space font\space `\external@font'\space loaded\space
554  for\space size\MessageBreak
555  <\f@size>}%

556 } 557 ⟨/2ekernel | def2 | autoload⟩

File o

ltfsscmp.dtx

This file contains the implementation of commands giving compatibility with the original ‘NFSS1’ release of the Font Selection Scheme.

Warning: The macro documentation is still basically the documentation from the first NFSS release and therefore in some cases probably not completely accurate.

31 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 ltfss.dtx is available.

[ auto-loading not activated ]

\new@fontshape \subst@fontshape \extra@def \default@mextra \define@mathalphabet \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.

1 ⟨∗autoload⟩

 2 \def\new@fontshape{\scan@fontshape\new@fontshape}
 3 \def\subst@fontshape{\scan@fontshape\subst@fontshape}
 4 \def\extra@def{\scan@fontshape\extra@def}
 5 \def\default@mextra{\scan@fontshape\default@mextra}
 6 \def\define@mathalphabet{\scan@fontshape\define@mathalphabet}
 7 \def\define@mathgroup{\scan@fontshape\define@mathgroup}

\scan@fontshape Here is the kernel definition for \scan@fontshape which loads the actual definitions from the file nfsscmp.def.

 8 \def\scan@fontshape{\input{nfsscmp.def}}

The following definitions are now placed into the auto-load file.

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.

 9 \begingroup
10 \nfss@catcodes
11 \catcode`\ =10\relax

12 ⟨/autoload⟩ 13 ⟨∗compat⟩

\new@fontshape The interface is now \DeclareFontShape.
14 \gdef\new@fontshape#1#2#3#4{%
15  \warn@rel@i\new@fontshape\DeclareFontShape
16  \expandafter\scan@fontshape\@gobble#4<\@nil><<%
17  \DeclareFontShape U{#1}{#2}{#3}\reserved@f}
18 \@onlypreamble\new@fontshape

\warn@rel@i The warning message used above.

19 \gdef\warn@rel@i#1#2{%
20 \@font@warning{***  NFSS release 1 command
21  \noexpand#1found\MessageBreak
22 ***  Update by using release 2 command
23  \string#2.\MessageBreak
24 ***  Recovery is probably possible}%

25 }

26 \@onlypreamble\warn@rel@i

\scan@fontshape This will scan the old font shape definition syntax.

27 \gdef\scan@fontshape{%
28 \let\reserved@f\@empty
29 \let\reserved@e\@empty %        holds last info
30 \scan@@fontshape

31 }

32 \@onlypreamble\scan@fontshape
\scan@@fontshape
33 \gdef\scan@@fontshape#1>#2#3<{%
34 \ifx\@nil#1%
35  \edef\reserved@f{\reserved@f\reserved@e}%
36 \else
37  \def\reserved@b{#1}%       nick names
38  \def\reserved@c{#3}%
39  \in@{ at}{#3}%
40  \ifin@
41  \in@{pt}{#3}%  not a proof but a good chance
42  \ifin@

We grap also everything after pt and discard it if people have forgotten to place a percent sign there.

43  \def\reserved@a##1 at##2pt##3\@nil{%
44  \def\reserved@b{##2}%
45  \def\reserved@c{##1}%
46  }%
47  \reserved@a#3\@nil
48  \fi
49  \fi
50  \ifnum 0<0#2
51  \edef\reserved@d{subf*\reserved@c}%
52  \ifcase #2\or
53  \or
54  \else
55  \errmessage{*** What's this? NFSS release 0? ***}%
56  \fi
57  \else

58  \edef\reserved@d{#2\reserved@c}%
59  \fi
60  \ifx\reserved@d\reserved@e
61  \edef\reserved@f{\reserved@f<\reserved@b>}%
62  \else
63  \edef\reserved@f{\reserved@f\reserved@e<\reserved@b>}%add old info
64  \let\reserved@e\reserved@d
65  \fi
66  \expandafter\scan@@fontshape
67 \fi

68 }

69 \@onlypreamble\scan@@fontshape

\subst@fontshape This is now also handled by the extend syntax of \DeclareFontShape.

70 \gdef\subst@fontshape#1#2#3#4#5#6{%
71  \warn@rel@i\subst@fontshape\DeclareFontShape
72  \DeclareFontShape{U}{#1}{#2}{#3}{<->sub*#4/#5/#6}{}}
73 \@onlypreamble\subst@fontshape
\extra@def This was replaced by \DeclareFontFamily.
74 \gdef\extra@def#1#2#3{%
75  \warn@rel@i\extra@def\DeclareFontFamily
76  \DeclareFontFamily{U}{#1}{}%

77 }

78 \@onlypreamble\extra@def
\default@mextra The new name is \DeclareFontEncodingDefaults but in this case we don’t feel

comfortable with this either.

79 \gdef\default@mextra{%
80 \warn@rel@i\default@mextra\DeclareFontEncodingDefaults

We pick up the argument to \default@mextra implicitly as the second argument

of \DeclareFontEncodingDefaults.
81 \DeclareFontEncodingDefaults\relax

82 }

83 \@onlypreamble\default@mextra
\preload@sizes The new interface is \DeclarePreloadSizes.
84 \gdef\preload@sizes{%
85  \warn@rel@i\preload@sizes\DeclarePreloadSizes
86  \DeclarePreloadSizes U%

87 }

88 \@onlypreamble\preload@sizes

\err@rel@i This macro is used in cases where emulation with NFSS2 features is not really possible.

89 \gdef\err@rel@i#1#2{%
90 \@latex@error{***  NFSS release 1 command \noexpand#1found%
91  ^^J***  Recovery not possible. Use \string#2}%
92  {The new release of NFSS doesn't support the
93  \noexpand#1command^^Jany longer.
94  Please upgrade your file to the syntax of NFSS
95  release 2^^Jusing the \noexpand#2command.}%

Let’s die.

 96 \batchmode\input.\relax

97 }

 98 \@onlypreamble\err@rel@i
\newmathalphabet \newmathalphabet@@ \newmathalphabet@@@  \newmathalphabet is the old form.
 99 \gdef\newmathalphabet{%
100 \if@no@font@opt
101  \@latex@error{*** NFSS release 1 command
102  \noexpand\newmathalphabet found%
103  ^^J \space*** Automatic recovery not possible.%
104  ^^J \space*** TYPE H for Help%

105 }%

106  {Please look at the file usrguide.tex for hints on
107  how to resolve this problem.}%
108 \else
109  \warn@rel@i\newmathalphabet\DeclareMathAlphabet
110 \fi
111 \@ifstar\newmathalphabet@@@
112  \newmathalphabet@@}
113 \gdef\newmathalphabet@@#1{\DeclareMathAlphabet#1{U}{}{}{}}
114 \gdef\newmathalphabet@@@#1#2#3#4{%
115  \DeclareMathAlphabet{#1}{U}{#2}{#3}{#4}}
116 \@onlypreamble\newmathalphabet
117 \@onlypreamble\newmathalphabet@@
118 \@onlypreamble\newmathalphabet@@@
\if@no@font@opt
\@no@font@optfalse
119 \global\let\if@no@font@opt\iftrue
120 \gdef\@no@font@optfalse{\let\if@no@font@opt\iffalse}

\define@mathalphabet This is a case where dying is best.

121 \gdef\define@mathalphabet{%
122  \err@rel@i\define@mathalphabet\DeclareMathAlphabet

123 }

124 \@onlypreamble\define@mathalphabet

\define@mathgroup And here is another one

125 \gdef\define@mathgroup{%
126  \err@rel@i\define@mathgroup\DeclareSymbolFont

127 }

128 \@onlypreamble\define@mathgroup

129 ⟨/compat⟩

\addtoversion  \addtoversion is the old form.
130 \def\addtoversion#1#2{%
131 \warn@rel@i\addtoversion\SetMathAlphabet
132 \SetMathAlphabet#2{#1}{U}}
133 \@onlypreamble\addtoversion

That finishes the definitions for the old interfaces — but first we better finish the group.

134 ⟨∗autoload⟩

135 \endgroup

136 ⟨/autoload⟩

File p

ltfssdcl.dtx

This file contains the main implementation of the font selection scheme commands. See other parts of the L^{A}TEX distribution, or The L^{A}TEX Companion for higher level documentation of these commands.

Warning: The macro documentation is still basically the documentation from the first NFSS release and therefore in some cases probably not completely accurate.

32 Interface Commands

{\in@ \atop \ifin@} \@in is a utility macro with two arguments. It determines whether its first argument occurs in its second (after expanding it) and sets the switch \if@in accordingly.

1 ⟨∗2ekernel | autoload⟩

 2 \def\in@#1#2{%
 3 \def\in@@##1#1##2##3\in@@{%
 4 \ifx\in@##2\in@false\else\in@true\fi}%
 5 \in@@#2#1\in@\in@@}
 6 \newif\ifin@

Before the \begin{document} command several ⟨math versions⟩ and ⟨math alphabet identifiers⟩ may be declared. In principle, there should be exactly one family/series/shape combination be declared for each version/alphabet pair. But we want to allow for defaults as well for automagical filling of holes.

While building the tables for math alphabet identifiers and math versions we keep several lists:

• the list of all math versions, \version@list, each entry prefixed by the control sequence \version@elt, i.e. this list has the following form

         \version@elt⟨version_{1}⟩\version@elt⟨version_{2}⟩. . .
                                           \version@elt⟨version_{n}⟩

• the list of all math alphabet identifiers. Here every entry has the form: \group@elt⟨math group number⟩ {{⟨default family⟩}{⟨default series⟩}{⟨default shape⟩}}.

• Each defined math alphabet identifier holds a list containing Information about the versions for which it is defined. This list has a more complicated structure: it looks as follows:

\set@alpha⟨the alphabet identifier itself ⟩ \reserved@c⟨math version⟩⟨font info⟩ …

         \@nil

where ⟨font info⟩ is either \reserved@e (if the combination is not defined yet) or

{{⟨family⟩}{⟨series⟩}{⟨shape⟩}}

\version@list We initialize the version list to be empty.

 7 \let\version@list=\@empty
 8 \@onlypreamble\version@list
\version@elt
 9 \let\version@elt\relax
10 \@onlypreamble\version@elt

\new@mathversion The macro \new@mathversion is called with the version control sequence as its argument.

11 %\def\new@mathversion#1{%

The first thing this macro does is to check if the version identifier is already present in \version@list. We enclose \version@list in braces since it might be empty (if no version is defined yet). But this means that we need a suitable number of

\expandafter primitives.
12 %  \expandafter\in@\expandafter#1\expandafter{\version@list}%
13 %  \ifin@

If so it prints an error message. The \next macro is used to get rid of the four characters \mv@ that would otherwise appear at the begin of the version name in the error message.

14 %    \@latex@error{Math version
15 %               `\expandafter\@gobblefour\string#1'
16 %               already defined}\@eha

Otherwise we have a new version, and we can proceed with entering it into the tables. We add it to \version@list. This is very easy: we define \version@elt (which is the delimiter in \version@list) to protect itself and the following token from being expanded and simply redefine \version@list.

17 %  \else
18 %     \global\expandafter\newcount\csname c@\expandafter
19 %                                 \@gobble\string#1\endcsname
20 %     \global\csname c@\expandafter
21 %                                 \@gobble\string#1\endcsname\@ne
22 %     \def\version@elt{\noexpand\version@elt\noexpand}%
23 %     \edef\version@list{\version@list\version@elt#1}%

Then we prepare to enter the new version into all math alphabet identifier lists. Remember that these lists use \reserved@c as delimiter, and that there appears the control sequence \reserved@e that must not be expanded. Therefore we take suitable precautions.

24 %     \def\reserved@c{\noexpand\reserved@c\noexpand}%
25 %     \let\reserved@e\relax

We will now go through the \alpha@list to process every ⟨math alphabet identifier⟩ in turn. Since this list has \group@elt as a delimiter we define this control sequence. It has three arguments as every entry consists of three items (as explained above).

26 %     \def\group@elt##1##2##3{%

The first of these arguments is the ⟨math alphabet identifier⟩. We redefine it by appending the information about the new version at the end of the list contained in it. However, there is one subtlety: the definitions for \reserved@c and \reserved@e made above prevent the main part of the list from being expanded. But we still have to take care of the header and the trailer. To do this we remove the trailer by means of the macro \remove@nil which also protect the header from being expanded. Its definition is given below. Now we can prepare to add the new version.

27 %          \edef##1{\expandafter\remove@nil##1%
28 %                   \reserved@c
29 %                   #1%
30 %                   \reserved@e
31 %                   \noexpand\@nil}}%

Finally we call \alpha@list which will now execute the macro \group@elt once for every defined ⟨math alphabet identifier⟩. And that’s all for now.

32 %     \alpha@list
33 %  \fi}

\alpha@list As we explained above every entry in \alpha@list has the form

\alpha@elt

⟨alphabet identifier⟩⟨internal group number⟩⟨default font assignments⟩… We initialize it to \@empty.

34 \let\alpha@list\@empty
35 \@onlypreamble\alpha@list
\alpha@elt
36 \let\alpha@elt\relax
37 \@onlypreamble\alpha@elt
new stuff
38 % start alloc at 0
39 \count18=-1

another begingroup bug:

40 \def\stepcounter #1{\global\advance\csname c@#1\endcsname\@ne
41 \begingroup\let\@elt\@stpelt \csname cl@#1\endcsname\endgroup }
42 \newif\ifrestore@version \restore@versiontrue
43 \@onlypreamble\ifrestore@version
44 \@onlypreamble\restore@versionfalse
45 \@onlypreamble\restore@versiontrue

We surround \select@group with braces so that functions using it can be used directly after _or ^. However, if we use oldstyle syntax where the math alphabet doesn’t have arguments (ie if \math@bgroup is not \bgroup) we need to get rid of the extra group.

46 \def\select@group#1#2#3#4{%
47 \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi
48 {%
49 \ifmmode
50 \ifnum\csname c@mv@\math@version\endcsname<\sixt@@n
51  \begingroup

52  \escapechar\m@ne
53  \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%
54  \globaldefs\@ne  \math@fonts
55  \endgroup
56  \ifrestore@version
57  \global\restore@versionfalse
58  \xdef\restore@mathversion
59  {\expandafter\noexpand\csname mv@\math@version\endcsname
60  \global\csname c@mv@\math@version\endcsname
61  \number\csname c@mv@\math@version\endcsname\relax}%
62  \aftergroup\dorestore@version
63  \fi
64  \xdef#1{\noexpand\use@mathgroup\noexpand#2%
65  {\number\csname c@mv@\math@version\endcsname}}%
66  \stepcounter{mv@\math@version}%
67 \else
68  \let#1\relax
69  \@latex@error{Too many math alphabets used in
70  version \math@version}%
71  \@eha
72 \fi
73 \else \expandafter\non@alpherr\fi
74 #1{#4}%
75 }%

76 }

77 \@onlypreamble\restore@mathversion

78 ⟨/2ekernel | autoload⟩ 79 ⟨∗2ekernel | autoerr⟩

80 \gdef\non@alpherr#1{\@latex@error{%

Since the argument is the internal alphabet name, we have to get rid of the @ in its name. The trick here is to use \@firstoftwo which is a L^{A}TEX macro which discards the second of two arguments.

81  \expandafter\@firstoftwo\string#1 allowed only in math mode}\@ehd}

82 ⟨/2ekernel | autoerr⟩

83 ⟨autoload⟩\def\non@alpherr{\@autoerr\non@alpherr}

84 ⟨∗2ekernel | autoload⟩

85 \def\dorestore@version
86 {\ifmmode
87  \aftergroup\dorestore@version
88 \else
89  \global\restore@versiontrue
90  \begingroup
91  \let\getanddefine@fonts\@gobbletwo
92  \restore@mathversion
93  \endgroup
94 \fi}%
95 \@onlypreamble\dorestore@version

We surround \select@group with braces so that functions using it can be used directly after _or ^.

96 \def\document@select@group#1#2#3#4{%
97 \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi

 98 {%
 99 \ifmmode
100 \ifnum\csname c@mv@\math@version\endcsname<\sixt@@n
101  \begingroup
102  \escapechar\m@ne
103  \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%
104  \globaldefs\@ne  \math@fonts
105  \endgroup
106  \expandafter\extract@alph@from@version
107  \csname mv@\math@version\expandafter\endcsname
108  \expandafter{\number\csname
109  c@mv@\math@version\endcsname}%
110  #1%
111  \stepcounter{mv@\math@version}%
112 \else
113  \let#1\relax
114  \@latex@error{Too many math alphabets used
115  in version \math@version}%
116  \@eha
117 \fi
118 \else \expandafter\non@alpherr\fi
119 #1{#4}%

120 }% 121 }

122 \def\process@table{%
123  \def\cdp@elt##1##2##3##4{%
124  \@font@info{Checking defaults for
125  ##1/##2/##3/##4}%
126  \expandafter
127  \ifx\csname##1/##2/##3/##4\endcsname\relax

Grouping is important for two reasons, first \cdp@elt will get redefined if \Declare... functions are executed within the external .fd file and secondly \try@load@fontshape changes a lot of catcodes without surrounding itself with a group.

128  \begingroup
129  \def\f@encoding{##1}\def\f@family{##2}%
130  \try@load@fontshape
131  \endgroup
132  \fi
133  \expandafter
134  \ifx\csname##1/##2/##3/##4\endcsname\relax
135  \@latex@error{This NFSS system isn't set up properly}%
136  {For encoding scheme ##1 the defaults
137  ##2/##3/##4 do not form a valid font shape}%
138  \else
139  \@font@info{... okay}%
140  \fi}%
141  \cdp@list

Now we make sure that \error@fontshape is okay.

142  \begingroup
143  \escapechar\m@ne
144  \error@fontshape

145  \expandafter\ifx\csname \curr@fontshape\endcsname\relax
146  \begingroup
147  \try@load@fontshape
148  \endgroup
149  \fi
150  \expandafter\ifx\csname \curr@fontshape\endcsname\relax
151  \@latex@error{This NFSS system isn't set up properly}%
152  {The system maintainer forgot to specify a suitable
153  substitution
154  font shape using the \noexpand\DeclareErrorFont
155  command}%
156  \fi
157  \endgroup

Set \select@group to its meaning used within the document body.

158  \let\select@group\document@select@group

Install the default font attributes they are currently pointing to error font shape. Don’t use \reset@font since that would trigger \selectfont.

159  \fontencoding{\encodingdefault}%
160  \fontfamily{\familydefault}%
161  \fontseries{\seriesdefault}%
162  \fontshape{\shapedefault}%

kill all macros not longer needed. we need to add many more!!!!!!

163 \everyjob{}%

164 }

165 \@onlypreamble\process@table

166 167

168 %\@onlypreamble\set@mathradical
169 \def\DeclareMathVersion#1{%
170 \expandafter\new@mathversion\csname mv@#1\endcsname}
171 \@onlypreamble\DeclareMathVersion
172 \def\new@mathversion#1{%
173 \expandafter\in@\expandafter#1\expandafter{\version@list}%
174 \ifin@
175  \@font@info{Redeclaring math version
176  `\expandafter\@gobblefour\string#1'}%
177 \else
178  \global\expandafter\newcount\csname c@\expandafter
179  \@gobble\string#1\endcsname
180  \def\version@elt{\noexpand\version@elt\noexpand}%
181  \edef\version@list{\version@list\version@elt#1}%
182 \fi

\toks@ is used to gather all tokens for the math version. \count@ will be used to count the math groups we add to this version.

183 \toks@{}%
184 \count@\z@

Now we loop over \group@list to add all math groups defined so far to the version and at the same time to count them.

185 \def\group@elt##1##2{%
186  \advance\count@\@ne

187  \addto@hook\toks@{\getanddefine@fonts##1##2}%

188 }%

189 \group@list

We set the counter for this math version to the number of math groups found in

 \group@list.
190 \global\csname c@\expandafter\@gobble\string#1\endcsname\count@

Now we loop over \alpha@list to add all math alphabets known so far. We have to distinugish the case that an alphabet by default should produce an error in new versions.

191 \def\alpha@elt##1##2##3{%
192  \ifx##2\no@alphabet@error
193  \toks@\expandafter{\the\toks@\install@mathalphabet##1%
194  {\no@alphabet@error##1}}%
195  \else
196  \toks@\expandafter{\the\toks@\install@mathalphabet##1%
197  {\select@group##1##2##3}}%
198  \fi

199 }%

200 \alpha@list

Finally we define the math version to expand to the contents of \toks@.

201 \xdef#1{\the\toks@}%

202 }

203 \@onlypreamble\new@mathversion
204 \def\DeclareSymbolFont#1#2#3#4#5{%
205 \@tempswafalse
206 \edef\reserved@b{#2}%
207 \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
208  \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
209 \cdp@list
210 \if@tempswa
211 \@ifundefined{sym#1}{%
212  \expandafter\new@mathgroup\csname sym#1\endcsname
213  \expandafter\new@symbolfont\csname sym#1\endcsname
214  {#2}{#3}{#4}{#5}}%

215 {%

216  \@font@info{Redeclaring symbol font `#1'}%
217  \def\group@elt##1##2{%
218  \expandafter\ifx\csname sym#1\endcsname##1%
219  \expandafter\addto@hook\expandafter
220  \toks@\expandafter{\expandafter\group@elt
221  \expandafter##1\csname#2/#3/#4/#5\endcsname}%
222  \else
223  \addto@hook\toks@{\group@elt##1##2}%
224  \fi

225 }%

226  \toks@{}%
227  \group@list
228  \def\version@elt##1{%
229  \expandafter
230  \SetSymbolFont@\expandafter##1\csname#2/#3/#4/#5\expandafter
231  \endcsname \csname sym#1\endcsname

232 }%

233  \version@list

234 }%

235 \else
236  \@latex@error{Encoding scheme  `#2' unknown}\@eha
237 \fi

238 }

239 \@onlypreamble\DeclareSymbolFont
240 \let\group@list\@empty
241 \@onlypreamble\group@list
242 \let\group@elt\relax
243 \@onlypreamble\group@elt
244 \def\new@symbolfont#1#2#3#4#5{%
245  \toks@\expandafter{\group@list}%
246  \edef\group@list{\the\toks@\noexpand\group@elt\noexpand#1%
247  \expandafter\noexpand\csname#2/#3/#4/#5\endcsname}%
248  \def\version@elt##1{\toks@\expandafter{##1}%
249  \edef##1{\the\toks@\noexpand\getanddefine@fonts
250  #1\expandafter\noexpand\csname#2/#3/#4/#5\endcsname}%
251  \global\advance\csname c@\expandafter
252  \@gobble\string##1\endcsname\@ne

253 }%

254  \version@list

255 }

256 \@onlypreamble\new@symbolfont
257 \def\SetSymbolFont#1#2#3#4#5#6{%
258 \@tempswafalse
259 \edef\reserved@b{#3}%
260 \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
261  \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
262 \cdp@list
263 \if@tempswa
264 \expandafter\SetSymbolFont@
265  \csname mv@#2\expandafter\endcsname\csname#3/#4/#5/#6\expandafter
266  \endcsname \csname sym#1\endcsname
267 \else
268 \@latex@error{Encoding scheme  `#3' unknown}\@eha
269 \fi

270 }

271 \@onlypreamble\SetSymbolFont
272 \def\SetSymbolFont@#1#2#3{%
273 \expandafter\in@\expandafter#1\expandafter{\version@list}%
274 \ifin@
275  \expandafter\in@\expandafter#3\expandafter{\group@list}%
276  \ifin@
277  \begingroup
278  \expandafter\get@cdp\string#2\@nil\reserved@a
279  \toks@{}%
280  \def\install@mathalphabet##1##2{%
281  \addto@hook\toks@{\install@mathalphabet##1{##2}}%

282 }%

283  \def\getanddefine@fonts##1##2{%
284  \ifnum##1=#3%
285  \addto@hook\toks@{\getanddefine@fonts#3#2}%

286  \expandafter\get@cdp\string##2\@nil\reserved@b
287  \ifx\reserved@a\reserved@b\else
288  \@font@warning{Encoding `\reserved@b' has changed
289  to `\reserved@a' for symbol font\MessageBreak
290  `\expandafter\@gobblefour\string#3' in the
291  math version `\expandafter
292  \@gobblefour\string#1'}%
293  \fi
294  \@font@info{%
295  Overwriting symbol font
296  `\expandafter\@gobblefour\string#3' in
297  version `\expandafter
298  \@gobblefour\string#1'\MessageBreak
299  \@spaces \expandafter\@gobble\string##2 -->
300  \expandafter\@gobble\string#2}%
301  \else
302  \addto@hook\toks@{\getanddefine@fonts##1##2}%
303  \fi}%
304  #1%
305  \xdef#1{\the\toks@}%
306  \endgroup
307  \else
308  \@latex@error{Symbol font `\expandafter\@gobblefour\string#3'
309  not defined}\@eha
310  \fi
311 \else
312  \@latex@error{Math version `\expandafter\@gobblefour\string#1'
313  is not
314  defined}{You probably mispelled the name of the math
315  version.^^JOr you have to specify an additional package.}%
316 \fi

317 }

318 \@onlypreamble\SetSymbolFont@
319 \def\get@cdp#1#2/#3\@nil#4{\def#4{#2}}
320 \@onlypreamble\get@cdp
321 \def\DeclareMathAlphabet#1#2#3#4#5{%
322 \@tempswafalse
323 \edef\reserved@b{#2}%
324 \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
325  \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
326 \cdp@list
327 \if@tempswa
328 \expandafter\ifx
329 \csname\expandafter\@gobble\string#1\endcsname
330 \relax
331  \new@mathalphabet#1{#2}{#3}{#4}{#5}%
332 \else

Check if it is already a math alphabet.

333  \edef\reserved@a{\noexpand\in@{\string\select@group}%
334  {\expandafter\meaning\csname @\expandafter
335  \@gobble\string#1\endcsname}}%
336  \reserved@a
337  \ifin@

338  \@font@info{Redeclaring math alphabet \string#1}%
339  \def\version@elt##1{%
340  \expandafter\SetMathAlphabet@\expandafter
341  ##1\csname#2/#3/#4/#5\expandafter\endcsname
342  \csname M@#2\expandafter\endcsname
343  \csname @\expandafter\@gobble\string#1\endcsname#1}%
344  \version@list
345  \else

Check if it is a math alphabet defined via \DeclareSymbolFontAlphabet.

346  \edef\reserved@a{\noexpand\in@{\string\use@mathgroup}%
347  {\expandafter\meaning\csname @\expandafter
348  \@gobble\string#1\endcsname}}%
349  \reserved@a
350  \ifin@

In that case overwriting is simple since there is nothing inserted in the math version macros.

351  \@font@info{Redeclaring math alphabet \string#1}%
352  \new@mathalphabet#1{#2}{#3}{#4}{#5}%

Otherwise panic.

353  \else
354  \@latex@error{Command `\string#1' already defined}\@eha
355  \fi
356  \fi
357 \fi
358 \else
359 \@latex@error{Encoding scheme  `#2' unknown}\@eha
360 \fi

361 }

362 \@onlypreamble\DeclareMathAlphabet
363 \def\new@mathalphabet#1#2#3#4#5{%
364  \toks@\expandafter{\alpha@list}%
365  \edef#1{\expandafter\noexpand\csname @\expandafter
366  \@gobble\string#1\endcsname
367  \if/#5/%
368  \noexpand\no@alphabet@error
369  \noexpand\no@alphabet@error
370  \else
371  \expandafter\noexpand\csname M@#2\endcsname
372  \expandafter\noexpand\csname#2/#3/#4/#5\endcsname
373  \fi

374 }%

375  \toks2\expandafter{#1}%
376  \edef\alpha@list{\the\toks@\noexpand\alpha@elt\the\toks2}%
377  \def\version@elt##1{\toks@\expandafter{##1}%
378  \edef##1{\the\toks@\install@mathalphabet
379  \expandafter\noexpand
380  \csname @\expandafter\@gobble
381  \string#1\endcsname
382  {\if/#5/%
383  \noexpand\no@alphabet@error
384  \noexpand#1%

385  \else
386  \noexpand\select@group\the\toks2
387  \fi}}%

388 }%

389  \version@list
390  \expandafter\edef\csname @\expandafter\@gobble
391  \string#1\endcsname{\if/#5/%
392  \noexpand\no@alphabet@error
393  \noexpand#1%
394  \else
395  \noexpand\select@group\the\toks2
396  \fi}%
397  \edef#1{\noexpand\protect
398  \expandafter\noexpand\csname @\expandafter
399  \@gobble\string#1\endcsname}%

400 }

401 \@onlypreamble\new@mathalphabet
402 \def\SetMathAlphabet#1#2#3#4#5#6{%
403 \@tempswafalse
404 \edef\reserved@b{#3}%
405 \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
406  \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
407 \cdp@list
408 \if@tempswa
409 \expandafter\SetMathAlphabet@
410  \csname mv@#2\expandafter\endcsname\csname#3/#4/#5/#6\expandafter
411  \endcsname \csname M@#3\expandafter\endcsname
412  \csname @\expandafter\@gobble\string#1\endcsname#1%
413 \else
414 \@latex@error{Encoding scheme  `#3' unknown}\@eha
415 \fi

416 }

417 \@onlypreamble\SetMathAlphabet
418 \def\SetMathAlphabet@#1#2#3#4#5{%
419 \expandafter\in@\expandafter#1\expandafter{\version@list}%
420 \ifin@
421  \expandafter\in@\expandafter#4\expandafter{\alpha@list}%
422  \ifin@
423  \begingroup
424  \toks@{}%
425  \def\getanddefine@fonts##1##2{%
426  \addto@hook\toks@{\getanddefine@fonts##1##2}%

427 }%

428  \def\reserved@c##1##2##3##4{%                % for message below
429  \expandafter\@gobble\string##4}%
430  \def\install@mathalphabet##1##2{%
431  \ifx##1#4%
432  \addto@hook\toks@
433  {\install@mathalphabet#4{\select@group#4#3#2}}%
434  \@font@info{Overwriting math alphabet
435  `\string#5' in version `\expandafter
436  \@gobblefour\string#1'\MessageBreak
437  \@spaces \reserved@c##2 -->

438  \expandafter\@gobble\string#2}%
439  \else
440  \addto@hook\toks@{\install@mathalphabet##1{##2}}%
441  \fi

442 }%

443  #1%
444  \xdef#1{\the\toks@}%
445  \endgroup
446  \else

If the math alphabet was defined via \DeclareSymbolFontAlphabet we have remove its external definition and add it as a normal math alphabet to every version before trying to change it in one version.

447  \edef\reserved@a{%
448  \noexpand\in@{\string\use@mathgroup}{\meaning#4}}%
449  \reserved@a
450  \ifin@
451  \def\reserved@b##1\use@mathgroup##2##3{%
452  \def\reserved@b{##3}\def\reserved@c{##2}}%
453  \expandafter\reserved@b#4%
454  \begingroup
455  \def\install@mathalphabet##1##2{%
456  \addto@hook\toks@{\install@mathalphabet##1{##2}}%

457 }%

458  \def\getanddefine@fonts##1##2{%
459  \addto@hook\toks@{\getanddefine@fonts##1##2}%
460  \ifnum##1=\reserved@b
461  \expandafter
462  \addto@hook\expandafter\toks@
463  \expandafter{\expandafter\install@mathalphabet
464  \expandafter#4\expandafter
465  {\expandafter\select@group\expandafter
466  #4\reserved@c##2}}%
467  \fi

468 }%

469  \def\version@elt##1{%
470  \toks@{}%
471  ##1%
472  \xdef##1{\the\toks@}%

473 }%

474  \version@list
475  \endgroup

Put it into the \alpha@list with default ‘error’

476  \expandafter\gdef\expandafter\alpha@list\expandafter
477  {\alpha@list
478  \alpha@elt #4\no@alphabet@error \no@alphabet@error}%
479  \gdef#4{\no@alphabet@error #5}% fake things :-)

Then call the internal setting routine again:

480  \SetMathAlphabet@{#1}{#2}{#3}#4#5%
481  \else
482  \@latex@error{Command `\string#5' not defined as a
483  math alphabet}%
484  {Use \noexpand\DeclareMathAlphabet to define it.}%

485  \fi
486  \fi
487 \else
488  \@latex@error{Math version `\expandafter\@gobblefour\string#1'
489  is not
490  defined}{You probably mispelled the name of the math
491  version.^^JOr you have to specify an additional package.}%
492 \fi

493 }

494 \@onlypreamble\SetMathAlphabet@

could do with more checks like allowing single number in #4 lowercase in #4 etc

495 \def\DeclareMathAccent#1#2#3#4{%
496 \expandafter\in@\csname sym#3\expandafter\endcsname
497  \expandafter{\group@list}%
498 \ifin@
499  \begingroup
500  \count\z@=#4\relax
501  \count\tw@\count\z@
502  \divide\count\z@\sixt@@n
503  \count@\count\z@
504  \multiply\count@\sixt@@n
505  \advance\count\tw@-\count@
506  \if\relax\noexpand#1% is command?
507  \edef\reserved@a{\noexpand\in@{\string\mathaccent}{\meaning#1}}%
508  \reserved@a
509  \ifin@
510  \expandafter\set@mathaccent
511  \csname sym#3\endcsname#1#2%
512  {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
513  \@font@info{Redeclaring math accent \string#1}%
514  \else
515  \expandafter\ifx
516  \csname\expandafter\@gobble\string#1\endcsname
517  \relax
518  \expandafter\set@mathaccent
519  \csname sym#3\endcsname#1#2%
520  {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
521  \else
522  \@latex@error{Command `\string#1' already defined}\@eha
523  \fi
524  \fi
525  \else
526  \@latex@error{Not a command name: `\noexpand#1'}\@eha
527  \fi
528  \endgroup
529 \else
530  \@latex@error{Symbol font `#3' is not defined}\@eha
531 \fi

532 }

533 \@onlypreamble\DeclareMathAccent
534 \def\set@mathaccent#1#2#3#4{%
535 \xdef#2{\mathaccent"\mathchar@type#3\hexnumber@#1#4\relax}}

536 \@onlypreamble\set@mathaccent
537 \def\DeclareMathSymbol#1#2#3#4{%
538 \expandafter\in@\csname sym#3\expandafter\endcsname
539  \expandafter{\group@list}%
540 \ifin@
541  \begingroup
542  \count\z@=#4\relax
543  \count\tw@\count\z@
544  \divide\count\z@\sixt@@n
545  \count@\count\z@
546  \multiply\count@\sixt@@n
547  \advance\count\tw@-\count@
548  \if\relax\noexpand#1% is command?
549  \edef\reserved@a{\noexpand\in@{\string\mathchar}{\meaning#1}}%
550  \reserved@a
551  \ifin@
552  \expandafter\set@mathsymbol
553  \csname sym#3\endcsname#1#2%
554  {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
555  \@font@info{Redeclaring math symbol \string#1}%
556  \else
557  \expandafter\ifx
558  \csname\expandafter\@gobble\string#1\endcsname
559  \relax
560  \expandafter\set@mathsymbol
561  \csname sym#3\endcsname#1#2%
562  {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
563  \else
564  \@latex@error{Command `\string#1' already defined}\@eha
565  \fi
566  \fi
567  \else
568  \expandafter\set@mathchar
569  \csname sym#3\endcsname#1#2
570  {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
571  \fi
572  \endgroup
573 \else
574  \@latex@error{Symbol font `#3' is not defined}\@eha
575 \fi

576 }

577 \@onlypreamble\DeclareMathSymbol
578 \def\set@mathchar#1#2#3#4{%
579 \global\mathcode`#2="\mathchar@type#3\hexnumber@#1#4\relax}
580 \@onlypreamble\set@mathchar
581 \def\set@mathsymbol#1#2#3#4{%
582 \global\mathchardef#2"\mathchar@type#3\hexnumber@#1#4\relax}
583 \@onlypreamble\set@mathsymbol
584 %\def\mathsymbol#1#2#3{%
585 %  \@tempcnta=#3\relax
586 %  \@tempcntb\@tempcnta
587 %  \divide\@tempcnta\sixt@@n
588 %  \count@\@tempcnta

589 %  \multiply\count@\sixt@@n
590 %  \advance\@tempcntb-\count@
591 %  \mathchar"\mathchar@type#1\hexnumber@#2%
592 %             \hexnumber@\@tempcnta\hexnumber@\@tempcntb\relax}

593 594

595 %

596 %\def\DeclareMathAlphabetCharacter#1#2#3{%
597 %  \DeclareMathSymbol{#1}7{#2}{#3}}
598 \def\DeclareMathDelimiter#1{%
599 \if\relax\noexpand#1%
600  \expandafter\@DeclareMathDelimiter
601 \else
602  \expandafter\@xDeclareMathDelimiter
603 \fi
604 #1}
605 \@onlypreamble\DeclareMathDelimiter
606 \def\@DeclareMathDelimiter#1#2#3#4#5#6{%
607 \expandafter\in@\csname sym#3\expandafter\endcsname
608  \expandafter{\group@list}%
609 \ifin@
610  \expandafter\in@\csname sym#5\expandafter\endcsname
611  \expandafter{\group@list}%
612  \ifin@
613  \begingroup
614  \count\z@=#4\relax
615  \count\tw@\count\z@
616  \divide\count\z@\sixt@@n
617  \count@\count\z@
618  \multiply\count@\sixt@@n
619  \advance\count\tw@-\count@
620  \edef\reserved@c{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%

621 %

622  \count\z@=#6\relax
623  \count\tw@\count\z@
624  \divide\count\z@\sixt@@n
625  \count@\count\z@
626  \multiply\count@\sixt@@n
627  \advance\count\tw@-\count@
628  \edef\reserved@d{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%

629 %

630  \edef\reserved@a{\noexpand\in@{\string\delimiter}{\meaning#1}}%
631  \reserved@a
632  \ifin@
633  \expandafter\set@mathdelimiter
634  \csname sym#3\expandafter\endcsname
635  \csname sym#5\endcsname#1#2%
636  \reserved@c\reserved@d
637  \@font@info{Redeclaring math delimiter \string#1}%
638  \else
639  \expandafter\ifx
640  \csname\expandafter\@gobble\string#1\endcsname
641  \relax

642  \expandafter\set@mathdelimiter
643  \csname sym#3\expandafter\endcsname
644  \csname sym#5\endcsname#1#2%
645  \reserved@c\reserved@d
646  \else
647  \@latex@error{Command `\string#1' already defined}\@eha
648  \fi
649  \fi
650  \endgroup
651  \else
652  \@latex@error{Symbol font `#5' is not defined}\@eha
653  \fi
654 \else
655  \@latex@error{Symbol font `#3' is not defined}\@eha
656 \fi

657 }

658 \@onlypreamble\@DeclareMathDelimiter
659 \def\@xDeclareMathDelimiter#1#2#3#4#5{%
660 \expandafter\in@\csname sym#2\expandafter\endcsname
661  \expandafter{\group@list}%
662 \ifin@
663  \expandafter\in@\csname sym#4\expandafter\endcsname
664  \expandafter{\group@list}%
665  \ifin@
666  \begingroup
667  \count\z@=#3\relax
668  \count\tw@\count\z@
669  \divide\count\z@\sixt@@n
670  \count@\count\z@
671  \multiply\count@\sixt@@n
672  \advance\count\tw@-\count@
673  \edef\reserved@c{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%

674 %

675  \count\z@=#5\relax
676  \count\tw@\count\z@
677  \divide\count\z@\sixt@@n
678  \count@\count\z@
679  \multiply\count@\sixt@@n
680  \advance\count\tw@-\count@
681  \edef\reserved@d{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
682  \expandafter\set@@mathdelimiter
683  \csname sym#2\expandafter\endcsname\csname sym#4\endcsname#1%
684  \reserved@c\reserved@d
685  \endgroup
686  \else
687  \@latex@error{Symbol font `#4' is not defined}\@eha
688  \fi
689 \else
690  \@latex@error{Symbol font `#2' is not defined}\@eha
691 \fi

692 }

693 \@onlypreamble\@xDeclareMathDelimiter

We have to end the definition of a math delimiter like \lfloor with a space and not with \relax as we did before, because otherwise contructs involving \abovewithdelims will prematurely end (pr/1329)

694 \def\set@mathdelimiter#1#2#3#4#5#6{%
695 \xdef#3{\delimiter"\mathchar@type#4\hexnumber@#1#5%
696  \hexnumber@#2#6 }}
697 \@onlypreamble\set@mathdelimiter
698 \def\set@@mathdelimiter#1#2#3#4#5{%
699 \global\delcode`#3="\hexnumber@#1#4\hexnumber@#2#5\relax}
700 \@onlypreamble\set@@mathdelimiter
701 \def\DeclareMathRadical#1#2#3#4#5{%

Below is a crude fix to make this macro work if #1 is undefined or \relax. Should be improved!

702 \expandafter\ifx
703  \csname\expandafter\@gobble\string#1\endcsname
704  \relax
705  \let#1\radical
706 \fi
707 \edef\reserved@a{\noexpand\in@{\string\radical}{\meaning#1}}%
708 \reserved@a
709 \ifin@
710  \expandafter\in@\csname sym#2\expandafter\endcsname
711  \expandafter{\group@list}%
712  \ifin@
713  \expandafter\in@\csname sym#4\expandafter\endcsname
714  \expandafter{\group@list}%
715  \ifin@
716  \begingroup
717  \count\z@=#3\relax
718  \count\tw@\count\z@
719  \divide\count\z@\sixt@@n
720  \count@\count\z@
721  \multiply\count@\sixt@@n
722  \advance\count\tw@-\count@
723  \edef\reserved@c{%
724  \hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
725  \count\z@=#5\relax
726  \count\tw@\count\z@
727  \divide\count\z@\sixt@@n
728  \count@\count\z@
729  \multiply\count@\sixt@@n
730  \advance\count\tw@-\count@
731  \edef\reserved@d{%
732  \hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%

Coded inline instead of using \set@mathradical

733 %          \expandafter\set@mathradical
734 %             \csname sym#2\expandafter\endcsname
735 %             \csname sym#4\endcsname#1%
736 %             \reserved@c\reserved@d
737  \xdef#1{\radical"\expandafter\hexnumber@
738  \csname sym#2\endcsname\reserved@c

739  \expandafter\hexnumber@
740  \csname sym#4\endcsname\reserved@d
741  \relax}%
742  \endgroup
743  \else
744  \@latex@error{Symbol font `#4' is not defined}\@eha
745  \fi
746  \else
747  \@latex@error{Symbol font `#2' is not defined}\@eha
748  \fi
749 \else
750  \@latex@error{Command `\string#1' already defined}\@eha
751 \fi

752 }

753 \@onlypreamble\DeclareMathRadical

Definition below was wrong it contained \delimiter !

 \def\set@mathradical#1#2#3#4#5{%
   \xdef#3{\radical"\hexnumber@#1#4\hexnumber@#2#5\relax}}
754 \let\mathalpha\relax % just a dummy currently
755 \def\mathchar@type#1{%
756 \ifodd 2#11 #1\else             % is this non-negative number?
757  \ifx#1\mathord 0\else
758  \ifx#1\mathop   1\else
759  \ifx#1\mathbin 2\else
760  \ifx#1\mathrel 3\else
761  \ifx#1\mathopen 4\else
762  \ifx#1\mathclose 5\else
763  \ifx#1\mathpunct 6\else
764  7%             % anything else is variable ord
765  \fi
766  \fi
767  \fi
768  \fi
769  \fi
770  \fi
771  \fi
772 \fi}
773 \@onlypreamble\mathchar@type
774 \def\DeclareSymbolFontAlphabet#1#2{%
775 \expandafter\DeclareSymbolFontAlphabet@
776  \csname @\expandafter\@gobble\string#1\endcsname{#2}#1}
777 \@onlypreamble\DeclareSymbolFontAlphabet
778 \def\DeclareSymbolFontAlphabet@#1#2#3{%

We use the switch \if@tempswa to decide if we can declare this symbol font alphabet.

779  \@tempswatrue

First check if #2 is known to be a symbol font

780 \expandafter\in@\csname sym#2\expandafter\endcsname
781  \expandafter{\group@list}%
782 \ifin@

Check if #1 is defined as a math alphabet defined via \DeclareMathAlphabet:

783  \expandafter\in@\expandafter#1\expandafter{\alpha@list}%
784  \ifin@

If so remove it from the \alpha@list and from all math version macros.

785  \@font@info{Redeclaring math alphabet \string#3}%
786  \toks@{}%
787  \def\alpha@elt##1##2##3{%
788  \ifx##1#1\else\addto@hook\toks@{\alpha@elt##1##2##3}\fi}%
789  \alpha@list
790  \xdef\alpha@list{\the\toks@}%

Now we loop over all versions and remove the math alphabet:

791  \def\version@elt##1{%
792  \begingroup
793  \toks@{}%
794  \def\getanddefine@fonts####1####2{%
795  \addto@hook\toks@{\getanddefine@fonts####1####2}}%
796  \def\install@mathalphabet####1####2{%
797  \ifx####1#1\else
798  \addto@hook\toks@{\install@mathalphabet
799  ####1{####2}}\fi}%
800  ##1%
801  \xdef##1{\the\toks@}%
802  \endgroup

803 }%

804  \version@list
805  \else

If #3 is not defined as a math alphabet check if it is defined at all:

806  \expandafter\ifx
807  \csname\expandafter\@gobble\string#1\endcsname
808  \relax

If it is undefined, fine otherwise check if it is a math alphabet defined via

 \DeclareSymbolFontAlphabet:
809  \else
810  \edef\reserved@a{%
811  \noexpand\in@{\string\use@mathgroup}{\meaning#1}}%
812  \reserved@a
813  \ifin@
814  \@font@info{Redeclaring math alphabet \string#3}%
815  \else

Since the command #3 is defined to be something which is not a math alphabet we have to skip redefining it.

816  \@tempswafalse
817  \@latex@error{Command `\string#3' already defined}\@eha
818  \fi
819  \fi
820  \fi
821 \else

Since the symbol font is not known we better skip defining this alphabet.

822  \@tempswafalse
823  \@latex@error{Unknown symbol font `#2'}\@eha

824 \fi
825 \if@tempswa

When we reach this point we are allowed to define #1 to be a symbol font math alphabet. This means that we have to set it to

\use@mathgroup ⟨math-settings⟩ \sym⟨name⟩

The ⟨math-settings⟩ are the one for the encoding that is used in the font shape where \sym⟨name⟩ is pointing to. This means that we have to get it from the information stored in \group@list. Thus we loop through that list after defining \group@elt in a suitable way.

826  \def\group@elt##1##2{%
827  \expandafter\ifx\csname sym#2\endcsname##1%
828  \expandafter\reserved@a\string##2\@nil
829  \fi}%
830  \def\reserved@a##1##2/##3\@nil{%
831  \def\reserved@a{##2}}%
832  \group@list
833  \toks@{\relax\ifmmode \else \non@alpherr#1\fi}%
834  \edef#1{\the\toks@
835  \noexpand\use@mathgroup
836  \expandafter\noexpand\csname M@\reserved@a\endcsname
837  \csname sym#2\endcsname}%
838  \def#3{\protect#1}%
839 \fi

840 }

841 \@onlypreamble\DeclareSymbolFontAlphabet@

842 ⟨/2ekernel | autoload⟩

File q

ltfssini.dtx

This file contains the top level L^{A}TEX interface to the font selection scheme commands. See other parts of the L^{A}TEX distribution, or The L^{A}TEX Companion for higher level documentation of these commands.

33 NFSS Initialisation

Finally, there are six commands that are to be used in L^{A}TEX and that we will therefore protect against expansion at the wrong point: \fontfamily, \fontseries,

\fontshape, \fontsize, \selectfont, and \mathversion.

33.1 Providing math versions

L^{A}TEX provides two versions. We call them normal and bold, respectively.

 1 \DeclareMathVersion{normal}
 2 \DeclareMathVersion{bold}

Now we define the standard font change commands. We don’t allow the use of \rmfamily etc. in math mode.

First the changes to another family:

 3 \DeclareRobustCommand\rmfamily
 4  {\not@math@alphabet\rmfamily\mathrm
 5  \fontfamily\rmdefault\selectfont}
 6 \DeclareRobustCommand\sffamily
 7  {\not@math@alphabet\sffamily\mathsf
 8  \fontfamily\sfdefault\selectfont}
 9 \DeclareRobustCommand\ttfamily
10  {\not@math@alphabet\ttfamily\mathtt
11  \fontfamily\ttdefault\selectfont}

Then the commands changing the series:

12 \DeclareRobustCommand\bfseries
13  {\not@math@alphabet\bfseries\mathbf
14  \fontseries\bfdefault\selectfont}
15 \DeclareRobustCommand\mdseries
16  {\not@math@alphabet\mdseries\relax
17  \fontseries\mddefault\selectfont}
18 \DeclareRobustCommand\upshape
19  {\not@math@alphabet\upshape\relax
20  \fontshape\updefault\selectfont}

Then the commands changing the shape:

21 \DeclareRobustCommand\slshape
22  {\not@math@alphabet\slshape\relax
23  \fontshape\sldefault\selectfont}
24 \DeclareRobustCommand\scshape
25  {\not@math@alphabet\scshape\relax
26  \fontshape\scdefault\selectfont}
27 \DeclareRobustCommand\itshape
28  {\not@math@alphabet\itshape\mathit

File q: ltfssini.dtx Date: 1995/11/01 Version v3.0g 165

29  \fontshape\itdefault\selectfont}

We also have to define the emphasize font change command (i.e. \em). This command will look is the current font is sloped (i.e. has a positive \fontdimen1) and will then select either \upshape or \itshape.

30 \DeclareRobustCommand\em
31  {\@nomath\em \ifdim \fontdimen\@ne\font >\z@
32  \upshape \else \itshape \fi}

\not@math@alphabet This function generates an error message when it is called in math mode. The same function should be defined in newlfont.sty.

33 \def\not@math@alphabet#1#2{%
34 \relax
35 \ifmmode
36  \@latex@error{Command \noexpand#1invalid in math mode}%
37  {%
38  Please
39  \ifx#2\relax
40  define a new math alphabet^^J%
41  if you want to use a special font in math mode%
42  \else

We have to a \noexpand below to prevent expansion of #2. In case of #1 we can omit this (due to the current definition of robust commands since they do come out right there :-).

43  use the math alphabet \noexpand#2instead of
44  the #1command%
45  \fi

46 .

47  }%
48 \fi}

Finally we provide two abbreviations to switch to the L^{A}TEX versions.

49 \def\boldmath{\@nomath\boldmath
50  \mathversion{bold}}
51 \def\unboldmath{\@nomath\unboldmath
52  \mathversion{normal}}

Here we switch to the default math version by defining the internal macro \math@version. We dare not to call \mathversion at this place because this

would call \glb@settings.
53 \def\math@version{normal}

33.2 Miscellaneous

\newfont \symbol We start by defining a few macros that are part of standard L^{A}TEX’s user interface. The use of these functions is not encouraged, but they will allow to process older documents without changes to the source.

54 \def\newfont#1#2{\@ifdefinable#1{\font#1=#2\relax}}
55 \def\symbol#1{\char #1\relax}

\@setfontsize \@setsize This abbreviation is used by L^{A}TEX’s user level size changing commands, such as

\large.
56 \def\@setfontsize#1#2#3{\@nomath#1%

For the benefit of people relying on keeping the name of the current font command saved in \@currsize we define it. To ensure that \@setfontsize keeps being robust we omit this assignment during times where \protect differs from

\@typeset@protect.
57  \ifx\protect\@typeset@protect
58  \let\@currsize#1%
59  \fi
60  \fontsize{#2}{#3}\selectfont}

For compatibility we also define \@setsize the 209 command

61 ⟨∗compat⟩

62 \def\@setsize#1#2#3#4{\@setfontsize#1{#4}{#2}}

63 ⟨/compat⟩

\oldstylenums This macro implements old style numerals but only works if we assume that the standard math fonts are used. Thus it needs changing in case other math encodings are used.

64 \def\oldstylenums#1{%
65 \begingroup

Provide spacing using the interword space of the current font.

66  \spaceskip\fontdimen\tw@\font

Then switch to the math italic font. We don’t change the current value of \f@series which means that you can use bold numerals if \bfseries is in force (For this there must be a substitution of OML/cmm/bx/it into OML/cmm/b/it in the corresponding .fd files.

67  \usefont{OML}{cmm}{\f@series}{it}%
68  \mathgroup\symletters #1%
69 \endgroup

70 }

\hexnumber@ To set up L^{A}TEX’s special math character definitions we first provide a macro to generate hexadecimal numbers. It is a rather simple \ifcase.

71 \def\hexnumber@#1{\ifcase\number#1
72 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or
73 9\or A\or B\or C\or D\or E\or F\fi}

\nfss@text In it simplest form \nfss@text is an \mbox. This will produce unbreakable text outside math and inside math you will get text with the same fonts as outside. The only drawback is that such item won’t change sizes in subscripts. But this behavior can be easily changed. With the amstex style option one will get a sub style called amstext which will redefine the \nfss@text macro to produce correct text in all sizes.

We have to use \def instead of the shorter \let since \mbox is undefined when we reach this point.

74 \def\nfss@text#1{{\mbox{#1}}}

\copyright The definition of \copyright was changed so that it works in other type styles, and to make it robust. We leave the family untouched so that the copyright notice will come out differently if a different font family is in use. This command is commented out, since it is now defined in ltoutenc.dtx.

75 %\DeclareRobustCommand\copyright

76 %    {{\ooalign{\hfil
77 %     \raise.07ex\hbox{\mdseries\upshape c}\hfil\crcr
78 %     \mathhexbox20D}}}

\normalfont \reset@font \p@reset@font The macro \reset@font is used in L^{A}TEX to switch to a standard font, in order to initialize the current font in situations where typesetting is done in a new visual context (e.g. in a footnote). We define it here to allow the test for the new L^{A}TEX version above but nevertheless are able to run all kind of mixtures.

The user interface name for \reset@font is \normalfont:

79 \DeclareRobustCommand\normalfont
80  {\usefont\encodingdefault
81  \familydefault
82  \seriesdefault
83  \shapedefault
84  \relax}
85 \let\reset@font\normalfont

We left out the special L^{A}TEX fonts which are not automatically included in the base version of the font selection since these fonts contain only a few characters which are also included in the AMS fonts so anybody who is using these fonts doesn’t need them. But for compatibility reasons we will define these symbols.

86 \def\not@base#1{\@latex@error
87 {Command \noexpand#1not provided in base LaTeX2e}%
88 {Load the latexsym or the amsfonts package to
89 define this symbol}}
90 \def\mho{\not@base\mho}
91 \def\Join{\not@base\Join}
92 \def\Box{\not@base\Box}
93 \def\Diamond{\not@base\Diamond}
94 \def\leadsto{\not@base\leadsto}
95 \def\sqsubset{\not@base\sqsubset}
96 \def\sqsupset{\not@base\sqsupset}
97 \def\lhd{\not@base\lhd}
98 \def\unlhd{\not@base\unlhd}
99 \def\rhd{\not@base\rhd}
100 \def\unrhd{\not@base\unrhd}

We now initialize all variables set by \DeclareErrorFont. These values are not really important since they will be overwritten later on by the definition in

fontdef.ltx.

However, if fontdef.cfg is corrupted then at least a hopefully suitable error font is present.

101 \DeclareErrorFont{OT1}{cmr}{m}{n}{10}  %%% don't modify this setting
102  %%% overwrite it in fontdef.cfg
103  %%% if necessary

We now load the customizable parts of NFSS.

104 \ifnum\inputlineno=\m@ne

Still using TEX2. need a configuration file to avoid setting the 8bit characters.

105 \InputIfFileExists{fonttext.cfg}
106  {\typeout{*************************************^^J%
107  *^^J%

108  * Local config file fonttext.cfg used^^J%
109  *^^J%
110  *************************************}%
111  \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%

112 }

113  {\typeout{*************************************^^J%
114  *^^J%
115  * You MUST use a fonttext.cfg file!^^J%
116  * As you are still using TeX2!!!!!^^J%
117  *^^J%
118  * See the documentation file tex2.txt^^J%
119  *^^J%
120  *************************************}%
121  \batchmode \@@end}
122 \else

With TEX3 can use the standard ltx file if no configuration file exists.

123 \InputIfFileExists{fonttext.cfg}
124  {\typeout{*************************************^^J%
125  *^^J%
126  * Local config file fonttext.cfg used^^J%
127  *^^J%
128  *************************************}%
129  \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%

130 }

131  {\input{fonttext.ltx}}
132 \fi
133 \let\@addtofilelist\@gobble

Ditto for math although I don’t that we will get a lot of customisation :-)

134 \InputIfFileExists{fontmath.cfg}
135  {\typeout{*************************************^^J%
136  *^^J%
137  * Local config file fontmath.cfg used^^J%
138  *^^J%
139  *************************************}%
140  \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%

141 }

142  {\input{fontmath.ltx}}
143 \let\@addtofilelist\@gobble

Then we preload several fonts. This file might be customized without changing the behavior of the format (i.e. necessary font definitions will be loaded at runtime if they are not preloaded). This is done in the file preload.ltx.

144 \InputIfFileExists{preload.cfg}
145  {\typeout{*************************************^^J%
146  *^^J%
147  * Local config file preload.cfg used^^J%
148  *^^J%
149  *************************************}%
150  \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%

151 }

152  {\input{preload.ltx}}
153 \let\@addtofilelist\@gobble

File q: ltfssini.dtx Date: 1995/11/01 Version v3.0g 169 \@acci \@accii \@acciii We also save the values of some accents in \@acci, \@accii and \@acciii so they

can be restored by a minipage inside a tabbing environment.

         154 \let\@acci\' \let\@accii\` \let\@acciii\=

{\cal \atop \mit} Here were the two old ⟨alphabet identifiers⟩.

File r

fontdef.dtx

34 Introduction

This file is used to generate the files fonttext.ltx (text font declarations) and fontmath.ltx (math font declarations), which are used during the format generation. It contains the declaration of the standard text encodings used at the site as well as a minimal subset of font shape groups that NFSS will look at to ensure that the specified encodings are valid.

The math part contains the setup for math encodings as well as the default math symbol declarations that belong to the encoding.

It is possible to change this setup (by using other fonts, or defaults) without losing the ability to process documents written at other sites. Portability in this sense means that a document will compile without errors. It does not mean, however, that identical output will be produced. For this it is necessary that the distributed setup is used at both installations.

35 Customization

You are not allowed to change this source file! If you want to change the default encodings and/or the font shape groups preloaded you should should create a copy of fonttext.ltx under the name fonttext.cfg and change this copy. If L^{A}TEX 2ε finds a file of this name it will use it, otherwise it uses the standard file which is

fontdef.ltx.

If you don’t plan to use Computer Modern much or at all, it might (!) be a good idea to make your own fonttext.cfg. Look at the comments below (docstrip module ‘text’) to see what should should go into such a file.

To change the math font setup use a copy of fontmath.ltx under the name fontmath.cfg and change this copy. However, dealing with this interface is even more a job for an expert than changing the text font setup — in short, we don’t encourage either.

Warning: please note that we don’t support customised L^{A}TEX versions. Thus, before sending in a bug report please try your test file with a L^{A}TEX format which is not customised and send in the log from that version (unless the problem goes away).

Please note: the following standard encodings have to be defined in all local variants of font....cfg to guarantee that all L^{A}TEX installations behave in the same way.

T1 Cork TEX text encoding
OT1 old TEX text encoding
U  unknown encoding
OML old TEX math letters encoding
OMS old TEX math symbols encoding
OMX old TEX math extension symbols encoding

Notice that some of these encodings are ‘old’ in the sense that we hope that they will be superseded soon by encoding standards defined by the TEX user community. Therefore this set of default encodings may change in the future.

The first candidate is OT1 which will soon be replaced by T1, the official TEX text encoding.

Warning: If you add additional encodings to this file there is no guarantee any longer that files processable at your installation will also be processable at other installations. Thus, if you make use of such an encoding in your document, e.g. if you intend to typeset in Cyrillic (OT2 encoding), you need to specify this encoding in the preamble of your document prior to sending it to another installation. Once the encoding is specified in that place in your document, the document is processable at all L^{A}TEX installations (provided they have suitable fonts installed).

For this reason we suggest that you define a short package file that sets up an additional encoding used at your site (rather than putting the encoding into this file) since this package can easily be shipped with your document.

36 The docstrip modules

The following modules are used to direct docstrip in generating external files:

driver produce a documentation driver file
text  produce the file fonttext.ltx
math produce the file fonttext.ltx

A typical docstrip command file would then have entries like:

\generateFile{fonttext.ltx}{t}{\from{fontdef.dtx}{text}}

37 A driver for this document

The next bit of code contains the documentation driver file for TEX, i.e. the file that will produce the documentation you are currently reading. It will be extracted from this file by the docstrip program.

1 ⟨∗driver⟩

2 \documentclass{ltxdoc}
3 \GetFileInfo{fontdef.dtx}
4 \begin{document}
5 \DocInput{fontdef.dtx}
6 \end{document}

7 ⟨/driver⟩

38 The fonttext.ltx file

The identification is done earlier on with a \ProvidesFile declaration.

8 ⟨∗text⟩

9 \typeout{*** Don't modify this file, use a .cfg file instead ***}

38.1 Encodings

This file declares the standard encodings for text and math fonts. All others should be declared in packages or in the documents directly.

For every text encoding there are normally a number of encoding specific commands, e.g. accents, special characters, etc. (The definition for such a command might have to change when the encoding is changed, because the character is in a different position, or not available at all, or the accent is produced in a different way.) This is handled by a general mechanism which is described in ltoutenc.dtx.

By convention, text encoding specific declarations, including the declaration \DeclareFontEncoding, are kept in separate file of the form ⟨enc⟩enc.def, e.g. OT1enc.def. This allows other applications to make use of the declarations as well. Similar to the default encoding, the loading of the encoding files for the two major text encodings shouldn’t be changed.

10 \input {OMLenc.def}
11 \input  {T1enc.def}
12 \input {OT1enc.def}       % <- should come after T1 for speed
13 \input {OMSenc.def}

We then set set the default text font encoding. This will hopefully change some day to T1. This setting should not be changed to produce a portable format.

14 \fontencoding{OT1}

If different encodings for text fonts are in use one could put the common setup into \DeclareFontEncodingDefaults. There is now a better mechanism so using this interface is discouraged!

15 \DeclareFontEncodingDefaults{}{}

Then we define the default substitution for every encoding. This release of L^{A}TEX 2ε assumes that the DC fonts are available. It is possible to change this to point to some other font family (e.g., Times with the appropriate encoding if it is available) without making documents non-portable. However, in such a case documents will produce different page breaks at other sites. The substitution defaults can all be changed without losing portability as long as there are font shape definitions for the selected substitutions.

16 \DeclareFontSubstitution{T1}{cmr}{m}{n}
17 \DeclareFontSubstitution{OT1}{cmr}{m}{n}

For every encoding declaration, L^{A}TEX 2ε will try to verify that the given substitution information makes sense, i.e. that it is impossible to go into an endless loop if font substitution happens. This is done at the moment the \begin{document} is encountered. L^{A}TEX 2ε will then check that for every encoding the substitution defaults form a valid font shape group, which means that it will check if there is a \DeclareFontShape declaration for this combination. We will therefore load the corresponding .fd files now. If we don’t do this they would be loaded at verification time (i.e. at \begin{document} which would delay processing unnecessarily.

Warning: Please note that this means that you have to regenerate the format whenever you change any of these .fd files since L^{A}TEX 2ε will not read .fd files if it already knows about the encoding/family combination.

The \nfss@catcodes ensures that white space is ignored in any definitions made in the fd files.

18 \begingroup
19 \nfss@catcodes
20 \input  {T1cmr.fd}
21 \input  {OT1cmr.fd}
22 \endgroup

We also load some other font definition files which are normally needed in a document. This is only done for processing speed and you can comment the next two lines out to save some memory. If necessary these files are then loaded when your document is processed. (Loading .fd files is a less drastic step compared to preloading fonts because the number of fonts is limited 255 at (nearly) every TEX installation, while the amount of main memory is not a limiting factor at most installations.)

23 \begingroup
24 \nfss@catcodes
25 \input {OT1cmss.fd}
26 \input {OT1cmtt.fd}
27 \endgroup

Even with all the precautions it is still possible that NFSS will run into problems, for example, when a .fd file contains corrupted data. To guard against such cases NFSS has a very low-level fallback font that is installed with the following line.

28 \DeclareErrorFont{OT1}{cmr}{m}{n}{10}

This means, “if everything else fails use Computer Modern Roman normal shape at 10pt in the old text encoding”. You can change the font used but the encoding should be the same as the one specified with \fontencoding above.

38.2 Defaults

To allow the use of \rmfamily, \sffamily, etc. in documents even if non-standard families are used we provide nine macros which hold the name of the corresponding families, series, and so on. This makes it easy to use other font families (like Times Roman, etc.). One simply has to redefine these defaults.

All these hooks have to be defined in this file but you can change their meaning (except for \encodingdefault) without making documents non-portable.

\rmdefault \sfdefault \ttdefault The following three definitions set up the meaning for \rmfamily, \sffamily, and

\ttfamily.
29 \newcommand\rmdefault{cmr}
30 \newcommand\sfdefault{cmss}
31 \newcommand\ttdefault{cmtt}

\bfdefault \mddefault Series changing commands are influenced by the following hooks.

32 \newcommand\bfdefault{bx}
33 \newcommand\mddefault{m}

\itdefault \sldefault \scdefault \updefault Shape changing commands use the following hooks.

34 \newcommand\itdefault{it}
35 \newcommand\sldefault{sl}

36 \newcommand\scdefault{sc}
37 \newcommand\updefault{n}
\encodingdefault \familydefault \seriesdefault \shapedefault Finally we have the hooks that describe the behaviour of the\normalfont com-

mand. To stay portable, the definition of \encodingdefault should not be changed and should match the setting above for \fontencoding. All other values can be set according to your taste.

38 \newcommand\encodingdefault{OT1}
39 \newcommand\familydefault{\rmdefault}
40 \newcommand\seriesdefault{\mddefault}
41 \newcommand\shapedefault{\updefault}

This finishes the low-level setup in fonttext.ltx.

42 ⟨/text⟩

39 The fontmath.ltx file

The identification is done earlier on with a \ProvidesFile declaration.

43 ⟨∗math⟩

44 \typeout{*** Don't modify this file, use a .cfg file instead ***}

39.1 The font encodings used

45 \DeclareFontEncoding{OML}{}{}
46 \DeclareFontEncoding{OMS}{}{}
47 \DeclareFontEncoding{OMX}{}{}

Finally a declaration for U encoding which serves for all fonts that do not fit standard encodings. For math this sets up \noaccents@ providing for AMS-L^{A}TEX. This macro is used therein to handle accented characters if they are not supported by the font. In other words, if fonts with U encoding are used in math, all accents (like from \breve) are obtained from some other font that has them.

48 \DeclareFontEncoding{U}{}{\noaccents@}

The encodings for math are next:

49 \DeclareFontSubstitution{OML}{cmm}{m}{it}
50 \DeclareFontSubstitution{OMS}{cmsy}{m}{n}
51 \DeclareFontSubstitution{OMX}{cmex}{m}{n}
52 \DeclareFontSubstitution{U}{cmr}{m}{n}
53 \begingroup
54 \nfss@catcodes
55 \input  {OMLcmm.fd}
56 \input  {OMScmsy.fd}
57 \input  {OMXcmex.fd}
58 \input  {Ucmr.fd}
59 \endgroup

39.1.1 Symbolfont and Alphabet declarations

We now define the basic symbol fonts used by L^{A}TEX. These four symbol fonts must be defined by this file.

It is possible to make the symbol fonts point to other external fonts without losing the ability to process documents written at other sites, as long as one defines the same symbol font names with the same encodings, e.g. operators with OT1 etc. If other encodings are used documents become non-portable. Such a change should therefore be done in a package file.

60 \DeclareSymbolFont{operators}   {OT1}{cmr} {m}{n}
61 \DeclareSymbolFont{letters}     {OML}{cmm} {m}{it}
62 \DeclareSymbolFont{symbols}     {OMS}{cmsy}{m}{n}
63 \DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}

64

65 \SetSymbolFont{operators}{bold}{OT1}{cmr} {bx}{n}
66 \SetSymbolFont{letters}  {bold}{OML}{cmm} {b}{it}
67 \SetSymbolFont{symbols}  {bold}{OMS}{cmsy}{b}{n}

Below are the seven math alphabets which are defined by NFSS. Again they must be defined by this file. However, as before you can change the fonts used without losing portability, but you should be careful when changing the encoding since that may make documents come out wrong.

68 \DeclareSymbolFontAlphabet{\mathrm}    {operators}
69 \DeclareSymbolFontAlphabet{\mathnormal}{letters}
70 \DeclareSymbolFontAlphabet{\mathcal}   {symbols}
71 \DeclareMathAlphabet      {\mathbf}{OT1}{cmr}{bx}{n}
72 \DeclareMathAlphabet      {\mathsf}{OT1}{cmss}{m}{n}
73 \DeclareMathAlphabet      {\mathit}{OT1}{cmr}{m}{it}
74 \DeclareMathAlphabet      {\mathtt}{OT1}{cmtt}{m}{n}

Given the currently available fonts we cannot bold-en \mathbf and \mathtt but in principle one could use ‘ultra bold’ or something. The alphabets defined via \DeclareSymbolFontAlphabet will change automatically in a new math version if the corresponding symbol font changes.

75 \SetMathAlphabet\mathsf{bold}{OT1}{cmss}{bx}{n}
76 \SetMathAlphabet\mathit{bold}{OT1}{cmr}{bx}{it}

39.2 Math font sizes

The declarations below declare the text, script and scriptscript size to be used for each text font size.

All occurences of sizes longer than a single character are replaced with the macro name that holds them, saving a number of tokens (but losing a bit of speed, so this may not stay this way).

77 \DeclareMathSizes{5}{5}{5}{5}
78 \DeclareMathSizes{6}{6}{5}{5}
79 \DeclareMathSizes{7}{7}{5}{5}
80 \DeclareMathSizes{8}{8}{6}{5}
81 \DeclareMathSizes{9}{9}{6}{5}
82 \DeclareMathSizes{\@xpt}{\@xpt}{7}{5}
83 \DeclareMathSizes{\@xipt}{\@xipt}{8}{6}
84 \DeclareMathSizes{\@xiipt}{\@xiipt}{8}{6}
85 \DeclareMathSizes{\@xivpt}{\@xivpt}{\@xpt}{7}
86 \DeclareMathSizes{\@xviipt}{\@xviipt}{\@xiipt}{\@xpt}
87 \DeclareMathSizes{\@xxpt}{\@xxpt}{\@xivpt}{\@xiipt}
88 \DeclareMathSizes{\@xxvpt}{\@xxvpt}{\@xxpt}{\@xviipt}

39.3 The math symbol assignments

We start by setting up math codes for most of the characters typed in directly from the keyboard. Most of them are normally already setup up in the same way by IniTEX. However, we repeat them here to have a complete setup which can be exchanged with another if desired.

39.3.1 The letters

 89 \DeclareMathSymbol{a}{\mathalpha}{letters}{`a}
 90 \DeclareMathSymbol{b}{\mathalpha}{letters}{`b}
 91 \DeclareMathSymbol{c}{\mathalpha}{letters}{`c}
 92 \DeclareMathSymbol{d}{\mathalpha}{letters}{`d}
 93 \DeclareMathSymbol{e}{\mathalpha}{letters}{`e}
 94 \DeclareMathSymbol{f}{\mathalpha}{letters}{`f}
 95 \DeclareMathSymbol{g}{\mathalpha}{letters}{`g}
 96 \DeclareMathSymbol{h}{\mathalpha}{letters}{`h}
 97 \DeclareMathSymbol{i}{\mathalpha}{letters}{`i}
 98 \DeclareMathSymbol{j}{\mathalpha}{letters}{`j}
 99 \DeclareMathSymbol{k}{\mathalpha}{letters}{`k}
100 \DeclareMathSymbol{l}{\mathalpha}{letters}{`l}
101 \DeclareMathSymbol{m}{\mathalpha}{letters}{`m}
102 \DeclareMathSymbol{n}{\mathalpha}{letters}{`n}
103 \DeclareMathSymbol{o}{\mathalpha}{letters}{`o}
104 \DeclareMathSymbol{p}{\mathalpha}{letters}{`p}
105 \DeclareMathSymbol{q}{\mathalpha}{letters}{`q}
106 \DeclareMathSymbol{r}{\mathalpha}{letters}{`r}
107 \DeclareMathSymbol{s}{\mathalpha}{letters}{`s}
108 \DeclareMathSymbol{t}{\mathalpha}{letters}{`t}
109 \DeclareMathSymbol{u}{\mathalpha}{letters}{`u}
110 \DeclareMathSymbol{v}{\mathalpha}{letters}{`v}
111 \DeclareMathSymbol{w}{\mathalpha}{letters}{`w}
112 \DeclareMathSymbol{x}{\mathalpha}{letters}{`x}
113 \DeclareMathSymbol{y}{\mathalpha}{letters}{`y}
114 \DeclareMathSymbol{z}{\mathalpha}{letters}{`z}

115

116 \DeclareMathSymbol{A}{\mathalpha}{letters}{`A}
117 \DeclareMathSymbol{B}{\mathalpha}{letters}{`B}
118 \DeclareMathSymbol{C}{\mathalpha}{letters}{`C}
119 \DeclareMathSymbol{D}{\mathalpha}{letters}{`D}
120 \DeclareMathSymbol{E}{\mathalpha}{letters}{`E}
121 \DeclareMathSymbol{F}{\mathalpha}{letters}{`F}
122 \DeclareMathSymbol{G}{\mathalpha}{letters}{`G}
123 \DeclareMathSymbol{H}{\mathalpha}{letters}{`H}
124 \DeclareMathSymbol{I}{\mathalpha}{letters}{`I}
125 \DeclareMathSymbol{J}{\mathalpha}{letters}{`J}
126 \DeclareMathSymbol{K}{\mathalpha}{letters}{`K}
127 \DeclareMathSymbol{L}{\mathalpha}{letters}{`L}
128 \DeclareMathSymbol{M}{\mathalpha}{letters}{`M}
129 \DeclareMathSymbol{N}{\mathalpha}{letters}{`N}
130 \DeclareMathSymbol{O}{\mathalpha}{letters}{`O}
131 \DeclareMathSymbol{P}{\mathalpha}{letters}{`P}
132 \DeclareMathSymbol{Q}{\mathalpha}{letters}{`Q}
133 \DeclareMathSymbol{R}{\mathalpha}{letters}{`R}

134 \DeclareMathSymbol{S}{\mathalpha}{letters}{`S}
135 \DeclareMathSymbol{T}{\mathalpha}{letters}{`T}
136 \DeclareMathSymbol{U}{\mathalpha}{letters}{`U}
137 \DeclareMathSymbol{V}{\mathalpha}{letters}{`V}
138 \DeclareMathSymbol{W}{\mathalpha}{letters}{`W}
139 \DeclareMathSymbol{X}{\mathalpha}{letters}{`X}
140 \DeclareMathSymbol{Y}{\mathalpha}{letters}{`Y}
141 \DeclareMathSymbol{Z}{\mathalpha}{letters}{`Z}

39.3.2 The digits

142 \DeclareMathSymbol{0}{\mathalpha}{operators}{`0}
143 \DeclareMathSymbol{1}{\mathalpha}{operators}{`1}
144 \DeclareMathSymbol{2}{\mathalpha}{operators}{`2}
145 \DeclareMathSymbol{3}{\mathalpha}{operators}{`3}
146 \DeclareMathSymbol{4}{\mathalpha}{operators}{`4}
147 \DeclareMathSymbol{5}{\mathalpha}{operators}{`5}
148 \DeclareMathSymbol{6}{\mathalpha}{operators}{`6}
149 \DeclareMathSymbol{7}{\mathalpha}{operators}{`7}
150 \DeclareMathSymbol{8}{\mathalpha}{operators}{`8}
151 \DeclareMathSymbol{9}{\mathalpha}{operators}{`9}

39.3.3 Punctuation, brace, etc. keys

152 \DeclareMathSymbol{!}{\mathclose}{operators}{"21}
153 \DeclareMathSymbol{(}{\mathopen}{operators}{"28}
154 \DeclareMathSymbol{)}{\mathclose}{operators}{"29}
155 \DeclareMathSymbol{*}{\mathbin}{symbols}{"03} % \ast
156 \DeclareMathSymbol{+}{\mathbin}{operators}{"2B}
157 \DeclareMathSymbol{,}{\mathpunct}{letters}{"3B}
158 \DeclareMathSymbol{-}{\mathbin}{symbols}{"00}
159 \DeclareMathSymbol{.}{\mathord}{letters}{"3A}
160 \DeclareMathSymbol{/}{\mathord}{letters}{"3D}
161 \DeclareMathSymbol{:}{\mathrel}{operators}{"3A}
162 \DeclareMathSymbol{;}{\mathpunct}{operators}{"3B}
163 \DeclareMathSymbol{<}{\mathrel}{letters}{"3C}
164 \DeclareMathSymbol{=}{\mathrel}{operators}{"3D}
165 \DeclareMathSymbol{>}{\mathrel}{letters}{"3E}
166 \DeclareMathSymbol{?}{\mathclose}{operators}{"3F}
167 \DeclareMathSymbol{[}{\mathopen}{operators}{"5B}
168 \DeclareMathSymbol{]}{\mathclose}{operators}{"5D}
169 \DeclareMathSymbol{|}{\mathord}{symbols}{"6A}

170

Should all of the following being activated by default? Probably not.

171 %\DeclareMathSymbol{`\{}{\mathopen}{symbols}{"66}
172 %\DeclareMathSymbol{`\}}{\mathclose}{symbols}{"67}
173 %\DeclareMathSymbol{`\\}{\mathord}{symbols}{"6E} % \backslash
174 \mathcode`\ ="8000 % \space
175 \mathcode`\'="8000 % ^\prime
176 \mathcode`\_="8000 % \_

39.3.4 Delimitercodes for characters

[to be completed]

Finally, IniTEX sets all \delcode values to -1, except \delcode`.=0

177 \delcode`\(="028300
178 \delcode`\)="029301
179 \delcode`\[="05B302
180 \delcode`\]="05D303
181 \delcode`\<="26830A
182 \delcode`\>="26930B
183 \delcode`\/="02F30E
184 \delcode`\|="26A30C
185 \delcode`\\="26E30F

N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!

39.4 Symbols accessed via control sequences

39.4.1 Greek letters

186 \DeclareMathSymbol{\alpha}{\mathord}{letters}{"0B}
187 \DeclareMathSymbol{\beta}{\mathord}{letters}{"0C}
188 \DeclareMathSymbol{\gamma}{\mathord}{letters}{"0D}
189 \DeclareMathSymbol{\delta}{\mathord}{letters}{"0E}
190 \DeclareMathSymbol{\epsilon}{\mathord}{letters}{"0F}
191 \DeclareMathSymbol{\zeta}{\mathord}{letters}{"10}
192 \DeclareMathSymbol{\eta}{\mathord}{letters}{"11}
193 \DeclareMathSymbol{\theta}{\mathord}{letters}{"12}
194 \DeclareMathSymbol{\iota}{\mathord}{letters}{"13}
195 \DeclareMathSymbol{\kappa}{\mathord}{letters}{"14}
196 \DeclareMathSymbol{\lambda}{\mathord}{letters}{"15}
197 \DeclareMathSymbol{\mu}{\mathord}{letters}{"16}
198 \DeclareMathSymbol{\nu}{\mathord}{letters}{"17}
199 \DeclareMathSymbol{\xi}{\mathord}{letters}{"18}
200 \DeclareMathSymbol{\pi}{\mathord}{letters}{"19}
201 \DeclareMathSymbol{\rho}{\mathord}{letters}{"1A}
202 \DeclareMathSymbol{\sigma}{\mathord}{letters}{"1B}
203 \DeclareMathSymbol{\tau}{\mathord}{letters}{"1C}
204 \DeclareMathSymbol{\upsilon}{\mathord}{letters}{"1D}
205 \DeclareMathSymbol{\phi}{\mathord}{letters}{"1E}
206 \DeclareMathSymbol{\chi}{\mathord}{letters}{"1F}
207 \DeclareMathSymbol{\psi}{\mathord}{letters}{"20}
208 \DeclareMathSymbol{\omega}{\mathord}{letters}{"21}
209 \DeclareMathSymbol{\varepsilon}{\mathord}{letters}{"22}
210 \DeclareMathSymbol{\vartheta}{\mathord}{letters}{"23}
211 \DeclareMathSymbol{\varpi}{\mathord}{letters}{"24}
212 \DeclareMathSymbol{\varrho}{\mathord}{letters}{"25}
213 \DeclareMathSymbol{\varsigma}{\mathord}{letters}{"26}
214 \DeclareMathSymbol{\varphi}{\mathord}{letters}{"27}
215 \DeclareMathSymbol{\Gamma}{\mathalpha}{operators}{"00}
216 \DeclareMathSymbol{\Delta}{\mathalpha}{operators}{"01}
217 \DeclareMathSymbol{\Theta}{\mathalpha}{operators}{"02}
218 \DeclareMathSymbol{\Lambda}{\mathalpha}{operators}{"03}
219 \DeclareMathSymbol{\Xi}{\mathalpha}{operators}{"04}
220 \DeclareMathSymbol{\Pi}{\mathalpha}{operators}{"05}
221 \DeclareMathSymbol{\Sigma}{\mathalpha}{operators}{"06}
222 \DeclareMathSymbol{\Upsilon}{\mathalpha}{operators}{"07}
223 \DeclareMathSymbol{\Phi}{\mathalpha}{operators}{"08}

224 \DeclareMathSymbol{\Psi}{\mathalpha}{operators}{"09}
225 \DeclareMathSymbol{\Omega}{\mathalpha}{operators}{"0A}

39.4.2 Ordinary symbols

226 \DeclareMathSymbol{\aleph}{\mathord}{symbols}{"40}
227 \def\hbar{{\mathchar'26\mkern-9muh}}
228 \DeclareMathSymbol{\imath}{\mathord}{letters}{"7B}
229 \DeclareMathSymbol{\jmath}{\mathord}{letters}{"7C}
230 \DeclareMathSymbol{\ell}{\mathord}{letters}{"60}
231 \DeclareMathSymbol{\wp}{\mathord}{letters}{"7D}
232 \DeclareMathSymbol{\Re}{\mathord}{symbols}{"3C}
233 \DeclareMathSymbol{\Im}{\mathord}{symbols}{"3D}
234 \DeclareMathSymbol{\partial}{\mathord}{letters}{"40}
235 \DeclareMathSymbol{\infty}{\mathord}{symbols}{"31}
236 \DeclareMathSymbol{\prime}{\mathord}{symbols}{"30}
237 \DeclareMathSymbol{\emptyset}{\mathord}{symbols}{"3B}
238 \DeclareMathSymbol{\nabla}{\mathord}{symbols}{"72}
239 \def\surd{{\mathchar"1270}}
240 \DeclareMathSymbol{\top}{\mathord}{symbols}{"3E}
241 \DeclareMathSymbol{\bot}{\mathord}{symbols}{"3F}
242 \def\angle{{\vbox{\ialign{$\m@th\scriptstyle##$\crcr
243  \not\mathrel{\mkern14mu}\crcr
244  \noalign{\nointerlineskip}
245  \mkern2.5mu\leaders\hrule \@height.34pt\hfill\mkern2.5mu\crcr}}}}
246 \DeclareMathSymbol{\triangle}{\mathord}{symbols}{"34}
247 \DeclareMathSymbol{\forall}{\mathord}{symbols}{"38}
248 \DeclareMathSymbol{\exists}{\mathord}{symbols}{"39}
249 \DeclareMathSymbol{\neg}{\mathord}{symbols}{"3A}
250  \let\lnot=\neg
251 \DeclareMathSymbol{\flat}{\mathord}{letters}{"5B}
252 \DeclareMathSymbol{\natural}{\mathord}{letters}{"5C}
253 \DeclareMathSymbol{\sharp}{\mathord}{letters}{"5D}
254 \DeclareMathSymbol{\clubsuit}{\mathord}{symbols}{"7C}
255 \DeclareMathSymbol{\diamondsuit}{\mathord}{symbols}{"7D}
256 \DeclareMathSymbol{\heartsuit}{\mathord}{symbols}{"7E}
257 \DeclareMathSymbol{\spadesuit}{\mathord}{symbols}{"7F}

39.4.3 Large Operators

258 \DeclareMathSymbol{\coprod}{\mathop}{largesymbols}{"60}
259 \DeclareMathSymbol{\bigvee}{\mathop}{largesymbols}{"57}
260 \DeclareMathSymbol{\bigwedge}{\mathop}{largesymbols}{"56}
261 \DeclareMathSymbol{\biguplus}{\mathop}{largesymbols}{"55}
262 \DeclareMathSymbol{\bigcap}{\mathop}{largesymbols}{"54}
263 \DeclareMathSymbol{\bigcup}{\mathop}{largesymbols}{"53}
264 \DeclareMathSymbol{\intop}{\mathop}{largesymbols}{"52}
265  \def\int{\intop\nolimits}
266 \DeclareMathSymbol{\prod}{\mathop}{largesymbols}{"51}
267 \DeclareMathSymbol{\sum}{\mathop}{largesymbols}{"50}
268 \DeclareMathSymbol{\bigotimes}{\mathop}{largesymbols}{"4E}
269 \DeclareMathSymbol{\bigoplus}{\mathop}{largesymbols}{"4C}
270 \DeclareMathSymbol{\bigodot}{\mathop}{largesymbols}{"4A}
271 \DeclareMathSymbol{\ointop}{\mathop}{largesymbols}{"48}

272  \def\oint{\ointop\nolimits}
273 \DeclareMathSymbol{\bigsqcup}{\mathop}{largesymbols}{"46}
274 \DeclareMathSymbol{\smallint}{\mathop}{symbols}{"73}

39.4.4 Binary symbols

275 \DeclareMathSymbol{\triangleleft}{\mathbin}{letters}{"2F}
276 \DeclareMathSymbol{\triangleright}{\mathbin}{letters}{"2E}
277 \DeclareMathSymbol{\bigtriangleup}{\mathbin}{symbols}{"34}
278 \DeclareMathSymbol{\bigtriangledown}{\mathbin}{symbols}{"35}
279 \DeclareMathSymbol{\wedge}{\mathbin}{symbols}{"5E}
280 \let\land=\wedge
281 \DeclareMathSymbol{\vee}{\mathbin}{symbols}{"5F}
282 \let\lor=\vee
283 \DeclareMathSymbol{\cap}{\mathbin}{symbols}{"5C}
284 \DeclareMathSymbol{\cup}{\mathbin}{symbols}{"5B}
285 \DeclareMathSymbol{\ddagger}{\mathbin}{symbols}{"7A}
286 \DeclareMathSymbol{\dagger}{\mathbin}{symbols}{"79}
287 \DeclareMathSymbol{\sqcap}{\mathbin}{symbols}{"75}
288 \DeclareMathSymbol{\sqcup}{\mathbin}{symbols}{"74}
289 \DeclareMathSymbol{\uplus}{\mathbin}{symbols}{"5D}
290 \DeclareMathSymbol{\amalg}{\mathbin}{symbols}{"71}
291 \DeclareMathSymbol{\diamond}{\mathbin}{symbols}{"05}
292 \DeclareMathSymbol{\bullet}{\mathbin}{symbols}{"0F}
293 \DeclareMathSymbol{\wr}{\mathbin}{symbols}{"6F}
294 \DeclareMathSymbol{\div}{\mathbin}{symbols}{"04}
295 \DeclareMathSymbol{\odot}{\mathbin}{symbols}{"0C}
296 \DeclareMathSymbol{\oslash}{\mathbin}{symbols}{"0B}
297 \DeclareMathSymbol{\otimes}{\mathbin}{symbols}{"0A}
298 \DeclareMathSymbol{\ominus}{\mathbin}{symbols}{"09}
299 \DeclareMathSymbol{\oplus}{\mathbin}{symbols}{"08}
300 \DeclareMathSymbol{\mp}{\mathbin}{symbols}{"07}
301 \DeclareMathSymbol{\pm}{\mathbin}{symbols}{"06}
302 \DeclareMathSymbol{\circ}{\mathbin}{symbols}{"0E}
303 \DeclareMathSymbol{\bigcirc}{\mathbin}{symbols}{"0D}
304 \DeclareMathSymbol{\setminus}{\mathbin}{symbols}{"6E}
305 \DeclareMathSymbol{\cdot}{\mathbin}{symbols}{"01}
306 \DeclareMathSymbol{\ast}{\mathbin}{symbols}{"03}
307 \DeclareMathSymbol{\times}{\mathbin}{symbols}{"02}
308 \DeclareMathSymbol{\star}{\mathbin}{letters}{"3F}

39.4.5 Relations

309 \DeclareMathSymbol{\propto}{\mathrel}{symbols}{"2F}
310 \DeclareMathSymbol{\sqsubseteq}{\mathrel}{symbols}{"76}
311 \DeclareMathSymbol{\sqsupseteq}{\mathrel}{symbols}{"77}
312 \DeclareMathSymbol{\parallel}{\mathrel}{symbols}{"6B}
313 \DeclareMathSymbol{\mid}{\mathrel}{symbols}{"6A}
314 \DeclareMathSymbol{\dashv}{\mathrel}{symbols}{"61}
315 \DeclareMathSymbol{\vdash}{\mathrel}{symbols}{"60}
316 \DeclareMathSymbol{\nearrow}{\mathrel}{symbols}{"25}
317 \DeclareMathSymbol{\searrow}{\mathrel}{symbols}{"26}
318 \DeclareMathSymbol{\nwarrow}{\mathrel}{symbols}{"2D}
319 \DeclareMathSymbol{\swarrow}{\mathrel}{symbols}{"2E}

320 \DeclareMathSymbol{\Leftrightarrow}{\mathrel}{symbols}{"2C}
321 \DeclareMathSymbol{\Leftarrow}{\mathrel}{symbols}{"28}
322 \DeclareMathSymbol{\Rightarrow}{\mathrel}{symbols}{"29}
323 \def\neq{\not=} \let\ne=\neq
324 \DeclareMathSymbol{\leq}{\mathrel}{symbols}{"14}
325 \let\le=\leq
326 \DeclareMathSymbol{\geq}{\mathrel}{symbols}{"15}
327 \let\ge=\geq
328 \DeclareMathSymbol{\succ}{\mathrel}{symbols}{"1F}
329 \DeclareMathSymbol{\prec}{\mathrel}{symbols}{"1E}
330 \DeclareMathSymbol{\approx}{\mathrel}{symbols}{"19}
331 \DeclareMathSymbol{\succeq}{\mathrel}{symbols}{"17}
332 \DeclareMathSymbol{\preceq}{\mathrel}{symbols}{"16}
333 \DeclareMathSymbol{\supset}{\mathrel}{symbols}{"1B}
334 \DeclareMathSymbol{\subset}{\mathrel}{symbols}{"1A}
335 \DeclareMathSymbol{\supseteq}{\mathrel}{symbols}{"13}
336 \DeclareMathSymbol{\subseteq}{\mathrel}{symbols}{"12}
337 \DeclareMathSymbol{\in}{\mathrel}{symbols}{"32}
338 \DeclareMathSymbol{\ni}{\mathrel}{symbols}{"33}
339  \let\owns=\ni
340 \DeclareMathSymbol{\gg}{\mathrel}{symbols}{"1D}
341 \DeclareMathSymbol{\ll}{\mathrel}{symbols}{"1C}
342 \DeclareMathSymbol{\not}{\mathrel}{symbols}{"36}
343 \DeclareMathSymbol{\leftrightarrow}{\mathrel}{symbols}{"24}
344 \DeclareMathSymbol{\leftarrow}{\mathrel}{symbols}{"20}
345 \let\gets=\leftarrow
346 \DeclareMathSymbol{\rightarrow}{\mathrel}{symbols}{"21}
347 \let\to=\rightarrow
348 \DeclareMathSymbol{\mapstochar}{\mathrel}{symbols}{"37}
349 \def\mapsto{\mapstochar\rightarrow}
350 \DeclareMathSymbol{\sim}{\mathrel}{symbols}{"18}
351 \DeclareMathSymbol{\simeq}{\mathrel}{symbols}{"27}
352 \DeclareMathSymbol{\perp}{\mathrel}{symbols}{"3F}
353 \DeclareMathSymbol{\equiv}{\mathrel}{symbols}{"11}
354 \DeclareMathSymbol{\asymp}{\mathrel}{symbols}{"10}
355 \DeclareMathSymbol{\smile}{\mathrel}{letters}{"5E}
356 \DeclareMathSymbol{\frown}{\mathrel}{letters}{"5F}
357 \DeclareMathSymbol{\leftharpoonup}{\mathrel}{letters}{"28}
358 \DeclareMathSymbol{\leftharpoondown}{\mathrel}{letters}{"29}
359 \DeclareMathSymbol{\rightharpoonup}{\mathrel}{letters}{"2A}
360 \DeclareMathSymbol{\rightharpoondown}{\mathrel}{letters}{"2B}
361 \def\cong{\mathrel{\mathpalette\@vereq\sim}} % congruence sign
362 \def\@vereq#1#2{\lower.5\p@\vbox{\lineskiplimit\maxdimen\lineskip-.5\p@
363  \ialign{$\m@th#1\hfil##\hfil$\crcr#2\crcr=\crcr}}}
364 \def\notin{\mathrel{\m@th\mathpalette\c@ncel\in}}
365 \def\c@ncel#1#2{\m@th\ooalign{$\hfil#1\mkern1mu/\hfil$\crcr$#1#2$}}
366 \def\rightleftharpoons{\mathrel{\mathpalette\rlh@{}}}
367 \def\rlh@#1{\vcenter{\m@th\hbox{\ooalign{\raise2pt
368  \hbox{$#1\rightharpoonup$}\crcr
369  $#1\leftharpoondown$}}}}
370 \def\doteq{\buildrel\textstyle.\over=}

39.4.6 Arrows

371 \def\joinrel{\mathrel{\mkern-3mu}}
372 \def\relbar{\mathrel{\smash-}} % \smash, because -
373  % has the same height as +
374 \def\Relbar{\mathrel=}
375 \DeclareMathSymbol{\lhook}{\mathrel}{letters}{"2C}
376 \def\hookrightarrow{\lhook\joinrel\rightarrow}
377 \DeclareMathSymbol{\rhook}{\mathrel}{letters}{"2D}
378 \def\hookleftarrow{\leftarrow\joinrel\rhook}
379 \def\bowtie{\mathrel\triangleright\joinrel\mathrel\triangleleft}
380 \def\models{\mathrel|\joinrel=}
381 \def\Longrightarrow{\Relbar\joinrel\Rightarrow}
    LaTeX Change: \longrightarrow and \longleftarrow redefined to make

then robust.

382 \DeclareRobustCommand\longrightarrow
383  {\relbar\joinrel\rightarrow}
384 \DeclareRobustCommand\longleftarrow
385  {\leftarrow\joinrel\relbar}
386 \def\Longleftarrow{\Leftarrow\joinrel\Relbar}
387 \def\longmapsto{\mapstochar\longrightarrow}
388 \def\longleftrightarrow{\leftarrow\joinrel\rightarrow}
389 \def\Longleftrightarrow{\Leftarrow\joinrel\Rightarrow}
390 \def\iff{\;\Longleftrightarrow\;}

39.4.7 Punctuation symbols

391 \DeclareMathSymbol{\ldotp}{\mathpunct}{letters}{"3A}
392 \DeclareMathSymbol{\cdotp}{\mathpunct}{symbols}{"01}
393 \DeclareMathSymbol{\colon}{\mathpunct}{operators}{"3A}

This is commented out, since \ldots is now defined in ltoutenc.dtx.

394 %\def\@ldots{\mathinner{\ldotp\ldotp\ldotp}}
395 %\DeclareRobustCommand\ldots
396 %          {\relax\ifmmode\@ldots\else\mbox{$\m@th\@ldots\,$}\fi}
397 \def\cdots{\mathinner{\cdotp\cdotp\cdotp}}
398 \def\vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@
399  \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}
400 \def\ddots{\mathinner{\mkern1mu\raise7\p@
401  \vbox{\kern7\p@\hbox{.}}\mkern2mu
402  \raise4\p@\hbox{.}\mkern2mu\raise\p@\hbox{.}\mkern1mu}}

39.4.8 Math accents

403 \DeclareMathAccent{\acute}{\mathalpha}{operators}{"13}
404 \DeclareMathAccent{\grave}{\mathalpha}{operators}{"12}
405 \DeclareMathAccent{\ddot}{\mathalpha}{operators}{"7F}
406 \DeclareMathAccent{\tilde}{\mathalpha}{operators}{"7E}
407 \DeclareMathAccent{\bar}{\mathalpha}{operators}{"16}
408 \DeclareMathAccent{\breve}{\mathalpha}{operators}{"15}
409 \DeclareMathAccent{\check}{\mathalpha}{operators}{"14}
410 \DeclareMathAccent{\hat}{\mathalpha}{operators}{"5E}
411 \DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
412 \DeclareMathAccent{\dot}{\mathalpha}{operators}{"5F}
413 \DeclareMathAccent{\widetilde}{\mathord}{largesymbols}{"65}

414 \DeclareMathAccent{\widehat}{\mathord}{largesymbols}{"62}

415

39.4.9 Radicals

416 \DeclareMathRadical{\sqrtsign}{symbols}{"70}{largesymbols}{"70}
417 \let\@@sqrt\sqrtsign

39.4.10 Over and under something, etc

418 \def\overrightarrow#1{\vbox{\m@th\ialign{##\crcr
419  \rightarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}
420  $\hfil\displaystyle{#1}\hfil$\crcr}}}
421 \def\overleftarrow#1{\vbox{\m@th\ialign{##\crcr
422  \leftarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}%
423  $\hfil\displaystyle{#1}\hfil$\crcr}}}
424 \def\overbrace#1{\mathop{\vbox{\m@th\ialign{##\crcr\noalign{\kern3\p@}%
425  \downbracefill\crcr\noalign{\kern3\p@\nointerlineskip}%
426  $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
427 \def\underbrace#1{\mathop{\vtop{\m@th\ialign{##\crcr
428 $\hfil\displaystyle{#1}\hfil$\crcr
429 \noalign{\kern3\p@\nointerlineskip}%
430 \upbracefill\crcr\noalign{\kern3\p@}}}}\limits}

(quite a waste of tokens, IMHO — Frank)

431 \def\skew#1#2#3{{\muskip\z@#1mu\divide\muskip\z@\tw@ \mkern\muskip\z@
432  #2{\mkern-\muskip\z@{#3}\mkern\muskip\z@}\mkern-\muskip\z@}{}}
433 \def\rightarrowfill{$\m@th\smash-\mkern-6mu%
434 \cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
435 \mkern-6mu\mathord\rightarrow$}
436 \def\leftarrowfill{$\m@th\mathord\leftarrow\mkern-6mu%
437 \cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
438 \mkern-6mu\smash-$}
439 \DeclareMathSymbol{\braceld}{\mathord}{largesymbols}{"7A}
440 \DeclareMathSymbol{\bracerd}{\mathord}{largesymbols}{"7B}
441 \DeclareMathSymbol{\bracelu}{\mathord}{largesymbols}{"7C}
442 \DeclareMathSymbol{\braceru}{\mathord}{largesymbols}{"7D}
443 \def\downbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
444 \braceld\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru
445 \bracelu\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\bracerd$}
446 \def\upbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
447 \bracelu\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\bracerd
448 \braceld\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru$}

39.4.11 Delimiters

449 \DeclareMathDelimiter{\lmoustache}   % top from (, bottom from )
450 {\mathopen}{largesymbols}{"7A}{largesymbols}{"40}
451 \DeclareMathDelimiter{\rmoustache}   % top from ), bottom from (
452 {\mathclose}{largesymbols}{"7B}{largesymbols}{"41}
453 \DeclareMathDelimiter{\arrowvert}    % arrow without arrowheads
454 {\mathord}{symbols}{"6A}{largesymbols}{"3C}
455 \DeclareMathDelimiter{\Arrowvert}    % double arrow without arrowheads
456 {\mathord}{symbols}{"6B}{largesymbols}{"3D}

457 \DeclareMathDelimiter{\Vert}
458 {\mathord}{symbols}{"6B}{largesymbols}{"0D}
459 \let\|=\Vert
460 \DeclareMathDelimiter{\vert}
461 {\mathord}{symbols}{"6A}{largesymbols}{"0C}
462 \DeclareMathDelimiter{\uparrow}
463 {\mathrel}{symbols}{"22}{largesymbols}{"78}
464 \DeclareMathDelimiter{\downarrow}
465 {\mathrel}{symbols}{"23}{largesymbols}{"79}
466 \DeclareMathDelimiter{\updownarrow}
467 {\mathrel}{symbols}{"6C}{largesymbols}{"3F}
468 \DeclareMathDelimiter{\Uparrow}
469 {\mathrel}{symbols}{"2A}{largesymbols}{"7E}
470 \DeclareMathDelimiter{\Downarrow}
471 {\mathrel}{symbols}{"2B}{largesymbols}{"7F}
472 \DeclareMathDelimiter{\Updownarrow}
473 {\mathrel}{symbols}{"6D}{largesymbols}{"77}
474 \DeclareMathDelimiter{\backslash}    % for double coset G\backslash H
475 {\mathord}{symbols}{"6E}{largesymbols}{"0F}
476 \DeclareMathDelimiter{\rangle}
477 {\mathclose}{symbols}{"69}{largesymbols}{"0B}
478 \DeclareMathDelimiter{\langle}
479 {\mathopen}{symbols}{"68}{largesymbols}{"0A}
480 \DeclareMathDelimiter{\rbrace}
481 {\mathclose}{symbols}{"67}{largesymbols}{"09}
482 \DeclareMathDelimiter{\lbrace}
483 {\mathopen}{symbols}{"66}{largesymbols}{"08}
484 \DeclareMathDelimiter{\rceil}
485 {\mathclose}{symbols}{"65}{largesymbols}{"07}
486 \DeclareMathDelimiter{\lceil}
487 {\mathopen}{symbols}{"64}{largesymbols}{"06}
488 \DeclareMathDelimiter{\rfloor}
489 {\mathclose}{symbols}{"63}{largesymbols}{"05}
490 \DeclareMathDelimiter{\lfloor}
491 {\mathopen}{symbols}{"62}{largesymbols}{"04}

\lgroup \rgroup \bracevert There are three plain TEX delimiters which are not fully supported by NFSS, since they partly point into a bold cmr font. Allocating a full symbol font, just to have three delimiters seems a but too much given the limited space available. For this reason only the extensible sizes are supported. If this is not desired one can use, without losing portability, define \mathbf and \mathtt as font symbol alphabet (setting up cmr/bx/n and cmtt/m/n as a symbol fonts first) and modify the delimiter declarations to point to with their small variant to those symbol fonts. (This is done in oldlfont.dtx so look there for examples.)

492 \DeclareMathDelimiter{\lgroup} % extensible ( with sharper tips
493  {\mathopen}{largesymbols}{"3A}{largesymbols}{"3A}
494 \DeclareMathDelimiter{\rgroup} % extensible ) with sharper tips
495  {\mathclose}{largesymbols}{"3B}{largesymbols}{"3B}
496 \DeclareMathDelimiter{\bracevert} % the vertical bar that extends braces
497  {\mathord}{largesymbols}{"3E}{largesymbols}{"3E}

39.5 Math versions of text commands

These symbols are the math versions of text commands such as \P, \$, etc.

\mathparagraph \mathsection \mathdollar \mathsterling \mathunderscore These math symbols are not in plain TEX.
498 \mathchardef\mathparagraph"027B
499 \mathchardef\mathsection"0278
500 \mathchardef\mathdollar"0024
501 \def\mathsterling{\mathit{\mathchar"7024}}
502 \def\mathunderscore{\kern0.06em \vbox{\hrule\@width.3em}}
\mathellipsis This is plain TEX’s \ldots.
503 \def\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%

39.6 Other special functions and parameters

39.6.1 Biggggg

504 \def\big#1{{\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}}
505 \def\Big#1{{\hbox{$\left#1\vbox to11.5\p@{}\right.\n@space$}}}
506 \def\bigg#1{{\hbox{$\left#1\vbox to14.5\p@{}\right.\n@space$}}}
507 \def\Bigg#1{{\hbox{$\left#1\vbox to17.5\p@{}\right.\n@space$}}}
508 \def\n@space{\nulldelimiterspace\z@ \m@th}

39.6.2 The log-like functions

\operator@font The \operator@font determines the symbol font used for log-like functions.

509 \def\operator@font{\mathgroup\symoperators}

39.6.3 Parameters

510 \thinmuskip=3mu
511 \medmuskip=4mu plus 2mu minus 4mu
512 \thickmuskip=5mu plus 5mu

This finishes the low-level setup in fontmath.ltx.

513 ⟨/math⟩

File s

preload.dtx

40 Overview

This file contains an number of possible settings for preloading fonts during installation of NFSS2 (which is used by L^{A}TEX 2ε). It will be used to generate the following files:

preload.min minimal subset of fonts necessary to run NFSS2
preload.ori  preload of CM fonts similar to the old lfonts.tex
preload.ltx  The standard selection of preloads
cmpreloa.xpt preload of CM fonts for 10pt document size
cmpreloa.xip preload of CM fonts for 11pt document size
cmpreloa.xii preload of CM fonts for 12pt document size
dcpreloa.xpt preload of DC fonts for 10pt size
dcpreloa.xip preload of DC fonts for 11pt size
dcpreloa.xii preload of DC fonts for 12pt size

These files are for installations that make use of Computer Modern fonts either old encoding (OT1) or Cork encoding (T1). The Computer Modern fonts with Cork encoding are known as DC-fonts.

Most important is preload.ltx which is used during format generation. You are not allowed to change this file.

41 Customization

You can customize the preloaded fonts in your L^{A}TEX 2ε system by installing a file with the name preload.cfg. If this file exists it will be used in place of the system file preload.ltx. You can, for example, copy one of the files mentioned above (that can be generated from this source) to preload.cfg.

Or you can define completely other preloads. In that case start from preload.min since that contains the fonts that have to be preloaded by *all* L^{A}TEX 2ε sytems.

Avoid using preload.ori, it will load so many fonts that on most installations it is nearly impossible to load other font families afterwards. This file is only generated to show what fonts have been preloaded by L^{A}TEX 2.09.

If you normally use other fonts than Computer Modern preload.min might be best.

Warning: If you preload fonts with encodings other than the normally supported encodings you have to declare that encoding in a fontdef.cfg configuration file (see the documentation in the file fontdef.dtx). Adding an extra encoding to the format might produce non-portable documents, thus this should be avoided if possible.

42 Module switches for the docstrip program

The docstrip will generate the above file from this source using the following module directives:

driver produce a documentation driver file
preload produce a preload… file
cm  for OT1 encoded Computer Modern
dc  for T1 encoded Computer Modern
min  produce minimal subset
xpt  produce 10pt preloads
xipt  produce 11pt preloads
xiipt  produce 12pt preloads
ori  produce preloads similar to old lfonts.tex
tex  produce preload.ltx

A typical docstrip command file would then have entries like:

\generateFile{preload.min}{t}{\from{preload.dtx}{preload,min}}

for generating preload files.

43 A driver for this document

The next bit of code contains the documentation driver file for TEX, i.e., the file that will produce the documentation you are currently reading. It will be extracted from this file by the docstrip program.

1 ⟨∗driver⟩

 2 \documentclass{ltxdoc}
 3 %\OnlyDescription  % comment out for implementation details
 4 \begin{document}
 5 \DocInput{preload.dtx}
 6 \end{document}

7 ⟨/driver⟩

44 The code

We begin by loading the math extension font (cmex10) and the L^{A}TEX line and circle fonts. It is necessary to do this explicitly since these are used by lplain.tex and latex.tex. Since the internal font name contains / characters and digits we construct the name via \csname. These are the only fonts (!) that must be loaded in this file.

All \DeclarePreloadSizes can be removed or others can be added, they only influence the processing speed.

 8 \expandafter\font\csname OMX/cmex/m/n/10\endcsname=cmex10\relax
 9 \font\tenln  =line10   \font\tenlnw  =linew10\relax
10 \font\tencirc=lcircle10 \font\tencircw=lcirclew10\relax

The above fonts should not be touched but anything below this point here in the preload suggestions can be modified without any problems.

11 ⟨−tex⟩%*******************************************

12 ⟨−tex⟩% Start any modification below this point **
13 ⟨−tex⟩%*******************************************

14 ⟨−tex⟩

15 %%
16 %% Computer Modern Roman:
17 %%-----------------------

18 ⟨∗ori⟩

19 \DeclarePreloadSizes{OT1}{cmr}{m}{n}
20  {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74,24.88}
21 \DeclarePreloadSizes{OT1}{cmr}{bx}{n}{9,10,10.95,12,14.4,17.28}
22 \DeclarePreloadSizes{OT1}{cmr}{m}{sl}{10,10.95,12}
23 \DeclarePreloadSizes{OT1}{cmr}{m}{it}{7,8,9,10,10.95,12}

24 ⟨/ori⟩

25 ⟨+xpt & cm⟩ \DeclarePreloadSizes{OT1}{cmr}{m}{n}{5,7,10}
26 ⟨+xpt & dc⟩ \DeclarePreloadSizes{T1}{cmr}{m}{n}{5,7,10}
27 ⟨+xipt & cm⟩ \DeclarePreloadSizes{OT1}{cmr}{m}{n}{6,8,10.95}
28 ⟨+xipt & dc⟩ \DeclarePreloadSizes{T1}{cmr}{m}{n}{6,8,10.95}
29 ⟨+xiipt & cm⟩ \DeclarePreloadSizes{OT1}{cmr}{m}{n}{6,8,12}
30 ⟨+xiipt & dc⟩ \DeclarePreloadSizes{T1}{cmr}{m}{n}{6,8,12}
31 %%
32 %% Computer Modern Sans:
33 %%----------------------
34 ⟨+ori⟩ \DeclarePreloadSizes{OT1}{cmss}{m}{n}{10,10.95,12}
35 %%
36 %% Computer Modern Typewriter:
37 %%----------------------------
38 ⟨+ori⟩ \DeclarePreloadSizes{OT1}{cmtt}{m}{n}{9,10,10.95,12}
39 %%
40 %% Computer Modern Math:
41 %%----------------------

42 ⟨∗ori⟩

43 \DeclarePreloadSizes{OML}{cmm}{m}{it}
44  {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74}
45 \DeclarePreloadSizes{OMS}{cmsy}{m}{n}
46  {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74}

47 ⟨/ori⟩

The math fonts are the same for both DC and CM fonts. So far there isn’t an agreed on standard.

48 ⟨∗xpt⟩

49 \DeclarePreloadSizes{OML}{cmm}{m}{it}{5,7,10}
50 \DeclarePreloadSizes{OMS}{cmsy}{m}{n}{5,7,10}

51 ⟨/xpt⟩ 52 ⟨∗xipt⟩

53 \DeclarePreloadSizes{OML}{cmm}{m}{it}{6,8,10.95}
54 \DeclarePreloadSizes{OMS}{cmsy}{m}{n}{6,8,10.95}

55 ⟨/xipt⟩ 56 ⟨∗xiipt⟩

57 \DeclarePreloadSizes{OML}{cmm}{m}{it}{6,8,12}
58 \DeclarePreloadSizes{OMS}{cmsy}{m}{n}{6,8,12}

59 ⟨/xiipt⟩

60 %%
61 %% LaTeX symbol fonts:
62 %%--------------------

File s: preload.dtx Date: 1995/12/04 Version v2.1f 189

63 ⟨∗ori⟩

64 \DeclarePreloadSizes{U}{lasy}{m}{n}
65  {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74}

66 ⟨/ori⟩ 67 ⟨/preload⟩

File s: preload.dtx Date: 1995/12/04 Version v2.1f 190

File t

ltfntcmd.dtx

Abstract

The commands defined in this file ltfntcmd are part of the kernel code for L^{A}TEX 2ε/NFSS2.

It is also meant to serve as documentation for package writers since it demonstrates how to define high-level font changing commands using a small number of creator functions.

45 Introduction

Font changes such as \bfseries, \sffamily, etc. are declarations; this means that their scope is delimited by the grouping structure, either by the next \end of some environment or by explicitly using a group, e.g., writing something like {\bfseries...} in the source. If you make the mistake of writing \bfseries{...} (thinking of \bfseries as a command with one argument) then the result is rather striking.

Font declarations are an artifact of the TEX system and for several reasons it is better to avoid them on the user level whenever possible. In L^{A}TEX3 they will probably all be replaced by environments and by font commands taking one argument.

This file defines a creator function for such declarative font switches. This function creates commands which can be used in both math and text.

This file also defines a number of high-level commands (all starting with \text..) that have one argument and typeset this argument in the requested way. Thus these commands are for typesetting short pieces of text in a specific family, series or shape. These are all produced as examples of the use of a creator function which is itself also defined in this file.

Table 1 shows all these high-level commands in action. A further advantage of using these commands is that they automatically take care of any necessary italic correction on either side of their argument.

Thus, when using such commands, one does not have to worry about forgetting the italic correction when changing fonts. Only in very few situations is this additional space wrong but, for example, most typographers recommend omitting the italic correction if a small punctuation character, like a comma, directly follows the font change. Since the amount of correction required is partly a matter of taste, you can define in what situations the italic correction should be suppressed. This is done by puttiing the characters that should cancel a preceding italic correction in the list \nocorrlist.^{7} The default definition for this list is produced by the following.

 \newcommand \nocorrlist {,.}

7Any package that changes the \catcode of a character inside \nocorrlist must then explicitly reset the list. Otherwise the changed character will no longer be recognized by the suppression algorithm.

Command  Corresponds to Action
\textrm{..}  \rmfamily  Typeset argument in roman family
\textsf{..}  \sffamily  Typeset argument in sans serif family

\texttt{..}  \ttfamily  Typeset argument in typewriter family

\textmd{..}  \mdseries  Typeset argument in medium series
\textbf{..}  \bfseries  Typeset argument in bold series
\textup{..}  \upshape  Typeset argument in normal shape
\textit{..}  \itshape  Typeset argument in italic shape
\textsl{..}  \slshape  Typeset argument in slanted shape
\textsc{..}  \scshape  Typeset argument in small caps shape
\emph{..}    \em  Typeset argument emphasized

Table 1: Font-change commands with arguments

The font change commands provided here all start with \text.. to emphasize that they are for use in normal text and to be easily memorable. They automatically take care of any necessary italic correction on either side of the argument.

It is best to declare the most often used characters first, because this will make the processing slightly faster. For example,

\emph{When using the \NFSS{} high-level commands,
the \emph{proper} use of italic corrections is
automatically taken care of}. Only
\emph{sometimes} one has to help \LaTeX{} by
adding a \verb=\nocorr= command.

which results in:

When using the NFSS high-level commands, the proper use of italic corrections is automatically taken care of. Only sometimes one has to help L^{A}TEX by adding a \nocorr command.

In contrast, the use of the declaration forms is often more appropriate when you define your own commands or environments.

\newenvironment{bfitemize}{\begin{itemize}\normalfont\bfseries}
                        {\end{itemize}}
\begin{bfitemize}
\item This environment produces boldface items.
\item It is defined in terms of \LaTeX's
\texttt{itemize} environment and NFSS
declarations.
\end{bfitemize}

This gives:

• This environment produces boldface items.

• It is defined in terms of L^{A}TEX’s itemize environment and NFSS declarations.

In addition to global customization of when to insert the italic correction, it is of course sometimes necessary to explicitly insert one with \/.

It is also possible to suppress the italic correction in individual instances. For this, the command \nocorr is provided.

The \nocorr must appear as the first or last token inside the braces of the argument of the \text... commands, at that end of the text where you wish to suppress the italic correction.

It is worth pointing out here that inserting a \/ in places where it can have no function (i.e. anywhere except immediately after a slanted letter) is not an error— it will just be silently ignored. Unfortunately this is not true if the redefinition of \/ in amstex.sty is used as this version can cause space to be removed immediately before the \/.

46 The implementation

\DeclareTextFontCommand This is the creator function for \text.. commands. It gives a warning if \foo or

\fragfoo is already defined.

In math mode it simply puts the font declaration and text into a box (possibly an automagically sized one).

Otherwise it first scans the text to see where \nocorr occurs within it. This sets the \check@ic commands to do what is necessary concerning the italic correction at both ends.

Note that it is necessary to put in the \aftergroup\maybe@ic at the end of the group so that it comes after any other aftergroup tokens and immediately before the following tokens. It is also necessary to remove the \fi from the token list before the group ends; this is done by adding an \expandafter just before the closing brace.

This now checks for empty contents of text command and optimises this case.

1 ⟨∗2ekernel⟩

 2 \def \DeclareTextFontCommand #1#2{%
 3 \DeclareRobustCommand#1[1]{%
 4  \ifmmode
 5  \nfss@text{#2##1}%
 6  \else
 7  \leavevmode
 8  {\text@command{##1}%
 9  #2\check@icl ##1\check@icr
10  \expandafter}%
11  \fi
12  }%

13 }

\textrm \textsf \texttt \textnormal Now we define the \text⟨family⟩ commands in terms of the above; \texttt does not look very nice!

14 \DeclareTextFontCommand{\textrm}{\rmfamily}
15 \DeclareTextFontCommand{\textsf}{\sffamily}
16 \DeclareTextFontCommand{\texttt}{\ttfamily}

17 \DeclareTextFontCommand{\textnormal}{\normalfont}

\textbf \textmd For the series attribute:

18 \DeclareTextFontCommand{\textbf}{\bfseries}
19 \DeclareTextFontCommand{\textmd}{\mdseries}
\textit \textsl \textsc \textup And for the shapes:
20 \DeclareTextFontCommand{\textit}{\itshape}
21 \DeclareTextFontCommand{\textsl}{\slshape}
22 \DeclareTextFontCommand{\textsc}{\scshape}
23 \DeclareTextFontCommand{\textup}{\upshape}

\emph Finally we have the \em font change declaration of L^{A}TEX. The corresponding definition with argument is

24 \DeclareTextFontCommand{\emph}{\em}

\nocorr This is just a label, so it does nothing; it should also be unexpandable.

25 \let \nocorr \relax

\text@command \check@nocorr@ \check@icl \check@icr This checks for a \nocorr as the first token in its argument and also for one in any other position not protected within braces (the latter is treated as if it were at the end of the argument).

Is this the correct action in the ‘empty’ case? It is efficient but typographically it is, strictly, incorrect!

26 \def \text@command #1{%
27 \def \reserved@a {#1}%
28 \ifx \reserved@a \@empty
29  \let \check@icl \@empty
30  \let \check@icr \@empty
31 \else

\space is a reserved word in L^{A}TEX or actually already in plain TEX. If somebody really redefines it so many things will break that I don’t see any reason to make this routine here slower than necessary.

32 %    \def \reserved@b { }%
33 %    \ifx \reserved@a \reserved@b
34  \ifx \reserved@a \space
35  \let \check@icl \@empty
36  \let \check@icr \@empty
37  \else
38  \check@nocorr@ #1\nocorr\@nil
39  \fi
40 \fi

41 }

42 \def \check@nocorr@ #1#2\nocorr#3\@nil {%

The two checks are initialised here to their values in the normal case.

43 \let \check@icl \maybe@ic
44 \def \check@icr {\aftergroup \maybe@ic}%
45 \def \reserved@a {\nocorr}%
46 \def \reserved@b {#1}%
47 \def \reserved@c {#3}%
48 \ifx \reserved@a \reserved@b
49  \ifx \reserved@c \@empty

File t: ltfntcmd.dtx Date: 1995/07/03 Version v3.3s 194 In this case there is a \nocorr at the start but not at the end, so \check@icl should be empty.

50  \let \check@icl \@empty
51  \else

Otherwise there is a \nocorr both at the start and elsewhere, so no italic corrections should be added.

52  \let \check@icl \@empty
53  \let \check@icr \@empty
54  \fi
55 \else
56  \ifx \reserved@c \@empty

In this case there is no \nocorr anywhere, so we need to check for an italic corection at both the beginning and the end.

57  \else

In this case there is no \nocorr at the start but there is one elsewhere, so no

\aftergroup is needed.
58  \let \check@icr \@empty
59  \fi
60 \fi

61 }

\maybe@ic \maybe@ic@ These macros implement the italic correction.

62 \def \maybe@ic {\futurelet\@let@token\maybe@ic@}
63 \def \maybe@ic@ {%

We first check to see if the current font is also sloped. (But do not forget the message Rainer sent about an upright font with non-zero slope!)

64 \ifdim \fontdimen\@ne\font>\z@
65 \else
66  \@tempswatrue

It would be possible, but probably not worthwhile, to continue the forward scan beyond any closing braces.

67  \expandafter\@tfor\expandafter\reserved@a\expandafter:\expandafter=%
68  \nocorrlist

We have to hide the \@let@token in the macro \t@st@ic rather than testing it directly in the loop since it might be \let to a \fi or \else, which would result in chaos.

69  \do \t@st@ic

Frank thinks that the next bit it is inefficient if done after the second change. Chris thinks that most all of this is inefficient for the commonest cases: but that is the price of a cleverer algorithm. It is certainly needed to deal with the use of

\nolinebreak.
70  \if@tempswa \sw@slant \fi
71 \fi

72 }

\t@st@ic The next token in the input stream is stored in \@let@token via a \let, the current token from \nocorrlist is stored via \def in \reserved@a. To compare them we have to fiddle around a bit.

If the only things to check were characters then this could be done via an \if thus their catcodes would not matter; but this will not work whilst \futurelet is used above.

73 \def \t@st@ic {%
74 \expandafter\let\expandafter\reserved@b\expandafter=\reserved@a\relax
75 \ifx\reserved@b\@let@token

If they are the same we record the fact and jump out of the loop.

76  \@tempswafalse
77  \@break@tfor
78 \fi

79 }

\sw@slant \fix@penalty The definition of the mysterious \sw@slant command is as follows.

80 \def \sw@slant {%

It is surely correct to put in an italic correction when there is no skip. If the last thing on the list is actually a zero skip (including things whose dimension part is zero, such as \hfill), or anything other than a sloped character, then the italic correction will have no effect.

In order to work correctly with unbreakable spaces from ~ (and other common forms of line-breaking control) we also move back across a penalty before the glue.

81 \ifdim \lastskip=\z@
82  \fix@penalty
83 \else
84  \skip@ \lastskip
85  \unskip
86  \fix@penalty
87  \hskip \skip@
88 \fi

89 }

The above code means: “If there is a non-zero space just before the current position (\ifdim...) save the amount of that space (\skip@\lastskip), remove it (\unskip), then do a similar thing if there is a penalty just before the skip, and finally put the space back in.”

Since zero glue cannot be distinguished in this context from no glue, we dare not put in an \hskip in this case as this may produce an unwanted breakpoint. This is not satisfactory.

The penalty before the glue is handled similarly, with the same caveats concerning the zero case. Is this the first recorded use of \unpenalty in standard L^{A}TEX code?

90 \def \fix@penalty {%
91 \ifnum \lastpenalty=\z@
92  \@@italiccorr
93 \else
94  \count@ \lastpenalty
95  \unpenalty
96  \@@italiccorr
97  \penalty \count@
98 \fi

99 }

\nocorrlist This holds the list of characters that should prevent italic correction. They should be ordered by decreasing frequency of use. If any such character is made active later on one needs to redefine the list so that the active character becomes part of it.

100 \def \nocorrlist {,.}

\nfss@text This command will by default behave like a L^{A}TEX \mbox but may be redefined by packages such as amstext.sty to be a bit cleverer.

101 \ifx \nfss@text\@undefined
102 \def \nfss@text {\leavevmode\hbox}
103 \fi

\DeclareOldFontCommand This is the function used to create declarative font-changing commands that can

also be used to change alphabets in math-mode.

Usage: \DeclareOldFontCommand \fn{⟨font-change decls⟩} ⟨math-alphabet⟩ Here \fn is the font-declaration command being defined, ⟨font-change decls⟩ is

the declaration it will expand to in text-mode, and ⟨math-alphabet⟩ is the (single) math alphabet specifier which is to be used in math-mode.

It does not care whether the command being defined already exists but it does give a warning if it redefines anything.

Here are some typical examples of its use in conjunction with more basic NFSS2 font commands.

    \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
    \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
    \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}

104 \def \DeclareOldFontCommand #1#2#3{%
105 \DeclareRobustCommand #1{\@fontswitch {#2}{#3}}%

106 }

\@fontswitch \@@math@egroup \@@math@egroup These two commands actually do the necessary tests and declarative font- or alphabet-changing.

107 \def \@fontswitch #1#2{%
108 \ifmmode
109  \let \math@bgroup \relax
110  \def \math@egroup {\let \math@bgroup \@@math@bgroup
111  \let \math@egroup \@@math@egroup}%

We need to have a \relax in the following line in case the #2 is something like \mathsf grabbing the next token as an argument. For this reason the code also uses explicit arguments again (see pr/1275).

112  #2\relax
113 \else
114  #1%
115 \fi

116 }

117 \let \@@math@bgroup \math@bgroup
118 \let \@@math@egroup \math@egroup

These commands are available only in the preamble.

119 \@onlypreamble \DeclareTextFontCommand
120 \@onlypreamble \DeclareOldFontCommand

47 Initialization

\normalsize This is defined to produce an error.

121 \def\normalsize{%
122 \@latex@error {The font size command \protect\normalsize\space
123  is not defined:\MessageBreak
124  there is probably something wrong with
125  the class file}\@eha

126 } 127 ⟨/2ekernel⟩

File t: ltfntcmd.dtx Date: 1995/07/03 Version v3.3s 198

File u

ltcounts.dtx

48 Counters and Lengths

Commands for defining and using counters. This file defines:

\newcounter To define a new counter. \setcounter To set the value of counters.

\addtotcounter Increase the counter #1 by the number #2. \steptcounter Increase a counter by one.

\refsteptcounter Increase a counter by one, also setting the value used by \label.

\value For accessing the value of the counter as a TEX number (as opposed to

\the⟨counter⟩ which expands to the printed representation of ⟨counter⟩)

\arabic \arabic{⟨counter⟩}: 1, 2, 3, … \roman \roman{⟨counter⟩}: i, ii, ii, … \Roman \Roman{⟨counter⟩}: I, II, II, … \alph \alph{⟨counter⟩}: a, b, c, … \Alph \Alph{⟨counter⟩}: A, B, C, …

\fnsymbol      \fnsymbol{⟨counter⟩}: ∗, †, ‡, . . .

1 ⟨∗2ekernel⟩

2 \message{env. counters,}

\subsection{Environment Counter Macros}

An environment foo has an associated counter defined by the following control sequences:

\c@foo : Contains the counter’s numerical value.

  It is defined by \newcount\foocounter.

\thefoo : Macro that expands to the printed value of \foocounter. For example, if sections are numbered within chapters, and section headings look like

Section II-3. The Nature of Counters then \thesection might be defined by:

   \def\thesection
      {\@Roman{\c@chapter}-\@arabic{\c@section}}

\p@foo : Macro that expands to a printed ’reference prefix’ of counter foo. Any \ref to a value created by counter foo will produce the expansion of \p@foo\thefoo when the the \label command is executed.

NOTE: \thefoo and \p@foo MUST BE DEFINED IN SUCH A WAY THAT

\edef\bar{\thefoo} OR \edef\bar{\p@foo}

DEFINES \bar SO THAT IT WILL EVALUATE TO THE COUNTER VALUE AT THE TIME OF THE \edef, EVEN AFTER \foocounter AND ANY OTHER COUNTERS HAVE BEEN CHANGED. THIS WILL HAPPEN IF YOU USE THE STANDARD

COMMANDS \@arabic,
\@Roman, ETC.

\cl@foo : List of counters to be reset when foo stepped.

Has format \@elt{countera}\@elt{counterb}\@elt{counterc}.

The following commands are used to define and modify counters. \setcounter{FOO}{VAL} : Globally sets \foocounter equal to VAL.

\addtocounter{FOO}{VAL}: Globally increments \foocounter by

VAL.

\newcounter{NEWCTR}[OLDCTR] :

Defines NEWCTR to be a counter, which is reset when

counter OLDCTR is stepped. If NEWCTR already defined produces ’c@NEWCTR already defined’ error.

\value{CTR} :

produces the value of counter CTR, for use with

       a \setcounter or \addtocounter command.

\stepcounter{FOO} : Globally increments counter \c@FOO

and resets all subsidiary counters.

\refstepcounter{FOO} : Same a \stepcounter, but it also defines
                         \@currentreference so that a subsequent

\label{bar} command causes \ref{bar} to generate the current value of counter foo.

\@definecounter{FOO} :

Initializes counter FOO (with empty reset list), defines \p@FOO and \theFOO to be null. Also adds FOO to \cl@@ckpt

– the reset list of a dummy counter @ckpt used for taking checkpoints.

\@addtoreset{FOO}{BAR} :

Adds counter FOO to the list of counters \cl@BAR to be reset when counter bar is stepped.

NUMBERING MACROS:

 \arabic{COUNTER} :

Representation of COUNTER as arabic numerals.

Changed 29 Apr 86 to make it print the obvious thing it COUNTER not positive.

\roman{COUNTER} : Representation of COUNTER as lower-case

Roman numerals.

\Roman{COUNTER} : Representation of COUNTER as upper-case

Roman numerals.

\alph{COUNTER} : Representation of COUNTER as a lower-case

letter: 1 = a, 2 = b, etc.

\Alph{COUNTER} : Representation of COUNTER as an upper-case

letter: 1 = A, 2 = B, etc.

\fnsymbol{COUNTER} : Representation of COUNTER as a footnote symbol: 1 = *, 2 = \dagger, etc.

THE ABOVE ARE IMPLEMENTED IN TERMS OF THE FOLLOWING:

     \@arabic\FOOcounter :

Representation of \FOOcounter as arabic numerals.

     \@roman\FOOcounter :

Representation of \FOOcounter as lower-case

Roman numerals.

     \@Roman\FOOcounter :

Representation of \FOOcounter as upper-case Roman numerals.

     \@alph\FOOcounter :

Representation of \FOOcounter as a lower-case letter: 1 = a, 2 = b, etc.

     \@Alph\FOOcounter :

Representation of \FOOcounter as an upper-case letter: 1 = A, 2 = B, etc.

     \@fnsymbol\FOOcounter :

Representation of \FOOcounter as a footnote symbol.

 3 \def\setcounter#1#2{\@ifundefined{c@#1}{\@nocounterr{#1}}%
 4 {\global\csname c@#1\endcsname#2\relax}}
 5 \def\addtocounter#1#2{\@ifundefined{c@#1}{\@nocounterr{#1}}%
 6 {\global\advance\csname c@#1\endcsname #2\relax}}
 7 \def\newcounter#1{\expandafter\@ifdefinable \csname c@#1\endcsname
 8  {\@definecounter{#1}}\@ifnextchar[{\@newctr{#1}}{}}
 9 \def\value#1{\csname c@#1\endcsname}
10 \def\@newctr#1[#2]{%
11 \@ifundefined{c@#2}{\@nocounterr{#2}}{\@addtoreset{#1}{#2}}}
12 \def\stepcounter#1{\addtocounter{#1}\@ne
13  \begingroup\let\@elt\@stpelt \csname cl@#1\endcsname\endgroup}
14 \def\@stpelt#1{\global\csname c@#1\endcsname \z@}
15 \def\cl@@ckpt{\@elt{page}}
\@definecounter
16 \def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
17  \setcounter{#1}\z@
18  \global\expandafter\let\csname cl@#1\endcsname\@empty
19  \@addtoreset{#1}{@ckpt}%
20  \global\expandafter\let\csname p@#1\endcsname\@empty
21  \expandafter
22  \gdef\csname the#1\expandafter\endcsname\expandafter
23  {\expandafter\@arabic\csname c@#1\endcsname}}

File u: ltcounts.dtx Date: 1995/05/20 Version v1.1c 201

24 \def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
\arabic \roman \Roman \alph \Alph \fnsymbol Numbering commands for definitions of \theCOUNTER and \list arguments.

\fnsymbol produces the standard footnoting symbols: asterisk, dagger, etc. All commands can now be used in text and math mode.

25 \def\arabic#1{\expandafter\@arabic\csname c@#1\endcsname}
26 \def\roman#1{\expandafter\@roman\csname c@#1\endcsname}
27 \def\Roman#1{\expandafter\@Roman\csname c@#1\endcsname}
28 \def\alph#1{\expandafter\@alph\csname c@#1\endcsname}
29 \def\Alph#1{\expandafter\@Alph\csname c@#1\endcsname}
30 \def\fnsymbol#1{\expandafter\@fnsymbol\csname c@#1\endcsname}

\@arabic \@roman \@Roman \@alph \@Alph Internal implementation of the above commands.

31 \def\@arabic#1{\number #1}  %% changed 29 Apr 86
32 \def\@roman#1{\romannumeral #1}
33 \def\@Roman#1{\expandafter\uppercase\expandafter{\romannumeral #1}}
34 \def\@alph#1{%
35 \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or
36 k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or
37  y\or z\else\@ctrerr\fi}
38 \def\@Alph#1{%
39 \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or
40 K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or
41  Y\or Z\else\@ctrerr\fi}

\@fnsymbol Typesetting old fashioned footnote symbols. This can be done both in text or math mode now.

42 \def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
43 \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger
44 \or \ddagger\ddagger \else\@ctrerr\fi}}

45 ⟨/2ekernel⟩

File u: ltcounts.dtx Date: 1995/05/20 Version v1.1c 202

File v

ltpageno.dtx

49 Page Numbering

Page numbers are produced by a page counter, used just like any other counter. The only difference is that \c@page contains the number of the next page to be output (the one currently being produced), rather than one minus it. Thus, it is normally initialized to 1 rather than 0. \c@page is defined to be \count0, rather than a count assigned by \newcount.

\pagenumbering The user sets the pagenumber style with the \pagenumbering{⟨foo⟩} command, which sets the page counter to 1 and defines \thepage to be \foo. For example, \pagenumbering{roman} causes pages to be numbered i, ii, etc.

1 ⟨∗2ekernel⟩

 2 \message{page nos.,}
 3 \countdef\c@page=0 \c@page=1
 4 \def\cl@page{}
 5 \def\pagenumbering#1{%
 6 \global\c@page \@ne \gdef\thepage{\csname @#1\endcsname
 7 \c@page}}

8 ⟨/2ekernel⟩

File w

ltxref.dtx

50 Cross Referencing

The user writes \label{⟨foo⟩} to define the following cross-references:

\ref{⟨foo⟩}: value of most recently incremented referencable counter. in the current environment. (Chapter, section, theorem and enumeration counters counters are referencable, footnote counters are not.)

\pageref{⟨foo⟩}: page number at which \label{foo} command appeared. where foo can be any string of characters not containing ‘\’, ‘{’ or ‘}’.

Note: The scope of the \label command is delimited by environments, so

\begin{theorem} \label{foo} ... \end{theorem} \label{bar}

defines \ref{foo} to be the theorem number and \ref{bar} to be the current section number.

Note: \label does the right thing in terms of spacing – i.e., leaving a space on both sides of it is equivalent to leaving a space on either side.

50.1 Cross Referencing

1 ⟨∗2ekernel⟩

 2 \message{x-ref,}

This is implemented as follows. A referencable counter CNT is incremented by the command \refstepcounter{CNT} , which sets

  \@currentlabel == {CNT}{eval(\p@cnt\theCNT)}. The command

\label{FOO} then writes the following on file \@auxout :

        \newlabel{FOO}{{eval(\@currentlabel)}{eval(\thepage)}}
  \ref{FOO} ==

BEGIN

if \r@foo undefined

then @refundefined := G T ?? Warning: ’reference foo on page ... undefined’

        else \@car \eval(\r@FOO)\@nil

fi END

  \pageref{foo} =

BEGIN

if \r@foo undefined

then @refundefined := G T ?? Warning: ’reference foo on page ... undefined’

        else \@cdr \eval(\r@FOO)\@nil

fi END

\G@refundefinedtrue \@refundefined This does not save on name-space (since \G@refundefinedfalse was never

needed) but it does make the implmentation of such one-way switches more consistent. The extra macro to make the change is used since this change appears several times.

Note despite its name, \G@refundefinedtrue does not correspnd to an \if command, and there is no matching … false. It would be more natural to call the command \G@refundefined (as inspection of the change log will reveal) but unfortunately such a change would break any package that had defined a \ref-like command that mimicked the definition of \ref, calling \G@refundefinedtrue. Inspection of the TEX archives revealed several such packages, and so this command has been named … true so that the definition of \ref need not be changed, and the packages will work without change.

 3 % \newif\ifG@refundefined
 4 % \def\G@refundefinedtrue{\global\let\ifG@refundefined\iftrue}
 5 % \def\G@refundefinedfalse{\global\let\ifG@refundefined\iffalse}
 6 \def\G@refundefinedtrue{%
 7 \gdef\@refundefined{%
 8  \@latex@warning@no@line{There were undefined references}}}
 9 \let\@refundefined\relax

\ref \pageref \@setref Referencing a \label. RmS 91/10/25: added a few extra \reset@font, as sug-

gested by Bernd Raichle RmS 92/08/14: made \ref and \pageref robust RmS 93/09/08: Added setting of refundefined switch.

10 \def\@setref#1#2#3{%
11 \ifx#1\relax
12 \protect\G@refundefinedtrue
13 \nfss@text{\reset@font\bfseries ??}%
14 \@latex@warning{Reference `#3' on page \thepage \space
15  undefined}%
16 \else
17 \expandafter#2#1\null
18 \fi}
19 \def\ref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
20 \def\pageref#1{\expandafter\@setref\csname r@#1\endcsname
21  \@secondoftwo{#1}}

\newlabel This command will be written to the .aux file to pass label information from one run to another.

\@newl@bel The internal form of \newlabel and \bibcite.
22 \def\@newl@bel#1#2#3{%
23 \@ifundefined{#1@#2}%
24  \relax
25  {\gdef \@multiplelabels {%
26  \@latex@warning@no@line{There were multiply-defined labels}}%
27  \@latex@warning@no@line{Label `#2' multiply defined}}%
28 \global\@namedef{#1@#2}{#3}}
29 \def\newlabel{\@newl@bel r}
30 \@onlypreamble\@newl@bel

\if@multiplelabels \@multiplelabels This is redefined to produce a warning if at least one label is defined more than once. It is executed by the \enddocument command.

31 \let \@multiplelabels \relax
\label \refstepcounter The commands \label and \refstepcounter have been changed to allow

\protect’ed commands to work properly. For example,

   \def\thechapter{\protect\foo{\arabic{chapter}.\roman{section}}}

will cause a \label{bar} command to define \ref{bar} to expand to something like \foo{4.d}. Change made 20 Jul 88.

32 \def\label#1{\@bsphack
33 \protected@write\@auxout{}%
34  {\string\newlabel{#1}{{\@currentlabel}{\thepage}}}%
35 \@esphack}
36 \def\refstepcounter#1{\stepcounter{#1}%
37  \protected@edef\@currentlabel
38  {\csname p@#1\endcsname\csname the#1\endcsname}%

39 }

\@currentlabel For \label commands that come before any environment

40 \def\@currentlabel{}

41 ⟨/2ekernel⟩

File x

ltlength.dtx

51 Lengths

\newlength Declare #1 to be a new length command.

\setlength Set the length command, #1, to the value #2. \addtolength Increase the value of the length command, #1, by the value #2. \settowidth Set the length, #1 to the width of a box containing #2. \settoheight Set the length, #1 to the height of a box containing #2. \settodepth Set the length, #1 to the depth of a box containing #2.

1 ⟨∗2ekernel⟩

               2 \message{lengths,}
  \newlength
               3 \def\newlength#1{\@ifdefinable#1{\newskip#1}}
  \setlength
               4 \def\setlength#1#2{#1#2\relax}
\addtolength  \relax added 24 Mar 86
               5 \def\addtolength#1#2{\advance#1 #2\relax}
\settoheight \settodepth \settowidth \@settodim The obvious analogs of \settowidth.
               6 \def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa

Clear the memory afterwards (which might be a lot).

               7  \setbox\@tempboxa\box\voidb@x}
               8 \def\settoheight{\@settodim\ht}
               9 \def\settodepth {\@settodim\dp}
              10 \def\settowidth {\@settodim\wd}

\@settopoint This macro takes the contents of the skip register that is supplied as its argument and removes the fractional part to make it a whole number of points. This can be used in class files to avoid values like 345.4666666pt when calulating a dimension.

              11 \def\@settopoint#1{\divide#1\p@\multiply#1\p@}

12 ⟨/2ekernel⟩

File y

ltmiscen.dtx

52 Miscellaneous Environments

This section implements the basic environment mechanism, and also a few specific environments including document, The math environments and related commands, the ‘flushing’ environments, (center, flushleft, flushright), and verbatim.

1 ⟨∗2ekernel⟩

 2 \message{environments,}

52.1 Environments

\begin{foo} and \end{foo} are used to delimit environment foo.

\begin{foo} starts a group and calls \foo if it is defined, otherwise it does nothing.

\end{foo} checks to see that it matches the corresponding \begin and if so, it calls \endfoo and does an \endgroup. Otherwise, \end{foo} does nothing.

If \end{foo} needs to ignore blanks after it, then \endfoo should globally set

the @ignore switch true with \global\@ignoretrue.

NOTE: \@@end is defined to be the \end command of TEX82.

\enddocument is the user’s command for ending the manuscript file.

\stop is a panic button — to end TEX in the middle.

 \enddocument ==

BEGIN \@checkend{document} %% checks for unmatched \begin

    \clearpage
    \begingroup

if @filesw = true

then close file @mainaux if G@refundefined = true then LaTeX Warning: ’There are undefined references.’ fi if @multiplelabels = true then LaTeX Warning:

’One or more label(s) multiply defined.’ else \@setckpt {ARG1}{ARG2} == null

                \newlabel{LABEL}{VAL} ==

BEGIN

                      \reserved@a == VAL
                      if def(\reserved@a) = def(\r@LABEL)

else @tempswa := true fi END

\bibcite{LABEL}{VAL} == null

BEGIN

                      \reserved@a == VAL
                      if def(\reserved@a) = def(\g@LABEL)

else @tempswa := true fi

END @tempswa := false make @ a letter

                \input \jobname.AUX

if @tempswa = true

then LaTeX Warning: ’Label may have changed.

Rerun to get cross-references right.’

fi  fi  fi

    \endgroup

finish up

END

  \@writefile{EXT}{ENTRY} ==

if tf@EXT undefined

        else \write\tf@EXT{ENTRY}

fi

\@currenvir The name of the current environment. Initialized to document to so that \end{document} works correctly.

 3 \def\@currenvir{document}
\if@ignore
\@ignoretrue
\@ignorefalse

 4 \newif\if@ignore
\enddocument
 5 \def\enddocument{%

The \end{document} hook is executed first. If necessary it can contain a \clearpage to output dangling floats first. In this position it can also contain something like \end{foo} so that the whole document effectively starts and ends with some special environment. However, this must be used with care, eg if two applications would use this without knowledge of each other the order of the environments will be wrong after all.

 6 \@enddocumenthook
 7 \@checkend{document}%
 8 \clearpage
 9 \begingroup
10  \if@filesw
11  \immediate\closeout\@mainaux
12  \let\@setckpt\@gobbletwo
13  \let\@newl@bel\@testdef

The previous line is equiv to setting

       \def\newlabel{\@testdef r}%
       \def\bibcite{\@testdef b}%
14  \@tempswafalse
15  \makeatletter \input\jobname.aux
16  \fi
17  \@dofilelist

First we check for font size substitution bigger than \fontsubfuzz. The \relax is necessary because this is a macro not a register.

18  \ifdim \font@submax >\fontsubfuzz\relax

In case you wonder about the \@gobbletwo inside the message below, this is a horrible hack to remove the tokens \on@line. that are added by \@font@warning at the end.

19  \@font@warning{Size substitutions with differences\MessageBreak
20  up to \font@submax\space have occured.\@gobbletwo}%
21  \fi

The macro \@defaultsubs is initially \relax but gets redefined to produce a warning if there have been some default font substitutions.

22  \@defaultsubs

The macro \@refundefined is initially \relax but gets redefined to produce a warning if there are undefined refs.

23  \@refundefined

If a label is defined more than once, \@tempswa will always be true and thus produce a “Label(s) may … ” warning. But since a rerun will not solve that problem (unless one uses a package like varioref that generates labels on the fly), we suppress this message.

24  \if@filesw
25  \ifx \@multiplelabels \relax
26  \if@tempswa
27  \@latex@warning@no@line{Label(s) may have changed.
28  Rerun to get cross-references right}%
29  \fi
30  \else
31  \@multiplelabels
32  \fi
33  \fi
34 \endgroup
35 \deadcycles\z@\@@end}
\@testdef
36 \def\@testdef #1#2#3{%
37 \def\reserved@a{#3}\expandafter \ifx \csname #1@#2\endcsname
38 \reserved@a  \else \@tempswatrue \fi}
\@writefile
39 \long\def\@writefile#1#2{%
40 \@ifundefined{tf@#1}\relax
41  {\@temptokena{#2}%
42  \immediate\write\csname tf@#1\endcsname{\the\@temptokena}%
43  }%

44 }

\stop
45 \def\stop{\clearpage\deadcycles\z@\let\par\@@par\@@end}

46 \everypar{\@nodocument} %% To get an error if text appears before the
47 \nullfont               %% \begin{document}

\begin, \end, and \@checkend changed so \end{document} will catch an unmatched \begin. Changed 24 May 89 as suggested by Frank Mittelbach and Rainer Sch\"opf.

\begin{NAME} ==

BEGIN

IF \NAME undefined THEN \reserved@a == BEGIN report error END

                     ELSE \reserved@a ==
                                (\@currenvir :=L NAME) \NAME

FI @ignore :=G F %% Added 30 Nov 88

 \begingroup
 \@endpe := F
 \@currenvir :=L NAME
 \NAME

END

\end{NAME} ==

BEGIN

\endNAME
\@checkend{NAME}
\endgroup

IF @endpe = T %% @endpe set True by \@endparenv

  THEN \@doendpe           %% \@doendpe redefines \par and
\everypar

%% to suppress paragraph indentation in

FI %% immediately following text IF @ignore = T

THEN @ignore :=G F

       \ignorespaces

FI END

\@checkend{NAME} ==

BEGIN

IF \@currenvir = NAME
  ELSE \@badend{NAME}

FI END

\begin
48 \def\begin#1{%
49 \@ifundefined{#1}%
50  {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
51  {\def\reserved@a{\def\@currenvir{#1}%
52  \edef\@currenvline{\on@line}%
53  \csname #1\endcsname}}%
54 \global\@ignorefalse %% \global...added 2 May 90

55 \begingroup\@endpefalse\reserved@a}
\end
56 \def\end#1{%
57 \csname end#1\endcsname\@checkend{#1}%
58 \expandafter\endgroup\if@endpe\@doendpe\fi
59 \if@ignore\global\@ignorefalse\ignorespaces\fi}
\@checkend
60 \def\@checkend#1{\def\reserved@a{#1}\ifx
61  \reserved@a\@currenvir \else\@badend{#1}\fi}

\@currenvline We do need a default value for \@currenvline on top-level since the document environment cancels the brace group. This means that a missmatch with \begin {document} will not produce a line number. Thus the outer default must be \@empty or we will end up with two spaces.

62 \let\@currenvline\@empty

52.2 Center, Flushright, Flushleft

63 \message{center,}
\center, \flushright and \flushleft set
  \rightskip = 0pt or \@flushglue (as appropriate)

\leftskip = 0pt or \@flushglue (as appropriate)

  \parindent = 0pt
  \parfillskip = 0pt. (except \flushleft)
  \\  == \par \vskip -\parskip

\\[LENGTH] == \\ \vskip LENGTH

  \\*  == \par \penalty 10000 \vskip -\parskip

\\*[LEN] == \\* \vskip LENGTH

They invoke the trivlist environment to handle vertical spacing before and after them.

\centering, \raggedright and \raggedleft are the declaration analogs

of the above.

\raggedright has a more universal effect, however. It sets \@rightskip := flushglue. Every environment, like the list environments, that set \rightskip to its ’normal’ value set it to \@rightskip

\@centercr
64 \def\@centercr{\ifhmode \unskip\else \@nolnerr\fi
65  \par\@ifstar{\nobreak\@xcentercr}\@xcentercr}
\@xcentercr
66 \def\@xcentercr{\addvspace{-\parskip}\@ifnextchar
67  [\@icentercr\ignorespaces}

\@icentercr
68 \def\@icentercr[#1]{\vskip #1\ignorespaces}

center We use \relax to prevent \item scanning too far.

69 \def\center{\trivlist \centering\item\relax}
70 \def\centering{\let\\\@centercr\rightskip\@flushglue\leftskip\@flushglue
71 \parindent\z@\parfillskip\z@skip}
72 \def\endcenter{\endtrivlist}
73 \newskip\@rightskip \@rightskip \z@skip

flushleft We use \relax to prevent \item scanning too far.

74 \def\flushleft{\trivlist \raggedright\item\relax}
75 \def\raggedright{%
76 \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip
77 \leftskip\z@skip
78 \parindent\z@}
79 \def\endflushleft{\endtrivlist}

flushright We use \relax to prevent \item scanning too far.

80 \def\flushright{\trivlist \raggedleft\item\relax}
81 \def\raggedleft{\let\\\@centercr\rightskip\z@skip\leftskip\@flushglue
82 \parindent\z@\parfillskip\z@skip}
83 \def\endflushright{\endtrivlist}
84 \message{verbatim,}

52.3 Verbatim

The verbatim environment uses the fixed-width \ttfamily font, turns blanks into spaces, starts a new line for each carrige return (or sequence of consecutive carriage returns), and interprets EVERY character literally. I.e., all special characters \, {, $, etc. are \catcode'd to ’other’.

The command \verb produces in-line verbatim text, where the argument is delimited by any pair of characters. E.g., \verb #...# takes ’...’ as its argument, and sets it verbatim in \ttfamily font.

The *-variants of these commands is the same, except that spaces print as the TeXbook’s space character instead of as blank spaces.

\@vobeyspaces
85 {\catcode`\ =\active%
86 \gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}}
\@xobeysp
87 \def\@xobeysp{\leavevmode\nobreak\ }

\@xverbatim
\@sxverbatim
 88 \begingroup \catcode `|=0 \catcode `[= 1
 89 \catcode`]=2 \catcode `\{=12 \catcode `\}=12
 90 \catcode`\\=12 |gdef|@xverbatim#1\end{verbatim}[#1|end[verbatim]]
 91 |gdef|@sxverbatim#1\end{verbatim*}[#1|end[verbatim*]]
 92 |endgroup

\@verbatim Real start of verbatim environment We use \relax to prevent \item scanning too far.

 93 \def\@verbatim{\trivlist \item\relax
 94 \if@minipage\else\vskip\parskip\fi
 95 \leftskip\@totalleftmargin\rightskip\z@skip
 96 \parindent\z@\parfillskip\@flushglue\parskip\z@skip

Added \@@par to clear possible \parshape definition from a surrounding list (the verbatim guru says).

 97 \@@par
 98 \@tempswafalse
 99 \def\par{%
100  \if@tempswa

A \leavevmode added: needed if, for example, a blank verbatim line is the first thing in a list item (wow!).

101  \leavevmode \null \@@par\penalty\interlinepenalty
102  \else
103  \@tempswatrue
104  \ifhmode\@@par\penalty\interlinepenalty\fi
105  \fi}%

To allow customization we hide the font used in a separate macro.

106 \obeylines \verbatim@font \@noligs
107 \let\do\@makeother \dospecials

To avoid a breakpoint after the labels box, we remove the penalty put there by the list macros: another use of \unpenalty!

108 \everypar \expandafter{\the\everypar \unpenalty}%

109 }

\begin{matrix}\verbatim \\ \endverbatim \end{matrix} (RmS 93/09/19) Protected against ‘missing item’ error message triggered by empty verbatim environment.

110 \def\verbatim{\@verbatim \frenchspacing\@vobeyspaces \@xverbatim}
111 \def\endverbatim{\if@newlist \leavevmode\fi\endtrivlist}

\verbatim@font Macro to select the font used for verbatim typesetting. It also does other work if necessary for the font used.

112 \def\verbatim@font{\normalfont\ttfamily}
verbatim*
113 \@namedef{verbatim*}{\@verbatim\@sxverbatim}
114 \expandafter\let\csname endverbatim*\endcsname =\endverbatim
\@makeother
115 \def\@makeother#1{\catcode`#112\relax}

116 \let\verb@balance@group\@empty

117

118 \def\verb@egroup{\global\let\verb@balance@group\@empty\egroup}

119

120 \begingroup
121 \obeylines%
122 \gdef\verb@eol@error{\obeylines%
123  \def^^M{\verb@egroup\@latex@error{%
124  \noexpand\verb ended by end of line}\@ehc}}%
125 \endgroup

\verb Typesetting a small piece verbatim.

126 \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
127 \bgroup \verbatim@font\@noligs
128  \verb@eol@error \let\do\@makeother \dospecials
129  \@ifstar\@sverb\@verb}

Definitions of \@sverb and \@verb changed so \verb+ foo+ does not lose leading blanks when it comes at the beginning of a line. Change made 24 May 89. Suggested by Frank Mittelbach and Rainer Sch\"opf.

130 \def\@sverb#1{%
131 \catcode`#1\active
132 \lccode`\~`#1%
133 \gdef\verb@balance@group{\verb@egroup
134  \@latex@error{\noexpand\verb illegal in command argument}\@ehc}%
135 \aftergroup\verb@balance@group
136 \lowercase{\let~\verb@egroup}}%
137 \def\@verb{\@vobeyspaces \frenchspacing \@sverb}
\verbatim@nolig@list
138 \def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-}
\do@noligs
139 \def\do@noligs#1{%
140 \catcode`#1\active
141 \begingroup
142  \lccode`\~`#1\relax
143  \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}}

\@noligs To stay compatible with packages that use \@noligs we keep it.

144 \def\@noligs{\let\do\do@noligs \verbatim@nolig@list}

145 ⟨/2ekernel⟩

File z

ltmath.dtx

¡*driver¿ ¡/driver¿

53 Math setup

This file contains a lot of the original plain TEX code, as well as the L^{A}TEX environments for math. It still needs sorting out.

1 ⟨∗2ekernel⟩

 2 \message{math definitions,}

53.1 Math commands based on plain TEX

53.1.1 The log-like functions

The standard operators:

 3 \def\log{\mathop{\operator@font log}\nolimits}
 4 \def\lg{\mathop{\operator@font lg}\nolimits}
 5 \def\ln{\mathop{\operator@font ln}\nolimits}
 6 \def\lim{\mathop{\operator@font lim}}
 7 \def\limsup{\mathop{\operator@font lim\,sup}}
 8 \def\liminf{\mathop{\operator@font lim\,inf}}
 9 \def\sin{\mathop{\operator@font sin}\nolimits}
10 \def\arcsin{\mathop{\operator@font arcsin}\nolimits}
11 \def\sinh{\mathop{\operator@font sinh}\nolimits}
12 \def\cos{\mathop{\operator@font cos}\nolimits}
13 \def\arccos{\mathop{\operator@font arccos}\nolimits}
14 \def\cosh{\mathop{\operator@font cosh}\nolimits}
15 \def\tan{\mathop{\operator@font tan}\nolimits}
16 \def\arctan{\mathop{\operator@font arctan}\nolimits}
17 \def\tanh{\mathop{\operator@font tanh}\nolimits}
18 \def\cot{\mathop{\operator@font cot}\nolimits}
19 \def\coth{\mathop{\operator@font coth}\nolimits}
20 \def\sec{\mathop{\operator@font sec}\nolimits}
21 \def\csc{\mathop{\operator@font csc}\nolimits}
22 \def\max{\mathop{\operator@font max}}
23 \def\min{\mathop{\operator@font min}}
24 \def\sup{\mathop{\operator@font sup}}
25 \def\inf{\mathop{\operator@font inf}}
26 \def\arg{\mathop{\operator@font arg}\nolimits}
27 \def\ker{\mathop{\operator@font ker}\nolimits}
28 \def\dim{\mathop{\operator@font dim}\nolimits}
29 \def\hom{\mathop{\operator@font hom}\nolimits}
30 \def\det{\mathop{\operator@font det}}
31 \def\exp{\mathop{\operator@font exp}\nolimits}
32 \def\Pr{\mathop{\operator@font Pr}}
33 \def\gcd{\mathop{\operator@font gcd}}
34 \def\deg{\mathop{\operator@font deg}\nolimits}

And some operators have to be done by hand:

35 \def\bmod{\nonscript\mskip-\medmuskip\mkern5mu
36 \mathbin{\operator@font mod}\penalty900\mkern5mu%
37 \nonscript\mskip-\medmuskip}
38 \def\pmod#1{\allowbreak\mkern18mu({\operator@font mod}\,\,#1)}

53.1.2 Biggggg

Variants on \big and friends for use with delimiters:

39 \def\bigl{\mathopen\big}
40 \def\bigm{\mathrel\big}
41 \def\bigr{\mathclose\big}
42 \def\Bigl{\mathopen\Big}
43 \def\Bigm{\mathrel\Big}
44 \def\Bigr{\mathclose\Big}
45 \def\biggl{\mathopen\bigg}
46 \def\biggm{\mathrel\bigg}
47 \def\biggr{\mathclose\bigg}
48 \def\Biggl{\mathopen\Bigg}
49 \def\Biggm{\mathrel\Bigg}
50 \def\Biggr{\mathclose\Bigg}

53.1.3 The UNSORTED Rest

The other math commands are lifted from plain TEX.

51 \newdimen\jot \jot=3pt
52 \newcount\interdisplaylinepenalty \interdisplaylinepenalty=100
53 \def\choose{\atopwithdelims()}
54 \def\brack{\atopwithdelims[]}
55 \def\brace{\atopwithdelims\{\}}
56 \def\mathpalette#1#2{\mathchoice{#1\displaystyle{#2}}%
57 {#1\textstyle{#2}}{#1\scriptstyle{#2}}{#1\scriptscriptstyle{#2}}}
58 \newbox\rootbox
59 \def\root#1\of{\setbox\rootbox\hbox{$\m@th\scriptscriptstyle{#1}$}
60 \mathpalette\r@@t}
61 \def\r@@t#1#2{\setbox\z@\hbox{$\m@th#1\sqrtsign{#2}$}
62 \dimen@\ht\z@ \advance\dimen@-\dp\z@
63 \mkern5mu\raise.6\dimen@\copy\rootbox \mkern-10mu \box\z@}
\phantom \mathstrut
64 \newif\ifv@ \newif\ifh@
65 \def\vphantom{\v@true\h@false\ph@nt}
66 \def\hphantom{\v@false\h@true\ph@nt}
67 \def\phantom{\v@true\h@true\ph@nt}
68 \def\ph@nt{%
69 \ifmmode
70  \expandafter\mathpalette\expandafter\mathph@nt
71 \else
72  \expandafter\makeph@nt
73 \fi}

74 \def\makeph@nt#1{%
75 \setbox\z@\hbox{\color@begingroup#1\color@endgroup}\finph@nt}
76 \def\mathph@nt#1#2{%
77 \setbox\z@\hbox{$\m@th#1{#2}$}\finph@nt}
78 \def\finph@nt{%
79 \setbox\tw@\null
80 \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@\fi
81 \ifh@ \wd\tw@\wd\z@\fi \box\tw@}
82 \def\mathstrut{\vphantom(}
\smash
83 \def\smash{%
84 \relax % \relax, in case this comes first in \halign
85 \ifmmode
86  \expandafter\mathpalette\expandafter\mathsm@sh
87 \else
88  \expandafter\makesm@sh
89 \fi}
90 \def\makesm@sh#1{%
91 \setbox\z@\hbox{\color@begingroup#1\color@endgroup}\finsm@sh}
92 \def\mathsm@sh#1#2{%
93 \setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh}
94 \def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \box\z@}
\buildrel
95 \def\buildrel#1\over#2{\mathrel{\mathop{\kern\z@#2}\limits^{#1}}}
\cases
96 \def\cases#1{\left\{\,\vcenter{\normalbaselines\m@th
97  \ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.}
98 \def\matrix#1{\null\,\vcenter{\normalbaselines\m@th
99  \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
100  \mathstrut\crcr\noalign{\kern-\baselineskip}
101  #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}
102 \def\pmatrix#1{\left(\matrix{#1}\right)}
\bordermatrix
103 \def\bordermatrix#1{\begingroup \m@th
104 \@tempdima 8.75\p@
105 \setbox\z@\vbox{%
106  \def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}%
107  \ialign{$##$\hfil\kern2\p@\kern\@tempdima&\thinspace\hfil$##$\hfil
108  &&\quad\hfil$##$\hfil\crcr
109  \omit\strut\hfil\crcr\noalign{\kern-\baselineskip}%
110  #1\crcr\omit\strut\cr}}%
111 \setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}%
112 \setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}%
113 \setbox\tw@\hbox{$\kern\wd\@ne\kern-\@tempdima\left(\kern-\wd\@ne
114  \global\setbox\@ne\vbox{\box\@ne\kern2\p@}%
115  \vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\right)$}%
116 \null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup}

117 \def\openup{\afterassignment\@penup\dimen@=}
118 \def\@penup{\advance\lineskip\dimen@
119 \advance\baselineskip\dimen@
120 \advance\lineskiplimit\dimen@}
121 \newif\ifdt@p
122 \def\displ@y{\global\dt@ptrue\openup\jot\m@th
123 \everycr{\noalign{\ifdt@p \global\dt@pfalse \ifdim\prevdepth>-1000\p@
124  \vskip-\lineskiplimit \vskip\normallineskiplimit \fi
125  \else \penalty\interdisplaylinepenalty \fi}}}
126 \def\@lign{\tabskip\z@skip\everycr{}} % restore inside \displ@y
127 \def\displaylines#1{\displ@y \tabskip\z@skip
128 \halign{\hb@xt@\displaywidth{$\@lign\hfil\displaystyle##\hfil$}\crcr
129  #1\crcr}}
130 \let\sp=^\let\sb=_
131 %\def\,{\mskip\thinmuskip}      % already defined in ltspace
132 \def\>{\mskip\medmuskip}
133 \def\;{\mskip\thickmuskip}
134 \def\!{\mskip-\thinmuskip}
135 \def\*{\discretionary{\thinspace\the\textfont2\char2}{}{}}

\: Nickname for the medium space since \> is not available inside tabbing.

136 \let\:=\>
\prime@s
137 {\catcode`\'=\active \gdef'{^\bgroup\prim@s}}
138 \def\prim@s{%
139 \prime\futurelet\@let@token\pr@m@s}
140 \def\pr@m@s{%
141 \ifx'\@let@token
142  \expandafter\pr@@@s
143 \else
144  \ifx^\@let@token
145  \expandafter\expandafter\expandafter\pr@@@t
146  \else
147  \egroup
148  \fi
149 \fi}
150 \def\pr@@@s#1{\prim@s} \def\pr@@@t#1#2{#2\egroup}
151 {\catcode`\_=\active \gdef_{\_}} % _in math is
152  % either subscript or \_

53.2 Math Environments

{\( \atop \)} Produces $...$ with checks that \( isn’t used in math mode, and that \) is only used in math mode begun with \(.

153 \def\({\relax\ifmmode\@badmath\else$\fi}
154 \def\){\relax\ifmmode\ifinner$\else\@badmath\fi\else \@badmath\fi}

{\[ \atop \]} Produces $$...$$ with checks that \[ isn’t used in math mode, and that \] is only used in math mode begun with \].

155 \def\[{%
156 \relax\ifmmode
157  \@badmath
158 \else
159  \ifvmode
160  \nointerlineskip
161  \makebox[.6\linewidth]%
162  \fi
163  $$%%$$ BRACE MATCH HACK
164 \fi

165 }

166 \def\]{%
167 \relax\ifmmode
168  \ifinner
169  \@badmath
170  \else
171  $$%%$$ BRACE MATCH HACK
172  \fi
173 \else
174  \@badmath
175 \fi
176 \ignorespaces

177 }

math displaymath Disguises for \(...\) and \[...\].
178 \let\math=\(
179 \let\endmath=\)
180 \def\displaymath{\[}
181 \def\enddisplaymath{\]\global\@ignoretrue}

equation \c@equation Numbered equations, using the counter \c@equation. Note: The document style must define \theequation etc., and do the appropriate \@addtoreset. It should also redefine \@eqnnum if another format for the equation number is desired other than the standard (...), or to move the equation numbers to the flushleft. (See comment on the \def of \@eqnnum.)

182 \@definecounter{equation}
183 \def\equation{$$\refstepcounter{equation}}
184 \def\endequation{\eqno \hbox{\@eqnnum}$$\global\@ignoretrue}

\@eqnnum Produces the equation number for equation and eqnarray environments. The following definition is for flushright numbers; for flushleft numbers, see leqno.clo. The equation number is set in black roman type even if an eqnarray environment appears in an italic environment.

185 \def\@eqnnum{{\normalfont \normalcolor (\theequation)}}

\stackrel A disguise for plain TEX’s buildrel.

186 \def\stackrel#1#2{\mathrel{\mathop{#2}\limits^{#1}}}

\frac A disguise for plain TEX’s \over.

187 \def\frac#1#2{{\begingroup#1\endgroup\over#2}}

\sqrt \@sqrt Add an optional argument to plain’s \sqrt to give the nth root of an expression n \sqrt{e}.

188 \DeclareRobustCommand\sqrt{\@ifnextchar[\@sqrt\sqrtsign}
189 \def\@sqrt[#1]{\root #1\of}

eqnarray \@eqcnt \@eqpen \if@eqnsw \@eqnsel Here’s the eqnarray environment: Default is for left-hand side of equations to be flushright. To make them flushleft, \let\@eqnsel = \hfil.

190 \newcount\@eqcnt
191 \newcount\@eqpen
192 \newif\if@eqnsw\@eqnswtrue
193 \newskip\@centering
194 \@centering = 0pt plus 1000pt

To get a proper \@currentlabel we have to redefine it for the whole display. Note that we can’t use \refstepcounter as this results in \@currentlabel getting restored at the wrong and thus always writing the first label to the .aux file.

195 \def\eqnarray{%
196 \stepcounter{equation}%
197 \def\@currentlabel{\p@equation\theequation}%
198 \global\@eqnswtrue
199 \m@th
200 \global\@eqcnt\z@
201 \tabskip\@centering
202 \let\\\@eqncr
203 $$\everycr{}\halign to\displaywidth\bgroup
204  \hskip\@centering$\displaystyle\tabskip\z@skip{##}$\@eqnsel
205  &\global\@eqcnt\@ne\hskip \tw@\arraycolsep \hfil${##}$\hfil
206  &\global\@eqcnt\tw@ \hskip \tw@\arraycolsep
207  $\displaystyle{##}$\hfil\tabskip\@centering
208  &\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss##\egroup
209  \tabskip\z@skip
210  \cr

211 }

212 \def\endeqnarray{%
213  \@@eqncr
214  \egroup
215  \global\advance\c@equation\m@ne
216 $$\global\@ignoretrue

217 }

218 \let\@eqnsel=\relax

\nonumber Switches off equation numbering.

219 \def\nonumber{\global\@eqnswfalse}
\@eqncr \@xeqncr \@yeqncr
220 \def\@eqncr{%
221 {\ifnum0=`}\fi
222 \@ifstar{%
223  \global\@eqpen\@M\@yeqncr
224 }{%

225  \global\@eqpen\interdisplaylinepenalty \@yeqncr

226 }% 227 }

228 \def\@yeqncr{\@testopt\@xeqncr\z@skip}
229 \def\@xeqncr[#1]{%
230 \ifnum0=`{\fi}%
231 \@@eqncr
232 \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}%

233 }

\@@eqncr
234 \def\@@eqncr{\let\reserved@a\relax
235  \ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}%
236  \or \def\reserved@a{&}\else
237  \let\reserved@a\@empty
238  \@latex@error{Too many columns in eqnarray environment}\@ehc\fi
239  \reserved@a \if@eqnsw\@eqnnum\stepcounter{equation}\fi
240  \global\@eqnswtrue\global\@eqcnt\z@\cr}

eqnarray* \@seqncr Here’s the eqnarray* environment:

241 \let\@seqncr=\@eqncr
242 \@namedef{eqnarray*}{\def\@eqncr{\nonumber\@seqncr}\eqnarray}
243 \@namedef{endeqnarray*}{\nonumber\endeqnarray}

\lefteqn \lefteqn{FORMULA} typesets FORMULA in display math style flushleft in a box of width zero.

244 \def\lefteqn#1{\rlap{$\displaystyle #1$}}

\ensuremath In math mode, \ensuremath{text} is equivalent to text; in LR or paragraph mode, it is equivalent to $text$. \relax is not needed in front of the \ifmmode

 as \protect will be \let to \relax.
245 \DeclareRobustCommand\ensuremath[1]{\ifmmode #1\else $#1$\fi}

246 ⟨/2ekernel⟩

53.3 External options to the standard document classes

53.3.1 Left equation numbering

\@eqnnum To put the equation number on the left side of an equation we have to use a little trick. The number is shifted \displaywidth to the left inside a box of (approximately) zero width. This fails when the quation is too wide, the equation number than may overprint the equation itself.

247 ⟨∗leqno⟩

248 \renewcommand\@eqnnum{\hb@xt@.01\p@{}%
249  \rlap{\normalfont\normalcolor
250  \hskip -\displaywidth(\theequation)}}

251 ⟨/leqno⟩

53.3.2 Flush left equations

To get the displayed math environments to print the contents flush left (with an indentation) we have to redefine all of L^{A}TEX 2ε’s displayed math environments.

\mathindent The amount of indentation of the equations is stored in a register.

252 ⟨∗fleqn⟩

253 \newdimen\mathindent

The setting of \mathindent has to be deferred until the class file has been processed, because \leftmargini is still 0pt wide at the moment fleqn.clo is read in.

254 \AtEndOfClass{\mathindent\leftmargini}

\[ Begin display math;

255 \renewcommand\[{\relax
256  \ifmmode\@badmath
257  \else
258  \begin{trivlist}%
259  \@beginparpenalty\predisplaypenalty
260  \@endparpenalty\postdisplaypenalty
261  \item[]\leavevmode
262  \hb@xt@\linewidth\bgroup $\m@th\displaystyle %$
263  \hskip\mathindent\bgroup
264  \fi}

\] end display math;

265 \renewcommand\]{\relax
266  \ifmmode
267  \egroup $\hfil% $
268  \egroup
269  \end{trivlist}%
270  \else \@badmath
271  \fi}

equation The equation environment

272 \renewenvironment{equation}%
273  {\@beginparpenalty\predisplaypenalty
274  \@endparpenalty\postdisplaypenalty
275  \refstepcounter{equation}%
276  \trivlist \item[]\leavevmode
277  \hb@xt@\linewidth\bgroup $\m@th% $
278  \displaystyle
279  \hskip\mathindent}%
280  {$\hfil % $
281  \displaywidth\linewidth\hbox{\@eqnnum}%
282  \egroup
283  \endtrivlist}

eqnarray The eqnarray environment

284 \renewenvironment{eqnarray}{%
285  \stepcounter{equation}%
286  \def\@currentlabel{\p@equation\theequation}%
287  \global\@eqnswtrue\m@th
288  \global\@eqcnt\z@
289  \tabskip\mathindent
290  \let\\=\@eqncr
291  \setlength\abovedisplayskip{\topsep}%
292  \ifvmode

293  \addtolength\abovedisplayskip{\partopsep}%
294  \fi

When the documentclass uses a non-zero \parskip setting the \topsep might have a negative value to compensate for that. Therefor we add \parskip to

 \abovedisplayskip.
295  \addtolength\abovedisplayskip{\parskip}%
296  \setlength\belowdisplayskip{\abovedisplayskip}%
297  \setlength\belowdisplayshortskip{\abovedisplayskip}%
298  \setlength\abovedisplayshortskip{\abovedisplayskip}%
299  $$\everycr{}\halign to\linewidth% $$
300  \bgroup
301  \hskip\@centering
302  $\displaystyle\tabskip\z@skip{##}$\@eqnsel&%
303  \global\@eqcnt\@ne \hskip \tw@\arraycolsep \hfil${##}$\hfil&%
304  \global\@eqcnt\tw@ \hskip \tw@\arraycolsep
305  $\displaystyle{##}$\hfil \tabskip\@centering&%
306  \global\@eqcnt\thr@@
307  \hb@xt@\z@\bgroup\hss##\egroup\tabskip\z@skip\cr}%
308  {\@@eqncr
309  \egroup
310  \global\advance\c@equation\m@ne$$% $$
311  \global\@ignoretrue

312 } 313 ⟨/fleqn⟩

File A

ltlists.dtx

54 List, and related environments

The generic commands for creating an indented environment – enumerate,

itemize, quote, etc – are:

\list{⟨LABEL⟩}{⟨COMMANDS⟩} ... \endlist

which can be invoked by the user as the list environment. The LABEL argument specifies item labeling. COMMANDS contains commands for changing the horizontal and vertical spacing parameters.

Each item of the environment is begun by the command \item[ITEMLABEL] which produces an item labeled by ITEMLABEL. If the argument is missing, then the LABEL argument of the \list command is used as the item label.

The label is formed by putting \makelabel{⟨ITEMLABEL⟩} in an hbox whose width is either its natural width or else \labelwidth, whichever is larger. The \list command defines \makelabel to have the default definition:

\makelabel{⟨ARG⟩} == BEGIN \hfil ARG END

which, for a label of width less than \labelwidth, puts the label flushright, \labelsep to the left of the item’s text. However, \makelabel can be \let to another command by the \list’s COMMANDS argument.

A \usecounter{⟨foo⟩} command in the second argument causes the counter foo to be initialized to zero, and stepped by every \item command without an argument. (\label commands within the list refer to this counter.)

When you leave a list environment, returning either to an enclosing list or normal text mode, LaTeX begins a new paragraph if and only if you leave a blank line after the \end command. This is accomplished by the \@endparenv command.

Blank lines are ignored every other reasonable place–i.e.:

• Between the \begin{list} and the first \item,

• Between the \item and the text of that item.

• Between the end of the last item and the \end{list}.

For an environment like quotation, in which items are not labeled, the entire environment is a single item. It is defined by letting \quotation == \list{}{...}\item\relax. (Note the \relax, there in case the first character in the environment is a ’[’.) The spacing parameters provide a great deal of flexability in designing the format, including the ability to let the indentation of the first paragraph be different from that of the subsequent ones.

The trivlist environment is equivalent to a list environment whose second argument sets the following parameter values:

\leftmargin = 0 : causes no indentation of left margin

\labelwidth = 0 : see below for precise effect this has.

\itemindent = 0 : with a null label, makes first paragraph have no indentation. Succeeding paragraphs have \parindent indentation. To give first paragraph same indentation, set \itemindent = \parindent before the

     \item[].

Every \item in a trivlist environment must have an argument—in many cases, this will be the null argument (\item[]). The trivlist environment is mainly used for paragraphing environments, like verbatim, in which there is no margin change. It provides the same vertical spacing as the list environment, and works reasonably well when it occurs immediately after an \item command in an enclosing list.

54.1 List and Trivlist

The following variables are used inside a list environment:

\@totalleftmargin The distance that the prevailing left margin is indented from the outermost left margin,

\linewidth The width of the current line. Must be initialized to \hsize.

\@listdepth A count for holding current list nesting depth.

\makelabel A macro with a single argument, used to generate the label from the argument (given or implied) of the \item command. Initialized to \@mklab by the \list command. This command must produce some stretch—i.e.,

     an \hfil.

\@inlabel A switch that is false except between the time an \item is encountered and the time that TEX actually enters horizontal mode. Should be tested by commands that can be messed up by the list environment’s use of \everypar.

\boxlabels When @inlabel = true, it holds the labels to be put out by

     \everypar.

@noparitem A switch set by \list when @inlabel = true. Handles the case of a \list being the first thing in an item.

@noparlist A switch set true for a list that begins an item. No \topsep space is added before or after \item’s such a list.

@newlist Set true by \list, set false by the first text (by \everypar).

@noitemarg Set true when executing an \item with no explicit argument. Used to save space. To save time, make two separate \@item commands.

@nmbrlist Set true by \usecounter command, causes list to be numbered.

\@listctr \def’ed by \usecounter to name of counter.

\@noskipsec A switch set true by a sectioning command when it is creating an in-text heading with \everypar.

Throughout a list environment, \hsize is the width of the current line, measured from the outermost left margin to the outermost right margin. Environments like tabbing should use \linewidth instead of \hsize.

Here are the parameters of a list that can be set by commands in the \list’s COMMANDS argument. These parameters are all TeX skips or dimensions (defined by \newskip or \newdimen), so the usual TEX or L^{A}TEX commands can be used to set them. The commands will be executed in vmode if and only if the \list was preceded by a \par (or something like an \end{list}), so the spacing parameters can be set according to whether the list is inside a paragraph or is its own paragraph.

54.2 Vertical Spacing (skips)

\topsep: Space between first item and preceding paragraph.

\partopsep: Extra space added to \topsep when environment starts a new paragraph (is called in vmode).

\itemsep: Space between successive items.

\parsep: Space between paragraphs within an item – the \parskip for this environment.

54.3 Penalties

\@beginparpenalty: put at the beginning of a list

\@endparpenalty: put at end of list

\@itempenalty: put between items.

54.4 Horizontal Spacing (dimens)

\leftmargin: space between left margin of enclosing environment (or of page if top level list) and left margin of this list. Must be nonnegative.

\rightmargin: analogous.

\listparindent: extra indentation at beginning of every paragraph of a list except the one started by the \item command. May be negative! Usually, labeled lists have \listparindent equal to zero.

\itemindent: extra indentation added right BEFORE an item label.

\labelwidth: nominal width of box that contains the label. If the natural width of the label <= \labelwidth, then the label is flushed right inside a box of width \labelwidth (with an \hfil). Otherwise, a box of the natural width is employed, which causes an indentation of the text on that line.

\labelsep: space between end of label box and text of first item.

54.5 Default Values

Defaults for the list environment are set as follows. First, \rightmargin, \listparindent and \itemindent are set to 0pt. Then, one of the commands \@listi, \@listii, ... , \@listvi is called, depending upon the current level of the list. The \@list … commands should be defined by the document style. A convention that the document style should follow is to set \leftmargin to \leftmargini,…, \leftmarginvi for the appropriate level. Items that aren’t changed may be left alone, but everything that could possibly be changed must be reset.

\list{LABEL}{COMMANDS} == BEGIN

if \@listdepth > 5

then LaTeX error: ’Too deeply nested’

  else \@listdepth :=G \@listdepth + 1

fi

\rightmargin  := 0pt
\listparindent := 0pt
\itemindent  := 0pt
\eval(@list \romannumeral\the\@listdepth)  %% Set default values:
\@itemlabel  :=L LABEL
\makelabel  == \@mklab

@nmbrlist :=L false COMMANDS

\@trivlist % commands common to \list and

\trivlist
\parskip  :=L \parsep
\parindent  :=L \listparindent
\linewidth  :=L \linewidth - \rightmargin -\leftmargin
\@totalleftmargin :=L \@totalleftmargin + \leftmargin
\parshape 1 \@totalleftmargin \linewidth
\ignorespaces                    % gobble space up to \item

END

\endlist == BEGIN \@listdepth :=G \@listdepth -1
              \endtrivlist

END

\@trivlist ==

BEGIN

if @newlist = T then \@noitemerr fi

%% This command removed for some forgotten

reason.

\@topsepadd :=L \topsep

if @noskipsec then leave vertical mode fi %% Added 11 Jun 85 if vertical mode

  then \@topsepadd :=L \@topsepadd + \partopsep

else \unskip \par % remove glue from end of last line fi if @inlabel = true

then @noparitem :=L true

@noparlist :=L true else @noparlist :=L false

        \@topsep :=L \@topsepadd

fi

\@topsep  :=L \@topsep + \parskip  %% Change 4 Sep 85

\leftskip  :=L 0pt  % Restore paragraphing

parameters

\rightskip  :=L \@rightskip
\parfillskip  :=L 0pt + 1fil

NOTE: \@setpar called on every \list in case \par has been temporarily munged before the \list command.

\@setpar{if @newlist = false then {\@@par} fi}

\@newlist  :=G T
\@outerparskip  :=L \parskip

END

\trivlist ==

BEGIN

\parsep  := \parskip

@nmbrlist := F

\@trivlist
\labelwidth := 0
\leftmargin := 0
\itemindent := \parindent

\@itemlabel :=L ”empty” %% added 93/12/13

\makelabel{LABEL} == LABEL

END

\endtrivlist ==

BEGIN if @inlabel = T then \indent fi if horizontal mode then \unskip \par fi if @noparlist = true

  else if \lastskip > 0
          then \@tempskipa := \lastskip
               \vskip - \lastskip
               \vskip \@tempskipa -\@outerparskip + \parskip

fi

       \@endparenv

fi END

\@endparenv ==

BEGIN \addpenalty{@endparpenalty}

\addvspace{\@topsepadd}

\endgroup    %% ends the \begin command’s \begingroup

\par == BEGIN

    \@restorepar
    \everypar{}
    \par

END

\everypar == BEGIN remove \lastbox \everypar{} END
\begingroup  %% to match the \end commands \endgroup

END

\item == BEGIN if math mode then WARNING fi if next char = [

      then \@item

else @noitemarg := true

\@item[@itemlabel]

END

\@item[LAB] ==

BEGIN if @noparitem = true

then @noparitem := false % NOTE: then clause hardly every taken,

    % so made a macro \@donoparitem
\box\@labels :=G \hbox{\hskip -\leftmargin
                       \box\@labels
                       \hskip \leftmargin }

if @minipage = false then

   \@tempskipa := \lastskip
   \vskip -\lastskip
   \vskip \@tempskipa + \@outerparskip - \parskip

fi else if @inlabel = true

then \indent \par % previous item empty. fi if hmode then 2 \unskip's

% To remove any space at end of prev. % paragraph that could cause a blank line.

         \par

fi if @newlist = T

then if @nobreak = T % Kludge if list follows \section

          then \addvspace{\@outerparskip - \parskip}
          else \addpenalty{\@beginparpenalty}
               \addvspace{\@topsep}
               \addvspace{-\parskip}   %% added 4 Sep 85

fi

   else \addpenalty{\@itempenalty}
        \addvspace{\itemsep}

fi @inlabel :=G true fi

\everypar{ @minipage :=G F @newlist :=G F if @inlabel = true

then @inlabel :=G false

\hskip -\parindent
\box\@labels
\penalty 0

%% 3 Oct 85 – allow line break here

\box\@labels :=G null

fi

\everypar{} }

@nobreak :=G false if @noitemarg = true

then @noitemarg := false

if @nmbrlist

then \refstepcounter{\@listctr}

fi fi

\@tempboxa :=L \hbox{\makelabel{LAB}}
\box\@labels :=G \@labels \hskip \itemindent
\hskip - (\labelwidth + \labelsep)
if \wd \@tempboxa > \labelwidth
   then \box\@tempboxa
   else \hbox to \labelwidth
{\unhbox\@tempboxa}

fi

\hskip\labelsep

\ignorespaces %gobble space up to text END

\makelabel{LABEL} == ERROR %% default to catch lonely \item

\usecounter{CTR} == BEGIN @nmbrlist :=L true

       \@listctr == CTR
       \setcounter{CTR}{0}

END

DEFINE \dimen's and \count
\topskip
\partopsep
\itemsep
\parsep
\@topsep
\@topsepadd
\outerparskip

1 ⟨∗2ekernel⟩

2 \newskip\topsep
3 \newskip\partopsep
4 \newskip\itemsep
5 \newskip\parsep
6 \newskip\@topsep
7 \newskip\@topsepadd
8 \newskip\@outerparskip

\leftmargin
\rightmargin
\listparindent
\itemindent
\labelwidth
\labelsep
\@totalleftmargin

 9 \newdimen\leftmargin
10 \newdimen\rightmargin
11 \newdimen\listparindent
12 \newdimen\itemindent
13 \newdimen\labelwidth
14 \newdimen\labelsep
15 \newdimen\linewidth
16 \newdimen\@totalleftmargin \@totalleftmargin=\z@
\leftmargini
\leftmarginii
\leftmarginiii
\leftmarginiv
\leftmarginv
\leftmarginvi

17 \newdimen\leftmargini
18 \newdimen\leftmarginii
19 \newdimen\leftmarginiii
20 \newdimen\leftmarginiv
21 \newdimen\leftmarginv
22 \newdimen\leftmarginvi
\@listdepth
\@itempenalty
\@beginparpenalty
\@endparpenalty

23 \newcount\@listdepth \@listdepth=0
24 \newcount\@itempenalty
25 \newcount\@beginparpenalty
26 \newcount\@endparpenalty
\@labels
27 \newbox\@labels
\if@inlabel
\@inlabelfalse
\@inlabeltrue

28 \newif\if@inlabel \@inlabelfalse
\if@newlist
\@newlistfalse
\@newlisttrue

29 \newif\if@newlist   \@newlistfalse
\if@noparitem
\@noparitemfalse
\@noparitemtrue

30 \newif\if@noparitem \@noparitemfalse
\if@noparlist
\@noparlistfalse
\@noparlisttrue

31 \newif\if@noparlist \@noparlistfalse
\if@noitemarg
\@noitemargfalse
\@noitemargtrue

32 \newif\if@noitemarg \@noitemargfalse
\if@newlist
\@newlistfalse
\@newlisttrue

33 \newif\if@nmbrlist  \@nmbrlistfalse
\list
34 \def\list#1#2{\ifnum \@listdepth >5\relax \@toodeep
35  \else \global\advance\@listdepth\@ne \fi
36 \rightmargin \z@ \listparindent\z@ \itemindent\z@
37 \csname @list\romannumeral\the\@listdepth\endcsname
38 \def\@itemlabel{#1}\let\makelabel\@mklab \@nmbrlistfalse #2\relax
39 \@trivlist
40 \parskip\parsep \parindent\listparindent

41 \advance\linewidth -\rightmargin \advance\linewidth -\leftmargin
42 \advance\@totalleftmargin \leftmargin
43 \parshape \@ne \@totalleftmargin \linewidth
44 \ignorespaces}
\par@deathcycles
45 \newcount\par@deathcycles
\@trivlist
46 \def\@trivlist{\@topsepadd\topsep
47 \if@noskipsec \leavevmode \fi
48 \ifvmode \advance\@topsepadd\partopsep \else \unskip\par\fi
49 \if@inlabel \@noparitemtrue \@noparlisttrue
50  \else \@noparlistfalse \@topsep\@topsepadd \fi
51  \advance\@topsep \parskip
52 \leftskip\z@skip\rightskip\@rightskip \parfillskip\@flushglue
53 \par@deathcycles\z@
54 \@setpar{\if@newlist
55  \advance\par@deathcycles\@ne
56  \ifnum\par@deathcycles>\@m
57  \@noitemerr{\@@par}\fi
58  \else{\@@par}\fi}%
59 \global\@newlisttrue \@outerparskip\parskip}
\trivlist
60 \def\trivlist{\parsep\parskip\@nmbrlistfalse
61 \@trivlist \labelwidth\z@ \leftmargin\z@
62 \itemindent\z@

We initialise \@itemlabel so that a trivlist with an \item not having an optional argument doesn’t produce an error message.

63 \let\@itemlabel\@empty
64 \def\makelabel##1{##1}}
\endlist
65 \def\endlist{\global\advance\@listdepth\m@ne
66  \endtrivlist}

The definition of \trivlist used to be in ltspace.dtx so that other commands could be ‘let to it’. They now use \def.

\endtrivlist
67 \def\endtrivlist{%
68 \if@inlabel\indent\fi
69 \if@newlist\@noitemerr\fi
70 \ifhmode\unskip \par\fi
71 \if@noparlist \else
72  \ifdim\lastskip >\z@
73  \@tempskipa\lastskip \vskip -\lastskip
74  \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip
75  \vskip\@tempskipa
76  \fi
77  \@endparenv
78 \fi

79 }

\@endparenv \@doendpe To suppress the paragraph indentation in text immediately following a paragraphmaking environment, \everypar is changed to remove the space, and \par is redefined to restore \everypar. Instead of redefining \par and \everpar, \@endparenv was changed to set the @endpe switch, letting \end redefine \par

and \everypar.

This allows paragraph-making environments to work right when called by other environments. (Changed 27 Oct 86)

80 \def\@endparenv{%
81 \addpenalty\@endparpenalty\addvspace\@topsepadd\@endpetrue}
82 \def\@doendpe{\@endpetrue
83  \def\par{\@restorepar\everypar{}\par\@endpefalse}\everypar
   Use \setbox0=\lastbox instead of \hskip -\parindent so that a \noindent

becomes a no-op when used before a line immediately following a list environment(23 Oct 86).

84  {{\setbox\z@\lastbox}\everypar{}\@endpefalse}}
\if@endpe
\@endpefalse
\@endpeltrue

85 \newif\if@endpe
86 \@endpefalse
\@mklab
87 \def\@mklab#1{\hfil #1}

\item
88 \def\item{\@inmatherr\item
89 \@ifnextchar [\@item{\@noitemargtrue \@item[\@itemlabel]}}
\@donoparitem
90 \def\@donoparitem{\@noparitemfalse
91 \global\setbox\@labels\hbox{\hskip -\leftmargin
92  \unhbox\@labels
93  \hskip \leftmargin}\if@minipage\else
94 \@tempskipa\lastskip
95 \vskip -\lastskip \advance\@tempskipa\@outerparskip
96 \advance\@tempskipa -\parskip \vskip\@tempskipa\fi}
\@item
97 \def\@item[#1]{\if@noparitem \@donoparitem
98 \else \if@inlabel \indent \par \fi
99  \ifhmode \unskip\unskip \par \fi
100  \if@newlist \if@nobreak \@nbitem \else
101  \addpenalty\@beginparpenalty
102  \addvspace\@topsep \addvspace{-\parskip}\fi
103  \else \addpenalty\@itempenalty \addvspace\itemsep
104  \fi
105  \global\@inlabeltrue
106 \fi
107 \everypar{\global\@minipagefalse\global\@newlistfalse
108  \if@inlabel
109  \global\@inlabelfalse

This next command was changed from an hskip to a kern to avoid a break point after the parindent box: the skip can cause a line-break if a very long label occurs in raggedright setting.

110 %           \hskip -\parindent
111  \kern -\parindent
112  \box\@labels
113  \penalty\z@
114  \fi
115  \everypar{}}%
116 \global\@nobreakfalse
117 \if@noitemarg \@noitemargfalse \if@nmbrlist
118  \refstepcounter\@listctr\fi \fi

We use \sbox to support colour commands.

119 \sbox\@tempboxa{\makelabel{#1}}%
120 \global\setbox\@labels
121 \hbox{\unhbox\@labels \hskip \itemindent
122  \hskip -\labelwidth \hskip -\labelsep
123  \ifdim \wd\@tempboxa >\labelwidth
124  \box\@tempboxa
125  \else \hbox to\labelwidth {\unhbox\@tempboxa}\fi
126  \hskip \labelsep}\ignorespaces}
\makelabel
127 \def\makelabel#1{\@latex@error{Lonely \string\item--perhaps a missing
128  list environment}\@ehc}
\@nbitem
129 \def\@nbitem{\@tempskipa\@outerparskip \advance\@tempskipa -\parskip
130  \addvspace\@tempskipa}
\usecounter
131 \def\usecounter#1{\@nmbrlisttrue\def\@listctr{#1}\setcounter{#1}\z@}

54.6 Itemize and Enumerate

Enumeration is done with four counters: enumi, enumii, enumiii and enumiv, where enumN controls the numbering of the Nth level enumeration. The label is generated by the commands \labelenumi … \labelenumiv, which should be defined by the document style. Note that \p@enumN\theenumN defines the output of a \ref command. A typical definition might be:

      \def\theenumii{\alph{enumii}}
      \def\p@enumii{\theenumi}
      \def\labelenumii{(\theenumii)}

which will print the labels as ‘(a)’, ‘(b)’, … and print a \ref as ‘3a’.

The item numbers are moved to the right of the label box, so they are always a distance of \labelsep from the item.

\@enumdepth holds the current enumeration nesting depth.

Itemization is controlled by four commands: \labelitemi, \labelitemii, \labelitemiii, and \labelitemiv. To cause the second-level list to be bulleted,

you just define \labelitemii to be •. \@itemspacing and \@itemdepth are the
analogs of \@enumspacing and \@enumdepth.
 \enumerate ==

BEGIN

     if \@enumdepth > 3

then errormessage: “Too deeply nested”.

       else \@enumdepth :=L \@enumdepth + 1
            \@enumctr :=L eval(enum@\romannumeral\the\@enumdepth)
            \list{\label(\@enumctr)}
                 {\usecounter{\@enumctr}
                  \makelabel{LABEL} == \hss \llap{LABEL}}

fi END

 \endenumerate == \endlist
\@enumdepth
132 \newcount\@enumdepth \@enumdepth = 0
\c@enumi \c@enumii \c@enumii \c@enumiv
133 \@definecounter{enumi}
134 \@definecounter{enumii}
135 \@definecounter{enumiii}
136 \@definecounter{enumiv}
enumerate
137 \def\enumerate{%
138 \ifnum \@enumdepth >\thr@@\@toodeep\else
139  \advance\@enumdepth\@ne
140  \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
141  \expandafter
142  \list
143  \csname label\@enumctr\endcsname
144  {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}%
145 \fi}
146 \let\endenumerate =\endlist
  \itemize ==

BEGIN

      if \@itemdepth > 3

then errormessage: ’Too deeply nested’.

        else \@itemdepth :=L \@itemdepth + 1
             \@itemitem ==
eval(labelitem\romannumeral\the\@itemdepth)
             \list{\@nameuse{\@itemitem}}
                   {\makelabel{LABEL} == \hss \llap{LABEL}}

fi END

   \enditemize == \endlist

\@itemdepth
147 \newcount\@itemdepth \@itemdepth = 0
itemize
148 \def\itemize{%
149 \ifnum \@itemdepth >\thr@@\@toodeep\else
150  \advance\@itemdepth\@ne
151  \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
152  \expandafter
153  \list
154  \csname\@itemitem\endcsname
155  {\def\makelabel##1{\hss\llap{##1}}}%
156 \fi}
157 \let\enditemize =\endlist

158 ⟨/2ekernel⟩

File B

ltboxes.dtx

55 L^{A}TEX Box commands

\makebox  \makebox[⟨wid⟩][⟨pos⟩]{⟨obj ⟩}

Puts ⟨obj ⟩ in an \hbox of width ⟨wid⟩, positioned by ⟨pos⟩.

The possible ⟨pos⟩ are: s stretched, l flushleft, r flushright, c (default) centred.

If ⟨wid⟩ is missing, then ⟨pos⟩ is also missing and ⟨obj ⟩ is put in an \hbox of its natural width.

\makebox(⟨x⟩,⟨y⟩)[⟨pos⟩]{⟨obj ⟩} Puts ⟨obj ⟩ in an \hbox of width x∗\unitlength and height y∗\unitlength. ⟨pos⟩ arguments are s, l, r or c (default) for stretched, flushleft, flushright or centred, and t or b for top, bottom – or combinations like tr or rb. Default for horizontal and vertical are centered. Note that in this picture mode version of \makebox a [b] aligns on the bottom of the text as documented. If you want to align on

the baseline use \makebox( , )[b]{\raisebox{0pt}[\height][0pt]{xyz}}} or
\makebox( , )[b]{\smash{xyz}}

\mbox \mbox{⟨obj ⟩} The same as \makebox{⟨obj ⟩}, but is more efficient as no check-

ing for optional arguments is done.

\newsavebox \newsavebox{\cmd} : If \cmd is undefined, then defines it to be a TEX box

register.

\savebox \savebox{\cmd} ... : \cmd is defined to be a TEX box register, and the ’...’ are any \makebox arguments. It is like \makebox, except it doesn’t produce text but saves the value in \box \cmd.

\sbox \sbox{⟨cmd⟩}{⟨obj ⟩} is an efficient abbreviation for

\savebox{⟨cmd⟩}{⟨obj ⟩}.
lrbox      \begin{lrbox}{⟨cmd⟩}⟨text⟩\end{lrbox} is equivalent to

\sbox{⟨cmd⟩}{⟨text⟩} except that any white space at the beginning and end of ⟨text⟩ is ignored.

\framebox \framebox ... : like \makebox, except it puts a ‘frame’ around the box. The frame is made of lines of thickness \fboxrule, separated by space \fboxsep from the text – except for \framebox(X,Y) ... , where the thickness of the lines is as for the picture environment, and there is no separation added.

\fbox \fbox{⟨obj ⟩} is an abbreviation for \framebox{⟨obj ⟩}. \parbox \parbox[⟨pos⟩][⟨height⟩][⟨inner-pos⟩]{⟨width⟩}{⟨text⟩} : Makes a box with

\hsize ⟨width⟩, positioned by ⟨pos⟩ as follows: c : \vcenter (placed in $...$ if not in math mode) b : \vbox t : \vtop default value is c. Sets \hsize := ⟨width⟩ and calls \@parboxrestore, which does the following: Restores the original definitions of:

    \par \\ \- \' \` \=

Resets the following parameters:

    \parindent  = 0pt

\parskip  = 0pt  added 20 Jan 87

    \linewidth  = \hsize
    \@totalleftmargin = 0pt
    \leftskip  = 0pt
    \rightskip  = 0pt
    \@rightskip  = 0pt
    \parfillskip  = 0pt plus 1fil
    \lineskip  = \normallineskip
    \baselineskip  = \normalbaselineskip

   Calls \sloppy
   Note: \@arrayparboxrestore same as \@parboxrestore but it doesn’t re-

store \\.

minipage minipage : Similar to \parbox, except it also makes this look like a page by

setting

   \textwidth == \columnwidth == box width

changes footnotes by redefining: \@mpfn == mpfootnote

\thempfn == \thempfootnote
\@footnotetext == \@mpfootnotetext

resets the following list environment parameters:

\@listdepth == \@mplistdepth

where \@mplistdepth is initialized to zero,

and executes \@minipagerestore to allow the document style to reset any other parameters it desires. It sets @minipage true, and resets \everypar to set it false. This switch keeps \addvspace from putting space at the top of a minipage.

Change added 24 May 89: \minipage sets @minipage globally; \endminipage resets it false.

\rule \rule[⟨raised⟩]{⟨width⟩}{⟨height⟩} : Makes a ⟨width⟩ ∗ ⟨height⟩ rule, raised

⟨raised⟩.

\underline \underline{⟨text⟩} : Makes an underlined hbox with ⟨text⟩ in it. \raisebox \raisebox{⟨distance⟩}[⟨height⟩][⟨depth⟩]{⟨box⟩} :

Raises ⟨box⟩ up by ⟨distance⟩ length (down if ⟨distance⟩ negative). Makes TEX think that the new box extends ⟨height⟩ above the line and ⟨depth⟩ below, for a total vertical length of ⟨height⟩+⟨depth⟩. Default values of ⟨height⟩ & ⟨depth⟩ = actual height and depth of box in new position.

1 ⟨∗2ekernel⟩

 2 \message{boxes,}

\makebox \makebox User level command just looks for optional [ or (.

 3 \def\makebox{%
 4 \leavevmode
 5 \@ifnextchar(%)

 6  \@makepicbox
 7  {\@ifnextchar[\@makebox\mbox}}

\mbox The basic horizontal box command for L^{A}TEX.

 8 \long\def\mbox#1{\leavevmode\hbox{#1}}

\@makebox Look for a possible second optional argument (defaults to c).

 9 \def\@makebox[#1]{%
10 \@ifnextchar [{\@imakebox[#1]}{\@imakebox[#1][c]}}
\@begin@tempboxa Helper macro for supporting \height, \width etc. Grab #1 into \@tempboxa and

measure it.

11 \long\def\@begin@tempboxa#1#2{%
12 \begingroup
13  \setbox\@tempboxa#1{\color@begingroup#2\color@endgroup}%
14  \def\width{\wd\@tempboxa}%
15  \def\height{\ht\@tempboxa}%
16  \def\depth{\dp\@tempboxa}%
17  \let\totalheight\@ovri
18  \totalheight\height
19  \advance\totalheight\depth}

\@end@tempboxa End the group started by \@begin@tempboxa, so that the scope of \height only includes the ‘length’ argument to the user-command.

20 \let\@end@tempboxa\endgroup
\bm@c \bm@l \bm@r \bm@s \bm@t \bm@b Set up spacing.
21 \def\bm@c{\hss\unhbox\@tempboxa\hss}
22 \def\bm@l{\unhbox\@tempboxa\hss}\let\bm@t\bm@l
23 \def\bm@r{\hss\unhbox\@tempboxa}\let\bm@b\bm@r
24 \def\bm@s{\unhbox\@tempboxa}
\@imakebox Internal form of \makebox.
25 \long\def\@imakebox[#1][#2]#3{%
26 \@begin@tempboxa\hbox{#3}%
27  \setlength\@tempdima{#1}%       support calc
28  \hb@xt@\@tempdima{\csname bm@#2\endcsname}%
29 \@end@tempboxa}
\@makepicbox Picture mode form of \makebox.
30 \def\@makepicbox(#1,#2){%
31 \@ifnextchar[{\@imakepicbox(#1,#2)}{\@imakepicbox(#1,#2)[]}}

\@imakepicbox picture mode version

32 \long\def\@imakepicbox(#1,#2)[#3]#4{%
33 \vbox to#2\unitlength
34 {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
35  \let\mb@t\vss
36  \@tfor\reserved@a :=#3\do{%
37  \if s\reserved@a
38  \let\mb@l\relax\let\mb@r\relax
39  \else
40  \expandafter\let\csname mb@\reserved@a\endcsname\relax

41  \fi}%
42  \mb@t
43  \hb@xt@ #1\unitlength{\mb@l #4\mb@r}%
44  \mb@b

This kern ensures that a b option aligns on the bottom of the text rather than the baseline. this is the documented behaviour in the L^{A}TEXBook. The kern is removed in compatibility mode.

45  \kern\z@}}

\set@color This macro is initialy a no-op, but the colour package will redefine it to insert a

\special.
46 \let\set@color\relax
\color@begingroup \color@endgroup \color@setgroup \normalcolor \color@hbox \color@vbox \color@endbox These macros are initialy a no-op, but the colour package will redefine them to be
\begingroup, \endgroup, \begingroup\set@color,
\hbox\bgroup\color@begingroup, \color@endgroup\egroup. and ⟨set to main

document colour⟩ respectively.

47 \let\color@begingroup\relax
48 \let\color@endgroup\relax
49 \let\color@setgroup\relax
50 \let\normalcolor\relax
51 \let\color@hbox\relax
52 \let\color@vbox\relax
53 \let\color@endbox\relax

\newsavebox Allocate a new ‘savebox’.

54 \def\newsavebox#1{\@ifdefinable{#1}{\newbox#1}}

\savebox Save #1 in a box register.

55 \def\savebox#1{%
56 \@ifnextchar(%)
57  {\@savepicbox#1}{\@ifnextchar[{\@savebox#1}{\sbox#1}}}

\sbox Save #1 in a box register.

58 \long\def\sbox#1#2{\setbox#1\hbox{%
59 \color@setgroup#2\color@endgroup}}

\@savebox Look for second optional argument.

60 \def\@savebox#1[#2]{%
61 \@ifnextchar [{\@isavebox#1[#2]}{\@isavebox#1[#2][c]}}
\@isavebox
62 \long\def\@isavebox#1[#2][#3]#4{%
63 \sbox#1{\@imakebox[#2][#3]{#4}}}

\@savepicbox Picture mode version of \savebox.

64 \def\@savepicbox#1(#2,#3){%
65 \@ifnextchar[%]
66  {\@isavepicbox#1(#2,#3)}{\@isavepicbox#1(#2,#3)[]}}
\@isavepicbox Picture mode version of \savebox.
67 \long\def\@isavepicbox#1(#2,#3)[#4]#5{%
68 \sbox#1{\@imakepicbox(#2,#3)[#4]{#5}}}

\lrbox lrbox: the new environment form of \sbox. Use \aftergroup tricks to enable a local assignment to be made to the box, in a way that it still has an effect outside the lrbox environment.

69 \def\lrbox#1{%
70 \edef\reserved@a{%
71  \endgroup
72  \setbox#1\hbox{%
73  \begingroup\aftergroup}%
74  \def\noexpand\@currenvir{\@currenvir}%
75  \def\noexpand\@currenvline{\on@line}}%
76 \reserved@a
77  \@endpefalse
78  \color@setgroup
79  \ignorespaces}

\endlrbox End the lrbox environment.

80 \def\endlrbox{\unskip\color@endgroup}

\usebox unchanged

81 \def\usebox#1{\leavevmode\copy #1\relax}

\frame The following definition of \frame was written by Pavel Curtis (Extra space removed 14 Jan 88) RmS 92/08/24: Replaced occurence of \@halfwidth by

\@wholewidth
82 \long\def\frame#1{%
83 \leavevmode
84 \hbox{%
85  \hskip-\@wholewidth
86  \vbox{%
87  \vskip-\@wholewidth
88  \hrule \@height\@wholewidth
89  \hbox{%
90  \vrule\@width\@wholewidth
91  #1%
92  \vrule\@width\@wholewidth}%
93  \hrule\@height\@wholewidth
94  \vskip-\@wholewidth}%
95  \hskip-\@wholewidth}}

\fboxrule \fboxsep user level parameters,

96 \newdimen\fboxrule
97 \newdimen\fboxsep

\fbox Abbreviated framed box command.

98 \long\def\fbox#1{%
99 \leavevmode
100 \setbox\@tempboxa\hbox{%
101  \color@begingroup
102  \kern\fboxsep{#1}\kern\fboxsep
103  \color@endgroup}%
104 \@frameb@x\relax}

\framebox Framed version of \makebox.
105 \def\framebox{%
106 \@ifnextchar(%)
107  \@framepicbox{\@ifnextchar[\@framebox\fbox}}

\@framebox Deal with optional arguments.

108 \def\@framebox[#1]{%
109 \@ifnextchar[%]
110  {\@iframebox[#1]}%
111  {\@iframebox[#1][c]}}

\@iframebox The handling the optional arguments. In order to set the whole box, including the frame to the specified dimension, we first determine that dimension from the natural size of the text, #3. calculated width.

112 \long\def\@iframebox[#1][#2]#3{%
113 \leavevmode
114 \@begin@tempboxa\hbox{#3}%
115  \setlength\@tempdima{#1}%
116  \setbox\@tempboxa\hb@xt@\@tempdima
117  {\kern\fboxsep\csname bm@#2\endcsname\kern\fboxsep}%
118  \@frameb@x{\kern-\fboxrule}%
119 \@end@tempboxa}

\@frameb@x Common part of \framebox and \fbox. #1 is a negative kern in the \framebox case so that the vertical rules do not add to the width of the box.

120 \def\@frameb@x#1{%
121 \@tempdima\fboxrule
122 \advance\@tempdima\fboxsep
123 \advance\@tempdima\dp\@tempboxa
124 \hbox{%
125  \lower\@tempdima\hbox{%
126  \vbox{%
127  \hrule\@height\fboxrule
128  \hbox{%
129  \vrule\@width\fboxrule
130  #1%
131  \vbox{%
132  \vskip\fboxsep
133  \box\@tempboxa
134  \vskip\fboxsep}%
135  #1%
136  \vrule\@width\fboxrule}%
137  \hrule\@height\fboxrule}%

138 }% 139 }% 140 }

\@framepicbox Picture mode version.

141 \def\@framepicbox(#1,#2){%
142 \@ifnextchar[{\@iframepicbox(#1,#2)}{\@iframepicbox(#1,#2)[]}}

\@iframepicbox Picture mode version.

143 \long\def\@iframepicbox(#1,#2)[#3]#4{%
144 \frame{\@imakepicbox(#1,#2)[#3]{#4}}}

\parbox The main vertical-box command for L^{A}TEX.

145 \def\parbox{%
146 \@ifnextchar[%]
147  \@iparbox
148  {\@iiiparbox c\@empty[s]}}

\@iparbox Optional argument handling.

149 \def\@iparbox[#1]{%
150 \@ifnextchar[%]
151  {\@iiparbox{#1}}%
152  {\@iiiparbox{#1}\@empty[s]}}

\@iiparbox Optional argument handling.

153 \def\@iiparbox#1[#2]{%
154 \@ifnextchar[%]
155  {\@iiiparbox{#1}{#2}}%
156  {\@iiiparbox{#1}{#2}[#1]}}
\@iiiparbox \@parboxto The internal version of \parbox.
157 \let\@parboxto\@empty
158 \long\def\@iiiparbox#1#2[#3]#4#5{%
159 \leavevmode
160 \@pboxswfalse
161 \setlength\@tempdima{#4}%
162 \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\endgraf}%
163  \ifx\@empty#2\else
164  \setlength\@tempdimb{#2}%
165  \def\@parboxto{to\@tempdimb}%
166  \fi
167  \if#1b\vbox
168  \else\if #1t\vtop
169  \else\ifmmode\vcenter
170  \else\@pboxswtrue $\vcenter
171  \fi\fi\fi
172  \@parboxto{\let\hss\vss\let\unhbox\unvbox
173  \csname bm@#3\endcsname}%
174  \if@pboxsw \m@th$\fi
175 \@end@tempboxa}

\@arrayparboxrestore Restore various paragraph parameters.

176 \def\@arrayparboxrestore{%
177 \let\par\@@par
178 \let\-\@dischyph

Redefined accents to allow changes in font encoding

179 \let\'\@acci\let\`\@accii\let\=\@acciii
180 \parindent\z@ \parskip\z@skip
181 \everypar{}%
182 \linewidth\hsize
183 \@totalleftmargin\z@
184 \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
185 \parfillskip\@flushglue \lineskip\normallineskip
186 \baselineskip\normalbaselineskip
187 \sloppy}

\parboxrestore Restore various paragraph parameters, and also \\.

188 \def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr}

\if@minipage Switch that is true at the start of a minipage.

189 \newif\if@minipage \@minipagefalse

\minipage Essentially an environment form of \parbox.

190 \def\minipage{%
191 \@ifnextchar[%]
192  \@iminipage
193  {\@iiiminipage c\@empty[s]}}

\@iminipage Optional argument handling.

194 \def\@iminipage[#1]{%
195 \@ifnextchar[%]
196  {\@iiminipage{#1}}%
197  {\@iiiminipage{#1}\@empty[s]}}

\@iiminipage Optional argument handling.

198 \def\@iiminipage#1[#2]{%
199 \@ifnextchar[%]
200  {\@iiiminipage{#1}{#2}}%
201  {\@iiiminipage{#1}{#2}[#1]}}
\@iiiminipage Internal form of minipage.
202 \def\@iiiminipage#1#2[#3]#4{%
203 \leavevmode
204 \@pboxswfalse
205 \setlength\@tempdima{#4}%
206 \def\@mpargs{{#1}{#2}[#3]{#4}}%
207 \setbox\@tempboxa\vbox\bgroup
208  \color@begingroup
209  \hsize\@tempdima
210  \textwidth\hsize \columnwidth\hsize
211  \@parboxrestore
212  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
213  \let\@footnotetext\@mpfootnotetext
214  \let\@listdepth\@mplistdepth \@mplistdepth\z@
215  \@minipagerestore\global\@minipagetrue %% \global added 24 May 89
216  \everypar{\global\@minipagefalse\everypar{}}}

\@minipagerestore Hook so that other styles can reset other commands in a minipage.

217 \let\@minipagerestore=\relax
\endminipage
218 \def\endminipage{%
219  \par
220  \unskip
221  \ifvoid\@mpfootins\else
222  \vskip\skip\@mpfootins
223  \normalcolor
224  \footnoterule
225  \unvbox\@mpfootins

226  \fi
227  \global\@minipagefalse   %% added 24 May 89
228 \color@endgroup
229 \egroup
230 \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
\@mplistdepth \@mpfootins Versions of \@listdepth and \footins local to minipage.
231 \newcount\@mplistdepth
232 \newinsert\@mpfootins
\@mpfootnotetext Minipage version of \@footnotetext.

Final \strut added 27 Mar 89, on suggestion by Don Hosek

233 \long\def\@mpfootnotetext#1{%
234 \global\setbox\@mpfootins\vbox{%
235  \unvbox\@mpfootins
236  \reset@font\footnotesize
237  \hsize\columnwidth
238  \@parboxrestore
239  \protected@edef\@currentlabel
240  {\csname p@mpfootnote\endcsname\@thefnmark}%
241  \color@begingroup
242  \@makefntext{%
243  \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
244  \color@endgroup}}
245 \newif\if@pboxsw

\rule Draw a rule of the specified size.

246 \def\rule{\@ifnextchar[\@rule{\@rule[\z@]}}

\@rule internal form of \rule.

247 \def\@rule[#1]#2#3{%
248 \@tempdima#3\advance\@tempdima #1%
249 \leavevmode
250 \hbox{\vrule\@width#2\@height\@tempdima\@depth-#1}}
\@@underline Saved primitive \underline.
251 \let\@@underline\underline

\underline L^{A}TEX version works outside math.

252 \def\underline#1{%
253 \relax
254 \ifmmode\@@underline{#1}%
255 \else $\@@underline{\hbox{#1}}\m@th$\relax\fi}

\raisebox Raise a box, and change its vertical dimensions.

256 \def\raisebox#1{%
257 \leavevmode
258 \@ifnextchar[{\@rsbox{#1}}{\@irsbox{#1}[]}}

\@rsbox Optional argument handling.

259 \def\@rsbox#1[#2]{%
260 \@ifnextchar[{\@iirsbox{#1}[#2]}{\@irsbox{#1}[#2]}}

\@argrsbox ...

\@irsbox Internal version of \raisebox (less than two optional args).

261 \long\def\@irsbox#1[#2]#3{%
262 \@begin@tempboxa\hbox{#3}%
263  \setlength\@tempdima{#1}%
264  \ifx\\#2\\\else\setlength\@tempdimb{#2}\fi
265  \setbox\@tempboxa\hbox{\raise\@tempdima\box\@tempboxa}%
266  \ifx\\#2\\\else\ht\@tempboxa\@tempdimb\fi
267  \box\@tempboxa
268 \@end@tempboxa}

\@iirsbox Internal version of \raisebox (two optional args).

269 \long\def\@iirsbox#1[#2][#3]#4{%
270 \@begin@tempboxa\hbox{#4}%
271  \setlength\@tempdima{#1}%
272  \setlength\@tempdimb{#2}%
273  \setlength\dimen@{#3}%
274  \setbox\@tempboxa\hbox{\raise\@tempdima\box\@tempboxa}%
275  \ht\@tempboxa\@tempdimb
276  \dp\@tempboxa\dimen@
277  \box\@tempboxa
278 \@end@tempboxa}

\@finalstrut This macro adds a special strut the depth of the box given as #1, and height and width 0pt. It is used for ensuring that the last line of a paragraph has the correct depth in ‘p’ columns of tables and in footnotes. In vertical mode nothing is done, as adding the strut (as done in 2.09) would start a new paragraph. It would be possible to inspect \prevdepth to check the depth of the just-completed paragraph, but we do not do that here. Actually we do even less now, skip the vmode test as it broke tabular ‘p’ columns. .

The \nobreak was added (1995/10/31) to allow hyphenation of the final word of the paragraph.

279 \def\@finalstrut#1{%
280 \unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\dp#1}

55.1 Some low-level constructs

The following commands are basically inherited from plain TEX.

\leftline \rightline \centerline \@@line These macros place text on a full line either centred or left or right adjusted.

281 \def\@@line{\hb@xt@\hsize}
282 \def\leftline#1{\@@line{#1\hss}}
283 \def\rightline#1{\@@line{\hss#1}}
284 \def\centerline#1{\@@line{\hss#1\hss}}

\rlap \llap These macros place text to the left or right of the current reference point without taking up space.

285 \def\rlap#1{\hb@xt@\z@{#1\hss}}
286 \def\llap#1{\hb@xt@\z@{\hss#1}}

287 ⟨/2ekernel⟩

File C

lttab.dtx

56 Tabbing, Tabular and Array Environments

This section deals with ‘Lining It Up in Columns’. First the tabbing environment is defined, and then in second part, tabular together with its variants, tabular*

and array.

Note that the tabular defined here is essentially the original L^{A}TEX 2.09 version, not the extended version described in The L^{A}TEX Companion. Use the array package to obtain the extended version.

56.1 tabbing

\dimen(\@firsttab + i) = distance of tab stop i from left margin 0 <= i <= 15 (?).

\dimen\@firsttab is initialized to \@totalleftmargin, so it starts

at the prevailing left margin.

\@maxtab = number of highest defined tab register

probably = \@firsttab + 12

\@nxttabmar = tab stop number of next line’s left margin \@curtabmar = tab stop number of current line’s left margin \@curtab = number of the current tab. At start of line,

                    it equals \@curtabmar

\@hightab = largest tab number currently defined.

\@tabpush = depth of \pushtab's

\box\@curline = contents of current line, excluding left margin

skip, and excluding contents of current field

\box\@curfield = contents of current field

@rjfield = switch: T iff the last field of the line should be right-justified at the right margin.

\tabbingsep = distance left by the \' command between the current position and the field that is “left-shifted”.

UTILITY MACROS \@stopfield : closes the current field \@addfield : adds the current field to the current line. \@contfield : continues the current field \@startfield : begins the next field \@stopline : closes the current line and outputs it \@startline : starts the next line \@ifatmargin : an \if that is true iff the current line.

has width zero

\@startline ==

BEGIN

 \@curtabmar :=G \@nxttabmar
 \@curtab :=G \@curtabmar
 \box\@curline :=G null
 \@startfield
 \strut

END

\@stopline ==

BEGIN

 \unskip
 \@stopfield

if @rjfield = T

then @rjfield :=G F

         \@tempdima := \@totalleftmargin + \linewidth
         \hb@xt@ \@tempdima{\@itemfudge
                             \hskip \dimen\@curtabmar
                             \box\@curline
                             \hfil
                             \box\@curfield}
   else \@addfield
        \hbox {\@itemfudge
               \hskip \dimen\@curtabmar
               \box\@curline}

fi END

\@startfield ==

BEGIN

  \box\@curfield :=G \hbox {

END

\@stopfield ==

BEGIN

   }

END

\@contfield ==

BEGIN

 \box\@curfield :=G \hbox { \unhbox\@currfield  %%} brace

matching END

\@addfield ==

BEGIN

 \box\@curline :=G \unbox\@curline * \unbox\@curfield

END

\@ifatmargin ==

BEGIN if dim of box\@curline = 0pt then END

\tabbing ==

BEGIN

\lineskip :=L 0pt
\> == \@rtab
\< == \@ltab
\= == \@settab
\+ == \@tabplus
\- == \@tabminus
\` == \@tabrj
\' == \@tablab
\\ == BEGIN \@stopline \@startline END

\\[DIST] == BEGIN

             \@stopline \vskip DIST \@startline\ignorespaces

END

\\* == BEGIN \@stopline \penalty 10000 \@startline END
\\*[DIST] == BEGIN \@stopline \penalty 10000 \vskip DIST
                   \@startline\ignorespaces  END
\@hightab := \@nxttabmar :=G \@firsttab
\@tabpush :=G 0
\dimen\@firsttab := \@totalleftmargin

@rjfield :=G F

\trivlist  \item\relax

if @minipage = F then \vskip \parskip fi

\box\@tabfbox = \rlap{\indent\the\everypar}

% note: \the\everypar sets @inlabel :=G F

\@itemfudge == BEGIN \box\@tabfbox END
\@startline
\ignorespaces

END

\@endtabbing ==

BEGIN

\@stopline

if \@tabpush > 0 then error message: ”unmatched \poptabs'’ fi

\endtrivlist

END

\@rtab ==

BEGIN

\@stopfield
\@addfield
if \@curtab < \@hightab
  then \@curtab :=G \@curtab + 1

else error message “Undefined Tab” fi

\@tempdima := \dimen\@curtab - \dimen\@curtabmar

- width of box \@curline

\box\@curline :=G \hbox{\unhbox\@curline + \hskip\@tempdima}
\@startfield

END

\@settab ==

BEGIN

\@stopfield
\@addfield
if \@curtab < \@maxtab
  then \@curtab :=G \@curtab+1

else error message: “Too many tabs” fi

if \@curtab > \@hightab
  then \@hightab :=L \@curtab  fi
\dimen\@curtab :=L \dimen\@curtabmar + width of \box\@curline
\@startfield

END

\@ltab ==

BEGIN

\@ifatmargin
  then if \@curtabmar > \@firsttab
         then \@curtab :=G \@curtab - 1
              \@curtabmar :=G \@curtabmar - 1

else error message “Too many untabs” fi else error message “Left tab in middle of line”

fi END

\@tabplus ==

BEGIN

     if \@nxttabmar < \@hightab
        then \@nxttabmar :=G \@nxttabmar+1

else error message “Undefined tab” fi

END

\@tabminus ==

BEGIN

     if \@nxttabmar > \@firsttab
        then \@nxttabmar :=G \@nxttabmar-1

else error message “Too many untabs” fi

END

\@tabrj ==
BEGIN \@stopfield
     \@addfield

@rjfield :=G T

      \@startfield

END

\@tablab ==
BEGIN \@stopfield
    \box\@curline G:= \hbox{\box\@curline %% ‘G’ added 17 Jun 86
                            \hskip - width of \box\@curfield
                            \hskip -\tabbingsep
                            \box\@curfield
                            \hskip \tabbingsep }
      \@startfield

END

\pushtabs ==

BEGIN

   \@stopfield
   \@tabpush :=G \@tabpush + 1
   \begingroup
   \@contfield

END

\poptabs ==

BEGIN

  \@stopfield
  if \@tabpush > 0
    then \endgroup
         \@tabpush :=G \@tabpush - 1

else error message: “Too many \poptabs'’ fi

  \@contfield

END

\a The accents \` , \' , and \= that have been redefined inside a tabbing environment can be called by typing \a` , \a' , and \a=. The macro \a is defined in

ltoutenc.dtx.

The ‘2ekernel’ code ensures that a \usepackage{autotabg} is essentially ignored if a ‘full’ format is being used that has picture mode already in the format.

1 ⟨2ekernel⟩\expandafter\let\csname ver@autotabg.sty\endcsname\fmtversion
\@firsttab \@maxtab

2 ⟨∗2ekernel | autoload⟩

3 \newdimen\@gtempa
4 \chardef\@firsttab=\the\allocationnumber
5 \newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
6 \newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
7 \newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
8 \newdimen\@gtempa
9 \chardef\@maxtab=\the\allocationnumber
10 \dimen\@firsttab=0pt

\@nxttabmar \@curtabmar \@curtab \@hightab \@tabpush
11 \newcount\@nxttabmar
12 \newcount\@curtabmar
13 \newcount\@curtab
14 \newcount\@hightab
15 \newcount\@tabpush
\@curline \@curfield \@tabfbox
16 \newbox\@curline
17 \newbox\@curfield
18 \newbox\@tabfbox

19 ⟨/2ekernel | autoload⟩ 20 ⟨∗2ekernel | def⟩

\if@rjfield
21 \newif\if@rjfield

\@startline It is, in some sense, an error if the current margin tab setting is higher than the value of \@hightab (which is a local variable). That this is allowed is a fundamental design flaw which is not going to be corrected now.

22 \gdef\@startline{%
23  \ifnum \@nxttabmar >\@hightab
24  \@badtab
25  \global\@nxttabmar \@hightab
26  \fi
27  \global\@curtabmar \@nxttabmar
28  \global\@curtab \@curtabmar
29  \global\setbox\@curline \hbox {}%
30  \@startfield
31  \strut

32 }

\@stopline
33 \gdef\@stopline{\unskip\@stopfield\if@rjfield \global\@rjfieldfalse
34 \@tempdima\@totalleftmargin \advance\@tempdima\linewidth
35 \hb@xt@\@tempdima{\@itemfudge\hskip\dimen\@curtabmar
36 \box\@curline\hfil\box\@curfield}\else\@addfield
37 \hbox{\@itemfudge\hskip\dimen\@curtabmar\box\@curline}\fi}
\@startfield
38 \gdef\@startfield{%
39 \global\setbox\@curfield\hbox\bgroup\color@begingroup}
\@stopfield
40 \gdef\@stopfield{%
41 \color@endgroup\egroup}
\@contfield
42 \gdef\@contfield{%
43 \global\setbox\@curfield\hbox\bgroup\color@begingroup
44 \unhbox\@curfield}

\@addfield
45 \gdef\@addfield{\global\setbox\@curline\hbox{\unhbox
46  \@curline\unhbox\@curfield}}
\@ifatmargin
47 \gdef\@ifatmargin{\ifdim \wd\@curline =\z@}
\@tabcr
48 \gdef\@tabcr{\@stopline \@ifstar{\penalty \@M \@xtabcr}\@xtabcr}
\@xtabcr
49 \gdef\@xtabcr{\@ifnextchar[\@itabcr{\@startline\ignorespaces}}
\@itabcr
50 \gdef\@itabcr[#1]{\vskip #1\@startline\ignorespaces}
51 \gdef\kill{\@stopfield\@startline\ignorespaces}

\tabbing We use \relax to prevent \item from scanning too far.

52 \gdef\tabbing{\lineskip \z@skip\let\>\@rtab\let\<\@ltab\let\=\@settab
53  \let\+\@tabplus\let\-\@tabminus\let\`\@tabrj\let\'\@tablab
54  \let\\=\@tabcr
55  \@hightab\@firsttab
56  \global\@nxttabmar\@firsttab
57  \dimen\@firsttab\@totalleftmargin
58  \global\@tabpush\z@ \global\@rjfieldfalse
59  \trivlist \item\relax
60  \if@minipage\else\vskip\parskip\fi
61  \setbox\@tabfbox\hbox{\rlap{\indent\hskip\@totalleftmargin
62  \the\everypar}}\def\@itemfudge{\box\@tabfbox}%
63  \@startline\ignorespaces}
\endtabbing
64 \gdef\endtabbing{%
65 \@stopline\ifnum\@tabpush >\z@ \@badpoptabs \fi\endtrivlist}

\@rtab Omitted \global added to \@rtab 17 Jun 86

66 \gdef\@rtab{\@stopfield\@addfield\ifnum \@curtab<\@hightab
67  \global\advance\@curtab \@ne \else\@badtab\fi
68  \@tempdima\dimen\@curtab
69  \advance\@tempdima -\dimen\@curtabmar
70  \advance\@tempdima -\wd\@curline
71  \global\setbox\@curline\hbox{\unhbox\@curline\hskip\@tempdima}%
72  \@startfield\ignorespaces}
\@settab
73 \gdef\@settab{\@stopfield\@addfield
74 \ifnum \@curtab <\@maxtab
75  \ifnum\@curtab =\@hightab
76  \advance\@hightab \@ne
77  \fi
78  \global\advance\@curtab \@ne
79 \else

80  \@latex@error{Tab overflow}\@ehd
81 \fi
82 \dimen\@curtab \dimen\@curtabmar
83 \advance\dimen\@curtab \wd\@curline
84 \@startfield
85 \ignorespaces

86 }

\@ltab
87 \gdef\@ltab{\@ifatmargin\ifnum\@curtabmar >\@firsttab
88  \global\advance\@curtab \m@ne \global\advance\@curtabmar\m@ne\else
89  \@badtab\fi\else
90  \@latex@error{\string\<\space in mid line}\@ehd\fi\ignorespaces}
\@tabplus
91 \gdef\@tabplus {\ifnum \@nxttabmar <\@hightab
92  \global\advance\@nxttabmar \@ne \else
93  \@badtab\fi\ignorespaces}
\@tabminus
94 \gdef\@tabminus{\ifnum\@nxttabmar >\@firsttab
95  \global\advance\@nxttabmar \m@ne \else
96  \@badtab\fi\ignorespaces}
\@tabrj
97 \gdef\@tabrj{%
98 \@stopfield\@addfield\global\@rjfieldtrue\@startfield\ignorespaces}
\@tablab  \setbox\@curline made \global in \@tablab. 17 Jun 86
99 \gdef\@tablab{\@stopfield\global\setbox\@curline\hbox{\box\@curline
100  \hskip -\wd\@curfield \hskip -\tabbingsep \box\@curfield
101  \hskip \tabbingsep}\@startfield\ignorespaces}
\pushtabs
102 \gdef\pushtabs{%
103 \@stopfield\@addfield\global\advance\@tabpush \@ne \begingroup
104  \@contfield}

\poptabs It is, in some sense, an error if, after the endgroup, the current tab setting is higher than the new value of \@hightab (which is a local variable). That this is allowed is a fundamental design flaw which is not going to be corrected now.

105 \gdef\poptabs{\@stopfield\@addfield
106 \ifnum \@tabpush >\z@
107  \endgroup
108  \global\advance\@tabpush \m@ne
109  \ifnum \@curtab >\@hightab
110  \global \@curtab \@hightab
111  \@badtab
112  \fi
113 \else
114  \@badpoptabs
115 \fi
116 \@contfield

117 }

118 ⟨/2ekernel | def⟩

\tabbingsep

119 ⟨∗2ekernel | autoload⟩

120 \newdimen\tabbingsep

121 ⟨/2ekernel | autoload⟩

\tabbing

122 ⟨∗autoload⟩

123 \def\tabbing{\@autoload{tabg}\tabbing}

124 ⟨/autoload⟩

56.2 array and tabular environments

ARRAY PARMETERS:

\arraycolsep

: half the width separating columns in an array environment

\tabcolsep

: half the width separating columns in a tabular environment

\arrayrulewidth

: width of rules

\doublerulesep

: space between adjacent rules in array or tabular

\arraystretch

: line spacing in array and tabular environments is done by placing a strut in every row of height and depth \arraystretch times the height and depth of the strut produced by an ordinary \strut commmand.

PREAMBLE: The PREAMBLE argument of an array or tabular environment can contain the following:

l,r,c : indicate where entry is to be placed. | : for vertical rule @{EXP} : inserts the text EXP in every column.

          \arraycolsep or \tabcolsep spacing is suppressed.

*{N}{PRE} : equivalent to writing N copies of PRE in the preamble.

PRE may contain *{N’}{EXP’} expressions.

p{LEN} : makes entry in parbox of width LEN.

SPECIAL ARRAY COMMANDS: \multicolumn{N}{FORMAT}{ITEM} : replaces the next N column items by ITEM, formatted according to FORMAT. FORMAT should contain at most one l,r or c. If it contains none, then ITEM is ignored.

\vline : draws a vertical line the height of the current row. May

appear in an array element entry.

\hline : draws a horizontal line between rows. Must appear either before the first entry (to appear above the first row) or right after a \\ command. If followed by another \hline,

       then adds a \vskip of \doublerulesep.

\cline[i-j] : draws horizontal lines between rows covering columns i through j, inclusive. Multiple commands may follow one another to provide lines covering several disjoint columns

\extracolsep{WIDTH} : for use inside an @ in the preamble. Causes a WIDTH space to be added between columns for the rest of the columns. This is in addition to the ordinary intercolumn space.

\array ==

BEGIN

\@acol  == \@arrayacol
\@classz == \@arrayclassz
\@classiv == \@arrayclassiv
\\  == \@arraycr
\@halignto == NULL
\@tabarray

END

\endarray{NAME} == BEGIN \crcr }} END
\tabular ==

BEGIN

\@halignto == NULL
\@tabular

END

\tabular*{WIDTH} ==

BEGIN

\@halignto == to WIDTH
\@tabular

END

\@tabular ==

BEGIN

\leavevmode
\hbox { $
   \@acol  == \@tabacol
   \@classz == \@tabclassz
   \@classiv == \@tabclassiv
   \\  == \@tabularcr
   \@tabarray

END

\endtabular == BEGIN \crcr}} $} END
\@tabarray == if next char = [ then \@array else \@array[c] fi

\@array[POS]{PREAMBLE} ==

BEGIN

define \@arstrutbox to make \@arstrut produce strut of height and depth \arraystretch times the height and depth of a normal strut.

\@mkpream{PREAMBLE}
\@preamble == \halign \@halignto {\tabskip=0pt\@arstrut
                        eval{\@preamble}\tabskip = 0pt\cr %%}
\@startpbox == \@@startpbox
\@endpbox == \@@endpbox

if POS = t then \vtop

else if POS = b then \vbox

                           else \vcenter

fi fi

{

\par ==L {} % changed 92/09/18

\@sharp  == #
\protect  == \relax
\lineskip  :=L 0pt
\baselineskip :=L 0pt
\@preamble

END

\@arraycr ==

BEGIN $ %% Prevents extra space at end of row’s last entry. if next char = [

then \@argarraycr

else $ \cr %% Needed to balance $ END

\@argarraycr[LENGTH] ==

BEGIN $ %% Needed to balance $ of \@arraycr if LENGTH > 0

 then \@tempdima := depth of \@arstrutbox + LENGTH

\vrule height 0pt width 0pt depth \@tempdima

       \cr
 else \cr \noalign{\vskip LENGTH}

END

\@tabularcr and \@argtabularcr same as \@arraycr and
\@argarraycr

except without the extra $’s.

125 ⟨∗2ekernel | autoload⟩

\extracolsep
126 \def\extracolsep#1{\tabskip #1\relax}

\array
127 \def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz
128 \let\@classiv\@arrayclassiv
129 \let\\\@arraycr\let\@halignto\@empty\@tabarray}
\endarray
\endtabular
\endtabular*

130 \def\endarray{\crcr\egroup\egroup}
131 \def\endtabular{\crcr\egroup\egroup $\egroup}
132 \expandafter \let \csname endtabular*\endcsname = \endtabular
\tabular
133 \def\tabular{\let\@halignto\@empty\@tabular}
\tabular* RmS 93/08/05: Replaced \expandafter\def by \@namedef.
134 \@namedef{tabular*}#1{\def\@halignto{to#1}\@tabular}
\@tabular
135 \def\@tabular{\leavevmode \hbox \bgroup $\let\@acol\@tabacol
136 \let\@classz\@tabclassz
137 \let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}

\@tabarray RmS 91/11/04 added \m@th.

138 \def\@tabarray{\m@th\@ifnextchar[\@array{\@array[c]}}

RmS 1993/11/03 changed \halign to \ialign and removed superfluous \tabskip assignment

\array
139 \def\@array[#1]#2{\setbox\@arstrutbox\hbox{\vrule
140  \@height\arraystretch \ht\strutbox
141  \@depth\arraystretch \dp\strutbox
142  \@width\z@}\@mkpream{#2}\edef\@preamble{\ialign \noexpand\@halignto
143  \bgroup \@arstrut \@preamble \tabskip\z@skip \cr}%
144  \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
145  \let\tabularnewline\\%
146  \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
147  \bgroup \let\par\@empty
148  \let\@sharp##\let\protect\relax
149  \lineskip\z@skip\baselineskip\z@skip\@preamble}

\@arraycr array version of \\.

150 \def\@arraycr{%
151 ${\ifnum0=`}\fi\@ifstar\@xarraycr\@xarraycr}
\@arraycr
152 \def\@xarraycr{\@ifnextchar[\@argarraycr{\ifnum0=`{\fi}${}\cr}}
\@argarraycr
153 \def\@argarraycr[#1]{%
154 \ifnum0=`{\fi}${}\ifdim #1>\z@ \@xargarraycr{#1}\else
155 \@yargarraycr{#1}\fi}

\tabularnewline \@tabularcr Tabular version of \\.
156 \def\@tabularcr{%
157 {\ifnum0=`}\fi\@ifstar\@xtabularcr\@xtabularcr}
158 \let\tabularnewline\relax
\@xtabularcr
159 \def\@xtabularcr{\@ifnextchar[\@argtabularcr{\ifnum0=`{\fi}\cr}}
\@argtabularcr
160 \def\@argtabularcr[#1]{\ifnum0=`{\fi}\ifdim #1>\z@
161 \unskip\@xargarraycr{#1}\else \@yargarraycr{#1}\fi}
\@xargarraycr
162 \def\@xargarraycr#1{\@tempdima #1\advance\@tempdima \dp \@arstrutbox
163 \vrule \@height\z@ \@depth\@tempdima \@width\z@ \cr}
\@yargarraycr
164 \def\@yargarraycr#1{\cr\noalign{\vskip #1}}
\multicolumn   \multicolumn{NUMBER}{FORMAT}{ITEM} ==

BEGIN

\multispan{NUMBER}
\begingroup
\@addamp == null
\@mkpream{FORMAT}
\@sharp == ITEM
\protect == \relax
\@startpbox == \@@startpbox
\@endpbox == \@@endpbox
\@arstrut
\@preamble
\endgroup

END The command \def\@addamp{} was removed from \multicolumn on 6 Dec

86 because it caused embedded array environments not to work. I think that it was included originally to prevent an error message if the 2nd argument to the \multicolumn command had two column specifiers.

8 Feb 89 — \hbox{} added after \@preamble to correct bug that occurred if \multicolumn preceded \\[D] with D > 0, caused by \\[] command doing an

\unskip, which removed \tabcolsep glue inserted by \multicolumn.
165 \def\multicolumn#1#2#3{\multispan{#1}\begingroup
166 \@mkpream{#2}%
167 \def\@sharp{#3}\set@typeset@protect
168 \let\@startpbox\@@startpbox\let\@endpbox\@@endpbox
169 \@arstrut \@preamble\hbox{}\endgroup\ignorespaces}

Codes for classes and character numbers of array, tabular and multicolumn arguments.

Character  Class  Number
———  —–  ——

c  0  0
l  0  1
r  0  2
|  1  -
@  2  -
p  3  -
{@-exp}  4  -
{p-arg}  5  -

\@testpach \foo : expands \foo, which should be an array parameter token, and sets \@chclass and \@chnum to its class and number. Uses \@lastchclass to distinguish 4 and 5

Preamble error codes 0: ’illegal character’ 1: ’Missing @-exp’ 2: ’Missing p-arg’

\@addamp ==

BEGIN if @firstamp = true then @firstamp := false

else & fi

END

\@mkpream TOKENLIST == BEGIN @firstamp := T

\@lastchclass := 6
\@preamble  == null
\@sharp  == \relax
\protect  == BEGIN \noexpand\protect\noexpand END
\@startpbox == \relax
\@endpbox  == \relax
\@expast{TOKENLIST}
for \@nextchar := expand(\reserved@a)
  do \@testpach{\@nextchar}
      case of \@chclass
        0 -> \@classz
        1 -> \@classi

...

        5 -> \@classv

end case

      \@lastchclass := \@chclass

od

  case of \@lastchclass
     0 -> \hskip \arraycolsep             % lrc
     1 ->                                  % |

2 -> \@preamerr1 % ’Missing @-exp’ % @ 3 -> \@preamerr2 % ’Missing p-arg’ % p 4 -> % @-exp

5 -> \hskip \arraycolsep             % p-exp

end case END

\@arrayclassz ==

BEGIN

\@preamble := \@preamble *
case of \@lastchclass
0 -> \hskip \arraycolsep \@addamp \hskip
\arraycolsep
1 -> \@addamp \hskip \arraycolsep

2 -> % impossible 3 -> % impossible

4 -> \@addamp
5 -> \hskip \arraycolsep \@addamp \hskip
\arraycolsep
6 -> \@addamp \hskip \arraycolsep

end case

* case of \@chnum
 0 -> \hfil$\relax\@sharp$\hfil
 1 -> $\relax\@sharp$\hfil
 2 -> \hfil$\relax\@sharp$

end case

END

\@tabclassz == similar to \@arrayclassz
\@classi ==

BEGIN

\@preamble := \@preamble *
case of \@lastchclass
   0 -> \hskip \arraycolsep \@arrayrule
   1 -> \hskip \doublerulesep \@arrayrule

2 -> % impossible

3 -> % impossible

   4 -> \@arrayrule
   5 -> \hskip \arraycolsep \@arrayrule
   6 -> \@arrayrule

end case

END

\@classii ==

BEGIN

\@preamble := \@preamble *
case of \@lastchclass

0 ->

   1  -> \hskip .5\arrayrulewidth

2 -> % impossible

else -> end case END

\@classiii ==

BEGIN

  \@preamble := \@preamble *
             case of \@lastchclass
                0 -> \hskip \arraycolsep \@addamp \hskip
\arraycolsep
                1 -> \@addamp \hskip \arraycolsep

2 -> % impossible 3 -> % impossible

                4 -> \@addamp
                5 -> \hskip \arraycolsep \@addamp \hskip
\arraycolsep
                6 -> \@addamp \hskip \arraycolsep

end case

END

\@arrayclassiv ==
    BEGIN \@preamble := \@preamble * $ \@nextchar$ END
\@tabclassiv == same as \@arrayclassv except without the $ ... $
\@classv ==

BEGIN

  \@preamble :=
      \@preamble * \@startpbox{\@nextchar}\ignorespaces\@sharp
                             \@endpbox

END

\@expast{S}:

Sets \reserved@a := S with all instances of *{N}{STRING} replaced by N copies of STRING, where N > 0. An * appearing inside braces is ignored, but *-expressions inside STRING are expanded, so nested *-expressions are handled properly.

\@expast{S} == BEGIN \@xexpast S *0x\@@ END
\@xexpast S1 *{N}{S2} S3 \@@ ==

BEGIN

  \reserved@a := S1
  \@tempcnta := N
  if \@tempcnta > 0
    then while \@tempcnta > 0 do \reserved@a := \reserved@a S2
                                 \@tempcnta := \@tempcnta - 1 od
          \reserved@b == \@xexpast
    else \reserved@b == \@xexnoop

fi

  \expandafter \reserved@b \reserved@a S3 \@@

END

\@xexnoop
170 \def\@xexnoop #1\@@{}
\@expast
171 \def\@expast#1{\@xexpast #1*0x\@@}
\@xexpast
172 \def\@xexpast#1*#2#3#4\@@{\edef\reserved@a{#1}\@tempcnta#2\relax
173  \ifnum\@tempcnta >\z@ \@whilenum\@tempcnta >\z@\do
174  {\edef\reserved@a{\reserved@a#3}\advance\@tempcnta \m@ne}%
175  \let\reserved@b\@xexpast
176  \else \let\reserved@b\@xexnoop\fi
177  \expandafter\reserved@b \reserved@a #4\@@}
\if@firstamp
\@addamp
178 \newif\if@firstamp
179 \def\@addamp{\if@firstamp \@firstampfalse \else
180  \edef\@preamble{\@preamble &}\fi}
\@arrayacol
\@tabacol
\@ampacol
\@acolampacol

181 \def\@arrayacol{\edef\@preamble{\@preamble \hskip \arraycolsep}}
182 \def\@tabacol{\edef\@preamble{\@preamble \hskip \tabcolsep}}
183 \def\@ampacol{\@addamp \@acol}
184 \def\@acolampacol{\@acol\@addamp\@acol}
\@mkpream
185 \def\@mkpream#1{\@firstamptrue\@lastchclass6
186 \let\@preamble\@empty
187 \let\protect\@unexpandable@protect
188 \let\@sharp\relax
189 \let\@startpbox\relax\let\@endpbox\relax
190 \@expast{#1}%
191 \expandafter\@tfor \expandafter
192  \@nextchar \expandafter:\expandafter=\reserved@a\do
193  {\@testpach\@nextchar
194  \ifcase \@chclass \@classz \or \@classi \or \@classii \or \@classiii
195  \or \@classiv \or\@classv \fi\@lastchclass\@chclass}%
196 \ifcase \@lastchclass \@acol
197  \or \or \@preamerr \@ne\or \@preamerr \tw@\or \or \@acol \fi}
\@arrayclassz
198 \def\@arrayclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
199 \or \or \@addamp \or
200 \@acolampacol \or \@firstampfalse \@acol \fi
201 \edef\@preamble{\@preamble
202 \ifcase \@chnum
203  \hfil$\relax\@sharp$\hfil \or $\relax\@sharp$\hfil
204  \or \hfil$\relax\@sharp$\fi}}

\@tabclassz RmS 91/08/14 inserted extra braces around entry for NFSS

205 \def\@tabclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
206 \or \or \@addamp \or
207 \@acolampacol \or \@firstampfalse \@acol \fi
208 \edef\@preamble{\@preamble{%
209 \ifcase \@chnum
210  \hfil\ignorespaces\@sharp\unskip\hfil
211  \or \ignorespaces\@sharp\unskip\hfil
212  \or \hfil\hskip\z@skip \ignorespaces\@sharp\unskip\fi}}}
\@classi
213 \def\@classi{\ifcase \@lastchclass \@acol \@arrayrule \or
214 \@addtopreamble{\hskip \doublerulesep}\@arrayrule\or
215 \or \or \@arrayrule \or
216 \@acol \@arrayrule \or \@arrayrule \fi}
\@classii
217 \def\@classii{\ifcase \@lastchclass \or
218 \@addtopreamble{\hskip .5\arrayrulewidth}\fi}
\@classiii
219 \def\@classiii{\ifcase \@lastchclass \@acolampacol \or
220 \@addamp\@acol \or
221 \or \or \@addamp \or
222 \@acolampacol \or \@ampacol \fi}
\@tabclassiv
223 \def\@tabclassiv{\@addtopreamble\@nextchar}
\@arrayclassiv
224 \def\@arrayclassiv{\@addtopreamble{$\@nextchar$}}
\@classv
225 \def\@classv{\@addtopreamble{\@startpbox{\@nextchar}\ignorespaces
226 \@sharp\@endpbox}}
\@addtopreamble
227 \def\@addtopreamble#1{\edef\@preamble{\@preamble #1}}
\@chclass
\@lastchclass
\@chnum

228 \newcount\@chclass
229 \newcount\@lastchclass
230 \newcount\@chnum
\arraycolsep
\tabcolsep
\arrayrulewidth
\doublerulesep

231 \newdimen\arraycolsep
232 \newdimen\tabcolsep
233 \newdimen\arrayrulewidth
234 \newdimen\doublerulesep
\arraystretch
235 \def\arraystretch{1}    % Default value.

\@arstrutbox
\@arstrut
236 \newbox\@arstrutbox
237 \def\@arstrut{%
238 \relax\ifmmode\copy\@arstrutbox\else\unhcopy\@arstrutbox\fi}
\@arrayrule
239 \def\@arrayrule{\@addtopreamble{\hskip -.5\arrayrulewidth
240 \vrule \@width \arrayrulewidth\hskip -.5\arrayrulewidth}}
\@testpatch
241 \def\@testpach#1{\@chclass \ifnum \@lastchclass=\tw@ 4 \else
242  \ifnum \@lastchclass=3 5 \else
243  \z@ \if #1c\@chnum \z@ \else
244  \if #1l\@chnum \@ne \else
245  \if #1r\@chnum \tw@ \else
246  \@chclass \if #1|\@ne \else
247  \if #1@\tw@ \else
248  \if #1p3 \else \z@ \@preamerr 0\fi
249 \fi  \fi  \fi  \fi  \fi  \fi
250 \fi}
\hline
251 \def\hline{%
252 \noalign{\ifnum0=`}\fi\hrule \@height \arrayrulewidth \futurelet
253 \reserved@a\@xhline}
\@xhline
254 \def\@xhline{\ifx\reserved@a\hline
255  \vskip\doublerulesep

Measure from the middle of the rules.

256  \vskip-\arrayrulewidth
257  \fi
258  \ifnum0=`{\fi}}
\vline
259 \def\vline{\vrule \@width \arrayrulewidth}

\cline \@cline The old L^{A}TEX2.09 implementation of \cline used up quite a lot of memory and two precious count registers. This new (1995/09/14) implementation does not use any count registers. It is coded in a way that depends heavily on the definition of \multispan so that command has been moved here from the file ltplain.dtx.

These counters are no longer declared.

  \newcount\@cla
  \newcount\@clb
260 \def\cline#1{\@cline#1\@nil}
261 \def\@cline#1-#2\@nil{%
262 \omit

Use the counter from \multispan.

263 \@multicnt#1%
264 \advance\@multispan\m@ne
265 \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
266 \@multicnt#2%
267 \advance\@multicnt-#1%
268 \advance\@multispan\@ne

The original had \unskip at this point, but how could a skip get here ???

269 \leaders\hrule\@height\arrayrulewidth\hfill
270 \cr

This is back spacing is fairly horrible, but it is what happened in the old version… An alternative would be to make \cline look ahead for a following \cline as does \hline. This would alter the spacing in existing documents so keep the old version in the kernel. Perhaps a package should do this differently.

271 \noalign{\vskip-\arrayrulewidth}}

\mscount The \mscount counter is no longer declared, saving a csname and a register. It is declared in compatibility mode.

\multispan \@multispan \sp@n Modify \multispan slightly from its plain TEX definition to allow more efficient code sharing with \multicolumn. Also share a count register with \multiput.

272 \def\multispan{\omit\@multispan}
273 \def\@multispan#1{%
274 \@multicnt#1\relax
275 \loop\ifnum\@multicnt>\@ne \sp@n\repeat}
276 \def\sp@n{\span\omit\advance\@multicnt\m@ne}

\@startpbox \@endpbox Helper macros for ‘p’ columns.

\@startpbox{⟨width⟩} text \egroup is essentially \parbox{⟨width⟩}{⟨text⟩}

   \@endpbox is essentially \unskip \strut \par \egroup\hfil (Changed 14

Jan 89) (changed again 1994/05/13)

277 \def\@startpbox#1{\vtop\bgroup \hsize #1\@arrayparboxrestore}
278 \def\@endpbox{\@finalstrut\@arstrutbox\par\egroup\hfil}

14 Jan 89: Def of \@endpbox changed from

\def\@endpbox{\par\vskip\dp\@arstrutbox\egroup\hfil}

so vertical spacing works out right if the last line of a ‘p’ entry has a descender.

\@@startpbox
\@@endpbox
279 \let\@@startpbox=\@startpbox
280 \let\@@endpbox=\@endpbox

281 ⟨/2ekernel | autoload⟩

File D

ltpictur.dtx

57 Picture Mode

Picture mode commands. In addition to the commands available in L^{A}TEX2.09, This section adds the new \qbezier command for drawing curves.

\qbezier \qbezier[⟨N ⟩](⟨AX,AY ⟩)(⟨BX,BY ⟩)(⟨CX,CY ⟩) plots a quadratic Bezier curve from (⟨AX,AY ⟩) to (⟨CX,CY ⟩), with (⟨BX,BY ⟩) as the third Bezier point, using N + 1 points equally spaced parametrically. If N = 0 (the default value), then a sufficient number of points are used to draw a connected curve–except that at most \qbeziermax + 1 points are drawn. A “point” is a square of side

\@wholewidth.

\bezier In addition, to be compatible with the old bezier package, a variant of this command, \bezier, is defined, in which the first argument is not optional.

\unitlength = value of dimension argument \@wholewidth = current line width \@halfwidth = half of current line width \@linefnt = font for drawing lines \@circlefnt = font for drawing circles

\linethickness{DIM} : Sets the width of horizontal and vertical lines in a picture to DIM. Does not change width of slanted lines or circles. Width of all lines reset by \thinlines and

     \thicklines

\picture(XSIZE,YSIZE)(XORG,YORG)

BEGIN

     \@picht :=L YSIZE * \unitlength
     box \@picbox :=
          \hb@xt@ XSIZE * \unitlength
            {\hskip -XORG * \unitlength
             \lower YORG * \unitlength
             \hbox{
             \ignorespaces    %% added 13 June 89

END

 \endpicture ==

BEGIN

                   } \hss }
                   heigth of \@picbox := \@picht

depth of \@picbox := 0

                   \mbox{\box\@picbox}   %% change 26 Aug 91

END

\put(X, Y){OBJ} == BEGIN

 \@killglue
 \raise Y * \unitlength  \hb@xt@ 0pt { \hskip X * \unitlength
                                          OBJ \hss
}
 \ignorespaces

END

\multiput(X,Y)(DELX,DELY){N}{OBJ} == BEGIN

\@killglue
\@multicnt := N
\@xdim := X * \unitlength
\@ydim := Y * \unitlength
while \@multicnt > 0
  do \raise \@ydim \hb@xt@ 0pt { \hskip \@xdim
                                         OBJ \hss   }
     \@multicnt := \@multicnt - 1
     \@xdim  := \@xdim + DELX * \unitlength
     \@ydim  := \@ydim + DELY * \unitlength

od

\ignorespaces

END

\shortstack[POS]{TEXT} : Makes a \vbox containing TEXT stacked as a one-column array, positioned l, r or c as indicated by POS.

The ‘2ekernel’ code ensures that a \usepackage{autopict} is essentially ignored if a ‘full’ format is being used that has picture mode already in the format.

1 ⟨2ekernel⟩\expandafter\let\csname ver@autopict.sty\endcsname\fmtversion
\@wholewidth
\@halfwidth

2 ⟨∗2ekernel | autoload⟩

3 \newdimen\@wholewidth
4 \newdimen\@halfwidth
\unitlength
5 \newdimen\unitlength \unitlength =1pt
\@picbox \@picht
6 \newbox\@picbox
7 \newdimen\@picht

8 ⟨/2ekernel | autoload⟩

\picture #1 should be white space.

\pictur@ #1 should be a ( (eating any white space before the bracket),

9 ⟨∗2ekernel | def⟩

10 \long\gdef\picture#1{\pictur@#1}
11 \gdef\pictur@(#1){%
12 \@ifnextchar({\@picture(#1)}{\@picture(#1)(0,0)}}

13 ⟨/2ekernel | def⟩ 14 ⟨∗autoload⟩

15 \def\pictur@{\@autoload{pict}}
16 \def\picture{\pictur@\picture}

17 ⟨/autoload⟩

\@picture

18 ⟨∗2ekernel | def⟩

19 \gdef\@picture(#1,#2)(#3,#4){%
20 \@picht#2\unitlength
21 \setbox\@picbox\hb@xt@#1\unitlength\bgroup
22  \hskip -#3\unitlength
23  \lower #4\unitlength\hbox\bgroup
24  \ignorespaces}
\endpicture
25 \gdef\endpicture{%
26 \egroup\hss\egroup
27  \ht\@picbox\@picht\dp\@picbox\z@
28  \mbox{\box\@picbox}}

In the definitions of \put and \multiput, \hskip was replaced by \kern just in case arg #3 = “plus”. (Bug detected by Don Knuth. changed 20 Jul 87).

29 \long\gdef\put(#1,#2)#3{%
30 \@killglue\raise#2\unitlength
31 \hb@xt@\z@{\kern#1\unitlength #3\hss}%
32 \ignorespaces}

\multiput #3 had better be a (.

33 \gdef\multiput(#1,#2)#3{%
34 \@xdim #1\unitlength
35 \@ydim #2\unitlength
36 \@multiput(}
\multiput
37 \long\gdef\@multiput(#1,#2)#3#4{%
38 \@killglue\@multicnt #3\relax
39 \@whilenum \@multicnt >\z@\do
40  {\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}%
41  \advance\@multicnt\m@ne
42  \advance\@xdim#1\unitlength\advance\@ydim#2\unitlength}%
43 \ignorespaces}
\@killglue
44 \gdef\@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}}

45 ⟨/2ekernel | def⟩

\thinlines \thicklines

46 ⟨∗2ekernel | def⟩

47 \gdef\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
48 \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth}
49 \gdef\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
50 \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth}

51 ⟨/2ekernel | def⟩ 52 ⟨∗autoload⟩

53 \def\thinlines{\pictur@\thinlines}
54 \def\thicklines{\pictur@\thicklines}

55 ⟨/autoload⟩

\linethickness

56 ⟨∗2ekernel | def⟩

57 \gdef\linethickness#1{\@wholewidth #1\relax \@halfwidth .5\@wholewidth}

58 ⟨/2ekernel | def⟩ 59 ⟨∗autoload⟩

60 \def\linethickness{\pictur@\linethickness}

61 ⟨/autoload⟩

\ishortstack

62 ⟨∗2ekernel | def⟩

63 \gdef\shortstack{\@ifnextchar[\@shortstack{\@shortstack[c]}}
\@ishortstack
64 \gdef\@shortstack[#1]{%
65 \leavevmode
66 \vbox\bgroup
67  \baselineskip-\p@\lineskip 3\p@
68  \let\mb@l\hss\let\mb@r\hss
69  \expandafter\let\csname mb@#1\endcsname\relax
70  \let\\\@stackcr
71  \@ishortstack}

\@ishortstack
72 \gdef\@ishortstack#1{\ialign{\mb@l {##}\unskip\mb@r\cr #1\crcr}\egroup}
\@stackcr \@ixstackcr
73 \gdef\@stackcr{\@ifstar\@ixstackcr\@ixstackcr}
74 \gdef\@ixstackcr{\@ifnextchar[\@istackcr{\cr\ignorespaces}}
\@istackcr
75 \gdef\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}

\line(X,Y){LEN} == BEGIN

  \@xarg  := X
  \@yarg  := Y
  \@linelen := LEN * \unitlength
  if \@xarg = 0
     then \@vline

else if \@yarg = 0

            then \@hline
            else \@sline

if

if END

\@sline ==

BEGIN

if \@xarg < 0

then @negarg := T

      \@xarg := -\@xarg
      \@yyarg := -\@yarg

else @negarg := F

      \@yyarg := \@yarg

fi

\@tempcnta := |\@yyarg|
if \@tempcnta > 6

then error: ’LATEX ERROR: Illegal \line or \vector argument.’

      \@tempcnta := 0

fi

\box\@linechar := \hbox{\@linefnt \@getlinechar(\@xarg,\@yyarg)
}
if \@yarg > 0 then \@upordown = \raise
                    \@clnht := 0
              else \@upordown = \lower
                   \@clnht := height of \box\@linechar

fi

\@clnwd := width of \box\@linechar

if @negarg

  then \hskip - width of \box\@linechar
       \reserved@a == \hskip - 2* width of box \@linechar
  else \reserved@a == \relax

fi %% Put out integral number of line segments

while \@clnwd <  \@linelen
  do \@upordown \@clnht \copy\@linechar
      \reserved@a
      \@clnht := \@clnht + ht of \box\@linechar
      \@clnwd := \@clnwd + width of \box\@linechar

od

%% Put out last segment

\@clnht := \@clnht - height of \box\@linechar
\@clnwd := \@clnwd - width of \box\@linechar
\@tempdima := \@linelen - \@clnwd
\@tempdimb := \@tempdima - width of \box\@linechar
if @negarg then \hskip -\@tempdimb
            else \hskip  \@tempdimb

fi

\@tempdima := 1000 * \@tempdima
\@tempcnta := \@tempdima / width of \box\@linechar
\@tempdima := (\@tempcnta * ht of \box\@linechar)/1000
\@clnht := \@clnht + \@tempdima
if \@linelen < width of box\@linechar
    then \hskip width of box\@linechar
    else \hbox{\@upordown \@clnht \copy\@linechar}

fi END

\@hline ==

BEGIN

if \@xarg < 0 then \hskip -\@linelen \fi
\vrule height \@halfwidth depth \@halfwidth width \@linelen
if \@xarg < 0 then \hskip -\@linelen \fi

END

\@vline == if \@yarg < 0 \@downline else \@upline fi

\@getlinechar(X,Y) ==

BEGIN

\@tempcnta := 8*X - 9

if Y > 0

  then \@tempcnta := \@tempcnta + Y
  else \@tempcnta := \@tempcnta - Y + 64

fi

\char\@tempcnta

END

\vector(X,Y){LEN} ==

BEGIN

\@xarg  := X
\@yarg  := Y
\@linelen := LEN * \unitlength
if \@xarg = 0
then \@vvector

else if \@yarg = 0

       then \@hvector
       else \@svector

if

if END

\@hvector ==

BEGIN

\@hline
{\@linefnt if \@xarg < 0 then \@getlarrow(1,0)
                         else \@getrarrow(1,0)
            fi}

END

\@vvector == if \@yarg < 0 \@downvector else \@upvector fi
\@svector ==

BEGIN

\@sline

\@tempcnta := |\@yarg|
  if \@tempcnta < 5
     then \hskip - width of \box\@linechar
           \@upordown \@clnht \hbox
                    {\@linefnt
                     if @negarg then \@getlarrow(\@xarg,\@yyarg)
                                else \@getrarrow(\@xarg,\@yyarg)
                     fi }

else error: ’LATEX ERROR: Illegal \line or \vector argument.’ fi

END

\@getlarrow(X,Y) ==

BEGIN if Y = 0

  then \@tempcnta := ’33

else \@tempcnta := 16 * X - 9

       \@tempcntb := 2 * Y
       if \@tempcntb > 0
         then \@tempcnta := \@tempcnta + \@tempcntb
         else \@tempcnta := \@tempcnta - \@tempcntb + 64

fi fi

\char\@tempcnta

END

\@getrarrow(X,Y) ==

BEGIN

\@tempcntb := |Y|
case of \@tempcntb
  0 : \@tempcnta := ’55

1 : if X < 3 then \@tempcnta := 24*X - 6 else if X = 3

               then \@tempcnta := 49
               else \@tempcnta := 58 fi

fi 2 : if X < 3

then \@tempcnta := 24*X - 3

else \@tempcnta := 51 % X must = 3 fi

  3 : \@tempcnta := 16*X - 2
  4 : \@tempcnta := 16*X + 7

endcase if Y < 0

  then \@tempcnta := \@tempcnta + 64

fi

\char\@tempcnta

END

\if@negarg
76 \newif\if@negarg
\line
77 \gdef\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
78 \@linelen #3\unitlength
79 \ifdim\@linelen<\z@\@badlinearg\else
80  \ifnum\@xarg =\z@ \@vline
81  \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
82  \fi
83 \fi}
\@sline
84 \gdef\@sline{%
85 \ifnum\@xarg<\z@ \@negargtrue \@xarg -\@xarg \@yyarg -\@yarg
86 \else \@negargfalse \@yyarg \@yarg \fi
87 \ifnum \@yyarg >\z@ \@tempcnta\@yyarg \else \@tempcnta -\@yyarg \fi
88 \ifnum\@tempcnta>6 \@badlinearg\@tempcnta\z@ \fi
89 \ifnum\@xarg>6 \@badlinearg\@xarg \@ne \fi
90 \setbox\@linechar\hbox{\@linefnt\@getlinechar(\@xarg,\@yyarg)}%
91 \ifnum \@yarg >\z@ \let\@upordown\raise \@clnht\z@
92 \else\let\@upordown\lower \@clnht \ht\@linechar\fi
93 \@clnwd \wd\@linechar
94 \if@negarg
95 \hskip -\wd\@linechar \def\reserved@a{\hskip -2\wd\@linechar}%
96 \else
97  \let\reserved@a\relax
98 \fi
99 \@whiledim \@clnwd <\@linelen \do
100 {\@upordown\@clnht\copy\@linechar
101 \reserved@a
102 \advance\@clnht \ht\@linechar
103 \advance\@clnwd \wd\@linechar}%
104 \advance\@clnht -\ht\@linechar
105 \advance\@clnwd -\wd\@linechar
106 \@tempdima\@linelen\advance\@tempdima -\@clnwd
107 \@tempdimb\@tempdima\advance\@tempdimb -\wd\@linechar
108 \if@negarg \hskip -\@tempdimb \else \hskip \@tempdimb \fi
109 \multiply\@tempdima \@m
110 \@tempcnta \@tempdima
111 \@tempdima \wd\@linechar \divide\@tempcnta \@tempdima
112 \@tempdima \ht\@linechar \multiply\@tempdima \@tempcnta
113 \divide\@tempdima \@m
114 \advance\@clnht \@tempdima
115 \ifdim \@linelen <\wd\@linechar
116 \hskip \wd\@linechar
117 \else\@upordown\@clnht\copy\@linechar\fi}
\@hline
118 \gdef\@hline{\ifnum \@xarg <\z@ \hskip -\@linelen \fi
119 \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@linelen
120 \ifnum \@xarg <\z@ \hskip -\@linelen \fi}

\getlinechar
121 \gdef\@getlinechar(#1,#2){\@tempcnta#1\relax\multiply\@tempcnta 8%
122 \advance\@tempcnta -9\ifnum #2>\z@ \advance\@tempcnta #2\relax\else
123 \advance\@tempcnta -#2\relax\advance\@tempcnta 64 \fi
124 \char\@tempcnta}
\vector
125 \gdef\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
126 \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi
127 \ifnum\@tempcnta<5\relax
128 \@linelen #3\unitlength
129 \ifdim\@linelen<\z@\@badlinearg\else
130  \ifnum\@xarg =\z@ \@vvector
131  \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
132  \fi
133 \fi
134 \else\@badlinearg\fi}
\@hvector
135 \gdef\@hvector{\@hline\hb@xt@\z@{\@linefnt
136 \ifnum \@xarg <\z@ \@getlarrow(1,0)\hss\else
137  \hss\@getrarrow(1,0)\fi}}
\@vvector
138 \gdef\@vvector{\ifnum \@yarg <\z@ \@downvector \else \@upvector \fi}
\@svector
139 \gdef\@svector{\@sline
140 \@tempcnta\@yarg \ifnum\@tempcnta <\z@ \@tempcnta -\@tempcnta\fi
141 \ifnum\@tempcnta <5%
142  \hskip -\wd\@linechar
143  \@upordown\@clnht \hbox{\@linefnt  \if@negarg
144  \@getlarrow(\@xarg,\@yyarg)\else \@getrarrow(\@xarg,\@yyarg)\fi}%
145 \else\@badlinearg\fi}
\@getlarrow
146 \gdef\@getlarrow(#1,#2){\ifnum #2=\z@ \@tempcnta'33 \else
147 \@tempcnta #1\relax\multiply\@tempcnta \sixt@@n \advance\@tempcnta
148 -9 \@tempcntb #2\relax\multiply\@tempcntb \tw@
149 \ifnum \@tempcntb >\z@ \advance\@tempcnta \@tempcntb
150 \else\advance\@tempcnta -\@tempcntb\advance\@tempcnta 64
151 \fi\fi\char\@tempcnta}
\@getrarrow
152 \gdef\@getrarrow(#1,#2){\@tempcntb #2\relax
153 \ifnum\@tempcntb <\z@ \@tempcntb -\@tempcntb\relax\fi
154 \ifcase \@tempcntb\relax \@tempcnta'55 \or
155 \ifnum #1<\thr@@ \@tempcnta #1\relax\multiply\@tempcnta
156 24\advance\@tempcnta -6 \else \ifnum #1=\thr@@ \@tempcnta 49
157 \else\@tempcnta 58 \fi\fi\or
158 \ifnum #1<\thr@@ \@tempcnta=#1\relax\multiply\@tempcnta
159 24\advance\@tempcnta -\thr@@ \else \@tempcnta 51 \fi\or
160 \@tempcnta #1\relax\multiply\@tempcnta

161 \sixt@@n \advance\@tempcnta -\tw@ \else
162 \@tempcnta #1\relax\multiply\@tempcnta
163 \sixt@@n \advance\@tempcnta 7 \fi\ifnum #2<\z@ \advance\@tempcnta 64 \fi
164 \char\@tempcnta}
\@vline
165 \gdef\@vline{\ifnum \@yarg <\z@ \@downline \else \@upline\fi}
\@upline
166 \gdef\@upline{%
167 \hb@xt@\z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
168 \@height \@linelen \@depth \z@\hss}}
\@downline
169 \gdef\@downline{%
170 \hb@xt@\z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
171 \@height \z@ \@depth \@linelen \hss}}
\@upvector
172 \gdef\@upvector{\@upline\setbox\@tempboxa\hbox{\@linefnt\char'66}\raise
173  \@linelen \hb@xt@\z@{\lower \ht\@tempboxa\box\@tempboxa\hss}}
\@downvector
174 \gdef\@downvector{\@downline\lower \@linelen
175  \hb@xt@\z@{\@linefnt\char'77\hss}}
  \dashbox{D}(X,Y) ==

BEGIN

leave vertical mode

   \hb@xt@ 0pt {
        \baselineskip := 0pt
        \lineskip  := 0pt

%% HORIZONTAL DASHES

        \@dashdim := X * \unitlength

\@dashcnt := \@dashdim + 200 % to prevent roundoff error

        \@dashdim := D * \unitlength
        \@dashcnt := \@dashcnt / \@dashdim
        if \@dashcnt is odd
          then \@dashdim := 0pt
               \@dashcnt := (\@dashcnt + 1) / 2
          else \@dashdim := \@dashdim / 2
               \@dashcnt := \@dashcnt / 2 - 1
               \box\@dashbox := \hbox{\vrule height \@halfwidth
                              depth \@halfwidth width \@dashdim}
               \put(0,0){\copy\@dashbox}
               \put(0,Y){\copy\@dashbox}
               \put(X,0){\hskip -\@dashdim\copy\@dashbox}
               \put(X,Y){\hskip -\@dashdim\box\@dashbox}
               \@dashdim := 3 * \@dashdim

fi

        \box\@dashbox := \hbox{\vrule height \@halfwidth

                  depth \@halfwidth width D * \unitlength
                  \hskip D * \unitlength}
\@tempcnta := 0
\put(0,0){\hskip \@dashdim
         while \@tempcnta < \@dascnt
           do \copy\@dashbox
              \@tempcnta := \@tempcnta + 1

od

        }
\@tempcnta := 0
put(0,Y){\hskip \@dashdim
         while \@tempcnta < \@dascnt
           do \copy\@dashbox
              \@tempcnta := \@tempcnta + 1

od

        }

%% vertical dashes

\@dashdim := Y * \unitlength

\@dashcnt := \@dashdim + 200 % to prevent roundoff error

\@dashdim := D * \unitlength
\@dashcnt := \@dashcnt / \@dashdim
if \@dashcnt is odd
  then \@dashdim := 0pt
       \@dashcnt := (\@dashcnt + 1) / 2
  else \@dashdim := \@dashdim / 2
       \@dashcnt := \@dashcnt / 2 - 1
       \box\@dashbox := \hbox{\hskip -\@halfwidth
                                \vrule width \@wholewidth
                                         height \@dashdim  }
       \put(0,0){\copy\@dashbox}
       \put(X,0){\copy\@dashbox}
       \put(0,Y){\lower\@dashdim\copy\@dashbox}
       \put(X,Y){\lower\@dashdim\copy\@dashbox}
       \@dashdim := 3 * \@dashdim

fi

\box\@dashbox := \hbox{\vrule width \@wholewidth
                          height D * \unitlength       }
\@tempcnta := 0
put(0,0){\hskip -\halfwidth
         \vbox{while \@tempcnta < \@dashcnt
                do \vskip D*\unitlength
                   \copy\@dashbox
                   \@tempcnta := \@tempcnta + 1

od

               \vskip \@dashdim
              } }
\@tempcnta := 0
put(X,0){\hskip -\halfwidth
         \vbox{while \@tempcnta < \@dashcnt

                        do \vskip D*\unitlength
                           \copy\@dashbox
                           \@tempcnta := \@tempcnta + 1

od

                       \vskip \@dashdim
                      }
                }

} % END DASHES

   \@imakepicbox(X,Y)

END

\dashbox
176 \gdef\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip
177 \lineskip \z@skip
178 \@dashdim #2\unitlength
179 \@dashcnt \@dashdim \advance\@dashcnt 200
180 \@dashdim #1\unitlength\divide\@dashcnt \@dashdim
181 \ifodd\@dashcnt\@dashdim \z@
182 \advance\@dashcnt \@ne \divide\@dashcnt \tw@
183 \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
184 \advance\@dashcnt \m@ne
185 \setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
186 \@width \@dashdim}\put(0,0){\copy\@dashbox}%
187 \put(0,#3){\copy\@dashbox}%
188 \put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
189 \put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
190 \multiply\@dashdim \thr@@
191 \fi
192 \setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
193 \@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
194 \put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
195 \do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
196 \put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
197 \do{\copy\@dashbox\advance\@tempcnta \@ne }}%
198 \@dashdim #3\unitlength
199 \@dashcnt \@dashdim \advance\@dashcnt 200
200 \@dashdim #1\unitlength\divide\@dashcnt \@dashdim
201 \ifodd\@dashcnt \@dashdim \z@
202 \advance\@dashcnt \@ne \divide\@dashcnt \tw@
203 \else
204 \divide\@dashdim \tw@ \divide\@dashcnt \tw@
205 \advance\@dashcnt \m@ne
206 \setbox\@dashbox\hbox{\hskip -\@halfwidth
207 \vrule \@width \@wholewidth
208 \@height \@dashdim}\put(0,0){\copy\@dashbox}%
209 \put(#2,0){\copy\@dashbox}%
210 \put(0,#3){\lower\@dashdim\copy\@dashbox}%
211 \put(#2,#3){\lower\@dashdim\copy\@dashbox}%
212 \multiply\@dashdim \thr@@
213 \fi
214 \setbox\@dashbox\hbox{\vrule \@width \@wholewidth
215 \@height #1\unitlength}\@tempcnta\z@

216 \put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
217 \do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
218 \vskip\@dashdim}}\@tempcnta\z@
219 \put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
220 \do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
221 \vskip\@dashdim}}}\@makepicbox(#2,#3)}

CIRCLES AND OVALS

USER COMMANDS:

\circle{D} : Produces the circle with the diameter as close as

possible to D * \unitlength.  \put(X,Y){\circle{D}}

puts the circle with its center at (X,Y).

\oval(X,Y) : Makes an oval as round as possible that fits in the rectangle of width X * \unitlength and height Y * \unitlength. The reference point is the center.

\oval(X,Y)[POS] : Save as \oval(X,Y) except it draws only the half or quadrant of the oval indicated by POS. E.G., \oval(X,Y)[t] draws just the top half and \oval(X,Y)[br] draws just the bottom right quadrant. In all cases, the reference point is the same as the unqualified \oval(X,Y) command.

\@ovvert {DELTA1} {DELTA2} : Makes a vbox containing either the left side or the right side of the oval being constructed. The baseline will coincide with the outside bottom edge of the oval; the left side of the box will coincide with the left edge of the vertical rule. The width of the box will be \@tempdima. DELTA1 and DELTA2 are added to the character number in

\@tempcnta

to get the characters for the top and bottom quarter circle pieces.

\@ovhorz : Makes an hbox containing the straight rule for either the top or the bottom of the oval being constructed. The baseline will coincide with bottom edge of the rule; the left side of the box will coincide with the left side of the oval. The width of the box will be \@ovxx.

\@getcirc {DIAM} : Sets \@tempcnta to the character number of the top-right quarter circle with the largest diameter less than or equal to DIAM. Sets \@tempboxa to an hbox containing that character.

Sets \@tempdima to \wd \@tempboxa, which is the distance

from the circle’s left outside edge to its right inside edge. (These characters are like those described in the TeXbook, pp. 389-90.)

\@getcirc {DIAM} ==

BEGIN

\@tempcnta := integer coercion of (DIAM + 2pt)

+ 2pt added 1 Nov 88

\@tempcnta := \@tempcnta / integer coercion of 4pt

if \@tempcnta > 10
then \@tempcnta := 10 fi
if \@tempcnta > 0
then \@tempcnta := \@tempcnta-1

else LaTeX Warning: Oval too small. fi

\@tempcnta  := 4 * \@tempcnta
\@tempboxa  := \hbox{\@circlefnt \char \@tempcnta}
\@tempdima  := \wd \@tempboxa

END

\@put{X}{Y}{OBJ} ==

BEGIN

\raise Y \hb@xt@ 0pt{\hskip X OBJ \hss}

END

\@oval(X,Y)[POS] ==

BEGIN

\begingroup
\boxmaxdepth := \maxdimen

@ovt := @ovb := @ovl := @ovr := true for all E in POS

do @ovE := false od

\@ovxx  := X * \unitlength
\@ovyy  := Y * \unitlength
\@tempdimb := min(\@ovxx,\@ovyy)
\@getcirc{\@tempdimb-2pt}   %% ”-2pt” added 7 Dec 89
\@ovro  := \ht \@tempboxa
\@ovri  := \dp \@tempboxa
\@ovdx  := \@ovxx - \@tempdima
\@ovdx  := \@ovdx/2
\@ovdy  := \@ovyy - \@tempdima
\@ovdy  := \@ovyy/2
\@circlefnt
\@tempboxa :=
    \hbox{

if @ovr

            then \@ovvert{3}{2} \kern -\@tempdima

fi

if @ovl

            then \kern \@ovxx \@ovvert{0}{1} \kern
-\@tempdima
                 \kern -\@ovxx

fi if @ovt

then \@ovhorz \kern -\@ovxx

fi if @ovb

then \raise \@ovyy \@ovhorz

fi

}
\@ovdx  := \@ovdx + \@ovro
\@ovdy  := \@ovdy + \@ovro
\ht\@tempboxa := \dp\@tempboxa := 0
\@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}
\endgroup

END

\@ovvert {DELTA1} {DELTA2} ==

BEGIN

\vbox to \@ovyy {

if @ovb

     then \@tempcntb := \@tempcnta + DELTA1
          \kern -\@ovro
          \hbox { \char \@tempcntb }
          \nointerlineskip
     else \kern \@ovri \kern \@ovdy

fi

   \leaders \vrule width \@wholewidth \vfil
   \nointerlineskip

if @ovt

     then \@tempcntb := \@tempcnta + DELTA2
          \hbox { \char \@tempcntb }
     else \kern \@ovdy \kern \@ovro

fi

  }

END

\@ovhorz ==

BEGIN

\hb@xt@ \@ovxx{
\kern \@ovro

if @ovr then

  else \kern \@ovdx

fi

\leaders \hrule height \@wholewidth \hfil

if @ovl then

  else \kern \@ovdx

fi

\kern \@ovri
}

END

\circle{DIAM} ==

BEGIN

 \begingroup
 \boxmaxdepth := maxdimen
 \@tempdimb := DIAM *\unitlength
 if \@tempdimb > 15.5pt
   then \@getcirc{\@tempdimb}
        \@ovro := \ht \@tempboxa
        \@tempboxa := \hbox{
                \@circlefnt
                \@tempcnta := \@tempcnta + 2
                \char \@tempcnta
                \@tempcnta := \@tempcnta - 1
                \char \@tempcnta
                \kern -2\@tempdima
                \@tempcnta := \@tempcnta + 2
                \raise \@tempdima \hbox { \char \@tempcnta }
                \raise \@tempdima \box\@tempboxa
               }
        \ht\@tempboxa := \dp\@tempboxa := 0
        \@put{-\@ovro}{-\@ovro}{\@tempboxa}

else

        \@circ{\@tempdimb}{96}

fi

\endgroup

END

\circle*{DIAM} == \@dot{DIAM} ==
\@circ{DIAM*\unitlength}{112}
\@circ{DIAM}{CHAR} ==

BEGIN \@tempcnta := integer coercion of (DIAM + .5pt)/1pt.

if \@tempcnta > 15 then \@tempcnta := 15 fi
if \@tempcnta > 1 then \@tempcnta := \@tempcnta - 1 fi
\@tempcnta := \@tempcnta + CHAR
\@circlefnt
\char \@tempcnta

END

\if@ovt \if@ovb \if@ovl \if@ovr If producing the Top Bottom Left or Right of an oval.

222 \newif\if@ovt
223 \newif\if@ovb
224 \newif\if@ovl
225 \newif\if@ovr

226 ⟨/2ekernel | def⟩ 227 ⟨∗2ekernel | autoload⟩

\@ovxx
\@ovyy
\@ovdx
\@ovdy
\@ovro
\@ovri

228 \newdimen\@ovxx
229 \newdimen\@ovyy
230 \newdimen\@ovdx
231 \newdimen\@ovdy
232 \newdimen\@ovro
233 \newdimen\@ovri

234 ⟨/2ekernel | autoload⟩

\advance\@tempdima 2pt\relax added 1 Nov 88 to fix bug in which size of drawn circle not monotonic function of argument of \circle, caused by different rounding for dimensions of large and small circles.

235 ⟨∗2ekernel | def⟩

\@getcirc
236 \gdef\@getcirc#1{\@tempdima #1\relax \advance\@tempdima 2\p@
237 \@tempcnta\@tempdima
238 \@tempdima 4\p@ \divide\@tempcnta\@tempdima
239 \ifnum \@tempcnta >10\relax \@tempcnta 10\relax\fi
240 \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne
241  \else \@latex@warning{Oval too small}\fi
242 \multiply\@tempcnta 4\relax
243 \setbox \@tempboxa \hbox{\@circlefnt
244 \char \@tempcnta}\@tempdima \wd \@tempboxa}
\@put
245 \gdef\@put#1#2#3{\raise #2\hb@xt@\z@{\hskip #1#3\hss}}
\oval
246 \gdef\oval(#1,#2){\@ifnextchar[{\@oval(#1,#2)}{\@oval(#1,#2)[]}}
\@oval
247 \gdef\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
248 \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
249 \@tfor\reserved@a :=#3\do{\csname @ov\reserved@a false\endcsname}%
250 \@ovxx
251 #1\unitlength \@ovyy #2\unitlength
252 \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
253 \advance \@tempdimb -2\p@
254 \@getcirc \@tempdimb
255 \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
256 \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
257 \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
258 \@circlefnt \setbox\@tempboxa
259 \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
260 \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
261 \if@ovt \@ovhorz \kern -\@ovxx \fi
262 \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
263 \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
264 \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
265 \endgroup}

\@ovvert
266 \gdef\@ovvert#1#2{\vbox to\@ovyy{%
267  \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
268  \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
269  \else \kern \@ovri \kern \@ovdy \fi
270  \leaders\vrule \@width \@wholewidth\vfil \nointerlineskip
271  \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
272  \hbox{\char \@tempcntb}%
273  \else \kern \@ovdy \kern \@ovro \fi}}
\@ovhorz
274 \gdef\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro
275  \if@ovr \else \kern \@ovdx \fi
276  \leaders \hrule \@height \@wholewidth \hfil
277  \if@ovl \else \kern \@ovdx \fi
278  \kern \@ovri}}
\circle
279 \gdef\circle{\@inmatherr\circle\@ifstar\@dot\@circle}
\@circle
280 \gdef\@circle#1{%
281 \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength
282 \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb
283  \@ovro\ht\@tempboxa
284  \setbox\@tempboxa\hbox{\@circlefnt
285  \advance\@tempcnta\tw@ \char \@tempcnta
286  \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
287  \advance\@tempcnta\tw@
288  \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
289  \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
290  \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
291 \else  \@circ\@tempdimb{96}\fi\endgroup}

\@dot Internal form of \circle*.

292 \gdef\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}}
\@circ
293 \gdef\@circ#1#2{\@tempdima #1\relax \advance\@tempdima .5\p@
294 \@tempcnta\@tempdima \@tempdima \p@
295 \divide\@tempcnta\@tempdima
296 \ifnum\@tempcnta >15\relax \@tempcnta 15\relax \fi
297 \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne\fi
298 \advance\@tempcnta #2\relax
299 \@circlefnt \char\@tempcnta}

300 ⟨/2ekernel | def⟩

301 ⟨∗2ekernel | autoload⟩

\@xarg \@yarg \@yyarg Counters used for manipulating the ‘slope’ arguments.

302 \newcount\@xarg
303 \newcount\@yarg
304 \newcount\@yyarg

\@multicnt Counter used in \multiput, and also \multicolumn.
305 \newcount\@multicnt

\@xdim \yxdim Length registers.

306 \newdimen\@xdim
307 \newdimen\@ydim

\@linechar Box for holding a line segment character, for sloping lines.

308 \newbox\@linechar

\@linelen Length of the line currently being built.

309 \newdimen\@linelen

\@clnwd \@clnht Height and width of current line segment.

310 \newdimen\@clnwd
311 \newdimen\@clnht
\@dashdim \@dashbox \@dashcnt  \dashbox internal registers.
312 \newdimen\@dashdim
313 \newbox\@dashbox
314 \newcount\@dashcnt

Initialization: “\thinlines”

315 \let\@linefnt\tenln
316 \let\@circlefnt\tencirc
317 \@wholewidth\fontdimen8\tenln
318 \@halfwidth .5\@wholewidth

319 ⟨/2ekernel | autoload⟩

57.1 Curves

The new \qbezier command, based on the old \bezier defined in bezier.sty.

\qbezier[N] == \bezier{N}

\bezier{N}(AX,AY)(BX,BY)(CX,CY) ==

BEGIN

IF N = 0

THEN \@xdima := |BX - AX| \@xb := |CX - BX|

\@xa := Max(\@xa, \@xb)

\@ya := |BY - AY| \@yb := |CY - BY|

\@ya := Max(\@ya, \@yb)
@sc := Max(\@xa, \@ya)

%% The coefficient .5 below is the degree of overlap of %% successive points, where 1 is no overlap and 0 is %% complete overlap. A coefficient of C multiplies %% the number of points plotted by 1/C.

%%
\@xa := .5 * \@halfwidth

       @sc := @sc / \@halfwidth

@sc := Max(@sc, qbeziermax) ELSE @sc := N

@scp := @sc+1

\@xb := 2 * (BX - AX) * \unitlength
\@xa := ((CX-AX)*\unitlength - \@xb)/@sc
\@yb := 2 * (BY - AY) * \unitlength
\@ya := ((CY-AY)*\unitlength - \@yb)/@sc
\@pictdot := square rule of width \@wholewidth
\count@ := 0

WHILE \count@ < @scp

  DO \@xdim := ((\count@*\@xa + @xb) / @sc) * \count@
      \@ydim := ((\count@*\@ya + @yb) / @sc) * \count@

plot pt with relative coords (\@xdim,\@ydim)

      \count@ := \count@+1

OD

\qbeziermax The maximum number of points to plot.

320 ⟨∗2ekernel | def⟩

321 ⟨def⟩\ifx\qbeziermax\@undefined
322 \gdef\qbeziermax{500}

323 ⟨def⟩\fi

In the code below, to save registers \@a … are not used. Instead other registers are reused.

\newcounter{@sc} -> \c@multicnt
\newcounter{@scp} -> \@tempcnta
\newdimen\@xa ->  \@ovxx
\newdimen\@xb ->  \@ovdx
\newdimen\@ya ->  \@ovyy
\newdimen\@yb ->  \@ovdy
\newsavebox{\@pictdot} -> \@tempboxa

\qbezier Main user-level command to plot quadratic bezier curves. #2 should be (.

324 \newcommand\qbezier[2][0]{\bezier{#1}#2}

\bezier Form of \bezier compatible with 2.09 bezier.sty, but modified to ignore spaces between its arguments. #2 should be white space, and #4 should be (.

325 \gdef\bezier#1)#2(#3)#4({\@bezier#1)(#3)(}
\@bezier
326 \gdef\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
327 \ifnum #1=\z@
328  \@ovxx #4\unitlength
329  \advance\@ovxx -#2\unitlength
330  \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi
331  \@ovdx #6\unitlength
332  \advance\@ovdx -#4\unitlength
333  \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi
334  \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi

335  \@ovyy #5\unitlength
336  \advance\@ovyy -#3\unitlength
337  \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi
338  \@ovdy #7\unitlength
339  \advance\@ovdy -#5\unitlength
340  \ifdim \@ovdy<\z@  \@ovdy -\@ovdy \fi
341  \ifdim \@ovyy<\@ovdy \@ovyy  \@ovdy \fi
342  \@multicnt
343  \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
344  \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
345  \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi
346 \else \@multicnt#1\relax \fi
347 \@tempcnta\@multicnt \advance\@tempcnta\@ne
348 \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength
349  \multiply\@ovdx \tw@
350 \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength
351  \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt
352 \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength
353  \multiply\@ovdy \tw@
354 \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength
355  \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt
356 \setbox\@tempboxa\hbox{\vrule \@height\@halfwidth
357  \@depth \@halfwidth
358  \@width \@wholewidth}%
359 \put(#2,#3){%
360  \count@\z@
361  \@whilenum{\count@<\@tempcnta}\do
362  {\@xdim\count@\@ovxx
363  \advance\@xdim\@ovdx
364  \divide\@xdim\@multicnt
365  \multiply\@xdim\count@
366  \@ydim\count@\@ovyy
367  \advance\@ydim\@ovdy
368  \divide\@ydim\@multicnt
369  \multiply\@ydim\count@
370  \raise \@ydim
371  \hb@xt@\z@{\kern\@xdim
372  \unhcopy\@tempboxa\hss}%
373  \advance\count@\@ne}}}

374 ⟨/2ekernel | def⟩

File E

ltthm.dtx

58 Theorem Environments

The user creates his own theorem-like environments with the command \newtheorem{⟨name⟩}{⟨text⟩}[⟨counter⟩] or \newtheorem{⟨name⟩}[⟨oldname⟩]{⟨text⟩} This defines the environment ⟨name⟩ to be just as one would expect a theorem environment to be, except that it prints ⟨text⟩ instead of “Theorem”.

If ⟨oldname⟩ is given, then environments ⟨name⟩ and ⟨oldname⟩ use the same counter, so using a ⟨name⟩ environment advances the number of the next ⟨name⟩ environment, and vice-versa.

If ⟨counter⟩ is given, then environment ⟨name⟩ is numbered within ⟨counter⟩. E.g., if ⟨counter⟩ = subsection, then the first ⟨name⟩ in subsection 7.2 is

numbered ⟨text⟩ 7.2.1.

The way ⟨name⟩ environments are numbered can be changed by redefining \the⟨name⟩.

DOCUMENT STYLE PARAMETERS

\@thmcounter{COUNTER} : A command such that

               \edef\theCOUNTER{\@thmcounter{COUNTER}}

defines \theCOUNTER to produce a number for a theorem environment. The default is:

            BEGIN \noexpand\arabic{COUNTER} END

\@thmcountersep : A separator placed between a theorem number and the number of the counter within which it is numbered. E.g., to make the third theorem of section 7.2 be numbered 7.2-3, \@thmcountersep should be \def'ed to ’-’. Its default is ’.’.

\@begintheorem{NAME}{NUMBER} : A command that begins a theorem

environment for a ’theorem’ named ’NAME NUMBER’ – e.g., \@begintheorem{Lemma}{3.7} starts Lemma 3.7.

  \@opargbegintheorem{NAME}{NUMBER}{OPARG} :

A command that begins a theorem

environment for a ’theorem’ named ’NAME NUMBER’ with

optional argument OPARG – e.g., \@begintheorem{Lemma}{3.7}{Jones} starts ‘Lemma 3.7 (Jones):’.

\@endtheorem : A command that ends a theorem environment.

\newtheorem{NAME}{TEXT}[COUNTER] == BEGIN

if \NAME is definable

    then \@definecounter{NAME}

if COUNTER present

then \@newctr{NAME}[COUNTER] fi

                \theNAME == BEGIN \theCOUNTER \@thmcountersep
                                    eval\@thmcounter{NAME}

END

           else \theNAME == BEGIN eval\@thmcounter{NAME} END
         \NAME == \@thm{NAME}{TEXT}
         \endNAME == \@endtheorem

else error fi

END

\newtheorem{NAME}[OLDNAME]{TEXT}==

BEGIN

if counter OLDNAME nonexistant then ERROR else

if \NAME is definable then BEGIN

                \theNAME == \theOLDNAME
                \NAME == \@thm{OLDNAME}{TEXT}
                \endNAME == \@endtheorem

END else error

fi fi

END

\@thm{NAME}{TEXT} == BEGIN

 \refstepcounter{NAME}

if next char = [ then \@ythm{NAME}{TEXT} else \@xthm{NAME}{TEXT}

fi END

\@xthm{NAME}{TEXT} ==

BEGIN

 \@begintheorem{TEXT}{\theNAME}
 \ignorespaces

END

\@ythm{NAME}{TEXT}[OPARG] == BEGIN

 \@opargbegintheorem{TEXT}{\theNAME}{OPARG}
 \ignorespaces

END

\newtheorem \newtheorem ought really be allowed only in the preamble Which would be good document style, and allow some main memory to be saved by declaring these commands to be \@onlypreamble. Unfortunately the L^{A}TEX book indicates that \newtheorem may be used anywhere in the document…

1 ⟨∗2ekernel⟩

 2 \def\newtheorem#1{%
 3 \@ifnextchar[{\@othm{#1}}{\@nthm{#1}}}
\@nthm
 4 \def\@nthm#1#2{%
 5 \@ifnextchar[{\@xnthm{#1}{#2}}{\@ynthm{#1}{#2}}}

\@xnthm 92/09/18 RmS: Changed \@addtoreset to \@newctr to produce error message if counter #3 does not exist (to be consistent with behaviour of \newcounter)

 6 \def\@xnthm#1#2[#3]{%
 7 \expandafter\@ifdefinable\csname #1\endcsname
 8  {\@definecounter{#1}\@newctr{#1}[#3]%
 9  \expandafter\xdef\csname the#1\endcsname{%
10  \expandafter\noexpand\csname the#3\endcsname \@thmcountersep
11  \@thmcounter{#1}}%
12  \global\@namedef{#1}{\@thm{#1}{#2}}%
13  \global\@namedef{end#1}{\@endtheorem}}}
\@ynthm
14 \def\@ynthm#1#2{%
15 \expandafter\@ifdefinable\csname #1\endcsname
16  {\@definecounter{#1}%
17  \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
18  \global\@namedef{#1}{\@thm{#1}{#2}}%
19  \global\@namedef{end#1}{\@endtheorem}}}
\@othm
20 \def\@othm#1[#2]#3{%
21 \@ifundefined{c@#2}{\@nocounterr{#2}}%
22  {\expandafter\@ifdefinable\csname #1\endcsname
23  {\global\@namedef{the#1}{\@nameuse{the#2}}%
24 \global\@namedef{#1}{\@thm{#2}{#3}}%
25 \global\@namedef{end#1}{\@endtheorem}}}}
\@thm
26 \def\@thm#1#2{%
27 \refstepcounter{#1}%
28 \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}}
\@xthm \@ythm
29 \def\@xthm#1#2{%
30 \@begintheorem{#2}{\csname the#1\endcsname}\ignorespaces}
31 \def\@ythm#1#2[#3]{%
32 \@opargbegintheorem{#2}{\csname the#1\endcsname}{#3}\ignorespaces}

Default values

File E: ltthm.dtx Date: 1995/10/10 Version v1.0f 291

\@thmcounter
\@thmcountersep
33 \def\@thmcounter#1{\noexpand\arabic{#1}}
34 \def\@thmcountersep{.}
\@begintheorem \@opargbegintheorem \@endtheorem Providing theorem defaults.
35 \def\@begintheorem#1#2{\trivlist
36 \item[\hskip \labelsep{\bfseries #1\ #2}]\itshape}
37 \def\@opargbegintheorem#1#2#3{\trivlist
38  \item[\hskip \labelsep{\bfseries #1\ #2\ (#3)}]\itshape}
39 \def\@endtheorem{\endtrivlist}

40 ⟨/2ekernel⟩

File E: ltthm.dtx Date: 1995/10/10 Version v1.0f 292

File F

ltsect.dtx

59 Sectioning Commands

This file defines the declarations such as \author which are used by \maketitle. \maketitle itself is defined by each class, not in the L^{A}TEX kernel.

The second part of the file defines the generic commands used for defining sectioning commands such as \chapter. Again the actual document level commands are defined in the class files, in terms of these commands.

1 ⟨∗2ekernel⟩

 2 \message{title,}

59.1 The Title

\title The user defines the title and author by the declarations \title{⟨name⟩},

\author  \author{⟨name⟩}

\date Similarly the date is declared with \date{⟨date⟩}. \thanks Inside these, the \thanks{⟨footnote text⟩} command may be used to make

\and acknowledgements, notice of address, etc. in a footnote. If there are multiple

authors, they have to be separated with the \and command.

\maketitle And finally, the \maketitle command produces the actual title, using the information previously saved with the other commands.

\title \@title  \title for use in \maketitle. If not given \maketitle will produce an error

message.

 3 \def\title#1{\gdef\@title{#1}}
 4 \def\@title{\@latex@error{No \noexpand\title given}\@ehc}
\author \@author  \author for use in \maketitle. If not given \maketitle will produce a warning

message.

 5 \def\author#1{\gdef\@author{#1}}
 6 \def\@author{\@latex@warning@no@line{No \noexpand\author given}}
\date \@date  \date for use in \maketitle. If not given \maketitle will produce \today as the

default.

 7 \def\date#1{\gdef\@date{#1}}
 8 \gdef\@date{\today}
\thanks
 9 \def\thanks#1{\footnotemark
10  \protected@xdef\@thanks{\@thanks
11  \protect\footnotetext[\the\c@footnote]{#1}}%

12 }

\@thanks
13 \let\@thanks\@empty

\and
14 \def\and{%%                             % \begin{tabular}
15 \end{tabular}\hskip 1em \@plus.17fil%
16 \begin{tabular}[t]{c}%% \end{tabular}

17 }

18 \message{sectioning,}

59.2 Sectioning

\@secpenalty
19 \newcount\@secpenalty
20 \@secpenalty = -300
\if@noskipsec
\@noskipsectrue
21 \newif\if@noskipsec \@noskipsectrue
\@startsection The \@startsection{⟨name⟩}{⟨level⟩}{ ⟨indent⟩}{⟨beforeskip⟩}

{⟨afterskip⟩}{⟨style⟩}*[⟨altheading⟩ ]{⟨heading⟩} command is the mother of all the user level sectioning commands. The part after the *, including the * is optional.

name: e.g., ’subsection’

level: a number, denoting depth of section – e.g., chapter=1, section = 2, etc.

indent: Indentation of heading from left margin

beforeskip: Absolute value = skip to leave above the heading. If negative, then paragraph indent of text following heading is suppressed.

afterskip: if positive, then skip to leave below heading, else negative of skip to leave to right of run-in heading.

style: commands to set style

If ‘*’ is missing, then increment the counter. If it is present, then there should be no [⟨altheading⟩] argument. The command uses the counter ’secnumdepth’. It contains a pointer to the highest section level that is to be numbered.

Warning: The \@startsection command should be at the same or higher grouping level as the text that follows it. For example, you should not do something like

      \def\foo{ \begingroup ...
                   \paragraph{...}
                 \endgroup}

Pseudocode for the \@startsection command

 \@startsection

{NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} == BEGIN IF @noskipsec = T THEN \leavevmode FI

% true if previous section% had no body.

\par

\@tempskipa := BEFORESKIP @afterindent := T

IF \@tempskipa < 0 THEN \@tempskipa := -\@tempskipa

@afterindent := F

FI IF @nobreak = true

THEN \everypar == null

  ELSE \addpenalty{\@secpenalty}
       \addvspace{\@tempskipa}

FI IF * next

THEN \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}

  ELSE \@dblarg{\@sect

{NAME}{LEVEL}{INDENT}

{BEFORESKIP}{AFTERSKIP}{STYLE}}

FI END

22 \def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
23 \par \@tempskipa #4\relax
24 \@afterindenttrue
25 \ifdim \@tempskipa <\z@
26  \@tempskipa -\@tempskipa \@afterindentfalse
27 \fi
28 \if@nobreak \everypar{}\else
29  \addpenalty\@secpenalty\addvspace\@tempskipa
30 \fi
31 \@ifstar
32  {\@ssect{#3}{#4}{#5}{#6}}%
33  {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}

\@sect Pseudocode for the \@sect command

\@sect{NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}[ARG1]{ARG2}

==

BEGIN

IF LEVEL > \c@secnumdepth

THEN \@svsec :=L null

 ELSE \refstepcounter{NAME}
      \@svsec :=L BEGIN \@seccntformat{#1}\relax END

FI IF AFTERSKIP > 0

 THEN \begingroup

STYLE

         \@hangfrom{\hskip INDENT\@svsec}
         {\interlinepenalty 10000 ARG2\par}
      \endgroup
      \NAMEmark{ARG1}
      \addcontentsline{toc}{NAME}

              { IF LEVEL > \c@secnumdepth
                  ELSE \protect\numberline{\theNAME} FI

ARG1 }

ELSE \@svsechd == BEGIN STYLE

                               \hskip INDENT\@svsec

ARG2

                               \NAMEmark{ARG1}
                               \addcontentsline{toc}{NAME}
                                  { IF LEVEL > \c@secnumdepth

ELSE

\protect\numberline{\theNAME}

FI ARG1 }

END

FI

    \@xsect{AFTERSKIP}

END

34 \def\@sect#1#2#3#4#5#6[#7]#8{%
35  \ifnum #2>\c@secnumdepth
36  \let\@svsec\@empty\else
37  \refstepcounter{#1}%

Since \@seccntformat might end with an improper \hskip which is scanning forward for plus or minus we end the definition of \@svsec with \relax as a precaution.

38  \protected@edef\@svsec{\@seccntformat{#1}\relax}%
39  \fi
40  \@tempskipa #5\relax
41  \ifdim \@tempskipa>\z@
42  \begingroup #6\relax
43  \@hangfrom{\hskip #3\relax\@svsec}%
44  {\interlinepenalty \@M #8\par}%
45  \endgroup
46  \csname #1mark\endcsname{#7}\addcontentsline
47  {toc}{#1}{\ifnum #2>\c@secnumdepth \else
48  \protect\numberline{\csname the#1\endcsname}\fi
49  #7}\else
50  \def\@svsechd{#6\hskip #3\relax  %% \relax added 2 May 90
51  \@svsec #8\csname #1mark\endcsname
52  {#7}\addcontentsline
53  {toc}{#1}{\ifnum #2>\c@secnumdepth \else
54  \protect\numberline{\csname the#1\endcsname}%
55  \fi
56  #7}}\fi
57  \@xsect{#5}}

\@xsect Pseudocode for the \@xsect command \@xsect{AFTERSKIP} == BEGIN

IF AFTERSKIP > 0

      THEN \par \nobreak

File F: ltsect.dtx Date: 1995/11/28 Version v1.0r 296 \vskip AFTERSKIP

\@afterheading

ELSE @nobreak :=G F @noskipsec :=G T \everypar{ IF @noskipsec = T

THEN @noskipsec :=G F

\clubpenalty :=G 10000
\hskip -\parindent
\begingroup
  \@svsechd
\endgroup
\unskip
\hskip -AFTERSKIP \relax

%% relax added 14 Jan 91

ELSE \clubpenalty :=G \@clubpenalty
\everypar := NULL

FI

}

FI

END

58 \def\@xsect#1{\@tempskipa #1\relax
59  \ifdim \@tempskipa>\z@
60  \par \nobreak
61  \vskip \@tempskipa
62  \@afterheading
63  \else \global\@nobreakfalse \global\@noskipsectrue
64  \everypar{\if@noskipsec \global\@noskipsecfalse
65  \clubpenalty\@M \hskip -\parindent
66  \begingroup \@svsechd \endgroup \unskip
67  \@tempskipa #1\relax
68  \hskip -\@tempskipa
69  \else \clubpenalty \@clubpenalty
70  \everypar{}\fi}\fi\ignorespaces}

\@seccntformat This command formats the section number including the space following it.

71 \def\@seccntformat#1{\csname the#1\endcsname\quad}

Pseudocode for the \@ssect command \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}{ARG} ==

BEGIN IF AFTERSKIP > 0

THEN \begingroup

STYLE

\@hangfrom{\hskip INDENT}{\interlinepenalty 10000
ARG\par}
\endgroup

ELSE \@svsechd == BEGIN STYLE

 \hskip INDENT

ARG END FI

    \@xsect{AFTERSKIP}

END Pseudocode for the \@afterheading command

 \@afterheading ==

BEGIN @nobreak :=G true \everypar := BEGIN IF @nobreak = T

THEN @nobreak :=G false

                               \clubpenalty :=G 10000

IF @afterindent = F

THEN remove \lastbox FI

                          ELSE \clubpenalty :=G \@clubpenalty
                               \everypar := NULL

FI END

END

\@ssect
72 \def\@ssect#1#2#3#4#5{\@tempskipa #3\relax
73 \ifdim \@tempskipa>\z@
74  \begingroup #4\@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}%
75  \endgroup
76 \else \def\@svsechd{#4\hskip #1\relax #5}\fi
77  \@xsect{#3}}
\if@afterindent
\@afterindenttrue
78 \newif\if@afterindent \@afterindenttrue
\@afterheading
79 \def\@afterheading{\global\@nobreaktrue
80  \everypar{\if@nobreak
81  \global\@nobreakfalse
82  \clubpenalty \@M
83  \if@afterindent \else {\setbox\z@\lastbox}\fi
84  \else \clubpenalty \@clubpenalty
85  \everypar{}\fi}}

\@hangfrom \@hangfrom{⟨text⟩} : Puts ⟨text⟩ in a box, and makes a hanging indentation of the following material up to the first \par. Should be used in vertical mode.

86 \def\@hangfrom#1{\setbox\@tempboxa\hbox{{#1}}%
87  \hangindent \wd\@tempboxa\noindent\box\@tempboxa}
\c@secnumdepth
\c@tocdepth
88 \newcount\c@secnumdepth
89 \newcount\c@tocdepth

\secdef \secdef{⟨unstarcmds⟩}{⟨unstarcmds⟩}{ ⟨starcmds⟩} When defining a \chapter or \section command without using \@startsection, you can use \secdef as follows:

File F: ltsect.dtx Date: 1995/11/28 Version v1.0r 298 1. \def\chapter{ … \secdef \⟨starcmd⟩ \⟨unstarcmd⟩ }

2. \def\⟨starcmd⟩[#1]#2{ … } % Command to define \chapter[…]{… }

3. \def\⟨unstarcmd⟩#1{ … } % Command to define \chapter*{… }

90 \def\secdef#1#2{\@ifstar{#2}{\@dblarg{#1}}}

59.2.1 Initializations

\sectionmark
\subsectionmark
\subsubsectionmark
\paragraphmark
\subparagraphmark

91 \let\sectionmark\@gobble
92 \let\subsectionmark\@gobble
93 \let\subsubsectionmark\@gobble
94 \let\paragraphmark\@gobble
95 \let\subparagraphmark\@gobble
96 \message{contents,}

59.3 Table of Contents etc.

59.3.1 Convention

\tf@⟨foo⟩ = file number for output for table foo. The file is opened only if @filesw

= true.

59.3.2 Commands

A \l@⟨type⟩{⟨entry⟩}{⟨page⟩} Macro needs to defined by document style for making an entry of type ⟨type⟩ in a table of contents, etc. E.g., the document style

should define \l@chapter, \l@section, etc.

Note: When the \protect command is used in the ⟨entry⟩ or ⟨text⟩ of one of the commands below, it causes the following control sequence to be written on the file without being expanded. The sequence will be expanded when the table of contents entry is processed.

Surprise: Inside an \addcontentsline or \addtocontents command argument, the commands: \index, \glossary, and \label are no-ops . This could cause a problem if the user puts an \index or \label into one of the commands he writes, or into the optional ‘short version’ argument of a \section or \caption command.

\@starttoc The \@starttoc{⟨ext⟩} command is used to define the commands:

\tableofcontents, \listoffigures, etc.

For example: \@starttoc{lof} is used in \listoffigures. This command reads the .⟨ext⟩ file and sets up to write the new .⟨ext⟩ file.

 \@starttoc{EXT} ==

BEGIN

     \begingroup
        \makeatletter

read file \jobname.EXT IF @filesw = true

          THEN open \jobname.EXT as file \tf@EXT

FI

@nobreak :=G FALSE %% added 24 May 89

     \endgroup

END

97 \def\@starttoc#1{\begingroup
98 \makeatletter
99 \@input{\jobname.#1}\if@filesw
100 \expandafter\newwrite\csname tf@#1\endcsname
101  \immediate\openout
102  \csname tf@#1\endcsname \jobname.#1\relax
103 \fi \global\@nobreakfalse \endgroup}

\addcontentsline The \addcontentsline{⟨table⟩}{⟨type⟩}{ ⟨entry⟩} command allows the user to add his/her own entry to a table of contents, etc. The command adds the entry \contentsline{⟨type⟩}{⟨entry⟩}{⟨page⟩} to the .⟨table⟩ file.

This macro is implemented as an aplication of \addtocontents. Note that \thepage is not expandable during \protected@write therefore one gets the page number at the time of the \shipout.

104 \def\addcontentsline#1#2#3{%
105 \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}}%

106 }

\addtocontents The \addtocontents{⟨table⟩}{⟨text⟩} command adds ⟨text⟩ to the .⟨table⟩ file, with no page number.

107 \long\def\addtocontents#1#2{%
108 \protected@write\@auxout
109  {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}%
110  {\string\@writefile{#1}{#2}}%

111 }

\contentsline The \contentsline{⟨type⟩}{⟨entry⟩}{⟨page⟩} macro produces a ⟨type⟩ entry in a table of contents, etc. It will appear in the .toc or other file. For example, The entry for subsection 1.4.3 in the table of contents for example, might be produced by:

       \contentsline{subsection}
           {\makebox{30pt}[r]{1.4.3} Gnats and Gnus}{22}

The \protect command causes command sequences to be written without expanding them.

112 \def\contentsline#1{\csname l@#1\endcsname}

\@dottedtocline{⟨level⟩}{⟨indent⟩}{⟨numwidth⟩ }{⟨title⟩}{⟨page⟩}: Macro to produce a table of contents line with the following parameters:

level If ⟨level⟩ > \c@tocdepth, then no line produced.

indent Total indentation from the left margin.

numwidth Width of box for number if the ⟨title⟩ has a \numberline command. As of 25 Jan 1988, this is also the amount of extra indentation added to second and later lines of a multiple line entry. title Contents of entry.

page Page number.

Uses the following parameters, which must be set by the document style. They should be defined with \def’s.

pnumwidth Width of box in which page number is set.

tocrmarg Right margin indentation for all but last line of multiple-line entries.

dotsep Separation between dots, in mu units. Should be \def’d to a number like 2 or 1.7

\@dottedtocline
113 \def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
114 \vskip \z@ \@plus.2\p@
115 {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
116  \parindent #2\relax\@afterindenttrue
117 \interlinepenalty\@M
118 \leavevmode
119 \@tempdima #3\relax
120 \advance\leftskip \@tempdima \null\hskip -\leftskip
121  {#4}\nobreak\leaders\hbox{$\m@th

If a document uses fonts other than computer modern, the use of a dot from math can be very disturbing despite the fact that this might be the only place in a document that then uses computer modern. Therefore we surround the dot with an \hbox to escape to the surrounding text font.

122  \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
123  mu$}\hfill \nobreak
124  \hb@xt@\@pnumwidth{%
125  \hfil\normalfont \normalcolor #5}\par}\fi}

Note: \nobreak’s added 7 Jan 86 to prevent bad line break that left the page number dangling by itself at left edge of a new line.

Changed 25 Jan 88 to use \leftskip instead of \hangindent so leaders of multiple-line contents entries would line up properly.

\numberline  \numberline{⟨number⟩}: For use in a \contentsline command. It puts

⟨number⟩ flushleft in a box of width \@tempdima (Before 25 Jan 88 change, it also added \@tempdima to the hanging indentation.)

126 \def\numberline#1{\hb@xt@\@tempdima{#1\hfil}}

127 ⟨/2ekernel⟩

File G

ltfloat.dtx

60 Floats

The different types of floats are identified by a ⟨type⟩ name, which is the name of the counter for that kind of float. For example, figures are of type ‘figure’ and tables are of type ‘table’. Each ⟨type⟩ has associated a positive ⟨type number⟩, which is a power of two. E.g., figures might be have type number 1, tables type number 2, programs type number 4, etc.

The locations where a float can go are specified by a ⟨placement specifier⟩, which is a list of the possible locations, each denoted by a letter as follows:

h : here — at the current location in the text.
t : top  — at the top of a text page.
b : bottom — at the bottom of a text page.
p : page — on a separate float page

In addition, in conjunction with these, you can use ‘!’ which means that the current values of the float positioning parameters are ignored for this float. (Has no effect on ‘p’, float page positioning.) For example, ‘pht’ specifies that the float can appear in any of three locations: page, here or top.

60.1 Floating Environments

1 ⟨∗2ekernel⟩

 2 \message{floats,}

Where floats may appear on a page, and how many may appear there are specified by the following float placement parameters. The numbers are named like counters so the user can set them with the ordinary counter-setting commands.

\c@topnumber : Number of floats allowed at the top of a column. \topfraction : Fraction of column that can be devoted to floats.

  \c@dbltopnumber, \dbltopfraction

: Same as above, but for double-column floats.

  \c@bottomnumber, \bottomfraction

: Same as above for bottom of page.

\c@totalnumber : Number of floats allowed in a single column,

including in-text floats.

\textfraction :Minimum fraction of column that must contain text. \floatpagefraction: Minimum fraction of page that must be taken

up by float page.

  \dblfloatpagefraction

: Same as above, for double-column floats.

The document style must define the following.

\fps@TYPE : The default placement specifier for floats of type TYPE.

\ftype@TYPE : The type number for floats of type TYPE.

\ext@TYPE : The file extension indicating the file on which the

contents list for float type TYPE is stored. For example, \ext@figure = ’lof’.

\fnum@TYPE : A macro to generate the figure number for a caption.

             For example, \fnum@TYPE == Figure \thefigure.
\@makecaption{NUM}{TEXT} :

A macro to make a caption, with NUM the value produced by \fnum@... and TEXT the text of the caption. It can assume it’s in a \parbox of the appropriate width.

\@float{TYPE}[PLACEMENT] : This macro begins a float environment for a

single-column float of type TYPE with PLACEMENT as the placement

specifier. The default value of PLACEMENT is defined by \fps@TYPE. The environment is ended by \end@float.

E.g., \figure == \@float{figure}, \endfigure == \end@float.

\@float{TYPE}[PLACEMENT] == BEGIN

if hmode then \@bsphack

              \@floatpenalty := -10002
         else \@floatpenalty := -10003

fi

\@captype ==L TYPE
\@dblflset

\@fps ==L PLACEMENT

\@onelevel@sanitize \@fps

add default PLACEMENT if at most ! in PLACEMENT ==

\@fpsadddefault

if inner

then LaTeX Error: ’Not in outer paragraph mode.’

       \@floatpenalty := 0

else if \@freelist nonempty

         then \@currbox :=L head of \@freelist
              \@freelist :=G tail of \@freelist
              \count\@currbox :=G 32*\ftype@TYPE +

bits determined by

PLACEMENT

         else \@floatpenalty := 0

LaTeX Error: ’Too many unprocessed floats’ fi fi

\@currbox :=G \color@vbox
                  \normalcolor
                    \vbox{

%% 15 Dec 87 –

                     %% removed \boxmaxdepth :=L 0pt

%% that made box 0 depth because it screwed %% things up. Instead, added \vskip0pt at

end

                          \hsize = \columnwidth
                          \@parboxrestore
                          \@floatboxreset

END

\caption ==

BEGIN

\refstepcounter{\@captype}
\@dblarg{\@caption{\@captype}}

END

In following definition, \par moved from after \addcontentsline to before \addcontentsline because the \write could cause an extra blank line to be added to the paragraph above the caption. (Change made 12 Jun 87)

\@caption{TYPE}[STEXT]{TEXT} == BEGIN

\par
\addcontentsline{\ext@TYPE}{TYPE}{\numberline{\theTYPE}{STEXT}}
\begingroup
  \@parboxrestore
  \@normalsize
  \@makecaption{\fnum@TYPE}{TEXT}
  \par
\endgroup

END

\@dblfloat{TYPE}[PLACEMENT] : Macro to begin a float environment for

a double-column float of type TYPE with PLACEMENT as the placement

specifier. The default value of PLACEMENT is ’tp’ The environment is ended by \end@dblfloat.

E.g., \figure* == \@dblfloat{figure},
      \endfigure* == \end@dblfloat.

\@dblfloat{TYPE}[PLACEMENT] ==

Identical to \@float{TYPE}[PLACEMENT] except \hsize and

\linewidth
     are set to \textwidth.

 3 \newcount\@floatpenalty

 4 \def\caption{\refstepcounter\@captype \@dblarg{\@caption\@captype}}

\@caption
 5 \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
 6 ext@#1\endcsname}{#1}{\protect\numberline{\csname
 7 the#1\endcsname}{\ignorespaces #2}}\begingroup
 8  \@parboxrestore
 9  \normalsize
10  \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
11 \endgroup}
\@float \@dblflset
12 \def\@float#1{%
13 \@ifnextchar[{\@xfloat{#1}}{\edef\reserved@a{\noexpand\@xfloat
14  {#1}[\csname fps@#1\endcsname]}\reserved@a}}
\@dblfloat
15 \def\@dblfloat{%
16 \if@twocolumn\let\reserved@a\@dbflt\else\let\reserved@a\@float\fi
17 \reserved@a}

\fps@dbl Note that all double floats have default fps ‘tp’.

\@setfps This sets the fps, dealing with error conditions by adding the default.

\@xfloat The first part of this sets the count register that stores all the information about

the type and fps of the float.

We assume here that the default specifiers already contain no active characters. It may be better to store the defaults as numbers, rather than symbol strings.

18 \def\@xfloat #1[#2]{%
19 \def \@captype {#1}%
20 \def \@fps {#2}%
21 \@onelevel@sanitize \@fps
22 \def \reserved@b {!}%
23 \ifx \reserved@b \@fps
24  \@fpsadddefault
25 \else
26  \ifx \@fps \@empty
27  \@fpsadddefault
28  \fi
29 \fi
30 \ifhmode
31  \@bsphack

32  \@floatpenalty -\@Mii
33 \else
34  \@floatpenalty-\@Miii
35 \fi
36 \ifinner
37  \@parmoderr\@floatpenalty\z@
38 \else
39  \@next\@currbox\@freelist
40  {%
41  \@tempcnta \sixt@@n
42  \expandafter \@tfor \expandafter \reserved@a
43  \expandafter :\expandafter =\@fps
44  \do
45  {%
46  \if \reserved@a h%
47  \ifodd \@tempcnta
48  \else
49  \advance \@tempcnta \@ne
50  \fi
51  \fi
52  \if \reserved@a t%
53  \@setfpsbit \tw@
54  \fi
55  \if \reserved@a b%
56  \@setfpsbit 4%
57  \fi
58  \if \reserved@a p%
59  \@setfpsbit 8%
60  \fi
61  \if \reserved@a !%
62  \ifnum \@tempcnta>15
63  \advance\@tempcnta -\sixt@@n\relax
64  \fi
65  \fi
66  }%
67  \@tempcntb \csname ftype@\@captype \endcsname
68  \multiply \@tempcntb \@xxxii
69  \advance \@tempcnta \@tempcntb
70  \global \count\@currbox \@tempcnta
71  }%
72  \@fltovf
73 \fi

The remainder sets up the box in which the float is typeset, and the typesetting enevironment to be used. It is essential to have the extra box to avoid the unwanted space that would otherwise often be put at the top of the float.

It ends with a hook; not sure how useful this is but it is needed at present to deal with double-column floats.

74 \global \setbox\@currbox
75  \color@vbox
76  \normalcolor
77  \vbox \bgroup
78  \hsize\columnwidth \@parboxrestore
79  \@floatboxreset

\@floatboxreset The default value of this is empty, for one-column floats.

81 \def \@floatboxreset {%
82  \reset@font
83  \normalsize
84  \@setnobreak
85  \@setminipage

86 }

\@setnobreak
87 \def \@setnobreak{%
88 \if@nobreak
89  \def\outer@nobreak{\global\@nobreaktrue}%
90  \global\@nobreakfalse
91 \fi

92 }

\@setminipage
93 \def \@setminipage{%
94 \global\@minipagetrue
95 \everypar{\global\@minipagefalse\everypar{}}%

96 }

\end@float
97 \def\end@float{%
98 \@endfloatbox
99 \ifnum\@floatpenalty <\z@

We make sure that we never exceed \textheight, otherwise float will never get typeset (91/03/15 FMi).

100  \@largefloatcheck
101  \@cons\@currlist\@currbox
102  \ifnum\@floatpenalty <-\@Mii
103  \penalty -\@Miv
104  \@tempdima\prevdepth    %% saving and restoring \prevdepth added
105  \vbox{}%                %% 26 May 87 to prevent extra vertical
106  \prevdepth \@tempdima   %% space when used in vertical mode
107  \penalty\@floatpenalty
108  \else
109  \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
110  \fi
111 \fi

112 }

\end@dblfloat
113 \def\end@dblfloat{%
114 \if@twocolumn
115 \@endfloatbox
116 \ifnum\@floatpenalty <\z@

We make sure that we never exceed \textheight, otherwise float will never get typeset (91/03/15 FMi).

117  \@largefloatcheck
118  \@cons\@dbldeferlist\@currbox
119 \fi

RmS 92/03/18 changed \@esphack to \@Esphack.

120  \ifnum \@floatpenalty =-\@Mii \@Esphack\fi
121 \else
122 \end@float
123 \fi

124 }

\@endfloatbox This macro is not intended to be a hook; it is designed to help maintain the integrity of this code, which is used twice and, as can be seen, is subject to frequent changes.

125 \def \@endfloatbox{%
126  \par\vskip\z@skip      %% \par\vskip\z@ added 15 Dec 87
127 %    \begin{macrocode}
128  \global\@minipagefalse
129  \outer@nobreak
130  \egroup                  %% end of vbox
131 \color@endbox

132 } 133 %

134 % \begin{macro}{\outer@nobreak}
135 % \changes{v1.0h}{1994/05/20}{Macro added: default is to do nothing.}
136 %    \begin{macrocode}
137 \let\outer@nobreak\@empty

\@largefloatcheck This calculates by how much a float is oversize for the page and prints this in a warning message.

138 \def \@largefloatcheck{%
139 \ifdim \ht\@currbox>\textheight
140  \@tempdima -\textheight
141  \advance \@tempdima \ht\@currbox
142  \@latex@warning {Float too large for page by \the\@tempdima}%
143  \ht\@currbox \textheight
144 \fi

145 }

\@dbflt \@xdblfloat
146 \def\@dbflt#1{\@ifnextchar[{\@xdblfloat{#1}}{\@xdblfloat{#1}[tp]}}
147 \def\@xdblfloat#1[#2]{%
148 \@xfloat{#1}[#2]\hsize\textwidth\linewidth\textwidth}

Moved to ltoutput 93/12/16

149 %\newcount\c@topnumber
150 %\newcount\c@dbltopnumber
151 %\newcount\c@bottomnumber
152 %\newcount\c@totalnumber
    An analysis of \@floatplacement:

This should be called whenever \@colht has been set.

153 \def\@floatplacement{\global\@topnum\c@topnumber
154  % Textpage bit, global:
155 \global\@toproom \topfraction\@colht
156 \global\@botnum  \c@bottomnumber
157 \global\@botroom \bottomfraction\@colht
158 \global\@colnum  \c@totalnumber
159  % Floatpage bit, local:
160 \@fpmin   \floatpagefraction\@colht}

\@dblfloatplacement This should be called only within a group. Now changed to provide extra checks in \@addtodblcol, needed when processing a BANG float.

161 \def \@dblfloatplacement {%

Textpage bit: global, but need not be.

162 \global \@dbltopnum \c@dbltopnumber
163 \global \@dbltoproom \dbltopfraction\@colht

This new bit uses \@textmin to locally store the amount of extra room in the column.

164 \@textmin \@colht
165 \advance \@textmin -\@dbltoproom

Floatpage bit: must be local.

166 \@fpmin \dblfloatpagefraction\textheight
167 \@fptop \@dblfptop
168 \@fpsep \@dblfpsep
169 \@fpbot \@dblfpbot

170 }

MARGINAL NOTES:

Marginal notes use the same mechanism as floats to communicate with the \output routine. Marginal notes are distinguished from floats by having a negative placement specification. The command \marginpar [LTEXT]{RTEXT} generates a marginal note in a parbox, using LTEXT if it’s on the left and RTEXT if it’s on the right. (Default is RTEXT = LTEXT.) It uses the following parameters.

\marginparwidth : Width of marginal notes. \marginparsep : Distance between marginal note and text.

the page layout to determine how to move the marginal note into the margin. E.g., \@leftmarginskip ==

     \hskip -\marginparwidth \hskip -\marginparsep .

\marginparpush : Minimum vertical separation between \marginpar's

Marginal notes are normally put on the outside of the page if @mparswitch = true, and on the right if @mparswitch = false. The command \reversemarginpar reverses the side where they

are put. \normalmarginpar undoes \reversemarginpar.

These commands have no effect for two-column output.

SURPRISE: if two marginal notes appear on the same line of text, then the second one could appear on the next page, in a funny position.

\marginpar [LTEXT]{RTEXT} == BEGIN

if hmode then \@bsphack

       \@floatpenalty := -10002
  else \@floatpenalty := -10003

fi if inner

then LaTeX Error: ’Not in outer paragraph mode.’

\@floatpenalty := 0

else if \@freelist has two elements:

  then get \@marbox, \@currbox from \@freelist
       \count\@marbox :=G -1
  else \@floatpenalty := 0

LaTeX Error: ’Too many unprocessed floats’

       \@currbox, \@marbox := \@tempboxa    %%use \def

fi fi if optional argument

then %% \@xmpar ==
\@savemarbox\@marbox{LTEXT}
\@savemarbox\@currbox{RTEXT}
else %% \@ympar ==
\@savemarbox\@marbox{RTEXT}
\box\@currbox :=G \box\@marbox

fi

\@xympar

END

\reversemarginpar == BEGIN \@mparbottom :=G 0

@reversemargin :=G true END

\normalmarginpar == BEGIN \@mparbottom :=G 0

@reversemargin :=G false END

\marginpar
171 \def\marginpar{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
172 \@floatpenalty-\@Miii\fi\ifinner
173  \@parmoderr\@floatpenalty\z@
174  \else\@next\@currbox\@freelist{}{}\@next\@marbox\@freelist{\global
175  \count\@marbox\m@ne}{\@floatpenalty\z@ \@fltovf
176  \def\@currbox{\@tempboxa}\def\@marbox{\@tempboxa}}\fi
177  \@ifnextchar [\@xmpar\@ympar}

\@xmpar
178 \long\def\@xmpar[#1]#2{\@savemarbox\@marbox{#1}\@savemarbox\@currbox
179 {#2}\@xympar}
\@ympar
180 \long\def\@ympar#1{\@savemarbox\@marbox{#1}\global\setbox\@currbox
181  \copy\@marbox\@xympar}
\@savemarbox
182 \long\def \@savemarbox #1#2{%
183 \global\setbox #1%
184  \color@vbox
185  \vtop{%
186  \hsize\marginparwidth
187  \@parboxrestore
188  \@marginparreset
189  #2%
190  \global\@minipagefalse
191  \outer@nobreak

192 }%

193  \color@endbox

194 }

\@marginparreset
195 \def \@marginparreset {%
196  \reset@font
197  \normalsize
198  \@setnobreak
199  \@setminipage

200 }

\@xympar

Setting the box here is done only because the code uses \end@float; it will be empty and gets discarded.

201 \def \@xympar{%
202 \ifnum\@floatpenalty <\z@\@cons\@currlist\@marbox\fi
203 \setbox\@tempboxa
204  \color@vbox
205  \vbox \bgroup
206 \end@float
207 \global \@ignorefalse \@esphack

208 }

\reversemarginpar
\normalmarginpar
209 \def\reversemarginpar{\global\@mparbottom\z@ \@reversemargintrue}
210 \def\normalmarginpar{\global\@mparbottom\z@ \@reversemarginfalse}
211 \message{footnotes,}

60.2 Footnotes

\footnote{NOTE} : User command to insert a footnote.

\footnote[NUM]{NOTE}: User command to insert a footnote numbered NUM, where NUM is a number – 1, 2, etc. For example, if footnotes are numbered *, **, etc. within pages, then \footnote[2]{...} produces footnote ’**’. This command does not step the footnote counter.

\footnotemark[NUM] : Command to produce just the footnote mark in the text, but no footnote. With no argument, it steps the footnote counter before generating the mark.

\footnotetext[NUM]{TEXT} : Command to produce the footnote but no mark. \footnote is equivalent to

                           \footnotemark \footnotetext .

As in PLAIN, footnotes use \insert\footins, and the following parameters:

\footnotesize : Size-changing command for footnotes.

\footnotesep : The height of a strut placed at the beginning of

every footnote.

\skip\footins : Space between main text and footnotes. The rule separating footnotes from text occurs in this space. This space lies above the strut of height \footnotesep which is at the beginning of the first footnote.

\footnoterule : Macro to draw the rule separating footnotes from text. It is executed right after a \vspace of \skip\footins. It should take zero vertical space–i.e., it should to a negative skip to compensate for any positive space it occupies. (See PLAIN.TEX.)

\interfootnotelinepenalty : Interline penalty for footnotes.

\thefootnote : In usual LaTeX style, produces the footnote number. If footnotes are to be numbered within pages, then the document style file must include an \@addtoreset command to cause the footnote counter to be reset when the page counter is stepped. This is not a good idea, though, because the counter will not always be reset in time to ensure that the first footnote on a page is footnote number one.

\@thefnmark : Holds the current footnote’s mark–e.g., \dag or ’1’ or ’a’.

\@mpfnnumber : A macro that generates the numbers for \footnote

              and \footnotemark commands. It == \thefootnote

outside a minipage environment, but can be changed inside to generate numbers for

              \footnote's.

\@makefnmark : A macro to generate the footnote marker from \@thefnmark The default definition was

             \hbox{$^\@thefnmark$}.

This is now replaced by

             \textsuperscript{\@thefnmark}
\@makefntext{NOTE} :

Must produce the actual footnote, using \@thefnmark as the mark of the footnote and NOTE as the text. It is called when

    effectively inside a \parbox, with \hsize = \columnwidth.

For example, it might be as simple as

           $^{\@thefnmark}$ NOTE

In a minipage environment, \footnote and \footnotetext are redefined so that

(a) they use the counter mpfootnote

(b) the footnotes they produce go at the bottom of the minipage. The switch is accomplished by letting \@mpfn == footnote or mpfootnote

and \thempfn == \thefootnote or \thempfootnote, and by redefining
\@footnotetext to be \@mpfootnotetext in the minipage.
\footnote{NOTE} ==

BEGIN

\stepcounter{\@mpfn}

begingroup

   \protect == \noexpand
   \@thefnmark :=G eval (\thempfn)

endgroup

\@footnotemark
\@footnotetext{NOTE}

END

\footnote[NUM]{NOTE} ==

BEGIN

begingroup

   \protect == \noexpand

counter \@mpfn :=L NUM

   \@thefnmark :=G eval (\thempfn)

endgroup

\@footnotemark

\@footnotetext{NOTE}

END

\footnotemark  ==
BEGIN \stepcounter{footnote}

begingroup

       \protect == \noexpand
       \@thefnmark :=G eval(\thefootnote)

endgroup

    \@footnotemark

END

\footnotemark[NUM] ==

BEGIN

begingroup footnote counter :=L NUM

     \protect == \noexpand
    \@thefnmark :=G eval(\thefootnote)

endgroup

   \@footnotemark

END

\@footnotemark ==

BEGIN

\leavevmode
IF hmode THEN \@x@sf := \the\spacefactor FI

\@makefnmark % put number in main text

IF hmode THEN \spacefactor := \@x@sf FI

END

\footnotetext  ==
BEGIN begingroup \protect == \noexpand
                 \@thefnmark :=G eval (\thempfn)

endgroup

      \@footnotetext

END

\footnotetext[NUM] ==

BEGIN begingroup counter \@mpfn :=L NUM

                  \protect == \noexpand
                  \@thefnmark :=G eval (\thempfn)

endgroup

      \@footnotetext

END

L^{A}TEX does use the same insert for footnotes as PLAIN.

212 \newinsert\footins

L^{A}TEX leaves these initializations for the \footins insert.

213 \skip\footins=\bigskipamount % space added when footnote is present
214 \count\footins=1000 % footnote magnification factor (1 to 1)
215 \dimen\footins=8in % maximum footnotes per page

L^{A}TEX keeps PLAIN TEX’s \footnoterule as the default.

216 \def\footnoterule{\kern-3\p@
217 \hrule \@width 2in \kern 2.6\p@} % the \hrule is .4pt high
\thefootnote
218 \@definecounter{footnote}
219 \def\thefootnote{\@arabic\c@footnote}
\thempfootnote
220 \@definecounter{mpfootnote}
221 \def\thempfootnote{\itshape\@alph\c@mpfootnote}

\@makefnmark Default definition.

222 %\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
223 \def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}

\textsuperscript This command provides superscript characters in the current text font. It’s implementation might change!!!

224 \DeclareRobustCommand*\textsuperscript[1]{%
225 \@textsuperscript{\selectfont#1}}

\@textsuperscript This command should not be used directly, but may be used to define other commands \textsuperscript, \@makefnmark. #1 should always start with a font selection command, to activate the font size switch.

226 \def\@textsuperscript#1{%
227 {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}
\footnotesep
228 \newdimen\footnotesep
\footnote
229 \def\footnote{\@ifnextchar[\@xfootnote{\stepcounter\@mpfn
230  \protected@xdef\@thefnmark{\thempfn}%
231  \@footnotemark\@footnotetext}}
\@xfootnote
232 \def\@xfootnote[#1]{%
233 \begingroup
234  \csname c@\@mpfn\endcsname #1\relax
235  \unrestored@protected@xdef\@thefnmark{\thempfn}%
236 \endgroup
237 \@footnotemark\@footnotetext}
\@footnotetext
238 \long\def\@footnotetext#1{\insert\footins{%
239  \reset@font\footnotesize
240  \interlinepenalty\interfootnotelinepenalty

241  \splittopskip\footnotesep
242  \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
243  \hsize\columnwidth \@parboxrestore
244  \protected@edef\@currentlabel{%
245  \csname p@footnote\endcsname\@thefnmark

246 }%

247  \color@begingroup
248  \@makefntext{%
249  \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}
250  \color@endgroup}}
\footnotemark
251 \def\footnotemark{%
252 \@ifnextchar[\@xfootnotemark
253  {\stepcounter{footnote}%
254  \protected@xdef\@thefnmark{\thefootnote}%
255  \@footnotemark}}
\@xfootnotemark
256 \def\@xfootnotemark[#1]{%
257 \begingroup
258  \c@footnote #1\relax
259  \unrestored@protected@xdef\@thefnmark{\thefootnote}%
260 \endgroup
261 \@footnotemark}
\@footnotemark
262 \def\@footnotemark{%
263 \leavevmode
264 \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
265 \@makefnmark
266 \ifhmode\spacefactor\@x@sf\fi
267 \relax}
\footnotetext
268 \def\footnotetext{%
269  \@ifnextchar [\@xfootnotenext
270  {\protected@xdef\@thefnmark{\thempfn}%
271  \@footnotetext}}
\@xfootnotenext
272 \def\@xfootnotenext[#1]{%
273 \begingroup
274  \csname c@\@mpfn\endcsname #1\relax
275  \unrestored@protected@xdef\@thefnmark{\thempfn}%
276 \endgroup
277 \@footnotetext}
\thempfn \@mpfn
278 \def\@mpfn{footnote}
279 \def\thempfn{\thefootnote}

280 ⟨/2ekernel⟩

File H

ltidxglo.dtx

61 Index and Glossary Generation

Index and Glossary commands.

\makeindex A preamble command to turn on indexing. \makeglossary A preamble command to turn on making glossary entries.

\index Make an index entry for #1. \glossary Make a glossary entry for #1.

\makeindex ==

BEGIN

if \@filesw = T
then open file \jobname.IDX as \@indexfile
\index == BEGIN \@bsphack
\begingroup
\protect{X} == \string X\space

%% added 3 Feb 87 for \index

commands

%% in \footnotes

re-\catcode special characters to ’other’

\@wrindex

fi END

\@wrindex{ITEM} ==

BEGIN

write of {\indexentry{ITEM}{page number}}

\endgroup
\@esphack

END

INITIALIZATION:

\index == BEGIN \@bsphack
\begingroup

re-\catcode special characters (in case ’%’ there)

\@index

END

\@index{ITEM} == BEGIN \endgroup \@esphack END

Changes made 14 Apr 89 to write \glossaryentry's instead of \indexentry's on the .glo file.

1 ⟨∗2ekernel⟩

2 \message{index,}

\makeindex
 3 \def\makeindex{%
 4 \newwrite\@indexfile
 5 \immediate\openout\@indexfile=\jobname.idx
 6 \def\index{\@bsphack\begingroup
 7  \@sanitize
 8  \@wrindex}\typeout
 9  {Writing index file \jobname.idx}%

10 }

11 \@onlypreamble\makeindex
\@wrindex
12 \def\@wrindex#1{%
13 \protected@write\@indexfile{}%
14  {\string\indexentry{#1}{\thepage}}%
15 \endgroup
16 \@esphack}
\index
17 \def\index{\@bsphack\begingroup \@sanitize\@index}
\@index
18 \def\@index#1{\endgroup\@esphack}
\makeglossary
19 \def\makeglossary{%
20 \newwrite\@glossaryfile
21 \immediate\openout\@glossaryfile=\jobname.glo
22 \def\glossary{\@bsphack\begingroup
23  \@sanitize
24  \@wrglossary}\typeout
25 {Writing glossary file \jobname.glo }}
26 \@onlypreamble\makeglossary
\@wrglossary
27 \def\@wrglossary#1{%
28 \protected@write\@glossaryfile{}%
29  {\string\glossaryentry{#1}{\thepage}}%
30 \endgroup
31 \@esphack}
\glossary
32 \def\glossary{\@bsphack\begingroup\@sanitize\@index}

33 ⟨/2ekernel⟩

File H: ltidxglo.dtx Date: 1995/10/25 Version v1.1d 318

File I

ltbibl.dtx

62 Bibliography Generation

A bibliography is created by the thebibliography environment, which generates a title such as “References”, and a list of entries. The BIBTEX program will create a file containing such an environment, which will be read in by the \bibliography command. With BIBTEX, the following commands will be used.

\bibliography \bibliography{⟨file1,file2, …,filen⟩} : specifies the bibdata files. Writes a

\bibdata entry on the .aux file and tries to read in mainfile.bbl.

\bibliographystyle      \bibliographystyle{⟨style⟩} : Writes a \bibstyle entry on the .aux file.

thebibliography The thebibliography environment is a list environment. To save the use of an extra counter, it should use enumiv as the item counter. Instead of using \item, items in the bibliography are produced by the following commands: \bibitem{⟨name⟩} : Produces a numbered entry cited as ⟨name⟩. \bibitem[⟨label⟩]{⟨name⟩} : Produces an entry labeled by ⟨Label⟩ and cited by ⟨name⟩.

The former is used for bibliographies with citations like [1], [2], etc.; the latter is used for citations like [Knuth82].

The document class must define the thebibliography environment. This environment has a single argument, which is the widest bibliography label– e.g., if the [Knuth67] is the widest entry, then this argument will be Knuth67. The \thebibliography command must begin a list environment, which the

\endthebibliography command ends.

\cite Entries are cited by the command \cite{⟨name⟩}. \nocite \nocite{⟨citations⟩} puts information on the .aux file that causes BibTEX to

include the {⟨citations⟩} list in the bibliography, but puts nothing in the text.

\nocite{*} is special: it tells BibTEX to put the whole of a collection of references into the bibiography.

1 ⟨∗2ekernel⟩

 2 \message{bibliography,}

PARAMETERS

\@cite : A macro such that \@cite{LABEL1,LABEL2}{NOTE}

produces the output for a \cite[NOTE]{FOO1,FOO2}

command, where entry FOOi is defined by \bibitem[LABELi]{FOOi}. The switch @tempswa is true if the optional NOTE

argument is present. The default definition is :

\@cite{LABELS}{NOTE} ==

BEGIN [LABELS IF @tempswa = T THEN , NOTE FI ]

END \@biblabel : A macro to produce the label in the bibliography

entry. For \bibitem[LABEL]{NAME}, the label is generated by \@biblabel{LABEL}. It has the default definition \@biblabel{LABEL} -> [LABEL].

CONVENTION

\b@FOO : The name or number of the reference created by \cite{FOO} E.g., if \cite{FOO} -> [17] , then \b@FOO -> 17.

\bibitem
 3 \def\bibitem{\@ifnextchar[\@lbibitem\@bibitem}
\@lbibitem
 4 \def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw
 5  {\let\protect\noexpand
 6  \immediate
 7  \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
\@bibitem
 8 \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
 9  {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
\bibcite
10 \def\bibcite{\@newl@bel b}
\citation
11 \let\citation\@gobble
\cite
12 \DeclareRobustCommand\cite{%
13 \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}

\@citex \penalty\@m added to definition of \@citex to allow a line break after the ‘,’ in

citations like [Jones80,Smith77] (Added 23 Oct 86)

space added after the ‘,’ (21 Nov 87)

14 \def\@citex[#1]#2{%
15 \let\@citea\@empty
16 \@cite{\@for\@citeb:=#2\do
17  {\@citea\def\@citea{,\penalty\@m\ }%
18  \edef\@citeb{\expandafter\@firstofone\@citeb}%
19  \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
20  \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
21  \G@refundefinedtrue
22  \@latex@warning
23  {Citation `\@citeb' on page \thepage \space undefined}}%
24  {\hbox{\csname b@\@citeb\endcsname}}}}{#1}}
\bibdata \bibstyle
25 \let\bibdata=\@gobble
26 \let\bibstyle=\@gobble

File I: ltbibl.dtx Date: 1995/12/07 Version v1.1l 320

\bibliography
27 \def\bibliography#1{%
28 \if@filesw
29  \immediate\write\@auxout{\string\bibdata{#1}}%
30 \fi
31 \@input@{\jobname.bbl}}
\bibliographystyle
32 \def\bibliographystyle#1{%
33 \ifx\@begindocumenthook\@undefined\else
34  \expandafter\AtBeginDocument
35 \fi
36  {\if@filesw
37  \immediate\write\@auxout{\string\bibstyle{#1}}%
38  \fi}}

\nocite (Added 14 Jun 85)

This puts information on the .aux file that causes BibTEX to include the citation list in the bibliography, but puts nothing in the text.

RmS 93/08/06: Made loop for \nocite like that for \@citex, to get rid of leading spaces.

39 \def\nocite#1{\@bsphack
40 \@for\@citeb:=#1\do{%
41  \edef\@citeb{\expandafter\@firstofone\@citeb}%
42  \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
43  \@ifundefined{b@\@citeb}{\G@refundefinedtrue
44  \@latex@warning{Citation `\@citeb' undefined}}{}}%
45 \@esphack}

Since \nocite{*} should not produce a warning about undefined citation keys (seee PR 557), we need to set the control sequence ‘\b@*’ to something other than \relax. As a result \cite{*} will not warn either (but that never worked with BibTEX in the first place).

46 \expandafter\let\csname b@*\endcsname\@empty

62.1 Default definitions

\@cite
47 \def\@cite#1#2{[{#1\if@tempswa , #2\fi}]}
\@biblabel
48 \def\@biblabel#1{[#1]}

49 ⟨/2ekernel⟩

File I: ltbibl.dtx Date: 1995/12/07 Version v1.1l 321

File J

ltpage.dtx

63 Page styles and related commands

63.1 Page Style Commands

\pagestyle{⟨style⟩} : sets the page style of the current and succeeding pages to style

\thispagestyle{⟨style⟩} : sets the page style of the current page only to style. To define a page style style, you must define \ps@style to set the page style

parameters.

HOW A PAGE STYLE MAKES RUNNING HEADS AND FEET:

   The \ps@. . . command defines the macros \@oddhead, \@oddfoot, \@evenhead,

and \@evenfoot to define the running heads and feet. (See output routine.) To make headings determined by the sectioning commands, the page style defines

the commands \chaptermark, \sectionmark, etc., where \chaptermark{⟨text⟩}

is called by \chapter to set a mark. The \...mark commands and the \...head macros are defined with the help of the following macros.

(All the \...mark commands should be initialized to no-ops.)

63.2 marking conventions

L^{A}TEX extends TeX’s \mark facility by producing two kinds of marks a ‘left’ and a ‘right’ mark, using the following commands: \markboth{⟨left⟩}{⟨right⟩} : Adds both marks. \markright{⟨right⟩} : Adds a ’right’ mark. \leftmark : Used in the output routine, gets the current ‘left’ mark. Works like

TeX’s \botmark.

\rightmark : Used in the output routine, gets the current ‘right’ mark. Works like TeX’s \firstmark. The marking commands work reasonably well for right marks ‘numbered within’ left marks—e.g., the left mark is changed by a \chapter command and the right mark is changed by a \section command. However, it does produce somewhat anomalous results if 2 \markboth’s occur on the same page.

Commands like \tableofcontents that should set the marks in some page styles use a \@mkboth command, which is \let by the pagestyle command (\ps@...) to \markboth for setting the heading or to \@gobbletwo to do nothing.

1 ⟨∗2ekernel⟩

\pagestyle
 2 \def\pagestyle#1{%
 3 \@ifundefined{ps@#1}%
 4  \undefinedpagestyle
 5  {\@nameuse{ps@#1}}}
\thispagestyle
 6 \def\thispagestyle#1{%
 7 \@ifundefined{ps@#1}%

 8  \undefinedpagestyle
 9  {\global\@specialpagetrue\gdef\@specialstyle{#1}}}

Default Initializations

\ps@empty
10 \def\ps@empty{%
11 \let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@oddfoot\@empty
12 \let\@evenhead\@empty\let\@evenfoot\@empty}
\ps@plain
13 \def\ps@plain{\let\@mkboth\@gobbletwo
14  \let\@oddhead\@empty\def\@oddfoot{\reset@font\hfil\thepage
15  \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
\@leftmark \@rightmark We implement \@leftmark and \@rightmark in terms of already defined com-

mands to save token space. We can’t get rid of them since they are sometimes used in applications.

16 \let\@leftmark\@firstoftwo
17 \let\@rightmark\@secondoftwo
\markboth \markright test for \@nobreak added 15 Apr 86 in \markboth and \markright letting \label

and \index to \relax added 22 Feb 86 so these commands can appear in sectioning command arguments RmS 91/06/21 Same for \glossary

18 \def\markboth#1#2{\gdef\@themark{{#1}{#2}}{%
19  \let\protect\@unexpandable@protect
20  \let\label\relax \let\index\relax \let\glossary\relax
21  \mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi}
22 \def\markright#1{{\let\protect\@unexpandable@protect
23  \let\label\relax \let\index\relax \let\glossary\relax
24  \expandafter\@markright\@themark
25  {#1}\mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi}
\@markright \leftmark \rightmark
26 \def\@markright#1#2#3{\gdef\@themark{{#1}{#3}}}
27 \def\leftmark{\expandafter\@leftmark\botmark{}{}}
28 \def\rightmark{\expandafter\@rightmark\firstmark{}{}}

Initialization

\@themark
29 \def\@themark{{}{}}

\mark We initialize the internal TEX \mark when we reach \begin{document}. Initialization in the format would not survive.

30 %\AtBeginDocument{\mark{{}{}}}

OTHER —–

\raggedbottom :Typesets pages with no vertical stretch, so they have their natural height instead of all being exactly the

File J: ltpage.dtx Date: 1995/07/20 Version v1.0h 323 same height. (Uses a space of .0001fil to avoid interfering with the 1fil space of \newpage.)

\flushbottom : Inverse of \raggedbottom - makes all pages the same height.

\sloppy : Resets TeX’s parameters so it accepts worse line and page breaks, and slightly more overfull boxes.

\fussy : Resets TeX’s parameters to their normal finnicky values.

\raggedbottom
31 \def\raggedbottom{%
32 \def\@textbottom{\vskip \z@ \@plus.0001fil}\let\@texttop\relax}
\flushbottom
33 \def\flushbottom{%
34 \let\@textbottom\relax \let\@texttop\relax}

Default definitions

\sloppy \sloppy will never (well, hardly ever) produce overfull boxes, but may produce underfull ones. (14 June 85) A sloppypar environment is equivalent to

{\par \sloppy ... \par}.
35 \def\sloppy{%
36 \tolerance 9999%
37 \emergencystretch 3em%
38 \hfuzz .5\p@
39 \vfuzz\hfuzz}
sloppypar
40 \def\sloppypar{\par\sloppy}
41 \def\endsloppypar{\par}
\fussy
42 \def\fussy{%
43 \emergencystretch\z@
44 \tolerance 200%
45 \hfuzz .1\p@
46 \vfuzz\hfuzz}

\overfullrule L^{A}TEX default is no overfull box rule. Changed by document class option.

47 \overfullrule 0pt

48 ⟨/2ekernel⟩

File K

ltoutput.dtx

64 Output Routine

64.1 Floats

The ‘2ekernel’ code ensures that a \usepackage{autoout1} is essentially ignored if a ‘full’ format is being used that has the autoload file mode already in the format.

1 ⟨defx⟩\begingroup
2 ⟨defx⟩\makeatletter
3 ⟨defx⟩\nfss@catcodes
4 ⟨2ekernel⟩\expandafter\let\csname ver@autoout1.sty\endcsname\fmtversion

5 ⟨∗2ekernel | autoload⟩

6 \message{output,}

****************************************

* OUTPUT * ****************************************

PAGE LAYOUT PARAMETERS

\topmargin : Extra space added to top of page. @twoside : boolean. T if two-sided printing

\oddsidemargin : IF @twoside = T

THEN extra space added to left of odd-numbered

pages. ELSE extra space added to left of all pages.

\evensidemargin : IF @twoside = T

THEN extra space added to left of

even-numbered

pages.

\headheight : height of head \headsep : separation between head and text \footskip : distance separation between baseline of last

line of text and baseline of foot.

Note difference between \footSKIP and \headSEP.

\textheight : height of text on page, excluding head and foot \textwidth : width of printing on page \columnsep : IF @twocolumn = T

THEN width of space between columns

\columnseprule : IF @twocolumn = T

THEN width of rule between columns (0 if none).

\columnwidth : IF @twocolumn = T

                    THEN (\textwidth - \columnsep)/2
                    ELSE \textwidth

It is set by the \twocolumn and

\onecolumn commands.

\@textbottom : Command executed at bottom of vbox holding text of

page (including figures). The \raggedbottom command almost \let's this to \vfil (actually sets it to \vskip \z@ plus.0001fil). Should have depth 0pt.

\@texttop : Command executed at top of vbox holding text of page (including figures). Used by letter style; can also be used to produce centered pages.

Let to \relax by \raggedbottom and
\flushbottom.

Page layout must initialize \@colht and \@colroom to \textheight.

PAGE STYLE PARAMETERS:

\floatsep : Space left between floats. \textfloatsep : Space between last top float or first bottom float

and the text.

\topfigrule : Command to place rule (or whatever) between floats at top of page and text. Executed in inner vertica mode right before the \textfloatsep skip separating the floats from the text. Must occupy zero vertical space. (See \footnoterule.)

\botfigrule  : Same as \topfigrule, but put after the

\textfloatsep skip separating text from the floats at bottom of page.

\intextsep : Space left on top and bottom of an in-text float. \dblfloatsep : Space between double-column floats. \dbltextfloatsep : Space between top double-column floats

and text.

\dblfigrule : Similar to \topfigrule, but for double-column

floats.

\@fptop : Glue to go at top of float column – must be 0pt +

stretch

\@fpsep : Glue to go between floats in a float column. \@fpbot : Glue to go at bottom of float column

– must be 0pt + stretch

\@dblfptop, \@dblfpsep, \@dblfpbot

: Analogous for double-column float page in two-column format.

FOOTNOTES: As in PLAIN, footnotes use \insert\footins.

PAGE LAYOUT SWITCHES AND MACROS

@twocolumn : Boolean. T if two columns per page globally.

PAGE STYLE MACROS AND SWITCHES

\@oddhead : IF @twoside = T

THEN macro to generate head of

odd-numbered

pages. ELSE macro to generate head of all pages.

\@evenhead : IF @twoside = T

THEN macro to generate head of

even-numbered

pages.

\@oddfoot : IF @twoside = T

THEN macro to generate foot of

odd-numbered

pages. ELSE macro to generate foot of all pages.

\@evenfoot : IF @twoside = T

THEN macro to generate foot of

even-numbered

pages.

@specialpage : boolean. T if current page is to have a special

format.

\@specialstyle : If its value is foo then

IF @specialpage = T

THEN the command \ps@foo is executed to temporarily reset the page style parameters before composing the current page. This command should execute only \def's

and \edef's, making only local definitions.

FLOAT PLACEMENT PARAMETERS

The following parameters are set by the macro \@floatplacement.

When \@floatplacement is called,

\@colht is the height of the page or column being built. I.e.: * For single-column page it equals \textheight.

* For double-column page it equals \textheight - height

of double-column floats on page.

Note that some are set globally and some locally:

\@topnum :=G Maximum number of floats allowed on the top of a

column.

\@toproom :=G Maximum amount of top of column devoted to floats– excluding \textfloatsep separation below the floats and \floatsep separation between them. For two-column output, should be computed as a function

of \@colht.
\@botnum, \@botroom

: Analogous to above.

\@colnum :=G Maximum number of floats allowed in a column,

including in-text floats.

\@textmin :=L Minimum amount of text (excluding footnotes) that

must appear on a text page.

%% 27 Sep 85 : made local to

                 %% \@addtocurcol and \@addtonextcol

It is now also used locally in processing double floats.

\@fpmin :=L Minimum height of floats in a float column.

The macro \@dblfloatplacement sets the following parameters.

\@dbltopnum :=G Maximum number of double-column floats allowed at

the top of a two-column page.

\@dbltoproom :=G Maximum height of double-column floats allowed at

top of two-column page.

\@fpmin :=L Minimum height of floats in a float column. It should also perform the following local assignments where necessary

– i.e., where the new value differs from the old one:

  \@fptop  :=L \@dblfptop
  \@fpsep  :=L \@dblfpsep
  \@fpbot  :=L \@dblfpbot

OUTPUT ROUTINE VARIABLES

\@colht : The total height of the current column. In single column style, it equals \textheight. In two-column style, it is \textheight minus the height of the double-column floats on the current page. MUST BE INITIALIZED TO

\textheight.

\@colroom : The height available in the current column for text and footnotes. It equals \@colht minus the height of all floats committed to the top and bottom of the current column.

\@textfloatsheight : The total height of in-text floats on the current page.

\footins : Footnote insertion number.

\@maxdepth : Saved value of TeX’s \maxdepth. Must be set when any routine sets \maxdepth.

CALLING THE OUTPUT ROUTINE

————————–

The output routine is called either by TeX’s normal page-breaking mechanism, or by a macro putting a penalty < or = -10000 in the output list. In the latter case, the penalty indicates why the output routine was called, using the following code.

penalty reason ——- ——

-10000  \pagebreak
\newpage
-10001  \clearpage (\penalty -10000 \vbox{} \penalty -10001)

-10002 float insertion, called from horizontal mode -10003 float insertion, called from vertical mode. -10004 float insertion.

Note: A float or marginpar puts the following sequence in the output

list: (i) a penalty of -10004, (ii) a null \vbox (iii) a penalty of -10002 or -10003.

This solves two special problems:

1. If the float comes right after a \newpage or \clearpage, then the first penalty is ignored, but the second one invokes the output routine.

2. If there is a split footnote on the page, the second ’page’ puts out the rest of the footnote.

THE OUTPUT ROUTINE ——————

FUNCTIONS USED IN THE OUTPUT ROUTINE:

\@outputpage : Produces an output page with the contents of box \@outputbox as the text part.

Also sets \@colht :=G \textheight.

The page style is determined as follows.

IF @thispagestyle = true

  THEN use \thispagestyle style

ELSE use ordinary page style.

\@tryfcolumn\FLIST : Tries to form a float column composed of floats

from \FLIST (if nonempty) with the following parameters: \@colht : height of box \@fpmin : minimum height of floats in the box \@fpsep : interfloat space \@fptop : glue at top of box \@fpbot : glue at bottom of box.

If it succeeds, then it does the following: * \@outputbox :=L the composed float box.

* @fcolmade :=G true

* \FLIST :=G \FLIST - floats put in box

* \@freelist :=G \@freelist + floats put in box

If it fails, then:

* @fcolmade :=G false NOTE: BIT MUST BE A SINGLE TOKEN!

\@makefcolumn \FLIST : Same as \@tryfcolumn except that it

fails to make a float column only if \FLIST is empty. Otherwise, it makes a float column containing at least the first box in \FLIST, disregarding \@fpmin.

\@startcolumn :
Calls \@tryfcolumn\@deferlist. If \@tryfcolumn returns with

(globally set) @fcolmade = false, then:

* Globally sets \@toplist and \@botlist to floats from \@deferlist to go at top and bottom of column, deleting them from \@deferlist. It does this using \@colht as the total height, the page

    style parameters \@floatsep and \@textfloatsep, and

the float placement parameters \@topnum, \@toproom,

    \@botnum, \@botroom, \@colnum and \textfraction.

* Globally sets \@colroom to \@colht minus the height of the added floats.

\@startdblcolumn :
Calls \@tryfcolumn\@dbldeferlist{8}. If \@tryfcolumn returns

with (globally set) @fcolmade = false, then:

* Globally sets \@dbltoplist to floats from \@dbldeferlist to go at top and bottom of column, deleting them from \@dbldeferlist. It does this using \textheight as the total height, and the parameters \@dblfloatsep, etc.

* Globally sets \@colht to \textheight minus the height of the added floats.

\@combinefloats : Combines the text from box

\@outputbox with the floats from \@toplist and
\@botlist,

putting the new box in \@outputbox. It uses \floatsep and \textfloatsep for the appropriate separations. It puts the elements of \TOPLIST and \BOTLIST onto \@freelist, and makes those lists null.

\@makecol : Makes the contents of \box255 plus the accumulated footnotes, plus the floats in \@toplist and \@botlist, into a single column of height \@colht (unless the page height has been locally changed), which it puts into box \@outputbox. It puts boxes in \@midlist back

onto \@freelist and restores \maxdepth.

\@opcol : Outputs a column whose text is in box \@outputbox If @twocolumn = false, then it calls \@outputpage,

sets \@colht :=G \textheight, and calls
\@floatplacement.

If @twocolumn = true, then: If @firstcolumn = true, then it puts box \@outputbox into \@leftcolumn and sets @firstcolumn :=G false.

If @firstcolumn = false, then it puts out the current two-column page, any possible two-column float pages, and determines \@dbltoplist for the next page.

USER COMMANDS THAT CALL OR AFFECT THE

OUTPUT ROUTINE —————————————————-

\newpage == BEGIN \par\vfil\penalty -10000 END
\clearpage == BEGIN \newpage

\write -1{} % Part of hack to make sure no

                    \vbox{}        % \write's get lost.
                    \penalty -10001

END

\cleardoublepage == BEGIN \clearpage

if @twoside = true and c@page is even

                            then \hbox{} \newpage fi

END

\twocolumn[BOX] : starts a new page, chnaging to twocolumn setting and puts BOX in a parbox of width \textwidth across the top. Useful for full-width titles for double-column pages. SURPRISE: The stretch from \@dbltextfloatsep will be inserted

between the BOX and the top of the two columns.

FLOAT-HANDLING MECHANISMS

————————-

The float environment obtains an insertion number B from the \@freelist (see below for a description of list manipulation), puts the float into box B and sets \count B to a FLOAT SPECIFIER. For a normal (not double-column) float, it then causes a page break in one of the following two ways:

- In outer hmode: \vadjust{\penalty -10002}

- In vmode : \penalty -10003. For a double-column float, it puts B onto the \@dbldeferlist. The float specifier has two components:

* A PLACEMENT SPECIFICATION, describing where the float may be placed.

* A TYPE, which is a power of two–e.g., figures might be

type 1 floats, tables type 2 floats, programs type 4 floats, etc. The float specifier is encoded as follows, where bit 0 is the least significant bit.

Bit Meaning

— ——- 0 1 iff the float may go where it appears in the text. 1 1 iff the float may go on the top of a page. 2 1 iff the float may go on the bottom of a page. 3 1 iff the float may go on a float page. 4 1 unless the PLACEMENT incluses a ! 5 1 iff a type 1 float 6 1 iff a type 2 float etc.

A negative float specifier is used to indicate a marginal note.

MACROS AND DATA STRUCTURES FOR PROCESSING FLOATS ————————————————

A FLOAT LIST consisting of the floats in boxes \boxa ... \boxN has the form:

       \@elt \boxa ... \@elt \boxN

where \boxI is defined by

       \newinsert\boxI

Normally, \@elt is \let to \relax. A test can be performed on the entire float list by locally \def'ing \@elt appropriately and executing the list. This is a lot more efficient than looping through the list.

The following macros are used for manipulating float lists.

\@next \CS \LIST {NONEMPTY}{EMPTY} == %% NOTE: ASSUME

\@elt = \relax
  BEGIN assume that \LIST == \@elt \B1 ... \@elt \Bn

if n = 0 then EMPTY else \CS :=L \B1

                 \LIST :=G \@elt \B2 ... \@elt \Bn

NONEMPTY

fi END

\@bitor\NUM\LIST : Globally sets switch @test to the disjunction for all I of bit log2 \NUM of the float specifiers of all the floats in \LIST. I.e., @test is set to true iff there is at least one float in \LIST having bit log2 \NUM of its float specifier equal to 1.

Note: log2 [(\count I)/32] is the bit number corresponding to the type of float I. To see if there is any float in \LIST having the same type as float I, you run \@bitor with

\NUM = [(\count I)/32] * 32.

\@bitor\NUM\LIST ==

BEGIN @test :=G false

  { \@elt \CTR == if \NUM <> 0 then
                      if \count\CTR / \NUM is odd

then @test := true fi fi

    \LIST
  }

END

\@cons\LIST\NUM : Globally sets \LIST := \LIST * \@elt \NUM
\@cons\LIST\NUM ==
BEGIN {  \@elt == \relax
        \LIST :=G \LIST \@elt \NUM
     }

BOX LISTS FOR FLOAT-PLACEMENT ALGORITHMS

\@freelist : List of empty boxes for placing new floats. \@toplist : List of floats to go at top of current column. \@midlist : List of floats in middle of current column. \@botlist : List of floats to go at bottom of current column. \@deferlist : List of floats to go after current column. \@dbltoplist : List of double-col. floats to go at top of current

page.

\@dbldeferlist : List of double-column floats to go on subsequent pages.

FLOAT-PLACEMENT ALGORITHMS

\@addtobot : Tries to put insert \@currbox on \@botlist.

Called only when:

              * \ht BOX < \@colroom
              * type of \@currbox not on \@deferlist
              * \@colnum > 0

* @insert = false If it succeeds, then:

* sets @insert true

* decrements \@botroom by \ht BOX

* decrements \@botnum and \@colnum by 1

* decrements \@colroom by \ht BOX + either

\floatsep

or \textfloatsep, as appropriate.

* sets \maxdepth to 0pt

\@addtotoporbot : Tries to put insert \@currbox on \@toplist or
   \@botlist.

Called only under same conditions as \@addtobot. If it succeeds, then:

* sets @insert true

      * decrements \@toproom or \@botroom by \ht

BOX

* decrements \@colnum and either \@topnum or

        \@botnum by 1

* decrements \@colroom by \ht BOX +

\floatsep

or \textfloatsep, as appropriate.

\@addtocurcol : Tries to add \@currbox to current column, setting @insert true if it succeeds, false otherwise. It will add \@currbox to top only if bit 0 of \count \@currbox is 0, and to the bottom only if bit 0 = 0 or an earlier float of the same type is put on the bottom. If the float is put in the text, then

\penalty\interlinepenalty is put

right after the float, before the following \vskip,

and \outputpenalty :=L 0.

\@addtonextcol : Tries to add \@currbox to the next column, setting @insert true if it succeeds, false otherwise.

\@addtodblcol : Tries to add \@currbox to the next double-column page, adding it to \@dbltoplist if it succeeds and

\@dbldeferlist if it fails.

\@addmarginpar ==

BEGIN

if \@currlist nonempty
then remove \@marbox from \@currlist
add \@marbox and \@currbox to \@freelist

%% NOTE: \@currbox = left box

else LaTeX error: ? %% shouldn’t happen fi \@tempcnta := 1 %% 1 = right, -1 = left if @twocolumn = true

then if @firstcolumn = true

then \@tempcnta := -1

fi else if @mparswitch = true

then if count0 odd

                else \@tempcnta := -1

fi fi if @reversemargin = true

          then \@tempcnta := -\@tempcnta

fi fi

if \@tempcnta < 0 then \box\@marbox :=G \box\@currbox

fi

\@tempdima :=L maximum(\@mparbottom - \@pageht
                                      + ht of \@marbox, 0)

if \@tempdima > 0 then LaTeX warning: ’marginpar moved’ fi

\@mparbottom :=G \@pageht + \@tempdima + depth of \@marbox
                     + \marginparpush
\@tempdima :=L \@tempdima - ht of \@marbox
\box\@marbox :=G \box\@currbox
                           \vbox { \vskip \@tempdima
                                   \box\@marbox
                                  }

height of \@marbox :=G depth of \@marbox :=G 0

\kern -\@pagedp
\nointerlineskip
\hbox{ if @tempcnta > 0 then \hskip \columnwidth
                            \hskip \marginparsep
                       else \hskip -\marginparsep
                            \hskip -\marginparwidth

fi

       \box\@marbox \hss
     }
\nobreak
\nointerlineskip
\hbox{\vrule height 0 width 0 depth \@pagedp}

END

Floats and marginpars add a lot of dead cycles.

7 \maxdeadcycles = 100
8 \let\@elt\relax
9 \def\@next#1#2#3#4{\ifx#2\@empty #4\else
10 \expandafter\@xnext #2\@@#1#2#3\fi}
11 \def\@xnext \@elt #1#2\@@#3#4{\def#3{#1}\gdef#4{#2}}
12 \newif \if@test
13 \def\@bitor#1#2{\global\@testfalse {\let\@elt\@xbitor
14 \@tempcnta #1\relax #2}}

RmS 91/11/22: Added test for |\count#1 = 0|. Suggested by Chris Rowley.

15 \def\@xbitor #1{\@tempcntb \count#1
16 \ifnum \@tempcnta =\z@
17 \else
18  \divide\@tempcntb\@tempcnta
19  \ifodd\@tempcntb \global\@testtrue\fi
20 \fi}

DEFINITION OF FLOAT BOXES:

21 \newinsert\bx@A
22 \newinsert\bx@B
23 \newinsert\bx@C
24 \newinsert\bx@D
25 \newinsert\bx@E
26 \newinsert\bx@F
27 \newinsert\bx@G
28 \newinsert\bx@H
29 \newinsert\bx@I
30 \newinsert\bx@J
31 \newinsert\bx@K
32 \newinsert\bx@L
33 \newinsert\bx@M
34 \newinsert\bx@N
35 \newinsert\bx@O
36 \newinsert\bx@P
37 \newinsert\bx@Q
38 \newinsert\bx@R
39 \gdef\@freelist{\@elt\bx@A\@elt\bx@B\@elt\bx@C\@elt\bx@D\@elt\bx@E
40  \@elt\bx@F\@elt\bx@G\@elt\bx@H\@elt\bx@I\@elt\bx@J
41  \@elt\bx@K\@elt\bx@L\@elt\bx@M\@elt\bx@N
42  \@elt\bx@O\@elt\bx@P\@elt\bx@Q\@elt\bx@R}
43 \gdef\@toplist{}
44 \gdef\@botlist{}
45 \gdef\@midlist{}
46 \gdef\@currlist{}
47 \gdef\@deferlist{}
48 \gdef\@dbltoplist{}
49 \gdef\@dbldeferlist{}

PAGE LAYOUT PARAMETERS

50 \newdimen\topmargin
51 \newdimen\oddsidemargin
52 \newdimen\evensidemargin
53 \let\@themargin=\oddsidemargin
54 \newdimen\headheight
55 \newdimen\headsep
56 \newdimen\footskip
57 \newdimen\textheight
58 \newdimen\textwidth
59 \newdimen\columnwidth
60 \newdimen\columnsep

61 \newdimen\columnseprule
62 \newdimen\marginparwidth
63 \newdimen\marginparsep
64 \newdimen\marginparpush

\AtBeginDvi \@begindvibox We use a box register in which to put stuff that must appear before anything else

in the .dvi file.

The stuff in the box should not add any typeset material to the page when it is unboxed.

65 \newbox\@begindvibox
66 \def \AtBeginDvi #1{%
67 \global \setbox \@begindvibox
68  \vbox{\unvbox \@begindvibox #1}%

69 }

\@maxdepth This is not the right place to set this; it needs to be set in a class/style file when

\maxdepth is set.

Also, many settings to \maxdepth should be to \@maxdepth, probably?

70 \newdimen\@maxdepth
71 \@maxdepth = \maxdepth
\paperheight \paperwidth New \paper. . . registers.
72 \newdimen\paperheight
73 \newdimen\paperwidth
\if@insert \if@fcolmade \if@specialpage \if@firstcolumn \if@twocolumn \if@twoside \if@reversemarginpar \if@mparswitch \col@number Local switches first:
74 \newif \if@insert

These should definitely be global:

75 \newif \if@fcolmade
76 \newif \if@specialpage \@specialpagefalse

These should be global but are not always set globally in other files.

77 \newif \if@firstcolumn \@firstcolumntrue
78 \newif \if@twocolumn   \@twocolumnfalse

Not sure about these: two questions. Should things which must apply to a whole doument be local or global (they probably should be ‘preamble only’ commands)? Are these three such things?

79 \newif \if@twoside     \@twosidefalse
80 \newif \if@reversemargin \@reversemarginfalse
81 \newif \if@mparswitch  \@mparswitchfalse

This counter has been imported from ‘multicol’.

82 \newcount \col@number
83 \col@number \@ne

INTERNAL REGISTERS

84 \newcount\@topnum
85 \newdimen\@toproom
86 \newcount\@dbltopnum
87 \newdimen\@dbltoproom
88 \newcount\@botnum

 89 \newdimen\@botroom
 90 \newcount\@colnum
 91 \newdimen\@textmin
 92 \newdimen\@fpmin
 93 \newdimen\@colht
 94 \newdimen\@colroom
 95 \newdimen\@pageht
 96 \newdimen\@pagedp
 97 \newdimen\@mparbottom \@mparbottom\z@
 98 \newcount\@currtype
 99 \newbox\@outputbox
100 \newbox\@leftcolumn
101 \newbox\@holdpg
102 \def\@thehead{\@oddhead} % initialization
103 \def\@thefoot{\@oddfoot}

\clearpage The tests at the beginning are an experimental attempt to avoid a completely empty page after a \twocolumn[...]. This prevents the text from the argument vanishing into a float box, never to be seen again. We hope that it does not produce wrong formatting in other cases.

104 \def\clearpage{%
105 \ifvmode
106  \ifnum \@dbltopnum =\m@ne
107  \ifdim \pagetotal <\topskip
108  \hbox{}
109  \fi
110  \fi
111 \fi
112 \newpage
113 \write\m@ne{}
114 \vbox{}
115 \penalty -\@Mi

116 }

\cleardoublepage
117 \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
118  \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}

119 ⟨/2ekernel | autoload⟩

\onecolumn

120 ⟨∗2ekernel | autoload | fltrace⟩

121 \def\onecolumn{%
122 \clearpage
123 \global\columnwidth\textwidth
124 \global\hsize\columnwidth
125 \global\linewidth\columnwidth
126 \global\@twocolumnfalse
127 \col@number \@ne
128 \@floatplacement}

\newpage \@emptycol It may be better to use an invisible rule rather than an empty box here.

129 \def \newpage {\par\vfil\penalty -\@M}
130 \def \@emptycol {\vbox{}\penalty -\@M}

\twocolumn \@topnewpage There are several bug fixes to the two-column stuff here.

131 \def \twocolumn {%
132 \clearpage
133 \global\columnwidth\textwidth
134 \global\advance\columnwidth-\columnsep
135 \global\divide\columnwidth\tw@
136 \global\hsize\columnwidth
137 \global\linewidth\columnwidth
138 \global\@twocolumntrue
139 \global\@firstcolumntrue
140 \col@number \tw@

There is no reason to put a \@dblfloatplacement here since \@topnewpage ignores these settings. The \@floatplacement is needed in case this comes after some changes.

141 \@ifnextchar [\@topnewpage\@floatplacement

142 }

Note that here, getting a box from the freelist can assume success since this comes just after a \clearpage.

143 \long\def \@topnewpage [#1]{%
144 \@next\@currbox\@freelist{}{}%
145 \global \setbox\@currbox
146  \color@vbox
147  \normalcolor
148  \vbox {%
149  \hsize\textwidth
150  \@parboxrestore
151  \col@number \@ne
152  #1%
153  \vskip -\dbltextfloatsep

154 }%

155  \color@endbox

Added size test and warning message; perhaps we should use an error message.

156 \ifdim \ht\@currbox>\textheight
157  \ht\@currbox \textheight
158 \fi

This next line is not essential but it is more robust to make this value non-zero, in case of weird errors.

This next bit is what is needed from \@addtodblcol, plus some extra checks for error trapping.

159 \global \count\@currbox \tw@
160 \@tempdima -\ht\@currbox
161 \advance \@tempdima -\dbltextfloatsep
162 \global \advance \@colht \@tempdima
163 \ifx \@dbltoplist \@empty
164 \else
165  \@latexerr{Float(s) lost}\@ehb
166  \let \@dbltoplist \@empty
167 \fi
168 \@cons \@dbltoplist \@currbox

This setting of \@dbltopnum is used only to change the typesetting in

\@combinedblfloats.
169 \global \@dbltopnum \m@ne

170 ⟨∗trace⟩

171  \tr@ce{dbltopnum set to -1 (= \the \@dbltopnum) (topnewpage)}%

172 ⟨/trace⟩

At points such as this we need to check that there is still a minimal amount of room left on the page; this uses an arbitrary small value at present. If there is little room left we just force a page-break, OK? This has been extended to cope with having to produce two empty columns.

I now think that the cut-off point should be 3\baselineskip?

Since this happens only when there is nothing on the page but the ‘top-box’, the empty box should not cause any problem other than some overfull box messages, which is not entirely misleading.

Here we need two page-ends since both columns need to be empty.

173 \ifdim \@colht<3\baselineskip
174  \@latex@warning@no@line {Optional argument of \noexpand\twocolumn
175  too tall on page \thepage}%
176  \@emptycol
177  \if@firstcolumn
178  \else
179  \@emptycol
180  \fi
181 \else
182  \global \vsize \@colht
183  \global \@colroom \@colht
184  \@floatplacement
185 \fi

186 }

\output \@specialoutput This needs some small adjustments. We cannot guarantee that the float mechanism will interact correctly with this stuff, but that mecahnism does not always work properly with footnotes already.

RmS 91/09/29:

added reset of \par to the output routine. This avoids problems when the output routine is called within a list where \par may be a no-op.

187 \output {%
188 \let \par \@@par
189 \ifnum \outputpenalty<-\@M
190  \@specialoutput
191 \else
192  \@makecol
193  \@opcol
Moved to \@opcol: \@floatplacement.
194  \@startcolumn

This loop could be replaced by an \expandafter tail recursion in \@startcolumn.

195  \@whilesw \if@fcolmade \fi

196 {% 197 ⟨∗trace⟩

198  \tr@ce{PAGE: float \if@twocolumn column \else page \fi

199  completed}%

200 ⟨/trace⟩

201  \@opcol\@startcolumn}%
202 \fi
203 \ifnum \outputpenalty>-\@Miv

At points such as this we need to check that there is still a minimal amount of room left on the page; this uses an arbitrary small value at present. If there is little room left we just force a page-break, OK?

This bit is essential only if a float has just been processed so maybe it should be moved.

Since this happens only when there is nothing on the page but floats, the empty box should not cause any problem other than some overfull box messages, which is not entirely misleading.

204  \ifdim \@colroom<2\baselineskip
205  \@latex@warning@no@line {Text page \thepage\space
206  contains only floats}%
207  \@emptycol
208  \if@twocolumn
209  \if@firstcolumn
210  \else
211  \@emptycol
212  \fi
213  \fi
214  \else
215  \global \vsize \@colroom
216  \fi
217 \else
218  \global \vsize \maxdimen
219 \fi

220 } 221 ⟨/2ekernel | autoload | fltrace⟩

 CHANGES TO \@specialoutput:
 * \penalty\z@ changed to \penalty\interlinepenalty so \samepage

works properly with figure and table environments.

(Changed 23 Oct 86)

* Definition of \@specialoutput changed 26 Feb 88 so \@pageht and \@pagedp aren’t changed for a marginal note. (Change suggested by Chris Rowley.)

222 ⟨∗2ekernel | def1 | autoload | fltrace⟩

223 \gdef\@specialoutput{%
224 \ifnum \outputpenalty>-\@Mii
225  \@doclearpage
226 \else
227  \ifnum \outputpenalty<-\@Miii
228  \ifnum \outputpenalty<-\@MM \deadcycles \z@ \fi
229  \global \setbox\@holdpg \vbox {\unvbox\@cclv}%
230  \else

Note that \boxmaxdepth should not be set here since we wish to record the natural depth of the holdpg box.

This is changed so as to not lose anything, such as writes and marks, which may get into box 255 and should be returned to the list. This should only happen when the first penalty in the mechanism is discarded and therefore \@holdpg should always be void in this case. This can happen because a penalty is discarded whenever there is no box on the list.

   It was just: \setbox\@tempboxa \box \@cclv.

The last box which is removed is the box put there by the double-penalty mechanism. The \unskip then removes the \topskip which is put there since the box is the first on the page.

231  \global \setbox\@holdpg \vbox{%
232  \unvbox\@holdpg
233  \unvbox\@cclv

We must now remove the box added by the float mechanism and the \topskip glue therefore added above it by TEX.

234  \setbox\@tempboxa \lastbox
235  \unskip

236 }%

These two are needed as separate dimensions only by \@addmarginpar; for other purposes we put the whole size into \@pageht (see below).

237  \@pagedp \dp\@holdpg
238  \@pageht \ht\@holdpg
239  \unvbox \@holdpg
240  \@next\@currbox\@currlist{%
241  \ifnum \count\@currbox>\z@

Putting the whole size into \@pageht (see above).

242  \advance \@pageht \@pagedp
243  \ifvoid\footins \else
244  \advance \@pageht \ht\footins
245  \advance \@pageht \skip\footins
246  \advance \@pageht \dp\footins
247  \fi

248 ⟨∗2ekernel | def1⟩

249  \ifvbox \@kludgeins

We want to make the adjustment due to this insert only if the non-star form is used. The *-form will probably not work with floats, but maybe it still could make some adjustment here even so?

250  \ifdim \wd\@kludgeins=\z@
251  \advance \@pageht \ht\@kludgeins

252 ⟨∗trace⟩

253  \tr@ce {Extra size added: \the \ht\@kludgeins}%

254 ⟨/trace⟩

255  \fi
256  \fi

257 ⟨/2ekernel | def1⟩

This version puts the inserts back just before the additional material; it could be moved earlier, before unboxing the page-so-far. Neither is guaranteed not to put things on the wrong page. This version is similar to the original version.

258  \@reinserts
259  \@addtocurcol
260  \else

261  \@reinserts
262  \@addmarginpar
263  \fi
264  }\@latexbug

A 2e change: use \addpenalty instead of \penalty here. Some penalty is needed to create a potential break-point immediately after the reinerts (or the marginal). Otherwise there can be no possibility to break here and this can cause the reinserts or the marginal to appear on the next page (which is often incorrect).

265  \ifnum \outputpenalty<\z@
266  \if@nobreak
267  \else
268  \addpenalty \interlinepenalty
269  \fi
270  \fi
271  \fi
272 \fi

273 } 274 ⟨/2ekernel | def1 | autoload | fltrace⟩

\@doclearpage This is a very much an emergency action, just dumping everything: footnotes first

then floats. A more sophisticated version is needed.

Also, it puts any left-over non-boxes (writes, specials, etc.) back after any float pages created: this is a bug.

275 ⟨∗2ekernel | autoload⟩

276 \def \@doclearpage {%
277  \ifvoid\footins
278  \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
279  \setbox\@tempboxa\box\@cclv
280  \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
281  \global \let \@toplist \@empty
282  \global \let \@botlist \@empty
283  \global \@colroom \@colht
284  \ifx \@currlist\@empty
285  \else
286  \@latexerr{Float(s) lost}\@ehb
287  \global \let \@currlist \@empty
288  \fi
289  \@makefcolumn\@deferlist
290  \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
291  \if@twocolumn
292  \if@firstcolumn
293  \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}%
294  \global \let \@dbltoplist \@empty
295  \global \@colht \textheight
296  \begingroup
297  \@dblfloatplacement
298  \@makefcolumn\@dbldeferlist
299  \@whilesw\if@fcolmade \fi{\@outputpage
300  \@makefcolumn\@dbldeferlist}%
301  \endgroup

302  \else
303  \vbox{}\clearpage
304  \fi
305  \fi
306  \else
307  \setbox\@cclv\vbox{\box\@cclv\vfil}%
308  \@makecol\@opcol
309  \clearpage
310  \fi

311 } 312 ⟨/2ekernel | autoload⟩

\@opcol Several changes in detail here.

313 ⟨∗2ekernel | autoload | fltrace⟩

314 \def \@opcol {%
315 \if@twocolumn
316  \@outputdblcol
317 \else
318  \@outputpage

319 ⟨∗trace⟩

320  \tr@ce{PAGE: one column (float? see above) page completed}%

321 ⟨/trace⟩

Not needed since it comes after \@outputpage:

322 %   \global\@colht\textheight
323 \fi

These do not need to be done every time \@opcol is used: they should be grouped together since they all need to be done at the end of the non-special output routine, or at the end of a clearpage one.

324 \global \@mparbottom \z@ \global \@textfloatsheight \z@
325 \@floatplacement

326 } 327 ⟨/2ekernel | autoload | fltrace⟩

\@makecol We must rewrite this macro to alllow for variations in page-makeup required by

changes in page-length.

This uses a different macro if a special-length column is being produced.

328 ⟨∗2ekernel | def1 | autoload⟩

329 \gdef \@makecol {%
330 \ifvoid\footins
331  \setbox\@outputbox \box\@cclv
332 \else
333  \setbox\@outputbox \vbox {%

This \boxmaxdepth setting is to ensure that deep footnotes do not overwrite the footer (on account of the negative skip added later): it should use \@maxdepth otherwise the chnage is pointless when there are footnotes.

But see also its use when combining floats.

334  \boxmaxdepth \@maxdepth
335  \unvbox \@cclv
336  \vskip \skip\footins
337  \color@begingroup

338  \normalcolor
339  \footnoterule
340  \unvbox \footins
341  \color@endgroup

342 }%

343 \fi

The h floats have now been finally committed to this page so we can reset their list. The top and bottom floats are then added to the page.

344 \xdef\@freelist{\@freelist\@midlist}%
345 \global \let \@midlist \@empty
346 \@combinefloats

The variations start here in case \enlargethispage has been used.

347 ⟨∗2ekernel | def1⟩

348 \ifvbox\@kludgeins
349  \@makespecialcolbox
350 \else

351 ⟨/2ekernel | def1⟩

This extra reboxing is only needed to add the \@texttop and \@textbotttom but this could be done earlier, when the floats are added.

The \boxmaxdepth resetting here will have no effect unless \@textbottom ends with a box or rule. So is this (or possibly \@maxdepth) the correct value?

The \vskip -\dimen@ ensures that the visible depth of the box does not affect the placement of anything on the page. Thus very deep pages will overprint the footer; but these should have been prevented by suitable settings of the maxdepths at appropriate times.

If \@textbottom ends with a box or rule of non-zero depth then this skip adjustemnt should be done again after it.

I think that the final boxing of the main text page could have a common ending which may make it simpler to see what is going on.

This needs further investigation, especially in the ‘special case’.

Also, the \boxmaxdepth setting here affects what happens wthin \@texttop and \@textbottom, should it? Is it needed at all?

RmS 91/10/22: Replaced \dimen128 by \dimen@.

352  \setbox\@outputbox \vbox to\@colht {%
353 %       \boxmaxdepth \maxdepth                   %??
354  \@texttop
355  \dimen@ \dp\@outputbox
356  \unvbox \@outputbox
357  \vskip -\dimen@
358  \@textbottom

359 }% 360 ⟨∗2ekernel | def1⟩

361 \fi

362 ⟨/2ekernel | def1⟩

363 \global \maxdepth \@maxdepth

364 } 365 ⟨/2ekernel | def1 | autoload⟩

\@reinserts This is the code which reinserts the inserts. It puts them all in one place; this can make some of them come out on the wrong page. It has been put into a separate macro to expidite experimentation.

366 ⟨∗2ekernel | def1 | autoload⟩

367 \gdef \@reinserts{%
368 \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
369 ⟨+2ekernel | def1⟩ \ifvbox\@kludgeins\insert\@kludgeins
370 ⟨+2ekernel | def1⟩  {\unvbox\@kludgeins}\fi

371 } 372 ⟨/2ekernel | def1 | autoload⟩

\@makespecialcolbox This implements certain variations in page-makeup.

373 ⟨∗2ekernel | def1 | fltrace⟩

374 \gdef \@makespecialcolbox {%

375 ⟨∗trace⟩

376 \tr@ce{Kludgeins ht \the\ht\@kludgeins\space
377  dp \the\dp\@kludgeins\space
378  wd \the\wd\@kludgeins}%

379 ⟨/trace⟩

First we find the natural height of the column.

See above for discussion of what is happening here.

This needs further investigation, especially in this ‘special case’.

380 \setbox\@outputbox \vbox {%
381  \@texttop
382  \dimen@ \dp\@outputbox
383  \unvbox\@outputbox
384  \vskip-\dimen@

385 }%

386 \@tempdima \@colht
387 \ifdim \wd\@kludgeins>\z@

Note that in this case (the *-version), the height of the \@kludgeins box is not used since its value is somewhat arbitrary: it need only be big enough to ensure that the page-break is not taken prematurely.

Here we calculate how much vertical space needs to be added in order to enable the column to fit into a box of size \@colht using the best information we have about the amount of shrink available (another thing which is known internally about a box, but cannot be accessed at the TEX level!).

This needs TEX3 otherwise \pageshrink is zero anyway; it may not be exactly the figure we wish as it is the total available from the all the material collected before the page-break decision is made. It will, we think, always be an overestimate of the actual shrink in the box; therefore this should always force the shortest possible column with the possibility of an overfull box.

This should work for bothe flush- and ragged-bottom setting since it makes the contents no smaller than the size (\@colht) of the box into which they are put.

Their should perhaps be an upper limit, of 0pt?, on the extra space added to force shrinking.

See above for a discussion of the \boxmaxdepth setting here.

388  \advance \@tempdima -\ht\@outputbox
389  \advance \@tempdima \pageshrink

390 ⟨∗trace⟩

391  \tr@ce {Natural ht of col: \the \ht\@outputbox}%
392  \tr@ce {\string \@colht: \the \@colht}%
393  \tr@ce {Pageshrink added: \the \pageshrink}%
394  \tr@ce {Hence, space added: \the \@tempdima}%

395 ⟨/trace⟩

396  \setbox\@outputbox \vbox to \@colht {%
397 %       \boxmaxdepth \maxdepth
398  \unvbox\@outputbox
399  \vskip \@tempdima
400  \@textbottom

401 }%

For the unstarred version, the final size of the page is precisely specified. Therefore, at least for the flush-bottom case, we need to ensure that, visually, it has this size exactly.

Thus we calculate this size and set the material in a box of this size, which is then put into a box of size \@colht with \vss at the bottom.

402 \else
403  \advance \@tempdima -\ht\@kludgeins

404 ⟨∗trace⟩

405  \tr@ce {Natural ht of col: \the \ht\@outputbox}%
406  \tr@ce {\string \@colht: \the \@colht}%
407  \tr@ce {Extra size added: -\the \ht \@kludgeins}%
408  \tr@ce {Hence, height of inner box: \the \@tempdima}%
409  \tr@ce {Max? pageshrink available: \the \pageshrink}%

410 ⟨/trace⟩

This type of final packaging could be done always; this may simplify all of this page-makeup.

It is not necessary to set \boxmaxdepth here since the \@outputbox ends with glue.

411  \setbox \@outputbox \vbox to \@colht {%
412  \vbox to \@tempdima {%
413  \unvbox\@outputbox
414  \@textbottom}%
415  \vss}%
416 \fi

Finally we need to explicitly make the insert box void.

417 {\setbox \@tempboxa \box \@kludgeins}%

418 } 419 ⟨/2ekernel | def1 | fltrace⟩

\@texttop \@textbottom These do nothing as a default.

420 ⟨∗2ekernel | autoload⟩

421 \let \@texttop \relax
422 \let \@textbottom \relax

\@resetactivechars \@activechar@info RmS 93/09/06: added hook to protect against certain active characters in the output routine. Default checks are for active space and end-of-line.

423 \def\@activechar@info #1{%
424  \@latex@info@no@line {Active #1 character found while
425  output routine is active

426  \MessageBreak
427  This may be a bug in a package file
428  you are using}%

429 }

Do not put any spaces in this next bit!

430 \begingroup
431 \obeylines\obeyspaces%
432 \gdef\@resetactivechars{%
433 \def^^M{\@activechar@info{EOL}\space}%
434 \def {\@activechar@info{space}\space}}%
435 \endgroup

\@outputpage \@shipoutsetup \@writesetup The \color@hbox hooks here are used to avoid putting just a colour special into an otherwise empty box (in a header or footer). These boxes are often set to be completely empty and so adding a special produces a very underfull box message.

There has been extensive tidying up of the old code here; including the removal of a level of grouping.

The setting of \protect immediately before the \shipout is needed so that protected commands within \writes are handled correctly.

Within shipout’s vbox it is reset to its default value, \relax.

Resetting it to its default value after the shipout has been completed (and the contents of the writes have been expanded) must be done by use of \aftergroup. This is because it must have the value \relax before macros coming from other uses of \aftergroup within this box are expanded.

Putting this into the \aftergroup token list does not affect the definition used in expanding the \writes because the aftergroup token list is only constructed when popping the save-stack, it is not expanded until after the shipout is completed.

Question: should things from an \aftergroup within the shipped out box be executed in the environment set up for the writes, or after it finishes?

A lot of this code has been in-lined tp prevent mis-use of internal commands as hooks.

436 \def\@outputpage{%
437 \begingroup           % the \endgroup is put in by \aftergroup

Now all the set-up stuff has been in-lined for Frank.

First the stuff for the writes.

From here … was in the command \@writesetup.

438 \let \protect \noexpand

RmS 93/08/19: Redefined accents to allow changes in font encoding; but exactly why was this needed?

The \catcode`\ = 10 was removed as it was considered useless (presumably because nothing gets tokenised during shipout).

This was put in as some error produced active spaces in a mark, I think.

Why was the hyphen reset?

439 \@resetactivechars
440 \let\-\@dischyph

With the new encoding setup the following line can use \let. It could also use the new internal commands?

441 \let\'\@acci\let\`\@accii\let\=\@acciii

442 \let\\\@normalcr

The was once inside the box.

443 \let\par\@@par          %% 15 Sep 87

… to here was in the command \@writesetup.

444 \shipout \vbox{%
445  \set@typeset@protect
446  \aftergroup \endgroup
447  \aftergroup \set@typeset@protect
448  % correct? or just restore by ending
449  % the group?

This first bit has been moved inside the shipped out box.

Now the setup inside the shipped out box; this should conatin all the stuff that could only affect typesetting; other stuff may need to be reset for the writes also.

From here … was in the command \@shipoutsetup.

450 \if@specialpage
451  \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
452 \fi
453 \if@twoside
454  \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
455  \let\@themargin\oddsidemargin
456  \else \let\@thehead\@evenhead
457  \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
458  \fi
459 \fi

The rest was always inside the box. RmS 91/08/15: aded this line:

460 \reset@font

RmS 93/08/06 Added \lineskiplimit=0pt to guard against it being nonzero: e.g. by \offinterlineskip being in effect.

There are probably lots of other things that may need resetting.

461 \normalsize
462 \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@

… to here was in the command \@shipoutsetup.

463  \@begindvi
464  \vskip \topmargin
465  \moveright\@themargin \vbox {%
466  \setbox\@tempboxa \vbox to\headheight{%
467  \vfil
468  \color@hbox
469  \normalcolor
470  \hb@xt@\textwidth {%
471  \let \label \@gobble
472  \let \index \@gobble
473  \let \glossary \@gobble %% 21 Jun 91
474  \@thehead

475 }%

476  \color@endbox
477  }%                        %% 22 Feb 87
478  \dp\@tempboxa \z@

479  \box\@tempboxa
480  \vskip \headsep
481  \box\@outputbox
482  \baselineskip \footskip
483  \color@hbox
484  \normalcolor
485  \hb@xt@\textwidth{%
486  \let \label \@gobble
487  \let \index \@gobble      %% 22 Feb 87
488  \let \glossary \@gobble   %% 21 Jun 91
489  \@thefoot

490 }%

491  \color@endbox

492 }% 493 }%

494 %   \endgroup now inserted by \aftergroup
495 \global \@colht \textheight
496 \stepcounter{page}%

It is now clear that this does something useful, thanks to Piet van Oostrum. It is needed because a float page is made without using TeX’s page-builder; thus the output routine is never called so the marks are not updated.

497 \let\firstmark\botmark

498 }

\@begindvi This unboxes stuff that must appear before anything else in the .dvi file, then

returns that box register to the free list and cancels itself.

The stuff in the box should not add any typeset material to the page.

499 \def \@begindvi{%
500 \unvbox \@begindvibox
501 \global\let \@begindvi \@empty

502 }

\@combinefloats \@cflt \@cflb The \boxmaxdepth setting here was not made local to a box so was dangerous. It is needed only within the box made by \@cflt (and not normally even there), so it has been moved there; this also agrees with the original pseudcode.

503 \def \@combinefloats {%
504 %    \boxmaxdepth \maxdepth
505  \ifx \@toplist\@empty \else \@cflt \fi
506  \ifx \@botlist\@empty \else \@cflb \fi

507 }

508 \def \@cflt{%
509  \let \@elt \@comflelt
510  \setbox\@tempboxa \vbox{}%
511  \@toplist
512  \setbox\@outputbox \vbox{%
513  \boxmaxdepth \maxdepth
514  \unvbox\@tempboxa
515  \vskip -\floatsep
516  \topfigrule
517  \vskip \textfloatsep
518  \unvbox\@outputbox

519 }%

520  \let\@elt\relax
521  \xdef\@freelist{\@freelist\@toplist}%
522  \global\let\@toplist\@empty

523 }

524 \def \@cflb {%
525  \let\@elt\@comflelt
526  \setbox\@tempboxa \vbox{}%
527  \@botlist
528  \setbox\@outputbox \vbox{%
529  \unvbox\@outputbox
530  \vskip \textfloatsep
531  \botfigrule
532  \unvbox\@tempboxa
533  \vskip -\floatsep

534 }%

535  \let\@elt\relax
536  \xdef\@freelist{\@freelist\@botlist}%
537  \global \let \@botlist\@empty

538 }

\@comflelt
\@comdblflelt
\@combinedblfloats

539 \def\@comflelt#1{\setbox\@tempboxa
540  \vbox{\unvbox\@tempboxa\box #1\vskip\floatsep}}
541 \def\@comdblflelt#1{\setbox\@tempboxa
542  \vbox{\unvbox\@tempboxa\box #1\vskip\dblfloatsep}}
543 \def \@combinedblfloats{%
544 \ifx \@dbltoplist \@empty
545 \else
546  \setbox\@tempboxa \vbox{}%
547  \let \@elt \@comdblflelt
548  \@dbltoplist
549  \let \@elt \relax
550  \xdef \@freelist {\@freelist\@dbltoplist}%
551  \global\let \@dbltoplist \@empty
552  \setbox\@outputbox \vbox to\textheight

The setting of \boxmaxdepth here has no effect since the \@outputbox should already have depth zero. Even so, it would have no effect on the layout of the page.

553  {%\boxmaxdepth\maxdepth   %% probably not needed, CAR
554  \unvbox\@tempboxa\vskip-\dblfloatsep

Here we need different typesetting if the top float comes from \@topnewpage.

555  \ifnum \@dbltopnum>\m@ne
556  \dblfigrule
557  \fi
558  \vskip \dbltextfloatsep
559  \box\@outputbox

560 }%

561 \fi

562 } 563 ⟨/2ekernel | autoload⟩

\@startcolumn \@startdblcolumn We could combine (most of) these two into \@startcol <list>. Note that

\@xstartcol was only used once (i.e. in \@startcolumn); it has therefore been removed. This is not quite as efficient but it now has the same structure as

 \@startdblcolumn.

The empty-list test has been moved to \@tryfcolumn.

564 ⟨∗2ekernel | autoload | fltrace⟩

565 \def \@startcolumn {%
566 \global \@colroom \@colht
567 \@tryfcolumn \@deferlist
568 \if@fcolmade

569 ⟨∗trace⟩

570  \tr@ce{PAGE: float \if@twocolumn column \else page \fi
571  completed}%

572 ⟨/trace⟩

573 \else
574  \begingroup
575  \let \reserved@b \@deferlist
576  \global \let \@deferlist \@empty
577  \let \@elt \@scolelt
578  \reserved@b
579  \endgroup
580 \fi

581 }

This one does not need to set \@colht.

582 \def \@startdblcolumn {%

Not needed since this always comes after \@outputpage:

583 % \global \@colht \textheight
584 \@tryfcolumn \@dbldeferlist
585 \if@fcolmade

586 ⟨∗trace⟩

587  \tr@ce{PAGE: double float page completed}%

588 ⟨/trace⟩

589 \else
590  \begingroup
591  \let \reserved@b \@dbldeferlist
592  \global \let \@dbldeferlist \@empty
593  \let \@elt \@sdblcolelt
594  \reserved@b
595  \endgroup
596 \fi

597 }

\@tryfcolumn Now tests if its list is empty before any further exertion.

598 \def \@tryfcolumn #1{%
599 \global \@fcolmadefalse
600 \ifx #1\@empty
601 \else

602 ⟨∗trace⟩

603  \tr@ce{PAGE: try float \if@twocolumn column/page\else page\fi
604  ---\string #1}%

605  \tr@ce{----- \string #1: #1}%

606 ⟨/trace⟩

607  \xdef\@trylist{#1}%
608  \global \let \@failedlist \@empty
609  \begingroup
610  \let \@elt \@xtryfc \@trylist
611  \endgroup
612  \if@fcolmade
613  \@vtryfc #1%
614  \fi
615 \fi

616 } 617 ⟨/2ekernel | autoload | fltrace⟩

618 ⟨∗2ekernel | autoload⟩

619 \def\@scolelt#1{\def\@currbox{#1}\@addtonextcol}
620 \def\@sdblcolelt#1{\def\@currbox{#1}\@addtodblcol}
621 \def\@vtryfc #1{\global\setbox\@outputbox\vbox{}\let\@elt\@wtryfc
622  \@flsucceed \global\setbox\@outputbox
623  \vbox to\@colht{\vskip \@fptop
624  \vskip -\@fpsep \unvbox \@outputbox
625  \vskip \@fpbot}\let\@elt\relax
626  \xdef #1{\@failedlist\@flfail}%
627  \xdef\@freelist{\@freelist\@flsucceed}}

628 \def\@wtryfc #1{\global\setbox\@outputbox\vbox{\unvbox\@outputbox
629  \vskip\@fpsep\box #1}}
630 \def\@xtryfc #1{\@next\reserved@a\@trylist{}{}\@currtype
631 \count #1\divide\@currtype\@xxxii \multiply\@currtype\@xxxii
632 \@bitor \@currtype \@failedlist \@testfp #1\ifdim
633  \ht #1>\@colht \global\@testtrue\fi
634  \if@test \@cons\@failedlist #1\else \@ytryfc #1\fi}
635 \def\@ytryfc #1{\begingroup \gdef\@flsucceed{\@elt #1}%
636 \global\let\@flfail\@empty
637 \@tempdima\ht #1\let\@elt\@ztryfc \@trylist
638 \ifdim \@tempdima >\@fpmin
639  \global\@fcolmadetrue \else \@cons\@failedlist #1\fi
640 \endgroup \if@fcolmade \let\@elt\@gobble \fi}
641 \def\@ztryfc #1{\@tempcnta\count #1\divide\@tempcnta\@xxxii
642  \multiply\@tempcnta\@xxxii \@bitor \@tempcnta {\@failedlist
643  \@flfail}\@testfp #1\@tempdimb\@tempdima
644  \advance\@tempdimb\ht #1\advance
645  \@tempdimb\@fpsep \ifdim \@tempdimb >\@colht \global\@testtrue\fi
646  \if@test \@cons\@flfail #1\else
647  \@cons\@flsucceed #1\@tempdima\@tempdimb
648  \fi}

649 ⟨/2ekernel | autoload⟩

The major changes for float suppression and the changes to the float mechanism to make it conform to the documentation are in these next macros.

\@addtobot Lots of changes.

650 ⟨∗2ekernel | autoload | fltrace⟩

651 \def \@addtobot {%

652 ⟨∗trace⟩

653 \tr@ce{***Start addtobot}%

654 ⟨/trace⟩

655 \@getfpsbit 4\relax

656 ⟨∗trace⟩

657 \tr@ce{fpstype \ifodd \@tempcnta OK \else not \fi bot:
658  \the \@fpstype}%

659 ⟨/trace⟩

660 \ifodd \@tempcnta
661  \@flsetnum \@botnum
662  \ifnum \@botnum>\z@
663  \@tempswafalse
664  \@flcheckspace \@botroom \@botlist
665  \if@tempswa

This next line means that this page is produced with box 255 having depth zero, rather than the normal maxdepth: is this needed, useful?

666  \global \maxdepth \z@
667  \@flupdates \@botnum \@botroom \@botlist

668 ⟨∗trace⟩

669  \tr@ce{colroom (after-bot) = \the \@colroom}%
670  \tr@ce{colnum (after-bot) = \the \@colnum}%
671  \tr@ce{botnum (after-bot) = \the \@botnum}%
672  \tr@ce{***Success: bot}%

673 ⟨/trace⟩

674  \@inserttrue
675  \fi

676 ⟨∗trace⟩

677  \else
678  \tr@ce{Fail: botnum = \the \@botnum:
679  fpstype \the \@fpstype=ORD?}%
680  \ifnum \@fpstype<\sixt@@n
681  \tr@ce{ERROR: !b float not successful (addtobot)}%
682  \fi

683 ⟨/trace⟩

684  \fi
685 \fi

686 }

\@addtotoporbot Lots of changes.
687 \def \@addtotoporbot {%

688 ⟨∗trace⟩

689 \tr@ce{***Start addtotoporbot}%

690 ⟨/trace⟩

691 \@getfpsbit \tw@

692 ⟨∗trace⟩

693 \tr@ce{fpstype \ifodd \@tempcnta OK \else not \fi top:
694  \the \@fpstype}%

695 ⟨/trace⟩

696 \ifodd \@tempcnta
697  \@flsetnum \@topnum
698  \ifnum \@topnum>\z@
699  \@tempswafalse
700  \@flcheckspace \@toproom \@toplist
701  \if@tempswa
702  \@bitor\@currtype{\@midlist\@botlist}%

703 ⟨∗trace⟩

704  \tr@ce{(mid+bot)list: \@midlist, \@botlist:
705  (addtotoporbot-before)}%

706 ⟨/trace⟩

707  \if@test

708 ⟨∗trace⟩

709  \tr@ce{type already on list: mid or bot---sent to addtobot}%

710 ⟨/trace⟩

711  \else
712  \@flupdates \@topnum \@toproom \@toplist

713 ⟨∗trace⟩

714  \tr@ce{colroom (after-top) = \the \@colroom}%
715  \tr@ce{colnum (after-top) = \the \@colnum}%
716  \tr@ce{topnum (after-top) = \the \@topnum}%
717  \tr@ce{***Success: top}%

718 ⟨/trace⟩

719  \@inserttrue
720  \fi
721  \fi

722 ⟨∗trace⟩

723  \else
724  \tr@ce{Fail: topnum = \the \@topnum: fpstype
725  \the \@fpstype=ORD?}%
726  \ifnum \@fpstype<\sixt@@n
727  \tr@ce{ERROR: !t float not successful (addtotoporbot)}%
728  \fi

729 ⟨/trace⟩

730  \fi
731 \fi
732 \if@insert
733 \else

734 ⟨∗trace⟩

735  \tr@ce{sent to addtobot (addtotoporbot)}%

736 ⟨/trace⟩

737  \@addtobot
738 \fi

739 } 740 ⟨/2ekernel | autoload | fltrace⟩

\@addtocurcol Lots of changes.

741 ⟨∗2ekernel | autoload | fltrace | flafter⟩

742 \def \@addtocurcol {%

743 ⟨∗trace⟩

744 \tr@ce{***Start addtocurcol}%

745 ⟨/trace⟩

746 \@insertfalse

747 \@setfloattypecounts
748 \ifnum \@fpstype=8

749 ⟨∗trace⟩

750  \tr@ce{fpstype !p only (addtocurcol): \the \@fpstype = 8?}%

751 ⟨/trace⟩

752 \else
753  \ifnum \@fpstype=24

754 ⟨∗trace⟩

755  \tr@ce{fpstype p only (addtocurcol): \the \@fpstype = 24?}%

756 ⟨/trace⟩

757  \else
758  \@flsettextmin

This is a new adjustment which is quite a major change in functionality; but it implements the documentation. Note that \@reqcolroom will include the whole of the page-so-far, and hence includes \@textfloatsheight of floats, so before comparing it with \@textmin, we add this to \@textmin also.

759 ⟨∗trace⟩

760  \tr@ce{textfloatsheight (before) = \the \@textfloatsheight}%

761 ⟨/trace⟩

762  \advance \@textmin \@textfloatsheight
763  \@reqcolroom \@pageht

This line must be removed since \@specialoutput changed.

764 %       \advance \@reqcolroom \@pagedp

765 ⟨∗trace⟩

766  \tr@ce{textmin + textfloatsheight: \the \@textmin}%
767  \tr@ce{page-so-far: \the \@reqcolroom}%

768 ⟨/trace⟩

769  \ifdim \@textmin>\@reqcolroom
770  \@reqcolroom \@textmin

771 ⟨∗trace⟩

772  \tr@ce{ORD? textmin being used}%

773 ⟨/trace⟩

774  \fi
775  \advance \@reqcolroom \ht\@currbox

776 ⟨∗trace⟩

777  \tr@ce{float size = \the \ht \@currbox (addtocurcol)}%
778  \tr@ce{colroom = \the \@colroom (addtocurcol)}%
779  \tr@ce{reqcolroom = \the \@reqcolroom (addtocurcol)}%

780 ⟨/trace⟩

781  \ifdim \@colroom>\@reqcolroom
782  \@flsetnum \@colnum
783  \ifnum \@colnum>\z@
784  \@bitor\@currtype\@deferlist

785 ⟨∗trace⟩

786  \tr@ce{deferlist: \@deferlist: (addtocurcol-before)}%

787 ⟨/trace⟩

788  \if@test

789 ⟨∗trace⟩

790  \tr@ce{type already on list: defer (addtocurcol)}%

791 ⟨/trace⟩

792  \else
793  \@bitor\@currtype\@botlist

794 ⟨∗trace⟩

795  \tr@ce{botlist: \@botlist: (addtocurcol-before)}%

796 ⟨/trace⟩

797  \if@test

798 ⟨∗trace⟩

799  \tr@ce{type already on list: bot---sent to addtobot}%

800 ⟨/trace⟩

801  \@addtobot
802  \else

803 ⟨∗trace⟩

804  \tr@ce{fpstype \ifodd \@tempcnta OK \else not \fi
805  here: \the \@fpstype}%

806 ⟨/trace⟩

807  \ifodd \count\@currbox
808  \advance \@reqcolroom \intextsep
809  \ifdim \@colroom>\@reqcolroom
810  \global \advance \@colnum \m@ne
811  \global \advance \@textfloatsheight \ht\@currbox

This may sometimes give an overestimate.

812  \global \advance \@textfloatsheight 2\intextsep
813  \@cons \@midlist \@currbox

814 ⟨∗trace⟩

815  \tr@ce{***Success: here}%
816  \tr@ce{textfloatsheight (after-here) =
817  \the \@textfloatsheight}%
818  \tr@ce{colnum (after-here) = \the \@colnum}%

819 ⟨/trace⟩

    CHANGE TO \@addtocurcol:
    \penalty\z@ changed to \penalty\interlinepenalty so \samepage works

properly with figure and table environments. (Changed 23 Oct 86)

    There is also an \addpenalty\interlinepenalty above.

Since in 2e \samepage is no longer supported, these could be removed.

Although it is best to use \addvspace in case two h floats come together, this makes other spacing more difficult to adjust; whereas if a user specifies two h floats together then they can more easily get the spacing correct by ad hoc commands.

It is necessary to adjust for the addition of \parskip here in case the float is added betweeen paragraphs (i.e. when in vertical mode).

Typesetting starts here.

820  \if@nobreak
821  \else
822  \addpenalty \interlinepenalty
823  \fi
824  \vskip \intextsep
825  \box\@currbox
826  \penalty\interlinepenalty
827  \vskip\intextsep
828  \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi

Typesetting ends here.

829  \outputpenalty \z@
830  \@inserttrue

831 ⟨∗trace⟩

832  \else

833  \tr@ce{Fail---no room at 2nd test of colroom
834  (addtocorcol \string\intextsep)}%

835 ⟨/trace⟩

836  \fi
837  \fi
838  \if@insert
839  \else

840 ⟨∗2ekernel | autoload | fltrace⟩ 841 ⟨∗trace⟩

842  \tr@ce{not here: sent to addtotoporbot}%

843 ⟨/trace⟩

844  \@addtotoporbot

845 ⟨/2ekernel | autoload | fltrace⟩ 846 ⟨∗!2ekernel&!autoload&!fltrace⟩ 847 ⟨∗trace⟩

848  \tr@ce{not here: sent to addtobot}%

849 ⟨/trace⟩

850  \@addtobot

851 ⟨/!2ekernel&!autoload&!fltrace⟩

852  \fi
853  \fi
854  \fi

855 ⟨∗trace⟩

856  \else
857  \tr@ce{Fail: colnum = \the \@colnum:
858  fpstype \the \@fpstype=ORD?}%
859  \ifnum \@fpstype<\sixt@@n
860  \tr@ce{ERROR: BANG float not successful (addtocurcol)}%
861  \fi

862 ⟨/trace⟩

863  \fi

864 ⟨∗trace⟩

865  \else
866  \tr@ce{Fail---no room: fl box ht: \the \ht \@currbox
867  (addtocurcol)}%

868 ⟨/trace⟩

869  \fi
870  \fi
871 \fi
872 \if@insert
873 \else
874  \@resethfps

875 ⟨∗trace⟩

876  \tr@ce{put on deferlist (addtocurcol)}%

877 ⟨/trace⟩

878  \@cons\@deferlist\@currbox

879 ⟨∗trace⟩

880  \tr@ce{deferlist: \@deferlist: (addtocurcol-after)}%

881 ⟨/trace⟩

882 \fi

883 } 884 ⟨/2ekernel | autoload | fltrace | flafter⟩

\@addtonextcol Lots of changes.

885 ⟨∗2ekernel | autoload | fltrace⟩

886 \def\@addtonextcol{%
887 \begingroup

888 ⟨∗trace⟩

889 \tr@ce{***Start addtonextcol}%

890 ⟨/trace⟩

891 \@insertfalse
892 \@setfloattypecounts
893 \ifnum \@fpstype=8

894 ⟨∗trace⟩

895  \tr@ce{fpstype not curcol: \the \@fpstype = 8?}%

896 ⟨/trace⟩

897 \else
898  \ifnum \@fpstype=24

899 ⟨∗trace⟩

900  \tr@ce{fpstype not curcol: \the \@fpstype = 24?}%

901 ⟨/trace⟩

902  \else
903  \@flsettextmin

904 ⟨∗trace⟩

905  \tr@ce{text-so-far: 0pt (top of col)}%

906 ⟨/trace⟩

907  \@reqcolroom \ht\@currbox

908 ⟨∗trace⟩

909  \tr@ce{float size: \the \@reqcolroom (addtonextcol)}%

910 ⟨/trace⟩

911  \advance \@reqcolroom \@textmin

912 ⟨∗trace⟩

913  \tr@ce{colroom = \the \@colroom (addtonextcol)}%
914  \tr@ce{reqcolroom = \the \@reqcolroom (addtonextcol)}%

915 ⟨/trace⟩

916  \ifdim \@colroom>\@reqcolroom
917  \@flsetnum \@colnum
918  \ifnum\@colnum>\z@
919  \@bitor\@currtype\@deferlist

920 ⟨∗trace⟩

921  \tr@ce{deferlist: \@deferlist: (addtonextcol-before)}%

922 ⟨/trace⟩

923  \if@test

924 ⟨∗trace⟩

925  \tr@ce{type already on list: defer (addtonextcol)}%

926 ⟨/trace⟩

927  \else

928 ⟨∗trace⟩

929  \tr@ce{sent to addtotoporbot (addtonextcol)}%

930 ⟨/trace⟩

931  \@addtotoporbot
932  \fi
933  \fi

934 ⟨∗trace⟩

935  \else
936  \tr@ce{Fail---no room: fl box ht: \the \ht \@currbox
937  (addtonextcol)}%

938 ⟨/trace⟩

939  \fi
940  \fi
941 \fi
942 \if@insert
943 \else

944 ⟨∗trace⟩

945  \tr@ce{put back on deferlist (addtonextcol)}%

946 ⟨/trace⟩

947  \@cons\@deferlist\@currbox

948 ⟨∗trace⟩

949  \tr@ce{deferlist: \@deferlist: (addtonextcol-after)}%

950 ⟨/trace⟩

951 \fi

952 ⟨∗trace⟩

953 \tr@ce{End of addtonextcol -- locally counts:}%
954 \tr@ce{ col: \the \@colnum. top: \the \@topnum. bot: \the \@botnum.}%

955 ⟨/trace⟩

956 \endgroup

957 ⟨∗trace⟩

958 \tr@ce{End of addtonextcol -- globally counts:}%
959 \tr@ce{col: \the \@colnum. top: \the \@topnum. bot: \the \@botnum.}%

960 ⟨/trace⟩ 961 }

\@addtodblcol Lots of changes.

962 \def\@addtodblcol{%
963 \begingroup

964 ⟨∗trace⟩

965 \tr@ce{***Start addtodblcol}%

966 ⟨/trace⟩

967 \@insertfalse
968 \@setfloattypecounts
969 \@getfpsbit \tw@

970 ⟨∗trace⟩

971 \tr@ce{fpstype \ifodd \@tempcnta OK \else not \fi dbltop:
972  \the \@fpstype}%

973 ⟨/trace⟩

974 \ifodd\@tempcnta
975  \@flsetnum \@dbltopnum
976  \ifnum \@dbltopnum>\z@
977  \@tempswafalse
978  \ifdim \@dbltoproom>\ht\@currbox
979  \@tempswatrue

980 ⟨∗trace⟩

981  \tr@ce{Space OK: \@dbltoproom =
982  \the \@dbltoproom > \the \ht \@currbox
983  (dbltoproom)}%

984 ⟨/trace⟩

985  \else

986 ⟨∗trace⟩

987  \tr@ce{fpstype: \the \@fpstype (addtodblcol)}%

988 ⟨/trace⟩

989  \ifnum \@fpstype<\sixt@@n

990 ⟨∗trace⟩

 991  \tr@ce{BANG float ignoring \@dbltoproom}%
 992  \tr@ce{\@spaces \@dbltoproom = \the \@dbltoproom.
 993  Ht float: \the \ht \@currbox-BANG}%

994 ⟨/trace⟩

Need to check that there is room on the page, using the local value of \@textmin to make the necessary adjustment to \@dbltoproom.

 995  \advance \@dbltoproom \@textmin

996 ⟨∗trace⟩

 997  \tr@ce{Local value of texmin: \the\@textmin}%
 998  \tr@ce{\@spaces space on page = \the \@dbltoproom.
 999  Ht float: \the \ht \@currbox-BANG}%

1000 ⟨/trace⟩

1001  \ifdim \@dbltoproom>\ht\@currbox
1002  \@tempswatrue

1003 ⟨∗trace⟩

1004  \tr@ce{Space OK BANG: space on page = \the \@dbltoproom >
1005  \the \ht \@currbox}%
1006  \else
1007  \tr@ce{fpstype: \the \@fpstype}%
1008  \tr@ce{Fail---no room dbltoproom-BANG?:}%
1009  \tr@ce{\@spaces space on page = \the \@dbltoproom.
1010  Ht float: \the \ht \@currbox}%

1011 ⟨/trace⟩ 1012 \fi

1013  \advance \@dbltoproom -\@textmin

1014 ⟨∗trace⟩

1015  \else
1016  \tr@ce{fpstype: \the \@fpstype}%
1017  \tr@ce{Fail---no room dbltoproom-ORD?:}%
1018  \tr@ce{\@spaces \@dbltoproom = \the \@dbltoproom.
1019  Ht float: \the \ht \@currbox}%

1020 ⟨/trace⟩ 1021 \fi 1022 \fi

1023  \if@tempswa
1024  \@bitor \@currtype \@dbldeferlist

1025 ⟨∗trace⟩

1026  \tr@ce{dbldeferlist: \@dbldeferlist: (before)}%

1027 ⟨/trace⟩

1028  \if@test

1029 ⟨∗trace⟩

1030  \tr@ce{type already on list: dbldefer}%

1031 ⟨/trace⟩

1032  \else
1033  \@tempdima -\ht\@currbox
1034  \advance\@tempdima
1035  -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
1036  \dblfloatsep \fi
1037  \global \advance \@dbltoproom \@tempdima
1038  \global \advance \@colht \@tempdima
1039  \global \advance \@dbltopnum \m@ne
1040  \@cons \@dbltoplist \@currbox

1041 ⟨∗trace⟩

1042  \tr@ce{dbltopnum (after) = \the \@dbltopnum}%
1043  \tr@ce{***Success: dbltop}%

1044 ⟨/trace⟩

1045  \@inserttrue

1046 \fi 1047 \fi 1048 ⟨∗trace⟩

1049  \else
1050  \tr@ce{Fail: dbltopnum = \the \@dbltopnum: fpstype
1051  \the \@fpstype=ORD?}%
1052  \ifnum \@fpstype<\sixt@@n
1053  \tr@ce{ERROR: !t float not successful (addtodblcol)}%

1054 \fi 1055 ⟨/trace⟩ 1056 \fi 1057 \fi

1058 \if@insert
1059 \else

1060 ⟨∗trace⟩

1061  \tr@ce{put on dbldeferlist}%

1062 ⟨/trace⟩

1063  \@cons\@dbldeferlist\@currbox

1064 ⟨∗trace⟩

1065  \tr@ce{dbldeferlist: \@dbldeferlist: (after)}%

1066 ⟨/trace⟩ 1067 \fi 1068 ⟨∗trace⟩

1069 \tr@ce{End of addtodblcol -- locally count:}%
1070 \tr@ce{ dbltop: \the \@dbltopnum.}%

1071 ⟨/trace⟩

1072 \endgroup

1073 ⟨∗trace⟩

1074 \tr@ce{End of addtodblcol -- globally count:}%
1075 \tr@ce{dbltop: \the \@dbltopnum.}%

1076 ⟨/trace⟩ 1077 } 1078 ⟨/2ekernel | autoload | fltrace⟩

\@addmarginpar

1079 ⟨∗2ekernel | autoload⟩

1080 \def\@addmarginpar{\@next\@marbox\@currlist{\@cons\@freelist\@marbox
1081  \@cons\@freelist\@currbox}\@latexbug\@tempcnta\@ne
1082  \if@twocolumn
1083  \if@firstcolumn \@tempcnta\m@ne \fi
1084  \else
1085  \if@mparswitch
1086  \ifodd\c@page \else\@tempcnta\m@ne \fi

1087 \fi

1088  \if@reversemargin \@tempcnta -\@tempcnta \fi

1089 \fi

1090  \ifnum\@tempcnta <\z@  \global\setbox\@marbox\box\@currbox \fi
1091  \@tempdima\@mparbottom
1092  \advance\@tempdima -\@pageht
1093  \advance\@tempdima\ht\@marbox

1094  \ifdim\@tempdima >\z@
1095  \@latex@warning@no@line {Marginpar on page \thepage\space moved}%
1096  \else
1097  \@tempdima\z@

1098 \fi

1099  \global\@mparbottom\@pageht
1100  \global\advance\@mparbottom\@tempdima
1101  \global\advance\@mparbottom\dp\@marbox
1102  \global\advance\@mparbottom\marginparpush
1103  \advance\@tempdima -\ht\@marbox

Putting box movement inside the ‘marbox’:

1104  \global\setbox \@marbox
1105  \vbox {\vskip \@tempdima
1106  \box \@marbox}%
1107  \global \ht\@marbox \z@
1108  \global \dp\@marbox \z@

Sticking (rather than gluing:-) the ‘marbox’ to the line above, changed vskip to kern:

1109  \kern -\@pagedp
1110  \nointerlineskip
1111  \hb@xt@\columnwidth
1112  {\ifnum \@tempcnta >\z@
1113  \hskip\columnwidth \hskip\marginparsep
1114  \else
1115  \hskip -\marginparsep \hskip -\marginparwidth

1116 \fi

1117  \box\@marbox \hss}%

For this reason the following code can vanish:

      \nobreak             %% No longer needed.  CAR92/12
      \vskip -\@tempdima   %% No longer needed.  CAR92/12
1118  \nointerlineskip
1119  \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}}

1120 ⟨/2ekernel | autoload⟩

64.1.1 Kludgeins

This part of the file is part of the implementation of the following two new commands for L^{A}TEX2e.

   \enlargethispage{<dim>}

Adds <dim> to the height of the current column only. On the printed page the bottom of this column is extended downwards by exactly <dim> without having any effect on the placement of the footer; this may result in an overprinting.

   \enlargethispage*{<dim>}

Similar to \enlargethispage but it tries to squeeze the column to be printed in as small a space as possible, ie it uses any shrinkability in the column. If the column was not explicitly broken (e.g. with \pagebreak) this may result in an overfull box message but execpt for this it will come out as expected (if you know what to expect).

The star form of this command is dedicated to Leslie Lamport, the other we need for ourselves (FMi, CAR).

\@kludgeins The insert which makes TEX do a lot of the necessary work. All we need to put into it is the amount by which the pagegoal should be changed.

1121 ⟨∗2ekernel | def1⟩

1122 \newinsert \@kludgeins
1123 \global\dimen\@kludgeins \maxdimen
1124 \global\count\@kludgeins 1000

1125 ⟨/2ekernel | def1⟩

\enlargethispage \enlargethispage* The user command.

1126 ⟨∗2ekernel | def1⟩

1127 \gdef \enlargethispage {%
1128 \@ifstar

1129 {% 1130 ⟨∗trace⟩

1131  \tr@ce{Enlarging page height * }%

1132 ⟨/trace⟩

1133  \@enlargepage{\hbox{\kern\p@}}}%

1134 {% 1135 ⟨∗trace⟩

1136  \tr@ce{Enlarging page height exactly---}%

1137 ⟨/trace⟩

1138  \@enlargepage\@empty}%

1139 } 1140 ⟨/2ekernel | def1⟩ 1141 ⟨∗autoload⟩

1142 \def\enlargethispage{\@autoload{out1}\enlargethispage}

1143 ⟨/autoload⟩

\@enlargepage This actually inserts the insert, after checking for extreme values of the change.

1144 ⟨∗2ekernel | def1⟩

1145 \gdef\@enlargepage#1#2{%

1146 ⟨∗trace⟩

1147 \tr@ce{\@spaces\@spaces by #2}%

1148 ⟨/trace⟩

1149 \@tempskipa#2\relax
1150 \ifdim \@tempskipa>.5\maxdimen
1151  \@latexerr{Suggested\space extra\space height\space
1152  (\the\@tempskipa)\space dangerously\space
1153  large}\@eha
1154 \else
1155  \ifdim \vsize<.5\maxdimen

1156 ⟨∗trace⟩

1157  \tr@ce {Kludgeins added--pagegoal before: \the\pagegoal}%

1158 ⟨/trace⟩

1159  \@bsphack
1160  \insert\@kludgeins{#1\vskip-\@tempskipa}%
1161  \@esphack

This next bit is for tracing only:

1162 ⟨∗trace⟩

1163  \ifvmode \par
1164  \tr@ce {Kludgeins added--pagegoal after: \the \pagegoal}%

1165 \fi 1166 ⟨/trace⟩

1167  \else
1168  \@latexerr{Page\space height\space already\space
1169  too\space large}\@eha

1170 \fi 1171 \fi 1172 } 1173 ⟨/2ekernel | def1⟩

64.1.2 Float control

This part implements controllable floats and other changes to the float mechanism.

It provides, at the doument level, the following command for inclusion in L^{A}TEX2e.

     \suppressfloats

This suppresses all further floats on the current page.

With an optional argument it suppresses only floats only in certain positions on the current page.

[t] suppresses only floats at the top of the page [b] suppresses only floats at the bottom of the page

It also enables the use of an extra specifier, !, in the location optional argument of a float. If this is present then, just for this particular float, whenever it is processed by the float mechanism the followinhg are ignored:

• all restrictions on the number of floats which can appear;

• all explicit restrictions on the amount of space which should (not) be occupied by floats and/or text.

The mechanism will still attempt to ensure that pages are not overfull.

These specifiers override, for the single float, the suppression commands described above.

In its current form, it also suplies a reasonably exhaustive, and somewhat baroque, means of tracing some aspects of the float mechanism.

More tracing.

\tr@ce \notrace \tracefloats \@traceval \tracefloatvals \@tracemessage Set-up tracing for floats independent of other tracing as it produces mega-output. Default is no tracing.

1174 ⟨∗trace⟩

1175 \def \@tracemessage #1{\typeout{LaTeX2e: #1}}
1176 \def \tracefloats{\let \tr@ce \@tracemessage}
1177 \def \notrace {\let \tr@ce \@gobble}
1178 \notrace

1179 \def \@traceval #1{\tr@ce{\string #1 = \the #1}}
1180 \def \tracefloatvals{%
1181 \@dblfloatplacement
1182 \@floatplacement
1183 \@traceval\@colnum
1184 \@traceval\@colroom
1185 \@traceval\@topnum
1186 \@traceval\@toproom
1187 \@traceval\@botnum
1188 \@traceval\@botroom
1189 \@traceval\@fpmin
1190 \tr@ce{\string\textfraction = \textfraction}%
1191 \@traceval\@dbltopnum
1192 \@traceval\@dbltoproom

1193 } 1194 ⟨/trace⟩ 1195 ⟨∗flafter⟩

1196 \providecommand\tr@ce[1]{}

1197 ⟨/flafter⟩

\suppressfloats \@flstop Float suppression commands: these set the relevant counter globally to zero. Thus they are overridden for a particular float by an ! specifier.

1198 ⟨∗2ekernel | autoload⟩

1199 \def \suppressfloats {%
1200 \@ifnextchar [%
1201  \@flstop
1202  {\global \@colnum \z@}%

1203 }

Maybe this should be a loop over #1?

1204 \def \@flstop [#1]{%
1205 \if t#1%
1206  \global \@topnum \z@

1207 \fi

1208 \if b#1%
1209  \global \@botnum \z@

1210 \fi 1211 }

Manipulation of float placement and type; both their strings and the corresponding count registers.

\@fpstype \@reqcolroom \@textfloatsheight First a new count register to go with \@currtype.

Then a new skip register, for information needed to remove the \@maxsep conservatism: it is possible that this could use a temporary register.

Finally a dimension register to hold the total height of in-text floats on the current page. This is needed to implement a major change in the functionality of \@addtocurcol which is, nevertheless, a bug fix. It is not local and therefore cannot be a temporary register.

1212 \newcount \@fpstype
1213 \newdimen \@reqcolroom
1214 \newdimen \@textfloatsheight

1215 ⟨/2ekernel | autoload⟩

\@fpsadddefault Adds the default placement to what is already there. Should not need to change this, but could do it as follows:

  \def \@fpsadddefault {%
     \@temptokena \expandafter\expandafter\expandafter
                  {\csname fps@\@captype \endcsname}%
     \edef \reserved@a {\the\@temptokena}%
     \@onelevel@sanitize \reserved@a
     \edef \@fps {\@fps\reserved@a}%
  }

1216 ⟨∗2ekernel | autoload | fltrace⟩

1217 \def \@fpsadddefault {%

1218 ⟨∗trace⟩

1219 \tr@ce{fps changed from: \@fps}%

1220 ⟨/trace⟩

1221 \edef \@fps {\@fps\csname fps@\@captype \endcsname}%
1222 \@latex@warning {%
1223  No positions in optional float specifier.\MessageBreak
1224  Default added (so using `\@fps')}%

1225 }

\@setfloattypecounts Sets counters \@fpstype and \@currtype.
    BANG == bit4 of \count\@currbox = 0.
1226 \def \@setfloattypecounts {%
1227 \@currtype \count\@currbox
1228 \@fpstype \count\@currbox
1229 \divide\@currtype\@xxxii \multiply\@currtype\@xxxii
1230 \advance \@fpstype -\@currtype

1231 ⟨∗trace⟩

1232 \tr@ce{(mod 32) fpstype: \the \@fpstype}%
1233 \tr@ce{(mult of 32) currtype: \the \@currtype}%
1234 % Tracing only: but some should be changed into real errors/warnings?
1235 \ifnum \@fpstype<\sixt@@n
1236  \ifnum \@fpstype=\z@
1237  \tr@ce{ERROR: no PLACEMENT, fpstype = \the \@fpstype = 0?}%

1238 \fi

1239  \ifnum \@fpstype=\@ne
1240  \tr@ce{WARNING: only h, fpstype = \the \@fpstype = 1?}%

1241 \fi

1242  \tr@ce{BANG float}%
1243 \else
1244  \ifnum \@fpstype=\sixt@@n
1245  \tr@ce{ERROR: no PLACEMENT, fpstype = \the \@fpstype = 16?}%

1246 \fi

1247  \ifnum \@fpstype=17
1248  \tr@ce{WARNING: only h, fpstype = \the \@fpstype = 17?}%

1249 \fi

1250  \tr@ce{ORD float}%

1251 \fi 1252 ⟨/trace⟩ 1253 } 1254 ⟨/2ekernel | autoload | fltrace⟩

Macros for getting, testing and setting bits of the fps.

\@getfpsbit Sets \@tempcnta to required bit of \count\@currbox.

1255 ⟨∗2ekernel | autoload⟩

1256 \def \@getfpsbit {%
1257 \@boxfpsbit \@currbox

1258 }

\@boxfpsbit Used above.
1259 \def \@boxfpsbit #1#2{%
1260 \@tempcnta \count#1%
1261 \divide \@tempcnta #2\relax

1262 }

\@testfp New definition of the float page test.

1263 \def \@testfp #1{%
1264 \@boxfpsbit #18\relax % Really `#1 8' for human readers!
1265 \ifodd \@tempcnta
1266 \else
1267  \global \@testtrue

1268 \fi 1269 }

\@setfpsbit Sets required bit of \@tempcnta (to 1).

1270 \def \@setfpsbit #1{%
1271 \@tempcntb \@tempcnta
1272 \divide \@tempcntb #1\relax
1273 \ifodd \@tempcntb
1274 \else
1275  \advance \@tempcnta #1\relax

1276 \fi 1277 } 1278 ⟨/2ekernel | autoload⟩

\@resethfps Globally adds t as a possible location for an h or !h only placement: this must be

done using the count.

Although it will leave \@fpstype set to 17 even if it was originally 1, this does not matter since it is the last thing in \@addtocurcol.

1279 ⟨∗2ekernel | autoload | fltrace⟩

1280 \def \@resethfps {%
1281 \let\reserved@a\@empty
1282 \ifnum \@fpstype=\@ne
1283  \def \reserved@a {!}%
1284  \@fpstype 17

1285 \fi

1286 \ifnum \@fpstype=17
1287  \global \advance \count\@currbox \tw@
1288  \@latex@warning@no@line {%
1289  `\reserved@a h' float specifier changed to `\reserved@a ht'}%

1290 ⟨∗trace⟩

1291  \tr@ce{%
1292  `t' added to `\reserved@a h'- new Count: \the \count\@currbox}%

1293 ⟨/trace⟩ 1294 \fi 1295 }

Special stuff for BANG floats.

\@flsetnum Ignores any zero float counter value in case BANG.

It uses a local assignment to the normally global counter: a bit naughty, perhaps?

These assgnments are safe so long as the counter involved is only consulted once (i.e. only for the ‘bang float’) with the changed value. This is the case within \@addtocurcol because it is used only once within a call of the output routine (which forms a group).

For \@addtonextcol this is achieved by putting a group around its code; this is needed because it is called (by \@startcolumn) for each float which was on the deferlist. Almost identical considerations pertain to \@addtodblcol. There may be more efficient ways to handle this, but the group seems to be the simplest.

1296 \def \@flsetnum #1{%

1297 ⟨∗trace⟩

1298 \tr@ce{fpstype: \the \@fpstype (flsetnum \string#1)}%

1299 ⟨/trace⟩

1300 \ifnum \@fpstype<\sixt@@n
1301  \ifnum #1=\z@

1302 ⟨∗trace⟩

1303  \tr@ce{BANG float resetting \string#1 to 1}%

1304 ⟨/trace⟩

1305  #1\@ne

1306 \fi 1307 \fi 1308 ⟨∗trace⟩

1309 \tr@ce{#1 (before) = \the #1}%

1310 ⟨/trace⟩ 1311 }

\@flsettextmin This ignores \textfraction space restriction in case BANG.

1312 \def \@flsettextmin {%

1313 ⟨∗trace⟩

1314 \tr@ce{fpstype: \the \@fpstype (flsettextmin)}%

1315 ⟨/trace⟩

1316 \ifnum \@fpstype<\sixt@@n

1317 ⟨∗trace⟩

1318  \tr@ce{BANG ignoring textmin}%

1319 ⟨/trace⟩

1320  \@textmin \z@
1321 \else
1322  \@textmin \textfraction\@colht

1323 ⟨∗trace⟩

1324  \tr@ce{ORD textmin = \the \@textmin}%

1325 ⟨/trace⟩ 1326 \fi 1327 }

\@flcheckspace This ignores space restriction in case BANG; this is still slightly conervative since it does not allow for the fact that, if there is no text in the column then \textfloatsep is not needed. Sets @tempswa true if there is room for \@currbox.

1328 \def \@flcheckspace #1#2{%
1329 \advance \@reqcolroom
1330  \ifx #2\@empty \textfloatsep \else \floatsep \fi

1331 ⟨∗trace⟩

1332 \tr@ce{colroom = \the \@colroom (flcheckspace \string#1 \string#2)}%
1333 \tr@ce{reqcolroom = \the \@reqcolroom
1334  (flcheckspace \string#1 \string#2)}%

1335 ⟨/trace⟩

1336 \ifdim \@colroom>\@reqcolroom
1337  \ifdim #1>\ht\@currbox
1338  \@tempswatrue

1339 ⟨∗trace⟩

1340  \tr@ce{Space OK: #1 = \the #1 > \the \ht \@currbox
1341  (flcheckspace \string#1 \string#2)}%

1342 ⟨/trace⟩

1343  \else

1344 ⟨∗trace⟩

1345  \tr@ce{fpstype: \the \@fpstype
1346  (flcheckspace \string#1 \string#2)}%

1347 ⟨/trace⟩

1348  \ifnum \@fpstype<\sixt@@n

1349 ⟨∗trace⟩

1350  \tr@ce{BANG float ignoring #1
1351  (flcheckspace \string#1 \string#2):}%
1352  \tr@ce{\@spaces #1 = \the #1.  Ht float: \the \ht \@currbox
1353  BANG}%

1354 ⟨/trace⟩

1355  \@tempswatrue

1356 ⟨∗trace⟩

1357  \else
1358  \tr@ce{Fail---no room (flcheckspace \string#1 \string#2)
1359  (fpstype \the \@fpstype=ORD?):}%
1360  \tr@ce{\@spaces #1 = \the #1.  Ht float: \the \ht \@currbox
1361  ORD?}%

1362 ⟨/trace⟩ 1363 \fi 1364 \fi 1365 ⟨∗trace⟩

1366 \else
1367  \tr@ce{Fail---no room at 2nd test of colroom
1368  (flcheckspace \string#1 \string#2)}%

1369 ⟨/trace⟩ 1370 \fi 1371 } 1372 ⟨/2ekernel | autoload | fltrace⟩

\@flupdates This updates everything when a float is placed.

1373 ⟨∗2ekernel | autoload⟩

1374 \def \@flupdates #1#2#3{%
1375 \global \advance #1\m@ne

1376 \global \advance \@colnum \m@ne
1377 \@tempdima -\ht\@currbox
1378 \advance \@tempdima
1379  -\ifx #3\@empty \textfloatsep \else \floatsep \fi
1380 \global \advance #2\@tempdima
1381 \global \advance \@colroom \@tempdima
1382 \@cons #3\@currbox

1383 } 1384 ⟨/2ekernel | autoload⟩

Interesting facts about float mechanisms past and present, together with a summary of various features, some unresolved:

1. The value \textfraction does not affect the processing of doublecol floats: this seems sensible, but should be documented.

2. \twocolumn floatplacement was wrong: dbl not needed, ord needed.

3. \@floatplacement was not called after \@startdblcol or \@topnewpage.

This has been changed; it is clearly a bug fix.

4. The use \@topnewpage when \dblfigrule is non-trivial produced a rule in the wrong place. This has been fixed by not using \dblfigrule when processing the ‘float’ from \@topnewpage.

5. If the specifier was just h and the float could not be put here, it went on the deferlist and stayed there until a clearpage. It now gets changed to a ‘th’: this is only an error-recovery action, putting just h or !h should be deprecated.

6. \@dblmaxsep was ‘the maximum of \dblfloatsep and \dbltexfloatsep’.

But it was never used! Now gone completely, like \@maxsep.

7. After an h float is put on a page, it was counted as text when applying the \textfraction test; this is possibly too big a change although it is a bug fix?

8. Two consecutive h floats are separated by twice \intextsep: this could be changed to one by use of \addvspace, OK? Note that it would also mean that less space is put in if an h float immediaiely follows other spaces. This is also possibly too big a change, at least for compatibility mode? Or it may be simply wrong! It has not been changed.

9. Now \@addtocurcol checks first for just p fps. I think that this is an increase in efficiency, but maybe the coding should be made even more efficient.

10. \@tryfcolumn now tests if the list is empty first, otherwise lots of wasted time! Thus this test has been removed from \@startcolumn. As Frank pointed out, this makes \@startcolumn less efficient. But it is now the same as \@startdblcolumn: I can see no reason why they should be different, but which is best?

11. Why is \@colroom set in \@doclearpage?

12. Footnotes. Check what \clearpage does when footnotes are left over. Footnotes are not put on float pages and, also, \@addtonextcol ignores the existence of held-over footnotes in deciding what floats can go on the page. Not changed.

13. \clearpage can still lose non-boxes, at least when floats are involved. It also moves some to the ‘wrong page’, but this may be a coding problem.

14. The ! option makes it necessary to check in \output that there is enough room left on the page after adding a float. (This would have been necessary anyway if anyone set \@textmin too close to zero! A similar danger existed also if the text in a \twocolumn[text] entity gets too large.) The current implementation of this also makes the normal case a little less efficient, OK? Not enough room means, at present, less than \baselineskip, with a warning: is this OK? Should it be made generic (another parameter)?

15. There are four possibilities for supporting this:

\twocolumn[\maketitle more text]

One is to change \maketitle slightly to allow this. Another is to change \@topnewpage so that more than one \twocolumn[] command is allowed; in this case \maketitle\twoclumn[more text] will work. The former is more robust from the user’s viewpoint, but makes the code for \maketitle rather ad hoc (maybe it is already?). Another is to misuse the global twocolumn flag locally within \@topnewpage. Yet another is to move the column count register from the multicol package into the kernel. This has beeen done.

16. Where should the reinserts be put to maximise the probability that footmotes come out on the correct page? Or should we go for as much comaptibility as psossible (but see next item)?

17. Should we continue to support (as much as possible) \samepage? Some of its intended functionality is now advertised as being provided by \enlargethispage. Use of either is likely to result in wrongly placed footnotes, marginals, etc. Which should have priority: obeying the pagination instructions, or correct placement of notes/marginalia?

18. Is the adjustment of space to cause shrinking in the kludge-* case correct? Should it be limited to 0pt?

19. Is the setting of \boxmaxdepth in makecol and friends needed? It only has any effect if \@textbottom ends with a box or rule, in which case the vskip to allow for its depth should also be added. If it is kept, it should probably be the last thing in the box. It has now been removed.

It would perhaps be better to document that \@textbottom and \@texttop must have natural height 0pt.

20. I cannot see why the vskip adjustement for the depth is needed if boxmaxdepth is used to ensure that there is never a too deep box.

21. The value of \boxmaxdepth should be explicitly set whenever necessary: it is too risky to assume that it has any particular value. Care is needed in deciding what to set it to.

It is interesting to note that the value of \boxmaxdepth is unique in being read before the local settings for the box group are reset; all other parameter settings which affect the box construction use their values outside the box group.

22. Should \@maxdepth store the setting of \maxdepth from lplain? Or should we provide a proper interface to class files for setting these?

An analysis of various other macros. \@opcol should do \@floatplacement, but where? Right at the end, since it

always occurs at the start of a column.

\def\@opcol{%
% Why is this done first?
\global \@mparbottom \z@
\if@twocolumn
\@outputdblcol
\else
\@outputpage
% This is not needed since it is done at the end of
%   |\@outputpage|:
\global \@colht \textheight
\fi}

Only tracing has been added to these.

1385 ⟨∗2ekernel | autoload | fltrace⟩

1386 \def\@makefcolumn #1{%
1387 \begingroup
1388  \@fpmin \z@
1389  \let \@testfp \@gobble
1390  \@tryfcolumn #1%
1391 \endgroup

1392 ⟨∗trace⟩

1393 \if@fcolmade
1394  \tr@ce{PAGE: in \string\clearpage \if@twocolumn ---twocolumn\fi---}%
1395  \tr@ce{----- float column/page completed from \string#1}%

1396 \fi 1397 ⟨/trace⟩ 1398 }

This will line up the last baselines in the two columns provided they are constructed in the normal way: i.e. ending in a skip of minus the original depth, with \@textbottom adding nothing.

Thus again it is essential for \@textbottom to have depth 0pt.

1399 \def\@outputdblcol{%
1400 \if@firstcolumn
1401  \global \@firstcolumnfalse
1402  \global \setbox\@leftcolumn \box\@outputbox

1403 ⟨∗trace⟩

1404  \tr@ce{PAGE: first column boxed}%

1405 ⟨/trace⟩

1406 \else
1407  \global \@firstcolumntrue

1408  \setbox\@outputbox \vbox {%
1409  \hb@xt@\textwidth {%
1410  \hb@xt@\columnwidth {%
1411  \box\@leftcolumn \hss}%
1412  \hfil
1413  \vrule \@width\columnseprule
1414  \hfil
1415  \hb@xt@\columnwidth {%
1416  \box\@outputbox \hss}%

1417 }% 1418 }% 1419 ⟨∗trace⟩

1420  \tr@ce{PAGE: second column also boxed}%

1421 ⟨/trace⟩

1422  \@combinedblfloats
1423  \@outputpage

1424 ⟨∗trace⟩

1425  \tr@ce{PAGE: two column page completed}%

1426 ⟨/trace⟩

1427  \begingroup
1428  \@dblfloatplacement
1429  \@startdblcolumn

This loop could be replaced by an \expandafter tail recursion in

  \@startdblcolumn.
1430  \@whilesw\if@fcolmade \fi
1431  {\@outputpage

1432 ⟨∗trace⟩

1433  \tr@ce{PAGE: double float page completed}%

1434 ⟨/trace⟩

1435  \@startdblcolumn}%
1436  \endgroup

1437 \fi 1438 } 1439 ⟨/2ekernel | autoload | fltrace⟩

64.1.3 Float placement parameters

The main purpose of this section is to ensure that all the float-placement parameters which need to be set in a class file or package have been declared. It also describes their use and sets values for them which are reasonable for typical douments using US letter or A4 sized paper.

Limits for the placement of floating objects

\c@topnumber This counter holds the maximum number of floats that can appear at the top of a text page or column.

1440 ⟨∗2ekernel | autoload⟩

1441 \newcount\c@topnumber
1442 \setcounter{topnumber}{2}

\topfraction This macro holds the maximum proportion (as a decimal number) of a text page or column that can be occupied by floats at the top.

1443 \newcommand\topfraction{.7}

\c@bottomnumber This counter holds the maximum number of floats that can appear at the bottom of a text page or column.

1444 \newcount\c@bottomnumber
1445 \setcounter{bottomnumber}{1}

\bottomfraction This macro holds the maximum proportion (as a decimal number) of a text page or column that can be occupied by floats at the bottom.

1446 \newcommand\bottomfraction{.3}

\c@totalnumber This counter holds the maximum number of floats that can appear on any text page or column.

1447 \newcount\c@totalnumber
1448 \setcounter{totalnumber}{3}

\textfraction This macro holds the minimum proportion (as a decimal number) of a text page or column that must be occupied by text.

1449 \newcommand\textfraction{.2}

\floatpagefraction This macro holds the minimum proportion (as a decimal number) of a page or column that must be occupied by floating objects before a ‘float page’ is produced.

1450 \newcommand\floatpagefraction{.5}

\c@dbltopnumber This counter holds the maximum number of double-column floats that can appear on the top of a two-column text page.

1451 \newcount\c@dbltopnumber
1452 \setcounter{dbltopnumber}{2}

\dbltopfraction This macro holds the maximum proportion (as a decimal number) of a two-column text page that can be occupied by double-column floats at the top.

1453 \newcommand\dbltopfraction{.7}

\dblfloatpagefraction This macro holds the minimum proportion (as a decimal number) of a page that must be occupied by double-column floating objects before a ‘double-column float page’ is produced.

1454 \newcommand\dblfloatpagefraction{.5}

Floats on a text page

\floatsep \textfloatsep \intextsep When a floating object is placed on a page with text, these parameters control the seperation between the float and the other objects on the page. These parameters are used for both one-column mode and single-column floats in two-column mode. They are all rubber lengths.

\floatsep is the space between adjacent floats that are placed at the top or bottom of the text page or column.

\textfloatsep is the space between the main text and floats at the top or bottom of the page or column.

\intextsep is the space between in-text floats and the text.

1455 \newskip\floatsep
1456 \newskip\textfloatsep
1457 \newskip\intextsep
1458 \setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
1459 \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
1460 \setlength\intextsep   {12\p@ \@plus 2\p@ \@minus 2\p@}

\dblfloatsep \dbltextfloatsep When double-column floats (floating objects that span the whole \textwidth) are placed at the top of a text page in two-column mode, the separation between the float and the text is controlled by \dblfloatsep and \dbltextfloatsep. They are rubber lengths.

\dblfloatsep is the space between adjacent double-column floats placed at the top of the text page.

\dbltextfloatsep is the space between the main text and double-column floats at the top of the page.

1461 \newskip\dblfloatsep
1462 \newskip\dbltextfloatsep
1463 \setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
1464 \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}

Floats on their own page or column

\@fptop \@fpsep \@fpbot When floating objects are placed on a seperate page or column, called a ‘float page’, the layout of the page is controlled by these parameters, which are rubber lengths.

At the top of the page \@fptop is inserted; typically this supplies some stretchable whitespace. At the bottom of the page \@fpbot ais inserted. Between adjacent floats \@fpsep is inserted.

These paramaters are used for all floating objects on a ‘float page’ in onecolumn mode, and for single-column floats in two-column mode.

Note that at least one of the two parameters \@fptop and \@fpbot should contain a plus ...fil so as to fill the remaining empty space.

1465 \newskip\@fptop
1466 \newskip\@fpsep
1467 \newskip\@fpbot
1468 \setlength\@fptop{0\p@ \@plus 1fil}
1469 \setlength\@fpsep{8\p@ \@plus 2fil}
1470 \setlength\@fpbot{0\p@ \@plus 1fil}

\@dblfptop \@dblfpsep \@dblfpbot Double-column ‘float pages’ in two-column mode use similar parameters.

1471 \newskip\@dblfptop
1472 \newskip\@dblfpsep
1473 \newskip\@dblfpbot
1474 \setlength\@dblfptop{0\p@ \@plus 1fil}
1475 \setlength\@dblfpsep{8\p@ \@plus 2fil}
1476 \setlength\@dblfpbot{0\p@ \@plus 1fil}

\topfigrule \botfigrule \dblfigrule The macros can be used to put in rules between floats and text; whatever they insert should be vertical mode material which takes up zero space.

1477 \let\topfigrule=\relax
1478 \let\botfigrule=\relax
1479 \let\dblfigrule=\relax

1480 ⟨/2ekernel | autoload⟩

File L

ltclass.dtx

65 Introduction

This file implements the following declarations, which replace \documentstyle in L^{A}TEX 2ε documents.

Note that old documents containing \documentstyle will be run using a compatibility option—thus keeping everyone happy, we hope!

The overall idea is that there are two types of ‘style files’: ‘class files’ which define elements and provide a default formatting for them; and ‘packages’ which provide extra functionality. One difference between L^{A}TEX 2ε and L^{A}TEX2.09 is that L^{A}TEX 2ε packages may have options. Note that options to classes packages may be implemented such that they input files, but these file names are not necessarily directly related to the option name.

66 User interface

\documentclass[⟨main-option-list⟩]{⟨class⟩}[⟨version⟩]

There must be exactly one such declaration, and it must come first. The ⟨main-option-list⟩ is a list of options which can modify the formatting of elements which are defined in the ⟨class⟩ file as well as in all following \usepackage declarations (see below). The ⟨version⟩ is a version number, beginning with a date in the format YYYY/MM/DD. If an older version of the class is found, a warning is issued.

\documentstyle[⟨main-option-list⟩]{⟨class⟩}[⟨version⟩]

The \documentstyle declaration is kept in order to maintain upward compatibility with L^{A}TEX2.09 documents. It is similar to \documentclass, but it causes all options in ⟨main-option-list⟩ that the ⟨class⟩ does not use to be passed to \RequirePackage after the options have been processed. This maintains compatibility with the 2.09 behaviour. Also a flag is set to indicate that the document is to be processed in L^{A}TEX2.09 compatibility mode. As far as most packages are concerned, this only affects the warnings and errors L^{A}TEX generates. This flag does affect the definition of font commands, and \sloppy.

\usepackage[⟨package-option-list⟩]{⟨package-list⟩}[⟨version⟩]

There can be any number of these declarations. All packages in ⟨package-list⟩ are called with the same options.

Each ⟨package⟩ file defines new elements (or modifies those defined in the ⟨class⟩), and thus extends the range of documents which can be processed. The ⟨package-option-list⟩ is a list of options which can modify the formatting of elements defined in the ⟨package⟩ file. The ⟨version⟩ is a version number, beginning with a date in the format YYYY/MM/DD. If an older version of the package is found, a warning is issued.

Each package is loaded only once. If the same package is requested more than once, nothing happens, unless the package has been requested with options that were not given the first time it was loaded, in which case an error is produced.

As well as processing the options given in the ⟨package-option-list⟩, each package processes the ⟨main-option-list⟩. This means that options that affect all of the packages can be given globally, rather than repeated for every package.

Note that class files have the extension .cls, packages have the extension .sty.

filecontents The environment filecontents is intended for passing the contents of packages, options, or other files along with a document in a single file. It has one argument, which is the name of the file to create. If that file already exists (maybe only in the current directory if the OS supports a notion of a ‘current directory’ or ‘default directory’) then nothing happens (except for an information message) and the body of the environment is bypassed. Otherwise, the body of the environment is written verbatim to the file name given as the first argument.

The environment is allowed only before \documentclass to ensure that all packages or options necessary for this particular run are present when needed.

66.1 Option processing

When the options are processed, they are divided into two types: local and global:

• For a class, the options in the \documentclass command are local.

• For a package, the options in the \usepackage command are local, and the options in the \documentclass command are global.

The options for \documentclass and \usepackage are processed in the following way:

1. The local and global options that have been declared (using \DeclareOption as described below) are processed first. In the case of \ProcessOptions, they are processed in the order that they were declared in the class or package. In the case of \ProcessOptions*, they are processed in the order that they appear in the option-lists. First the global options, and then the local ones.

2. Any remaining local options are dealt with using the default option (declared using the \DeclareOption* declaration described below). For document classes, this usually does nothing, but records the option on a list of unused options. For packages, this usually produces an error.

Finally, when \begin{document} is reached, if there are any global options which have not been used by either the class or any package, the system will produce a warning.

67 Class and Package interface

67.1 Class name and version

\ProvidesClass A class can identify itself with the \ProvidesClass{⟨name⟩}[⟨version⟩] command. The ⟨version⟩ should begin with a date in the format YYYY/MM/DD.

67.2 Package name and version

\ProvidesPackage A package can identify itself with the \ProvidesPackage{⟨name⟩}[⟨version⟩] command. The ⟨version⟩ should begin with a date in the format YYYY/MM/DD.

67.3 Requiring other packages

\RequirePackage Packages or classes can load other packages using \RequirePackage[⟨options⟩]{⟨name⟩}[⟨version⟩]. If the package has already been loaded, then nothing happens unless the requested options are not a subset of the options with which it was loaded, in which case an error is called.

\LoadClass Similar to \RequirePackage, but for classes, may not be used in package files.

\PassOptionsToPackage Packages can pass options to other packages using:

\PassOptionsToPackage{⟨options⟩}{⟨package⟩}.

\PassOptionsToClass This adds the ⟨options⟩ to the options list of any future \RequirePackage or \usepackage command. For example:

    \PassOptionsToPackage{foo,bar}{fred}
    \RequirePackage[baz]{fred}

is the same as:

    \RequirePackage[foo,bar,baz]{fred}
\LoadClassWithOptions      \LoadClassWithOptions{⟨name⟩}[⟨version⟩]:

This is similar to \LoadClass, but it always calls class ⟨name⟩ with exactly the same option list that is being used by the current class, rather than an option explicitly supplied or passed on by \PassOptionsToClass.

\RequirePackageWithOptions  \RequirePackageWithOptions is the analogous command for packages.

This is mainly intended to allow one class to simply build on another, for example:

   \LoadClassWithOptions{article}

This should be contrasted with the slightly different construction

   \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
   \ProcessOptions
   \LoadClass{article}

As used here, the effects are more or less the same, but the version using \LoadClassWithOptions is slightly quicker (and less to type). If, however, the class declares options of its own then the two constructions are different; compare, for example:

   \DeclareOption{landscape}{...}
   \ProcessOptions
   \LoadClassWithOptions{article}

with:

   \DeclareOption{landscape}{...}
   \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
   \ProcessOptions
   \LoadClass{article}

In the first case, the article class will be called with option landscape precisely when the current class is called with this option; but in the second example it will not as in that case article is only passed options by the default option handler, which is not used for landscape as that option is explicitly declared.

\@ifpackageloaded To find out if a package has already been loaded, use

\@ifclassloaded  \@ifpackageloaded{⟨package⟩}{⟨true⟩}{⟨false⟩}.

\@ifpackagelater To find out if a package has already been loaded with a version more recent \@ifclasslater than ⟨version⟩, use \@ifpackagelater{⟨package⟩}{⟨version⟩}{⟨true⟩}{⟨false⟩}. \@ifpackagewith To find out if a package has already been loaded with at least the options

\@ifclasswith ⟨options⟩, use \@ifpackagewith{⟨package⟩}{⟨options⟩}{⟨true⟩}{⟨false⟩}.

67.4 Declaring new options

Options for classes and packages are built using the same macros.

\DeclareOption To define a builtin option, use \DeclareOption{⟨name⟩}{⟨code⟩}. \DeclareOption* To define the default action to perform for local options which have not been

declared, use \DeclareOption*{⟨code⟩}.

Note: there should be no use of

\RequirePackage, \DeclareOption, \DeclareOption* or \ProcessOptions
inside \DeclareOption or \DeclareOption*.

Possible uses for \DeclareOption* include:

   \DeclareOption*{}

Do nothing. Silently accept unknown options. (This suppresses the usual warnings.)

   \DeclareOption*{\@unkownoptionerror}

Complain about unknown local options. (The initial setting for package files.)

   \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{⟨pkg-name⟩}

Handle the the current option by passing it on to the package ⟨pkg-name⟩, which will presumably be loaded via \RequirePackage later in the file. This is useful for building ‘extension’ packages, that perhaps handle a couple of new options, but then pass everything else on to an existing package.

   \DeclareOption*{\InputIfFileExists{xx-\CurrentOption.yyy}%
               {}%
               {\OptionNotUsed}}

Handle the option foo by loading the file xx-foo.yyy if it exists, otherwise do nothing, but declare that the option was not used. Actually the \OptionNotUsed declaration is only needed if this is being used in class files, but does no harm in package files.

67.5 Safe Input Macros

\InputIfFileExists  \InputIfFileExists{⟨file⟩}{⟨then⟩}{⟨else⟩}

Inputs ⟨file⟩ if it exists. Immediately before the input, ⟨then⟩ is executed. Otherwise ⟨else⟩ is executed.

\IfFileExists As above, but does not input the file.

One thing you might like to put in the ⟨else⟩ clause is

\@missingfileerror This starts an interactive request for a filename, supplying default extensions. Just hitting return causes the whole input to be skipped and entering x quits the current run,

\input This has been redefined from the L^{A}TEX2.09 definition, in terms of the new

commands \InputIfFileExists and \@missingfileerror.

\listfiles Giving this declaration in the preamble causes a list of all files input via the ‘safe input’ commands to be listed at the end. Any strings specified in the optional argument to \ProvidesPackage are listed alongside the file name. So files in standard (and other non-standard) distributions can put informative strings in this argument.

68 Implementation

1 ⟨∗2ekernel⟩

\if@compatibility The flag for compatibilty mode.

 2 \newif\if@compatibility

\@documentclasshook The hook called after the first \documentclass command. By default this checks to see if \@normalsize is undefined, and if so, sets it to \normalsize.

 3 \def\@documentclasshook{%
 4 \ifx\@normalsize\@undefined
 5  \let\@normalsize\normalsize
 6 \fi
 7 }

\@declaredoptions This list is automatically built by \DeclareOption. It is the list of options (separated by commas) declared in the class or package file and it defines the order in which the the corresponding \ds@⟨option⟩ commands are executed. All local ⟨option⟩s which are not declared will be processed in the order defined by the

optional argument of \documentclass or \usepackage.
 8 \let\@declaredoptions\@empty

\@classoptionslist List of options of the main class.

 9 \let\@classoptionslist\relax

\@unusedoptionlist List of options of the main class that haven’t been declared or loaded as class option files.

10 \let\@unusedoptionlist\@empty

\CurrentOption Name of current package or option.

11 \let\CurrentOption\@empty

\@currname Name of current package or option.

12 \let\@currname\@empty

\@currext The current file extension.

13 \global\let\@currext=\@empty
\@clsextension \@pkgextension The two possible values of \@currext.
14 \def\@clsextension{cls}
15 \def\@pkgextension{sty}
16 \@onlypreamble\@clsextension
17 \@onlypreamble\@pkgextension

\@pushfilename \@popfilename \@currnamestack Commands to push and pop the file name and extension. #1 current name. #2 current extension. #3 current catcode of @. #4 Rest of the stack.

18 \def\@pushfilename{%
19 \xdef\@currnamestack{%
20  {\@currname}%
21  {\@currext}%
22  {\the\catcode`\@}%
23  \@currnamestack}}
24 \@onlypreamble\@pushfilename
25 \def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil}
26 \@onlypreamble\@popfilename
27 \def\@p@pfilename#1#2#3#4\@nil{%
28 \gdef\@currname{#1}%
29 \gdef\@currext{#2}%
30 \catcode`\@#3\relax
31 \gdef\@currnamestack{#4}}
32 \@onlypreamble\@p@pfilename
33 \gdef\@currnamestack{}
34 \@onlypreamble\@currnamestack

\@ptionlist Returns the option list of the file.

35 \def\@ptionlist#1{%
36 \@ifundefined{opt@#1}\@empty{\csname opt@#1\endcsname}}
37 \@onlypreamble\@ptionlist
\@ifpackageloaded \@ifclassloaded  \@ifpackageloaded{⟨name⟩} Checks to see whether a file has been loaded.
38 \def\@ifpackageloaded{\@ifl@aded\@pkgextension}
39 \def\@ifclassloaded{\@ifl@aded\@clsextension}
40 \@onlypreamble\@ifpackageloaded
41 \@onlypreamble\@ifclassloaded
42 \def\@ifl@aded#1#2{%
43 \expandafter\ifx\csname ver@#2.#1\endcsname\relax
44  \expandafter\@secondoftwo
45 \else
46  \expandafter\@firstoftwo
47 \fi}
48 \@onlypreamble\@ifl@aded
\@ifpackagelater \@ifclasslater  \@ifpackagelater{⟨name⟩}{YYYY/MM/DD} Checks that the package loaded is

more recent than the given date.

49 \def\@ifpackagelater{\@ifl@ter\@pkgextension}
50 \def\@ifclasslater{\@ifl@ter\@clsextension}
51 \@onlypreamble\@ifpackagelater
52 \@onlypreamble\@ifclasslater
53 \def\@ifl@ter#1#2{%
54 \expandafter\@ifl@t@r
55  \csname ver@#2.#1\endcsname}
56 \@onlypreamble\@ifl@ter

This internal macro is also used in \NeedsTeXFormat.

57 \def\@ifl@t@r#1#2{%
58 \ifnum\expandafter\@parse@version#1//00\@nil<%
59  \expandafter\@parse@version#2//00\@nil
60  \expandafter\@secondoftwo
61 \else
62  \expandafter\@firstoftwo
63 \fi}
64 \@onlypreamble\@ifl@t@r
65 \def\@parse@version#1/#2/#3#4#5\@nil{#1#2#3#4 }
66 \@onlypreamble\@parse@version

\@ifpackagewith \@ifclasswith \@ifpackagewith{⟨name⟩}{⟨option-list⟩} Checks that ⟨option-list⟩ is a subset of the options with which ⟨name⟩ was loaded.

67 \def\@ifpackagewith{\@if@ptions\@pkgextension}
68 \def\@ifclasswith{\@if@ptions\@clsextension}
69 \@onlypreamble\@ifpackagewith
70 \@onlypreamble\@ifclasswith
71 \def\@if@ptions#1#2{%
72 \@expandtwoargs\@if@pti@ns{\@ptionlist{#2.#1}}}
73 \@onlypreamble\@if@ptions

Probably shouldnt use \CurrentOption here… (changed to \reserved@b.)

74 \def\@if@pti@ns#1#2{%
75 \let\reserved@a\@firstoftwo
76 \@for\reserved@b:=#2\do{%
77  \expandafter\in@\expandafter{\expandafter,\reserved@b,}{,#1,}%
78  \ifin@\else\let\reserved@a\@secondoftwo\fi}%
79 \reserved@a}
80 \@onlypreamble\@if@pti@ns

\ProvidesPackage Checks that the current filename is correct, and defines \ver@filename.

81 \def\ProvidesPackage#1{%
82 \xdef\@gtempa{#1}%
83 \ifx\@gtempa\@currname\else
84  \@latex@warning@no@line{You have requested
85  \@cls@pkg\space`\@currname',\MessageBreak
86  but the \@cls@pkg\space provides `#1'}%
87 \fi
88 \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%]
89 \@onlypreamble\ProvidesPackage
90 \def\@pr@videpackage[#1]{%
91 \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}%
92 \ifx\@currext\@clsextension
93  \typeout{Document Class: \@gtempa\space#1}%
94 \else
95  \wlog{Package: \@gtempa\space#1}%
96 \fi}
97 \@onlypreamble\@pr@videpackage
\ProvidesClass Like \ProvidesPackage, but for classes.
98 \let\ProvidesClass\ProvidesPackage
99 \@onlypreamble\ProvidesClass

\ProvidesFile Like \ProvidesPackage, but for arbitrary files. Do not apply \@onlypreamble to

these, as we may want to label files input during the document.

\@providesfile
100 \def\ProvidesFile#1{%
101 \begingroup
102  \catcode`\ 10 %
103  \@makeother\/%
104  \@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}}

During initex a special version of \@providesfile is used. The real definition is installed right at the end, in ltfinal.dtx.

 \def\@providesfile#1[#2]{%
     \wlog{File: #1 #2}%
     \expandafter\xdef\csname ver@#1\endcsname{#2}%
   \endgroup}
     \end{macrocode}

\PassOptionsToPackage \PassOptionsToClass If the package has been loaded, we check that it was first loaded with the options. Otherwise we add the option list to that of the package.

105 \def\@pass@ptions#1#2#3{%
106 \expandafter\xdef\csname opt@#3.#1\endcsname{%
107  \@ifundefined{opt@#3.#1}\@empty
108  {\csname opt@#3.#1\endcsname,}%
109  \zap@space#2 \@empty}}
110 \@onlypreamble\@pass@ptions
111 \def\PassOptionsToPackage{\@pass@ptions\@pkgextension}
112 \def\PassOptionsToClass{\@pass@ptions\@clsextension}
113 \@onlypreamble\PassOptionsToPackage
114 \@onlypreamble\PassOptionsToClass
\DeclareOption \DeclareOption* Adds an option as a \ds@ command, or the default \default@ds command.
115 \def\DeclareOption{%
116 \let\@fileswith@pti@ns\@badrequireerror
117 \@ifstar\@defdefault@ds\@declareoption}
118 \long\def\@declareoption#1#2{%
119 \xdef\@declaredoptions{\@declaredoptions,#1}%
120 \toks@{#2}%
121 \expandafter\edef\csname ds@#1\endcsname{\the\toks@}}
122 \long\def\@defdefault@ds#1{%
123 \toks@{#1}%
124 \edef\default@ds{\the\toks@}}
125 \@onlypreamble\DeclareOption
126 \@onlypreamble\@declareoption
127 \@onlypreamble\@defdefault@ds

\OptionNotUsed If we are in a class file, add \CurrentOption to the list of unused options. Otherwise, in a package file do nothing.

128 \def\OptionNotUsed{%
129 \ifx\@currext\@clsextension
130  \xdef\@unusedoptionlist{%
131  \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi
132  \CurrentOption}%

133 \fi}
134 \@onlypreamble\OptionNotUsed

\default@ds The default default option code. Set by \@onefilewithoptions to either

 \OptionNotUsed for classes, or \@unknownoptionerror for packages. This may

be reset in either case with \DeclareOption*.

135 % \let\default@ds\OptionNotUsed
\ProcessOptions \ProcessOptions*  \ProcessOptions calls \ds@option for each known package option, then calls

\default@ds for each option on the local options list. Finally resets all the declared options to \relax. The empty option does nothing, this has to be reset on the off chance it’s set to \relax if an empty element gets into the

 \@declaredoptions list.

The star form is similar but executes options given in the order specified in the document, not the order they are declared in the file. In the case of packages, global options are executed before local ones.

136 \def\ProcessOptions{%
137 \let\ds@\@empty
138 \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
139 \@ifstar\@xprocess@ptions\@process@ptions}
140 \@onlypreamble\ProcessOptions
141 \def\@process@ptions{%
142 \@for\CurrentOption:=\@declaredoptions\do{%
143  \ifx\CurrentOption\@empty\else
144  \@expandtwoargs\in@{,\CurrentOption,}{%
145  ,\ifx\@currext\@clsextension\else\@classoptionslist,\fi
146  \@curroptions,}%
147  \ifin@
148  \@use@ption
149  \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
150  \fi
151  \fi}%
152 \@process@pti@ns}
153 \@onlypreamble\@process@ptions
154 \def\@xprocess@ptions{%
155 \ifx\@currext\@clsextension\else
156  \@for\CurrentOption:=\@classoptionslist\do{%
157  \ifx\CurrentOption\@empty\else
158  \@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}%
159  \ifin@
160  \@use@ption
161  \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
162  \fi
163  \fi}%
164 \fi
165 \@process@pti@ns}
166 \@onlypreamble\@xprocess@ptions
    The common part of \ProcessOptions and \ProcessOptions*.
167 \def\@process@pti@ns{%
168 \@for\CurrentOption:=\@curroptions\do{%
169  \@ifundefined{ds@\CurrentOption}%

170  {\@use@ption
171  \default@ds}%

There should not be any non-empty definition of \CurrentOption at this point, as all the declared options were executed earlier. This is for compatibility with 2.09 styles which use \def\ds@… directly, and so have options which do not appear

 in \@declaredoptions.
172  \@use@ption}%

Clear all the definitions for option code. First set all the declared options to \relax, then reset the ‘default’ and ‘empty’ options. and the lst of declared options.

173 \@for\CurrentOption:=\@declaredoptions\do{%
174  \expandafter\let\csname ds@\CurrentOption\endcsname\relax}%
175 \let\CurrentOption\@empty
176 \let\@fileswith@pti@ns\@@fileswith@pti@ns
177 \AtEndOfPackage{\let\@unprocessedoptions\relax}}
178 \@onlypreamble\@process@pti@ns

\@options \@options is a synonym for \ProcessOptions* for upward compatibility with L^{A}TEX2.09 style files.

179 \def\@options{\ProcessOptions*}
180 \@onlypreamble\@options

\@use@ption Execute the code for the current option.

181 \def\@use@ption{%
182 \@expandtwoargs\@removeelement\CurrentOption
183 \@unusedoptionlist\@unusedoptionlist
184 \csname ds@\CurrentOption\endcsname}
185 \@onlypreamble\@use@ption

\ExecuteOptions \ExecuteOptions{⟨option-list⟩} executes the code declared for each option.

186 \def\ExecuteOptions#1{%
187 \def\reserved@a##1\@nil{%
188  \@for\CurrentOption:=#1\do{\csname ds@\CurrentOption\endcsname}%
189  \edef\CurrentOption{##1}}%
190 \expandafter\reserved@a\CurrentOption\@nil}
191 \@onlypreamble\ExecuteOptions

The top-level commands, which just set some parameters then call the internal

 command, \@fileswithoptions.

\documentclass The main new-style class declaration.

192 \def\documentclass{%
193 \let\documentclass\@twoclasseserror
194 \if@compatibility\else\let\usepackage\RequirePackage\fi
195 \@fileswithoptions\@clsextension}
196 \@onlypreamble\documentclass

\documentstyle 2.09 style class ‘style’ declaration.

197 \def\documentstyle{%
198 \makeatletter\input{latex209.def}\makeatother
199 \documentclass}
200 \@onlypreamble\documentstyle

\RequirePackage Load package if not already loaded.

201 \def\RequirePackage{%
202 \@fileswithoptions\@pkgextension}
203 \@onlypreamble\RequirePackage
\LoadClass Load class.
204 \def\LoadClass{%
205 \ifx\@currext\@pkgextension
206  \@latex@error
207  {\noexpand\LoadClass in package file}%
208  {You may only use \noexpand\LoadClass in a class file.}%
209 \fi
210 \@fileswithoptions\@clsextension}
211 \@onlypreamble\LoadClass

\@loadwithoptions Pass the current option list on to a class or package. #1 is \@cls-or-pkgextension, #2 is \RequirePackage or \LoadClass, #3 is the class or package to be loaded.

212 \def\@loadwithoptions#1#2#3{%
213 \expandafter\let\csname opt@#3.#1\expandafter\endcsname
214  \csname opt@\@currname.\@currext\endcsname
215 #2{#3}}
216 \@onlypreamble\@loadwithoptions

\LoadClassWithOptions Load class ‘#1’ with the current option list.

217 \def\LoadClassWithOptions{%
218 \@loadwithoptions\@clsextension\LoadClass}
219 \@onlypreamble\LoadClassWithOptions

\RequirePackageWithOptions Load package ‘#1’ with the current option list.

220 \def\RequirePackageWithOptions{%
221 \@loadwithoptions\@pkgextension\RequirePackage}
222 \@onlypreamble\RequirePackageWithOptions

\usepackage To begin with, \usepackage produces an error. This is reset by \documentclass.

223 \def\usepackage#1#{%
224 \@latex@error
225  {\noexpand \usepackage before \string\documentclass}%
226  {\noexpand \usepackage may only appear in the document
227  preamble, i.e.,\MessageBreak
228  between \noexpand\documentclass and
229  \string\begin{document}.}%
230 \@gobble}
231 \@onlypreamble\usepackage

\NeedsTeXFormat Check that the document is running on the correct system.

232 \def\NeedsTeXFormat#1{%
233 \def\reserved@a{#1}%
234 \ifx\reserved@a\fmtname
235  \expandafter\@needsformat
236 \else
237  \@latex@error{This file needs format `\reserved@a'%
238  \MessageBreak but this is `\fmtname'}{%

239  The current input file will not be processed
240  further,\MessageBreak
241  because it was written for some other flavor of
242  TeX.\MessageBreak\@ehd}%

If the file is not meant to be processed by L^{A}TEX 2ε we stop inputting it, but we do not end the run. We just end inputting the current file.

243  \endinput \fi}
244 \@onlypreamble\NeedsTeXFormat
245 \def\@needsformat{%
246 \@ifnextchar[%]
247  \@needsf@rmat
248  {}}
249 \@onlypreamble\@needsformat
250 \def\@needsf@rmat[#1]{%
251  \@ifl@t@r\fmtversion{#1}{}%
252  {\@latex@warning@no@line
253  {You have requested release `#1' of LaTeX,\MessageBreak
254  but only release `\fmtversion' is available}}}
255 \@onlypreamble\@needsf@rmat

\zap@space \zap@space foo⟨space⟩\@empty removes all spaces from foo that are not protected by { } groups.

256 \def\zap@space#1 #2{%
257 #1%
258 \ifx#2\@empty\else\expandafter\zap@space\fi
259 #2}
\@fileswithoptions The common part of \documentclass and \usepackage.
260 \def\@fileswithoptions#1{%
261 \@ifnextchar[%]
262  {\@fileswith@ptions#1}%
263  {\@fileswith@ptions#1[]}}
264 \@onlypreamble\@fileswithoptions
265 \def\@fileswith@ptions#1[#2]#3{%
266 \@ifnextchar[%]
267 {\@fileswith@pti@ns#1[#2]#3}%
268 {\@fileswith@pti@ns#1[#2]#3[]}}
269 \@onlypreamble\@fileswith@ptions

Then we do some work.

First of all, we define the global variables. Then we look to see if the file has already been loaded. If it has, we check that it was first loaded with at least the current options. If it has not, we add the current options to the package options, set the default version to be 0000/00/00, and load the file if we can find it. Then we check the version number.

Finally, we restore the old file name, reset the default option, and we set the catcode of @.

For classes, we can immediately process the file. For other types, #2 could be a comma separated list, so loop through, processing each one separately.

270 \def\@fileswith@pti@ns#1[#2]#3[#4]{%

271 \ifx#1\@clsextension
272  \ifx\@classoptionslist\relax
273  \xdef\@classoptionslist{\zap@space#2 \@empty}%
274  \def\reserved@a{%
275  \@onefilewithoptions#3[#2][#4]#1%
276  \@documentclasshook}%
277  \else
278  \def\reserved@a{%
279  \@onefilewithoptions#3[#2][#4]#1}%
280  \fi
281 \else

build up a list of calls to \@onefilewithoptions (one for each package) without thrashing the parameter stack.

282  \def\reserved@b##1,{%
283  \ifx\@nil##1\relax\else
284  \ifx\relax##1\relax\else
285  \noexpand\@onefilewithoptions##1[#2][#4]\noexpand\@pkgextension
286  \fi
287  \expandafter\reserved@b
288  \fi}%
289  \edef\reserved@a{\zap@space#3 \@empty}%
290  \edef\reserved@a{\expandafter\reserved@b\reserved@a,\@nil,}%
291 \fi
292 \reserved@a}
293 \@onlypreamble\@fileswith@pti@ns

Have the main argument as #1, so we only need one \expandafter above.

294 \def\@onefilewithoptions#1[#2][#3]#4{%
295 \@pushfilename
296 \xdef\@currname{#1}%
297 \global\let\@currext#4%
298 \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
299 \let\CurrentOption\@empty
300 \@reset@ptions
301 \makeatletter

Grab everything in a macro, so the parameter stack is popped before any processing begins.

302 \def\reserved@a{%
303  \@ifl@aded\@currext{#1}%
304  {\@if@ptions\@currext{#1}{#2}{}%
305  {\@latex@error
306  {Option clash for \@cls@pkg\space #1}%
307  {The package #1 has already been loaded
308  with options:\MessageBreak
309  \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
310  There has now been an attempt to load it
311  with options\MessageBreak
312  \space\space[#2]\MessageBreak
313  Adding the line:\MessageBreak
314  \space\space\string\usepackage
315  [\@ptionlist{#1.\@currext},#2]{#1}\MessageBreak
316  to your document may fix this.\MessageBreak
317  Try typing \space <return> \space to proceed.}}}%

318  {\@pass@ptions\@currext{#2}{#1}%
319  \global\expandafter
320  \let\csname ver@\@currname.\@currext\endcsname\@empty
321  \InputIfFileExists
322  {\@currname.\@currext}%
323  {}%
324  {\@missingfileerror\@currname\@currext}%

\@unprocessedoptions will generate an error for each specified option in a package unless a \ProcessOptions has appeared in the package file.

325  \let\@unprocessedoptions\@@unprocessedoptions
326  \csname\@currname.\@currext-h@@k\endcsname
327  \expandafter\let\csname\@currname.\@currext-h@@k\endcsname
328  \@undefined
329  \@unprocessedoptions}
330  \@ifl@ter\@currext{#1}{#3}{}%
331  {\@latex@warning@no@line
332  {You have requested,\on@line,
333  version\MessageBreak
334  `#3' of \@cls@pkg\space #1,\MessageBreak
335  but only version\MessageBreak
336  `\csname ver@#1.\@currext\endcsname'\MessageBreak
337  is available}}%
338  \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
339  \@popfilename
340  \@reset@ptions}%
341 \reserved@a}
342 \@onlypreamble\@onefilewithoptions

\@@fileswith@pti@ns Save the definition (for error checking).

343 \let\@@fileswith@pti@ns\@fileswith@pti@ns
344 \@onlypreamble\@@fileswith@pti@ns

\@reset@ptions Reset the default option, and clear lists of declared options.

345 \def\@reset@ptions{%
346 \global\ifx\@currext\@clsextension
347  \let\default@ds\OptionNotUsed
348 \else
349  \let\default@ds\@unknownoptionerror
350 \fi
351 \global\let\ds@\@empty
352 \global\let\@declaredoptions\@empty}
353 \@onlypreamble\@reset@ptions

68.1 Hooks

Allow code do be saved to be executed at specific later times.

Save things in macros, I considered using toks registers, (and \addto@hook from the NFSS code, that would require stacking the contents in the case of required packages, so just generate a new macro for each package.

\@begindocumenthook \@enddocumenthook Stuff to appear at the begining or end of the document.

354 \ifx\@begindocumenthook\@undefined
355 \let\@begindocumenthook\@empty
356 \fi
357 \let\@enddocumenthook\@empty

\g@addto@macro Globally add to the end of a macro.

358 \long\def\g@addto@macro#1#2{{%
359 \toks@\expandafter{#1#2}%
360 \xdef#1{\the\toks@}}}
\AtEndOfPackage \AtEndOfClass \AtBeginDocument \AtEndDocument The access functions.
361 \def\AtEndOfPackage{%
362 \expandafter\g@addto@macro\csname\@currname.\@currext-h@@k\endcsname}
363 \let\AtEndOfClass\AtEndOfPackage
364 \@onlypreamble\AtEndOfPackage
365 \@onlypreamble\AtEndOfClass
366 \def\AtBeginDocument{\g@addto@macro\@begindocumenthook}
367 \def\AtEndDocument{\g@addto@macro\@enddocumenthook}
368 \@onlypreamble\AtBeginDocument

\@cls@pkg The current file type.

369 \def\@cls@pkg{%
370 \ifx\@currext\@clsextension
371  document class%
372 \else
373  package%
374 \fi}
375 \@onlypreamble\@cls@pkg
\@unknownoptionerror Bad option.
376 \def\@unknownoptionerror{%
377 \@latex@error
378  {Unknown option `\CurrentOption' for \@cls@pkg\space`\@currname'}%
379  {The option `\CurrentOption' was not declared in
380  \@cls@pkg\space`\@currname', perhaps you\MessageBreak
381  misspelled its name.
382  Try typing \space <return>
383  \space to proceed.}}
384 \@onlypreamble\@unknownoptionerror

\@@unprocessedoptions Declare an error for each option, unless a \ProcessOptions occured.

385 \def\@@unprocessedoptions{%
386 \ifx\@currext\@pkgextension
387  \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
388  \@for\CurrentOption:=\@curroptions\do{%
389  \ifx\CurrentOption\@empty\else\@unknownoptionerror\fi}%
390 \fi}
391 \@onlypreamble\@unprocessedoptions
392 \@onlypreamble\@@unprocessedoptions

\@badrequireerror  \RequirePackage or \LoadClass occurs in the options section.
393 \def\@badrequireerror#1[#2]#3[#4]{%
394 \@latex@error
395  {\noexpand\RequirePackage or \noexpand\LoadClass
396  in Options Section}%
397  {The \@cls@pkg\space `\@currname' is defective.\MessageBreak
398  It attempts to load `#3' in the options section, i.e.,\MessageBreak
399  between \noexpand\DeclareOption and \string\ProcessOptions.}}
400 \@onlypreamble\@badrequireerror
\@twoloadclasserror Two \LoadClass in a class.
401 \def\@twoloadclasserror{%
402 \@latex@error
403  {Two \noexpand\LoadClass commands}%
404  {You may only use one \noexpand\LoadClass in a class file}}
405 \@onlypreamble\@twoloadclasserror
\@twoclasseserror Two \documentclass or \documentstyle.
406 \def\@twoclasseserror#1#{%
407 \@latex@error
408  {Two \noexpand\documentclass or \noexpand\documentstyle commands}%
409  {The document may only declare one class.}\@gobble}
410 \@onlypreamble\@twoclasseserror

68.2 Providing shipment

\two@digits Prefix a number less than 10 with ‘0’.

411 \def\two@digits#1{\ifnum#1<10 0\fi\number#1}

\filecontents \endfilecontents This environment implements inline files. The star-form does not write extra comments into the file.

412 \begingroup%
413 \gdef\filecontents{\@tempswatrue\filec@ntents}%
414 \catcode`\*=11 %
415 \gdef\filecontents*{\@tempswafalse\filec@ntents}%
416 \catcode`\^^M\active%
417 \catcode`\^^L\active\let^^L\relax%
418 \catcode`\^^I\active%
419 \gdef\filec@ntents#1{%
420 \openin\@inputcheck#1 %
421 \ifeof\@inputcheck%
422  \@latex@warning@no@line%
423  {Writing file `\@currdir#1'}%
424  \chardef\verbatim@out15 %
425  \ch@ck7\verbatim@out\write%
426 \else%
427  \closein\@inputcheck%
428  \@latex@warning@no@line%
429  {File `#1' already exists on the system.\MessageBreak%
430  Not generating it from this source}%
431  \def\immediate##1\relax{}%
432 \fi%
433 \immediate\openout\verbatim@out=#1\relax%

434 \if@tempswa%
435  \immediate\write\verbatim@out{%
436  \@percentchar\@percentchar\space LaTeX2e file `#1'^^J%
437  \@percentchar\@percentchar\space  generated by the %
438  `filecontents' environment^^J%
439  \@percentchar\@percentchar\space from source `\jobname' on %
440  \number\year/\two@digits\month/\two@digits\day.^^J%
441  \@percentchar\@percentchar}\relax%
442 \fi%
443 \let\do\@makeother\dospecials%
444 \@vwrend%
445 \catcode`\^^L\active%
446 \let\L\@undefined%
447 \def^^L{\@ifundefined L^^J^^J^^J}%
448 \catcode`\^^I\active%
449 \let\I\@undefined%
450 \def^^I{\@ifundefined I\space\space}%
451 \catcode`\^^M\active%
452 \def^^M##1^^M%
453  {\def\reserved@b{##1}%
454  \ifx\reserved@b\reserved@a%
455  \expandafter\end\expandafter{\@currenvir}%
456  \else%
457  \immediate\write\verbatim@out{##1}\relax\expandafter^^M%
458  \fi}}%
459 \endgroup%
460 \begingroup
461 \catcode`/=0
462 \catcode`<=\catcode`{
463 \catcode`>=\catcode`}
464 \catcode`|=\catcode`\%
465 /catcode`/\=12
466 /catcode`/{=12
467 /catcode`/}=12
468 /catcode`/%=12
469 /catcode`/*=11
470 /gdef/@percentchar<%>
471 /gdef/@vwrend</edef/reserved@a<\end{/@currenvir}>>
472 /gdef/endfilecontents<|
473 /immediate/closeout/verbatim@out/relax
474 /ifx/L/@undefined/else
475  /@latex@warning@no@line<Form Feed has been converted to Blank Line>|
476 /fi
477 /ifx/I/@undefined/else
478  /@latex@warning@no@line<Tab has been converted to Space>|
479 /fi
480 /immediate/write/@unused<>/relax>
481 /global/let/endfilecontents*/endfilecontents|
482 /@onlypreamble/filecontents
483 /@onlypreamble/endfilecontents
484 /@onlypreamble/filecontents*
485 /@onlypreamble/endfilecontents*
486 /endgroup
487 \@onlypreamble\filec@ntents

488 \@onlypreamble\@vwrend

489 ⟨/2ekernel⟩

69 After Preamble

Finally we declare a package that allows all the commands declared above to be

 \@onlypreamble to be used after \begin{document}.

490 ⟨∗afterpreamble⟩

491 \NeedsTeXFormat{LaTeX2e}
492 \ProvidesPackage{pkgindoc}
493  [1994/10/20 v1.1 Package Interface in Document (DPC)]
494 \def\reserved@a#1\do\@clsextension#2\do\@vwrend#3\relax{%
495 \gdef\@preamblecmds{#1#3}}
496 \expandafter\reserved@a\@preamblecmds\relax

497 ⟨/afterpreamble⟩

File M

lthyphen.dtx

This file contains the code for loading hyphenation patterns into L^{A}TEX. Most of this will end up in a file called hyphen.ltx. If you wish to customize your L^{A}TEX system in respect of hyphenation patterns, write a file hyphen.cfg. If this file exists, it will be loaded instead of hyphen.ltx. See the comments below for additional information.

To produce the printed version of this file the following code is used. It can be extracted with the docstrip program, or one can run this file directly through L^{A}TEX 2ε.

1 ⟨∗driver⟩

 2 \documentclass{ltxdoc}
 3 \begin{document}
 4 \DocInput{lthyphen.dtx}
 5 \end{document}

6 ⟨/driver⟩

The default file hyphen.ltx loads hyphenation patterns for US english. If you want to load additional or other hyphenation patterns, you should create a file hyphen.cfg. This is best done by starting from hyphen.ltx.

For backward compatibility, the default file, hyphen.ltx, first tries to load the file hyphen.tex. If this file exists, an information message is issued and the appropriate defaults for TEX’s internal parameters are set: \language is initialized to 0, and \lefthyphenmin and \righthyphenmin to 2 and 3, respectively, to disallow x- or -xx breaks.

7 ⟨∗default⟩

 8 \InputIfFileExists{hyphen.tex}%
 9 {\message{Loading hyphenation patterns for US english.}%
10  \language=0
11  \lefthyphenmin=2 \righthyphenmin=3 }%

Otherwise, since we cannot do anything without any hyphenation patterns, an error message is printed and the IniTEX run is terminated by invoking \@@end (which is the L^{A}TEX 2ε name for TEX’s \end primitive).

12 {\errhelp{The configuration for hyphenation is incorrectly
13  installed.^^J%
14  If you don't understand this error message you need
15  to seek^^Jexpert advice.}%
16  \errmessage{OOPS! I can't find any hyphenation patterns for
17  US english.^^J \space Think of getting some or the
18  latex2e setup will never succeed}\@@end}

19 ⟨/default⟩

The following example describes the possible contents of a file hyphen.cfg that will load both US English and German hyphenation patterns, making the former the default. It sets \language to 0 for the US patterns and to 1 for the German patterns. Then \language is set to 0 to make this the default and the default

values of \lefthyphenmin and \righthyphenmin are set.
\language=0
\input hyphen % (or \input ushyphen1 if the file has been renamed)

\language=1
\input ghyph31
\language=0
\lefthyphenmin=2
\righthyphenmin=3
\endinput

Another possibility is to use the package babel, by Johannes Braams. That package is distributed with a suitable hyphen.cfg file.

File N

ltfinal.dtx

70 Final settings

This section contains the final settings for L^{A}TEX. It initialises some debugging and typesetting parameters, sets the default \catcodes and uc/lc codes, and inputs the hyphenation file.

70.1 Debugging

By default, L^{A}TEX shows statistics:

1 ⟨∗2ekernel⟩

 2 \tracingstats1

Empty the error help message, which may have some rubbish:

 3 \errhelp{}

70.2 Typesetting parameters

\@lowpenalty \@medpenalty \@highpenalty These are penalties used internally.
 4 \newcount\@lowpenalty
 5 \newcount\@medpenalty
 6 \newcount\@highpenalty

The default values of the picture and \fbox parameters:

 7 \unitlength = 1pt
 8 \fboxsep = 3pt
 9 \fboxrule = .4pt

The saved value of TEX’s \maxdepth:

10 \@maxdepth       = \maxdepth

\vsize initialized because a \clearpage with \vsize < \topskip causes trouble. \@colroom and \@colht also initialized because \vsize may be set to them if a

\clearpage is done before the \begin{document}
11 \vsize = 1000pt
12 \@colroom = \vsize
13 \@colht = \vsize

Initialise \textheight\textwidth and page style, to avoid internal errors if they are not set by the class.

14 \textheight=.5\maxdimen
15 \textwidth=\textheight
16 \ps@empty

70.3 Hyphenation

The following code will be compiled into the format file. It checks for the existance of hyphen.cfg in inputs that file if found. Otherwise it inputs hyphen.ltx. Note that these are loaded in before the \catcodes are set, so local hyphenation files can use 8-bit input.

We try to load the customized hyphenation description file.

17 \InputIfFileExists{hyphen.cfg}
18  {\typeout{********************************************^^J%
19  * Local configuration file hyphen.cfg used^^J%
20  ********************************************}%
21  \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%

22 }

23  {\input{hyphen.ltx}}
24 \let\@addtofilelist\@gobble

70.4 Font loading

Fonts loaded during the formatting process might already have changed the \font@submax from 0pt to something higher. If so be put out a bold warning.

25 \ifdim \font@submax >\z@
26 \@font@warning{Size substitutions with differences\MessageBreak
27  up to \font@submax\space have occured.\MessageBreak
28  \MessageBreak
29  Please check the transcript file
30  carefully\MessageBreak
31  and redo the format generation if necessary!
32  \@gobbletwo}%
33 \errhelp{Only stopped, to give you time to
34  read the above message.}
35 \errmessage{}

We reset the macro. Otherwise every user will get a warning on every job.

36 \def\font@submax{0pt}
37 \fi

70.5 Input encoding

We temporarily define \reserved@a to apply \reserved@c to all the numbers in the range of its arguments.

38 \def\reserved@a#1#2{%
39 \@tempcnta#1\relax
40 \@tempcntb#2\relax
41 \reserved@b

42 }

43 \def\reserved@b{%
44 \ifnum\@tempcnta>\@tempcntb\else
45  \reserved@c\@tempcnta
46  \advance\@tempcnta\@ne
47  \expandafter\reserved@b
48 \fi

49 }

Set the special catcodes (although some of these are useless, since an error will have occurred if the catcodes have changed). Note that ^^J has catcode ‘other’ for use in warning messages.

50 \catcode`\ =10

51 \catcode`\#=6
52 \catcode`\$=3
53 \catcode`\%=14
54 \catcode`\&=4
55 \catcode`\\=0
56 \catcode`\^=7
57 \catcode`\_=8
58 \catcode`\{=1
59 \catcode`\}=2
60 \catcode`\~=13
61 \catcode`\@=11
62 \catcode`\^^I=10
63 \catcode`\^^J=12
64 \catcode`\^^L=13
65 \catcode`\^^M=5

Set the ‘other’ catcodes.

66 \def\reserved@c#1{\catcode#1=12\relax}
67 \reserved@c{`\!}
68 \reserved@c{`\"}
69 \reserved@a{`\'}{`\?}
70 \reserved@c{`\[}
71 \reserved@c{`\]}
72 \reserved@c{`\`}
73 \reserved@c{`\|}

Set the ‘letter’ catcodes.

74 \def\reserved@c#1{\catcode#1=11\relax}
75 \reserved@a{`\A}{`\Z}
76 \reserved@a{`\a}{`\z}

All the characters in the range 0–31 and 127–255 are illegal, except tab (^^I), nl (^^J), ff (^^L) and cr (^^M).

Now allow 8-bit characters, although their use in this way is strongly discouraged. See inputenc.dtx for a supported mechanism for 8-bit input.

77 \def\reserved@c#1{\catcode#1=15\relax}
78 \reserved@a{0}{`\^^H}
79 \reserved@c{`\^^K}
80 \reserved@a{`\^^N}{31}
81 %\ifnum\inputlineno=\m@ne
82 \catcode"7F=15
83 %\else
84 %  \reserved@a{"7F}{"FF}
85 %\fi

The lower case characters need their \uccode and \lccode values set. Depending on the TEX version, we might not be allowed to do this for non-ASCII characters.

86 \def\reserved@c#1{%
87 \count@=#1\advance\count@ by -"20
88 \uccode#1=\count@
89 \lccode#1=#1

90 }

91 \reserved@a{`\a}{`\z}
92 \ifnum\inputlineno=\m@ne\else

 93 \reserved@a{"A0}{"BC}
 94 \reserved@a{"E0}{"FF}
 95 \fi

The upper case characters need their \uccode and \lccode values set, and their \sfcode set to 999.

 96 \def\reserved@c#1{%
 97 \count@=#1\advance\count@ by "20
 98 \uccode#1=#1
 99 \lccode#1=\count@
100 \sfcode#1=999

101 }

102 \reserved@a{`\A}{`\Z}
103 \ifnum\inputlineno=\m@ne\else
104 \reserved@a{"80}{"9C}
105 \reserved@a{"C0}{"DF}
106 \fi

Well, it would be nice if that were correct, but unfortunately, the Cork encoding contains some odd slots whose uccode or lccode isn’t quite what you’d expect.

107 \uccode`\^^Y=`\I     % dotless i
108 \lccode`\^^Y=`\^^Y   % dotless i
109 \uccode`\^^Z=`\J     % dotless j, ae in OT1
110 \lccode`\^^Z=`\^^Z   % dotless j, ae in OT1
111 \ifnum\inputlineno=\m@ne\else
112 \lccode`\^^9d=`\i    % dotted I
113 \uccode`\^^9d=`\^^9d % dotted I
114 \lccode`\^^9e=`\^^9e % d-bar
115 \uccode`\^^9e=`\^^d0 % d-bar
116 \fi

\MakeUppercase \MakeUppercase \@uclclist And whilst we’re doing things with uc/lc tables, here are two commands to upper-

and lower-case a string.

Note that this implementation is subject to change! At the moment we’re not providing any way to extend the list of uc/lc commands, since finding a good interface is difficult. These commands have some nasty features, such as uppercasing mathematics, environment names, labels, etc. A much better long-term solution is to use all-caps fonts, but these aren’t generally available.

117 \DeclareRobustCommand{\MakeUppercase}[1]{{%
118  \def\i{I}\def\j{J}%
119  \def\reserved@a##1##2{\let##1##2\reserved@a}%
120  \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
121  \protected@edef\reserved@a{\uppercase{#1}}%
122  \reserved@a

123 }}

124 \DeclareRobustCommand{\MakeLowercase}[1]{{%
125  \def\reserved@a##1##2{\let##2##1\reserved@a}%
126  \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
127  \protected@edef\reserved@a{\lowercase{#1}}%
128  \reserved@a

129 }}

130 \def\@uclclist{\oe\OE\o\O\ae\AE\aa\AA
131  \dh\DH\dj\DJ\l\L\ng\NG\ss\SS\th\TH}

The above code works, but has the nasty side-effect that if you say something like:

     \markboth{\MakeUppercase\contentsname}
              {\MakeUppercase\contentsname}

then the uppercasing is only done to the first letter of the contents name, since the mark expands out to:

     \mark{\protect\MakeUppercase Table of Contents}
          {\protect\MakeUppercase Table of Contents}

In order to get round this, we redefine \MakeUppercase and \MakeLowercase to grab their argument and brace it. This is a very low-level hack, and is not recommended practice! This is an instance of a general problem that makes it unsafe to grab arguments unbraced, and probably needs a more general solution. For the moment though, this hack will do:

132 \protected@edef\MakeUppercase#1{\MakeUppercase{#1}}
133 \protected@edef\MakeLowercase#1{\MakeLowercase{#1}}

70.6 Applying Patch files

Between major releases, small patches will be distributed in files ltpatch.ltx which must be added at this point.

134 \IfFileExists{ltpatch.ltx}
135 {\typeout{***********************************^^J%
136  * Applying patch file ltpatch.ltx *^^J%
137  ***********************************}
138 \def\fmtversion@topatch{unknown}
139 \input{ltpatch.ltx}
140 \ifx\fmtversion\fmtversion@topatch
141  \ifx\patch@level\@undefined
142  \typeout{^^J^^J^^J%
143  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
144  !! Patch file `ltpatch.ltx' not suitable for this^^J%
145  !! version of LaTeX.^^J^^J%
146  !! Please check if initex found an old patch file:^^J%
147  !! --- if so, rename it or delete it, and redo the^^J%
148  !! initex run.^^J%
149  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
150  \batchmode \@@end
151  \else

The code below adds the ‘patch level’ string to the first \typeout in the startup banner.

152  \def\fmtversion@topatch{0}%
153  \ifx\fmtversion@topatch\patch@level\else
154  \def\reserved@a\typeout##1##2\reserved@a{%
155  \typeout{##1 patch level \patch@level}##2}
156  \everyjob\expandafter\expandafter\expandafter{%
157  \expandafter\reserved@a\the\everyjob\reserved@a}
158  \let\reserved@a\relax
159  \the\everyjob
160  \fi
161  \fi

162 \else
163  \typeout{^^J^^J^^J%
164  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
165  !! Patch file `ltpatch.ltx' (for version <\fmtversion@topatch>)^^J%
166  !! is not suitable for version <\fmtversion> of LaTeX.^^J^^J%
167  !! Please check if initex found an old patch file:^^J%
168  !! --- if so, rename it or delete it, and redo the^^J%
169  !!     initex run.^^J%
170  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
171  \batchmode \@@end
172 \fi
173 \let\fmtversion@topatch\relax
174 }{}

70.7 Initialise file list

\@providesfile Initialise for use in the document. During initex a modified version has been used which leaves debugging information for latexbug.tex.

175 \def\@providesfile#1[#2]{%
176  \wlog{File: #1 #2}%
177  \expandafter\xdef\csname ver@#1\endcsname{#2}%
178 \endgroup}

\reserved@a \reserved@b And just to make sure nobody relies on those definitions of \reserved@b and friends. These macros are reserved for use in the kernel. Do not use them as general scratch macros.

179 \let\reserved@a\@filelist
180 \let\reserved@b=\@undefined
181 \let\reserved@c=\@undefined
182 \let\reserved@d=\@undefined
183 \let\reserved@e=\@undefined
184 \let\reserved@f=\@undefined

\@filelist \@addtofilelist Reset \@filelist so files input while making the format are not listed. The list built up so far may take up a lot of memory and so it is moved to \reserved@a where it will be overwritten as soon as almost any L^{A}TEX command is issued in a class file. However the latexbug.tex program will be able to access this information and insert it into a bug report.

185 \let\@filelist\@gobble
186 \def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}%

70.8 Dumping the format

Finally we make @ into a letter, ensure the format will be in the ‘normal’ error mode, and dump everything into the format file.

187 \makeatother
188 \errorstopmode
189 \dump

190 ⟨/2ekernel⟩

Index 403

Index

The italic numbers denote the pages where the corresponding entry is described, numbers underlined point to the definition, all others indicate the places where it is used.

Symbols

\! . . . . . . . . . . . b154, b156, z134, N67 \" . . . . . . . . . . . . . . . . . . . . . l182,

l290, l325, l359, l422, l453, l480, l488, l494, l498, l504, l508, l514, l520, l527, l528, l534, l538, N68

\# . . . . . . . . . . . . . . . . a9, a22, b6,

b14, b219, d270, m306, m351, N51 \$ . . . . . . . . . . . . . . . a21, b4, b13,

d269, l257, l343, l350, l411, N52 \% . . . . . . . . . . . a22, a47, a49, a69,

b14, b217, d270, m353, L464, N53 \& . . . . . a21, b5, b13, b218, d269, N54 \' . . . . . . . . b232, l183, l291, l327,

l356, l424, l433, l439, l441, l444, l446, l454, l460, l466, l468, l471, l473, l481, l485, l492, l496, l501, l506, l509, l511, l518, l523, l524, l531, l536, l539, q154, r175, y138, z137, B179, C53, K441, N69

\( . . . . . . . . . . . r177, z153, \underline{z153}, z178 \) . . . . . . . b232, r178, \underline{z153}, z154, z179 \* . . . . . . . . . . . . . . m356, z135, L414 \+ . . . . . . . . . . . . . . . . . . . . . . . . C53 \, . b155, b157, \underline{i187}, r396, y138, z7,

z8, z38, z96, z98, z101, z115, z131 \- b121, d9, \underline{d9}, d10, d11, l321, l322,

l417, m358, y138, B178, C53, K440 \. . . . . . . . . b154, b156, l184, l292,

l365, l430, l456, l457, l483, m357 \/ . . a39, d12, m274, m359, r183, L103 \: . . b155, b157, d262, d263, z136, \underline{z136} \; . . . . . . b155, b157, r390, z116, z133 \< l418, l564, m354, r181, y138, C52, C90 \= . . . . . . . . . . . . . . . . . l185, l293,

l364, q154, B179, C52, K441, L465 \> . . . . . . . . . . . . . . . . . l415, l565,

m355, r182, y138, z132, z136, C52 \? . . . . . . . . . . . . . . . b154, b156, N69 \@ . . . . . . . . . . . . a12, d264, d265,

g22, \underline{i190}, j2, l124, L22, L30, N61 \@@ . . . . . . . . . . . . . . . . . . . . a249,

a250, f15, f19–f22, f24, f27, f28, f30, f31, k188, k204, n494, n498, n499, C170–C172, C177, K10, K11

\@@defaultsubs . . . . . . . . . . . . . \underline{m408} \@@enc@update . . . . . l152, m206, \underline{m210} \@@end . a16, a164, a290, a349, a376,

a437, a679, d8, k166, k167, q121, y35, y45, M18, N150, N171

\@@endpbox . . . . . . . C144, C168, \underline{C279} \@@eqncr . . . . . . z213, z231, \underline{z234}, z308

\@@fileswith@pti@ns . . . . . L176, \underline{L343}

\@@hyph . . . . . . . . . . . . . . . . . . . . . \underline{d9} \@@hyphenation . . . . . . . . . . . . . . \underline{l162} \@@ifdefinable . . . . . . . . . . . . . . \underline{d98} \@@input . . . . . . . . . . . . . . . . a15,

d7, d285, k142, k143, k152, m307 \@@italiccorr . . . . . . . . . \underline{d12}, t92, t96 \@@line . . . . . . . . . . . . . . . . . . . \underline{B281} \@@math@bgroup . . . . . . . . . . t110, t117 \@@math@egroup . . . . . . . . . . . . . . \underline{t107} \@@par \underline{d6}, h4, y45, y97, y101, y104,

60, A57, A58, B177, K188, K443 \@@patterns . . . . . . . . . . . . . . . . . \underline{l162} \@@protect . . . . . . . . d222, d228, d237 \@@sqrt . . . . . . . . . . . . . . . . . . . . r417 \@@startpbox . . . . . . C144, C168, \underline{C279} \@@underline . . . . . . \underline{B251}, B254, B255

\@@unprocessedoptions . . . L325, \underline{L385}

\@@warning . . . . . . . . . . . . . . . . . \underline{g188} \@Alph . . . . . . . . . . . . . . . . . . u29, \underline{u31}

\@DeclareMathDelimiter . . . . . . . .

. . . . . . . . . . . . p600, p606, p658

\@DeclareMathSizes m179, m180, \underline{m182}

\@Esphack . . . . . . . . . i82, G109, G120 \@M . . . . . . . . . . . \underline{b21}, b196, b197,

d23, d25, i14–i21, i26, i34, n401, n424, z223, C48, F44, F65, F74, F82, F117, K129, K130, K189

\@MM . . . . . . . . . . . . . . \underline{b21}, G242, K228 \@Mi . . . . . . . . . . . . . . . . . . . . \underline{e3}, K115 \@Mii . . . . . . . . . . . . . . . . \underline{e3}, G32,

G102, G120, G171, K224, K828 \@Miii . . . . . . . . . \underline{e3}, G34, G172, K227 \@Miv . . . . . . . . . e6, G103, G109, K203 \@Roman . . . . . . . . . . . . . . . . . u27, \underline{u31} \@TeXversion . . . . . . . . . . . . . . . . .

. 1, 5, \underline{a244}, a442, a450, a452, g31 \@acci . . . . . . . . . . . \underline{q154}, B179, K441 \@accii . . . . . . . . . . \underline{q154}, B179, K441 \@acciii . . . . . . . . . \underline{q154}, B179, K441

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@acol . . . . . . . . . . . . . . . . . C127, C135, C183, C184, C196, C197, C200, C207, C213, C216, C220

\@acolampacol . . . . . . \underline{C181}, C198,

C200, C205, C207, C219, C222

\@activechar@info . . . . . . . . . . \underline{K423}

\@addamp . . . . . . . . . . \underline{C178}, C183,

C184, C199, C206, C220, C221 \@addfield . . . . . . . . . . . . . . C36,

\underline{C45}, C66, C73, C98, C103, C105 \@addmarginpar . . . . . . . . K262, \underline{K1079} \@addtobot . . \underline{K650}, K737, K801, K850 \@addtocurcol . . . . . . . . . K259, \underline{K741} \@addtodblcol . . . . . . . . . K620, \underline{K962} \@addtofilelist a43, a45, k44, k142,

\underline{k185}, q111, q129, q133, q140,

q143, q150, q153, N21, N24, \underline{N185}

\@addtonextcol . . . . . . . . K619, \underline{K885}

\@addtopreamble . . . . . . . . . C214,

C218, C223–C225, \underline{C227}, C239 \@addtoreset . . . . . . . . . u11, u19, u24 \@addtotoporbot … \underline{K687}, K844, K931 \@afterheading . . . . . . . . . . F62, \underline{F79}

\@afterindentfalse . . . . . . . . . . . F26
\@afterindenttrue . . . F24, \underline{F78}, F116

\@alph . . . . . . . . . . . . . u28, \underline{u31}, G221 \@ampacol … \underline{C181}, C198, C205, C222 \@arabic . . . . . . . u23, u25, \underline{u31}, G219 \@argarraycr . . . . . . . . . . . C152, \underline{C153} \@argdef . . . . . . . . . . . . . . . . . . . \underline{d47} \@argrsbox . . . . . . . . . . . . . . . . \underline{B261} \@argtabularcr . . . . . . . . . C159, \underline{C160} \@array . . . . . . . . . . . . . . . C138, C139 \@arrayacol . . . . . . . . . . . . C127, \underline{C181} \@arrayclassiv . . . . . . . . . C128, \underline{C224} \@arrayclassz . . . . . . . . . . C127, \underline{C198} \@arraycr . . . . . . . . C129, \underline{C150}, \underline{C152}

\@arrayparboxrestore \underline{B176}, B188, C277

\@arrayrule . . . . . . . C213–C216, \underline{C239} \@arstrut . . . . . . . . C143, C169, \underline{C236} \@arstrutbox . C139, C162, \underline{C236}, C278 \@author . . . . . . . . . . . . . . . . . . . . \underline{F5} \@autoerr … b75, b240, b247, g19,

g88, g119, g150, \underline{g213}, g218, g221, g224, g228, g231, g235, g238, g241, g245, g248, g257, g263, g266, g269, g272, g277, g280, g285, k154, l58, m476, p83

\@autoload . . . . . . . . . . . . . \underline{d278},

g213, n417, C123, D15, K1142 \@auxout . . . . . I7, I8, I19, I29, I37,

I42, k67, k72, k88, k102, w33, F108 \@backslashchar . . . . . . . . \underline{d185}, g216 \@badcrerr . . . . . . . . . . . . . . . . . \underline{g273} \@badend . . . . . . . . . . . . . . . \underline{g232}, y61

\@badlinearg . . . . . . . . . . . . . \underline{g259},

D79, D88, D89, D129, D134, D145 \@badmath . . . . . . . . . . \underline{g236}, z153,

z154, z157, z169, z174, z256, z270 \@badpoptabs . . . . . . . \underline{g242}, C65, C114

                                       \@badrequireerror . . . . . . L116, \underline{L393}

\@badtab . . . . . . . . . . . . . . . . \underline{g246},

C24, C67, C89, C93, C96, C111

                                       \@begin@tempboxa . . . . . . . . . . . . .

\underline{B11}, B26, B114, B162, B262, B270

                                       \@begindocumenthook . . . . . . . . . . .

. I33, k38, k41, m301, \underline{L354}, L366 \@begindvi . . . . . . . . . . . K463, \underline{K499} \@begindvibox . . . . . . . . . . \underline{K65}, K500

                                       \@beginparpenalty . . . . . . . . . . . .

. . . . . i17, z259, z273, \underline{A23}, A101 \@begintheorem . . . . . . . . . . E30, \underline{E35} \@bezier . . . . . . . . . . . . . D325, \underline{D326} \@bibitem . . . . . . . . . . . . . . . . . I3, \underline{I8} \@biblabel . . . . . . . . . . . . . . . I4, \underline{I48} \@bitor . . . . . . . K13, K632, K642,

K702, K784, K793, K919, K1024 \@botlist . . . . . K44, K280, K282,

K506, K527, K536, K537, K664, K667, K702, K704, K793, K795

\@botnum . . . . . . . . . . . . . . . G156, K88, K661, K662, K667, K671, K678, K954, K959, K1187, K1209

\@botroom G157, K89, K664, K667, K1188 \@boxfpsbit …. K1257, \underline{K1259}, K1264 \@break@tfor . . . . . . . . . \underline{f31}, k137, t77 \@bsphack . . . . . . . . . . . . . . . . I39,

i6, \underline{i38}, i150, i167, w32, G31, G171, H6, H17, H22, H32, K1159

\@caption . . . . . . . . . . . . . . . . G4, \underline{G5} \@captype . . . . . G4, G19, G67, K1221 \@car . . . . . . . . . . . . . \underline{d30}, 35, j15, l85 \@carcube . . . . . . . . . . . . . . \underline{d32}, d101 \@cclv . . . . . . . . . \underline{b16}, K229, K233,

K278, K279, K307, K331, K335 \@cclvi . . . . . . . . . . \underline{b21}, b50, b53, b56 \@cdr . . . . . . . . . . . \underline{d30}, d245, d246, 35 \@centercr . . . . . . . \underline{y64}, y70, y76, y81 \@centering . . . . . . . . . . . . . . z193,

z194, z201, z204, z207, z301, z305 \@cflb . . . . . . . . . . . . . . . . . . . . \underline{K503} \@cflt . . . . . . . . . . . . . . . . . . . . \underline{K503} \@changed@cmd \underline{l3}, l73, l180, m106, m214 \@changed@x . . . . . . . . . . . \underline{l3}, l168, l176

                                       \@changed@x@mouth . . . . . . . l168, l176

\@charlb . . . . . . . . . . . . . . k104, k111 \@charrb . . . . . . . . . . . . . . k105, k112 \@chclass C194, C195, \underline{C228}, C241, C246

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@check@c . . . . . . . . . . . . . d157, \underline{d159} \@check@eq . . . . . . . . d163, d164, \underline{d168} \@checkend . . . . . . . . . . . y7, y57, \underline{y60} \@chnum . C202, C209, \underline{C228}, C243–C245 \@circ . . . . . . . . . . . D291, D292, \underline{D293} \@circle . . . . . . . . . . . . . D279, \underline{D280} \@circlefnt . . . . . . . . . . D47, D49,

D243, D258, D284, D299, D316 \@cite . . . . . . . . . . . . . . . . . . I16, \underline{I47} \@citea . . . . . . . . . . . . . . . . . I15, I17 \@citeb . I16, I18–I20, I23, I24, I40–I44 \@citex . . . . . . . . . . . . . . . . . I13, \underline{I14} \@classi . . . . . . . . . . . . . . C194, \underline{C213} \@classii . . . . . . . . . . . . . C194, \underline{C217} \@classiii . . . . . . . . . . . . C194, \underline{C219} \@classiv . . . . . . . . C128, C137, C195

\@classoptionslist . . . . . . . . . . . .

. . . . . \underline{L9}, L145, L156, L272, L273 \@classv . . . . . . . . . . . . . . C195, \underline{C225} \@classz . . . . . . . . . C127, C136, C194 \@cline . . . . . . . . . . . . . . . . . . . \underline{C260} \@clnht … D91, D92, D100, D102,

D104, D114, D117, D143, \underline{D310} \@clnwd . . . . . . . . . . . . . . . . . D93,

D99, D103, D105, D106, \underline{D310} \@cls@pkg . . . . . . . . . . . L85, L86,

L306, L334, \underline{L369}, L378, L380, L397 \@clsextension . . . . . . . . . . . a360,

\underline{L14}, L39, L50, L68, L92, L112, L129, L145, L155, L195, L210, L218, L271, L338, L346, L370, L494

\@clubpenalty . . . . . \underline{k9}, k18, F69, F84 \@colht … k15, G155, G157, G160,

G163, G164, K93, K162, K173, K182, K183, K283, K295, K322, K352, K386, K392, K396, K406, K411, K495, K566, K583, K623, K633, K645, K1038, K1322, N13

\@colnum . . . . . . . . . . . . . . . G158, K90, K670, K715, K782, K783, K810, K818, K857, K917, K918, K954, K959, K1183, K1202, K1376

\@colroom . . k16, K94, K183, K204, K215, K283, K566, K669, K714, K778, K781, K809, K913, K916, K1184, K1332, K1336, K1381, N12

\@combinedblfloats . . . . . \underline{K539}, K1422

\@combinefloats . . . . . . . K346, \underline{K503} \@comdblflelt . . . . . . . . . . . . . . \underline{K539} \@comflelt . . . . . . . K509, K525, \underline{K539} \@cons . . . . . . . . . . . . . . . . . . \underline{d29},

35, u24, G101, G118, G202, K168, K634, K639, K646, K647, K813, K878, K947, K1040, K1063, K1080, K1081, K1382

\@contfield . . . . . . . . \underline{C42}, C104, C116 \@ctrerr . . . . . . . . \underline{g226}, u37, u41, u44 \@curfield . . . . . . . . . . . . . . \underline{C16},

C36, C39, C43, C44, C46, C100 \@curline . . . . . . . \underline{C16}, C29, C36,

C37, C45–C47, C70, C71, C83, C99 \@curr@enc . l133, l137, l140, l142, l143 \@currbox . . G39, G70, G74, G101,

G118, G139, G141, G143, G174, G176, G178, G180, K144, K145, K156, K157, K159, K160, K168, K240, K241, K619, K620, K775, K777, K807, K811, K813, K825, K866, K878, K907, K936, K947, K978, K982, K993, K999, K1001, K1005, K1010, K1019, K1033, K1040, K1063, K1081, K1090, K1227, K1228, K1257, K1287, K1292, K1337, K1340, K1352, K1360, K1377, K1382

\@currdir 1, 4, a50, a72, a74, a80, a82, a88, a90, a95, a97, a107, \underline{a120}, a185, a198, a211, a284, a286, a292, a294, a302, a307, a308, a323, a325, a329, a339, a343, a344, a384, a385, a396, a431, L423

\@current@cmd . . . . . . . . . . . l24, m218 \@currentlabel . . . . . . . . . . . w34,

w37, \underline{w40}, z197, z286, B239, G244 \@currenvir g233, \underline{y3}, y51, y61, B74, L455 \@currenvline …. g233, y52, \underline{y62}, B75 \@currext \underline{L13}, L21, L29, L91, L92,

L129, L138, L145, L155, L205, L214, L297, L298, L303, L304, L309, L315, L318, L320, L322, L324, L326, L327, L330, L336, L338, L346, L362, L370, L386, L387

\@currlist . . . . . . . . G101, G202,

K46, K240, K284, K287, K1080 \@currname . . . . . . . . . . . . . . . . . .

k196, k197, \underline{L12}, L20, L28, L83, L85, L91, L138, L214, L296, L298, L320, L322, L324, L326, L327, L362, L378, L380, L387, L397

\@currnamestack . . . . . . . . . . . . . \underline{L18} \@curroptions . . . . . . . . . . . . . . . .

… L138, L146, L168, L387, L388 \@currsize . . . . . . . . . . . . . . . . . q58 \@currtype K98, K630–K632, K702,

K784, K793, K919, K1024, K1227, K1229, K1230, K1233

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@curtab . . . . . . . . . . . . . . . . . . . .

\underline{C11}, C28, C66–C68, C74, C75, C78, C82, C83, C88, C109, C110

\@curtabmar . . . . . . . . . . \underline{C11}, C27,

C28, C35, C37, C69, C82, C87, C88 \@d@r . . . . . . . . . . . . . . . . . a103, a104 \@dashbox . . . . . D185–D189, D192,

D195, D197, D206, D208– D211, D214, D217, D220, \underline{D312}

\@dashcnt . . . . . . . . . . . . . . D179– D184, D194, D196, D199–D202, D204, D205, D216, D219, \underline{D312}

\@dashdim . . . . . . . . . D178–D181, D183, D186, D188–D190, D194, D196, D198–D201, D204, D208, D210–D212, D218, D221, \underline{D312}

\@date . . . . . . . . . . . . . . . . . . . . . . \underline{F7} \@dbflt . . . . . . . . . . . . . . . G16, \underline{G146} \@dblarg . . . . . \underline{d267}, 34, F33, F90, G4 \@dbldeferlist . G118, K49, K293,

K298, K300, K584, K591, K592, K1024, K1026, K1063, K1065

\@dblfloat . . . . . . . . . . . . . . . . . \underline{G15}

\@dblfloatplacement . . . . . . . . . . .

. k24, \underline{G161}, K297, K1181, K1428 \@dblflset . . . . . . . . . . . . . . . . . \underline{G12} \@dblfpbot . . . . . . . . . . . G169, \underline{K1471} \@dblfpsep . . . . . . . . . . . G168, \underline{K1471} \@dblfptop . . . . . . . . . . . G167, \underline{K1471} \@dbltoplist . . . . . . . . K48, K163,

K166, K168, K293, K294, K544, K548, K550, K551, K1035, K1040

\@dbltopnum . . . . . . . . . . . . . G162, K86, K106, K169, K171, K555, K975, K976, K1039, K1042, K1050, K1070, K1075, K1191

\@dbltoproom . . . . . . . . . . . . . . . . .

…. G163, G165, K87, K978, K981, K982, K991, K992, K995, K998, K1001, K1004, K1009, K1013, K1018, K1037, K1192

\@dec@text@cmd . . . . . . . . . . . . . . . . \underline{l3}

\@declaredoptions . . . . . . . . . . . .

\underline{L8}, L119, L142, L158, L173, L352 \@declareoption … L117, L118, L126 \@defaultsubs . . . . . . m398, \underline{m408}, y22 \@defaultunits m183, \underline{m244}, n133, n135 \@defdefault@ds … L117, L122, L127 \@deferlist . . . . . . . . . . . . . . . . . .

K47, K280, K289, K290, K567, K575, K576, K784, K786, K878, K880, K919, K921, K947, K949

\@definecounter . . . u8, \underline{u16}, z182,

A133–A136, E8, E16, G218, G220 \@depth . . . . . . . . . . . . . \underline{d13}, n145,

r444, r445, r447, r448, B250, B280, C141, C163, D119, D168, D171, D185, D192, D357, K1119

\@dir …. a102, a105, a107, a109, a110 \@dischyph . . . . . . . . \underline{d11}, B178, K440 \@doclearpage . . . . . . . . . K225, \underline{K275}

\@documentclasshook . . . . . . . \underline{L3}, L276

\@doendpe . . . . . . . . . . . . . . . y58, \underline{A80} \@dofilelist . . . . . . . . k194, \underline{k210}, y17 \@donoparitem . . . . . . . . . . . \underline{A90}, A97 \@dot . . . . . . . . . . . . . . . . D279, \underline{D292} \@dotsep . . . . . . . . . . . . . . . . . . F122 \@dottedtocline . . . . . . . . . . . . \underline{F113} \@downline . . . . . . . D165, \underline{D169}, D174 \@downvector . . . . . . . . . . D138, \underline{D174} \@eha . . . . . \underline{g195}, g217, g220, g223,

g234, g237, g279, k73, l55, l105, m33, m77, m117, m160, m200, m255, n106, p16, p71, p116, p236, p268, p309, p354, p359, p414, p522, p526, p530, p564, p574, p647, p652, p655, p687, p690, p744, p747, p750, p817, p823, t125, y50, K1153, K1169

\@ehb . . . . . . . . . . . . . . . . . . . \underline{g195},

g227, g262, g265, g268, K165, K286 \@ehc . . . . . . . . . . . . . . . . . . . d94,

d121, \underline{g195}, g273, g276, g284, g287, y124, y134, z238, A128, F4

\@ehd . . . . . \underline{g195}, g230, g240, g244,

g247, g255, p81, C80, C90, L242 \@elt . . . . . . . . . . . d29, k105, p41,

u13, u15, K8, K11, K13, K39– K42, K509, K520, K525, K535, K547, K549, K577, K593, K610, K621, K625, K635, K637, K640

\@empty . . . . . . . . . . . . . . . . . . . . . \underline{f14} \@emptycol . . . . . . . . . . . . . . . . . .

. . \underline{K129}, K176, K179, K207, K211 \@end@tempboxa . . . . . . . . . . . . . . .

\underline{B20}, B29, B119, B175, B268, B278

\@enddocumenthook . . . y6, \underline{L354}, L367

\@endfloatbox . . . . . G98, G115, \underline{G125} \@endparenv . . . . . . . . . . . . . A77, \underline{A80}

\@endparpenalty . . . . . . . . . . . . . .

. . . . . . i18, z260, z274, \underline{A23}, A81 \@endpbox . . . . . . . . . . . . . . C144,

C168, C189, C226, \underline{C277}, C280 \@endpefalse . y55, A83, A84, \underline{A85}, B77 \@endpeltrue . . . . . . . . . . . . . . . . \underline{A85} \@endpetrue . . . . . . . . . . . . . A81, A82 \@endtheorem . . . . . E13, E19, E25, \underline{E35} \@enlargepage . . K1133, K1138, \underline{K1144}

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@enumctr . . . . . . . . A140, A143, A144 \@enumdepth . . . . . . . \underline{A132}, A138–A140 \@eqcnt . . . . . . . . . . . . . . . . . \underline{z190},

z235, z240, z288, z303, z304, z306 \@eqncr … z202, \underline{z220}, z241, z242, z290 \@eqnnum . . z184, \underline{z185}, z239, \underline{z247}, z281 \@eqnsel . . . . . . . . . . . . . . . \underline{z190}, z302 \@eqnswfalse . . . . . . . . . . . . . . . . z219 \@eqnswtrue …. z192, z198, z240, z287 \@eqpen . . . . . . . \underline{z190}, z223, z225, z232 \@err@ . . . . . . . . . . . . . . . . . . g40,

g44, g47, g55, g67, g71, g74, g82 \@esphack . . I45, i6, \underline{i38}, i155, i174,

w35, G207, H16, H18, H31, K1161 \@evenfoot . . . . . . . . . J12, J15, K457 \@evenhead . . . . . . . . . J12, J15, K456

\@expandtwoargs . . . . . . . . . . . . . .

…. \underline{d183}, L72, L144, L158, L182 \@expast . . . . . . . . . . . . . . \underline{C171}, C190 \@failedlist . . . . . . . . . . . . K608,

K626, K632, K634, K639, K642 \@fcolmadefalse . . . . . . . . . . . . K599 \@fcolmadetrue . . . . . . . . . . . . . K639 \@filef@und … k124, k134, k142, k152 \@filelist . . . . . . . . . . . . . . . . . .

. k43, \underline{k184}, k185, k196, q111,

q129, q140, q150, N21, N179, \underline{N185}

\@fileswfalse . . . . . . . . . . . . . . . k51

\@fileswith@pti@ns . . . . . . . L116,

L176, L267, L268, L270, L293, L343

\@fileswith@ptions . . . . . . . . . . . .

. . . . . . . L262, L263, L265, L269

\@fileswithoptions . . . . . . . . . . . .

. . . . . . . L195, L202, L210, \underline{L260} \@fileswtrue . . . . . . . . . . . . . . . . . k7 \@finalstrut . B243, \underline{B279}, C278, G249 \@firstampfalse … C179, C200, C207 \@firstamptrue . . . . . . . . . . . . . C185

\@firstcolumnfalse . . . . . . . . . K1401
\@firstcolumntrue . . . . . . . . . . . .

. . . . . . . . k21, K77, K139, K1407 \@firstofone . . . . . . . . . . . . . . I18,

I41, \underline{d179}, n300, p47, p97, C265 \@firstoftwo …. a34, \underline{d179}, d241,

d266, p81, w19, J16, L46, L62, L75 \@firsttab … \underline{C2}, C55–C57, C87, C94 \@flcheckspace … K664, K700, \underline{K1328} \@flfail …. K626, K636, K643, K646 \@float . . . . . . . . . . . . . . . . \underline{G12}, G16 \@floatboxreset . . . . . . . . . G79, \underline{G81} \@floatpenalty G3, G32, G34, G37,

G99, G102, G107, G109, G116, G120, G171–G173, G175, G202

                                       \@floatplacement . . . . k24, G153,

K128, K141, K184, K325, K1182 \@flsetnum . . . . . . . . . . . . . K661,

K697, K782, K917, K975, \underline{K1296} \@flsettextmin … K758, K903, \underline{K1312} \@flstop . . . . . . . . . . . . . . . . . \underline{K1198} \@flsucceed . . K622, K627, K635, K647 \@fltovf . . . . . . . . . . \underline{g267}, G72, G175 \@flupdates . . . . . . K667, K712, \underline{K1373} \@flushglue . . . . . . . . . . . . . . . . . .

\underline{e17}, y70, y76, y81, y96, A52, B185 \@fnsymbol . . . . . . . . . . . . . . u30, \underline{u42} \@font@info . . . . . . . . m108, m144,

m150, m285, m334, m446, n30, n38, n46, n74, n87, n126, n154, n168, n179, n193, n209, n215, n224, n235, n242, n247, n257, n269, n281, n465, n481, n490, n503, n532, n544, p124, p139, p175, p216, p294, p338, p351, p434, p513, p555, p637, p785, p814

\@font@warning . . m4, m394, m399, n19, n33, n41, n49, n61, n77, n448, n464, n480, n489, n502, n531, n543, o20, p288, y19, N26

\@fontswitch . . . . . . . . . . . . t105, \underline{t107} \@footnotemark . . . . . . . . . . . . . . .

. . G231, G237, G255, G261, \underline{G262} \@footnotetext . . . . . . . . . . B213,

G231, G237, \underline{G238}, G271, G277 \@for . I16, I40, \underline{f16}, k84, k196, L76,

L142, L156, L168, L173, L188, L388 \@forloop . . . . . . . . . . . . . . . . f19, \underline{f20} \@fornoop . . . . . . . . . . . . \underline{f15}, f23, f29 \@fortmp . . . . . . . . . . . . . f17, f18, f26 \@fpbot . . . . . . . . . G169, K625, \underline{K1465} \@fpmin . . . . . . . . . . . . . . . . G160,

G166, K92, K638, K1189, K1388 \@fps . . . . . . . . . . . G20, G21, G23,

G26, G43, K1219, K1221, K1224 \@fpsadddefault … G24, G27, \underline{K1216} \@fpsep G168, K624, K629, K645, \underline{K1465} \@fpstype …. K658, K679, K680,

K694, K725, K726, K748, K750, K753, K755, K805, K858, K859, K893, K895, K898, K900, K972, K987, K989, K1007, K1016, K1051, K1052, \underline{K1212}, K1228, K1230, K1232, K1235–K1237, K1239, K1240, K1244, K1245, K1247, K1248, K1282, K1284, K1286, K1298, K1300, K1314, K1316, K1345, K1348, K1359

\@fptop . . . . . . . . . G167, K623, \underline{K1465}

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@frameb@x . . . . . . . B104, B118, \underline{B120} \@framebox . . . . . . . . . . . . B107, \underline{B108} \@framepicbox . . . . . . . . . . B107, \underline{B141} \@freelist . . . . . . . . . . . . . . G39,

G174, K39, K144, K344, K521, K536, K550, K627, K1080, K1081

\@getcirc . . . . . . . . \underline{D236}, D254, D282 \@getfpsbit . K655, K691, K969, \underline{K1255} \@getlarrow . . . . . . . D136, D144, \underline{D146} \@getlinechar . . . . . . . . . . D90, D121 \@getpen . . . . . . . . . . i5, i6, i9, i13, \underline{i32} \@getrarrow . . . . . . . D137, D144, \underline{D152} \@glossaryfile . . . . . . H20, H21, H28 \@gobble . . . . . . I11, I25, I26, d99,

\underline{d176}, d185, d204, d208, d284, f6, f9, g109, g140, g171, g180, i29, i211, k44, k184, l28, m395, n299, o16, p19, p21, p179, p190, p252, p299, p300, p329, p335, p343, p348, p366, p380, p390, p399, p412, p429, p438, p516, p558, p640, p703, p776, p807, q133, q143, q153, F91– F95, F109, K471–K473, K486– K488, K640, K1177, K1389, L230, L409, N24, N120, N126, N185

\@gobblecr . . . . . . . . . . . . . i209, i210 \@gobblefour . . . . . . . . . . . . . . . . .

. \underline{d176}, p15, p176, p290, p292, p296, p298, p308, p312, p436, p488

\@gobbletwo . . . . . . . . . . . . . . . . . .

. . d145, d146, \underline{d176}, f12, k25, m400, p91, y12, y20, J11, J13, N32

\@gtempa . . . . . . . . d92, d93, d150, d151, k163, k164, k166–k168, C3, C5–C8, L82, L83, L93, L95

\@halfwidth . . . . . . . . . . . . . . . \underline{D2}, D48, D50, D57, D119, D167, D170, D185, D192, D206, D216, D219, D318, D344, D356, D357

\@halignto . . C129, C133, C134, C142 \@hangfrom . . . . . . . . . . F43, F74, \underline{F86} \@hash@ . . . . . . . . . . d78, d79, d83, d85 \@height . . . . . . . . . . . . . . . b190,

\underline{d13}, i161, i169, l245, l247, n144, r245, r444, r445, r447, r448, B88, B93, B127, B137, B250, B280, C140, C163, C252, C269, D119, D168, D171, D185, D192, D208, D215, D276, D356, K1119

\@highpenalty . . . . . . . . . . . . . i33, \underline{N4} \@hightab … \underline{C11}, C23, C25, C55,

C66, C75, C76, C91, C109, C110 \@hline . . . . . . . . . . . D81, \underline{D118}, D135 \@holdpg . . . . . . . . . . . . . . . K101,

K229, K231, K232, K237–K239 \@hspace . . . . . . . . . . . . . . . i191, \underline{i192} \@hspacer . . . . . . . . . . . . . . i191, \underline{i193} \@hvector . . . . . . . . . . . . D131, \underline{D135} \@icentercr . . . . . . . . . . . . . . y67, \underline{y68} \@iden . . . . . . . . . . . . . . . . . . . . . \underline{d182} \@if . . . . . . . . . . . . . . d140, d141, \underline{d143} \@if@pti@ns . . . . . . . . . . L72, L74, L80 \@if@ptions . . L67, L68, L71, L73, L304 \@ifatmargin . . . . . . . . . . . . \underline{C47}, C87 \@ifclasslater . . . . . . . . . . . 380, \underline{L49} \@ifclassloaded . . . . . . . . . . 380, \underline{L38} \@ifclasswith . . . . . . . . . . . . 380, \underline{L67} \@ifdefinable . . . . . . . . . . . . d51,

d53, d96, \underline{d98}, d206, 34, l19, q54, u7, x3, B54, E7, E15, E22

\@iffileonpath . . . . . . . . . k120, \underline{k128} \@ifl@aded . . L38, L39, L42, L48, L303 \@ifl@t@r . . . . . . L54, L57, L64, L251 \@ifl@ter … L49, L50, L53, L56, L330 \@ifnch . . . . . . . . . . . d250, \underline{d251}, d263 \@ifnextchar I3, I13, a40, d48, d68,

d116, \underline{d247}, d266, d267, 34, i30, i210, k143, n371, u8, y66, z188, A89, B5, B7, B10, B31, B56, B57, B61, B65, B106, B107, B109, B142, B146, B150, B154, B191, B195, B199, B246, B258, B260, C49, C138, C152, C159, D12, D63, D74, D246, E3, E5, E28, G13, G146, G177, G229, G252, G269, K141, K1200, L88, L104, L246, L261, L266

\@iforloop . . . . . . . . . . . . . . . f21, \underline{f22}

\@ifpackagelater . . . . . . . . . 380, \underline{L49}
\@ifpackageloaded . . . . . . . . 380, \underline{L38}

\@ifpackagewith . . . . . . . . . . 380, \underline{L67} \@iframebox . . . . . . . B110, B111, \underline{B112} \@iframepicbox . . . . . . . . . B142, \underline{B143} \@ifstar . . d40, \underline{d266}, 34, i25, i144,

i191, m179, o111, y65, y129, z222, C48, C151, C157, D73, D279, F31, F90, K1128, L117, L139

\@ifundefined . I20, I43, d93, d100, d120, d128, d151, d162, \underline{d239}, 34, m75, m159, n384, p211, u3, u5, u11, w23, y40, y49, E21, J3, J7, L36, L107, L169, L447, L450

\@ignorefalse …. \underline{y4}, y54, y59, G207 \@ignoretrue . . . . . . . . . . . . . . . . .

… i86, \underline{y4}, z181, z184, z216, z311 \@iiiminipage . . . . . . . . . . . . . . . .

. . B193, B197, B200, B201, \underline{B202}

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@iiiparbox . . . . . . . . . . . . . B148,

B152, B155, B156, \underline{B157}, B230 \@iiminipage . . . . . . . . . . . B196, \underline{B198} \@iinput . . . . . . . . . . . . . . k143, \underline{k144} \@iiparbox . . . . . . . . . . . . B151, \underline{B153} \@iirsbox . . . . . . . . . . . . . B260, \underline{B269} \@imakebox . . . . . . . . . B10, \underline{B25}, B63 \@imakepicbox … B31, \underline{B32}, B68, B144 \@iminipage . . . . . . . . . . . . B192, \underline{B194} \@include . . . . . . . . . . . . . . . k74, k75 \@index . . . . . . . . . . . . H17, \underline{H18}, H32 \@indexfile . . . . . . . . . . . H4, H5, H13 \@inlabelfalse . . . . . . . . . \underline{A28}, A109 \@inlabeltrue . . . . . . . . . . \underline{A28}, A105 \@inmatherr . . . . . . . . \underline{g281}, A88, D279 \@inmathtrue . . . . . . . . . . . . . . . . n230 \@inmathwarn . . . . . . . . . . . . . . . . . . \underline{l3} \@input . . . . . . . . . k27, k78, \underline{k151}, F99 \@input@ . . . . . . . I31, k93, \underline{k153}, m341 \@inputcheck . . . . . a17, a133, a134,

a137, a145, a323, a324, a327, a336, d24, \underline{k3}, k115, k116, k123, k132, k133, k136, L420, L421, L427

\@insertfalse . . . . . K746, K891, K967 \@inserttrue K674, K719, K830, K1045 \@invalidchar . . . . . . . . . . . . . . . \underline{g287} \@iparbox . . . . . . . . . . . . . B147, \underline{B149} \@irsbox . . . . . . . . . B258, B260, \underline{B261} \@isavebox . . . . . . . . . . . . . B61, \underline{B62} \@isavepicbox . . . . . . . . . . . B66, \underline{B67} \@ishortstack . . . . . . . . . . . \underline{D64}, \underline{D72} \@istackcr . . . . . . . . . . . . . D74, \underline{D75} \@itabcr . . . . . . . . . . . . . . . C49, \underline{C50} \@item . . . . . . . . . . . . . . . . . A89, \underline{A97} \@itemdepth . . . . . . . \underline{A147}, A149–A151 \@itemfudge . . . . . . . . . C35, C37, C62 \@itemitem . . . . . . . . . . . . A151, A154 \@itemlabel . . . . . . . . . A38, A63, A89 \@itempenalty . . . . . . . i19, \underline{A23}, A103 \@iwhiledim . . . . . . . . . . . . . . . . . . . \underline{f7} \@iwhilenum . . . . . . . . . . . . . . . . . . . \underline{f3} \@iwhilesw . . . . . . . . . . . . . . . . . . \underline{f10} \@ixpt . . . . . . . . . . . . . . . . . . . . \underline{m483} \@ixstackcr . . . . . . . . . . . . . . . . . \underline{D73} \@killglue . . . . . . . . . D30, D38, \underline{D44} \@kludgeins K249–K251, K253, K348,

K369, K370, K376–K378, K387, K403, K407, K417, \underline{K1121}, K1160

\@labels . . . . . . . . . . . . . . . . . . . .

\underline{A27}, A91, A92, A112, A120, A121

\@largefloatcheck . G100, G117, \underline{G138}

\@lastchclass . . . . . . . . . . . C185, C195, C196, C198, C205, C213, C217, C219, \underline{C228}, C241, C242 \@latex@e@error . . . . . . . . . . . . . d284 \@latex@error … d94, d121, \underline{g150},

g191, g215, g220, g223, g227, g230, g233, g237, g240, g243, g247, g253, g260, g265, g268, g271, g273, g275, g279, g284, g287, k73, l53, l102, m8, m33, m77, m117, m160, m200, m255, n105, o90, o101, p14, p69, p80, p114, p135, p151, p236, p268, p308, p312, p354, p359, p414, p482, p488, p522, p526, p530, p564, p574, p647, p652, p655, p687, p690, p744, p747, p750, p817, p823, q36, q86, t122, y50, y123, y134, z238, A127, C80, C90, F4, L206, L224, L237, L305, L377, L394, L402, L407

\@latex@info . . . . . . . . . . . d191, \underline{g150}

                                       \@latex@info@no@line . . . . \underline{g150}, K424

\@latex@warning … I22, I44, \underline{g150},

g188, l62, w14, D241, G142, K1222

                                       \@latex@warning@no@line . . . . . . .

. . . . . . . . . d170, \underline{g150}, g189, k12, k182, w8, w26, w27, y27, F6, K174, K205, K1095, K1288, L84, L252, L331, L422, L428

\@latexbug . . . . . . \underline{g270}, K264, K1081 \@latexerr . . . . . . . . . . . . . . . . . .

\underline{g188}, K165, K286, K1151, K1168

\@lbibitem . . . . . . . . . . . . . . . . I3, \underline{I4} \@ldots . . . . . . . . . . . . . . . . r394, r396 \@leftcolumn …. K100, K1402, K1411 \@leftmark . . . . . . . . . . . . . . \underline{J16}, J27 \@let@token . . . . . d250, d252, d255,

d263, t62, t75, z139, z141, z144 \@lign . . . . . . . . . . . . . . . . . z126, z128 \@linechar . . D90, D92, D93, D95,

D100, D102–D105, D107, D111, D112, D115–D117, D142, \underline{D308}

\@linefnt . . . . . . . D47, D49, D90,

D135, D143, D172, D175, D315 \@linelen . . D78, D79, D99, D106,

D115, D118–D120, D128, D129, D168, D171, D173, D174, \underline{D309}

\@listctr . . . . . . . . . . I9, A118, A131 \@listdepth . . . . . . . . . . . . . . . . . .

. \underline{A23}, A34, A35, A37, A65, B214 \@listfiles . . . . . . . . . k42, k188, k203 \@lnbk . . . . . . . . . . . . . . . . . . . . . . \underline{i11}

                                       \@loadwithoptions . \underline{L212}, L218, L221

\@lowpenalty . . . . . . . . . . . . . . i32, \underline{N4} \@ltab . . . . . . . . . . . . . . . . . C52, \underline{C87}

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@m …. I17, \underline{b21}, b152, b154, b155,

b186, b187, i190, A56, D109, D113 \@mainaux . . . . . . . . . . . . . . . . . . .

. \underline{k5}, k30, k31, k67, k78, k102, y11 \@makebox . . . . . . . . . . . . . . . . B7, \underline{B9} \@makecaption . . . . . . . . . . . . . . . G10 \@makecol . . . . . . . . K192, K308, \underline{K328} \@makefcolumn . . . . . . . . . . . . . . . .

. K289, K290, K298, K300, K1386 \@makefnmark . . . . . . . . . . \underline{G222}, G265 \@makefntext . . . . . . . . . . . B242, G248 \@makeother . . . . . . . . . . . . . . a23,

a39, a68, d269, d270, m354– m361, y107, \underline{y115}, y128, L103, L443

\@makepicbox . . . . . . . . B6, \underline{B30}, D221

\@makespecialcolbox . . . . K349, \underline{K373}

\@marbox . . . . . . G174–G176, G178, G180, G181, G202, K1080, K1090, K1093, K1101, K1103, K1104, K1106–K1108, K1117

\@marginparreset . . . . . . G188, \underline{G195}

\@markright . . . . . . . . . . . . . . J24, \underline{J26} \@maxdepth k40, \underline{K70}, K334, K363, N10 \@maxtab . . . . . . . . . . . . . . . . \underline{C2}, C74 \@medpenalty . . . . . . . . . . . . . . i33, \underline{N4} \@midlist . . . . . . . . . . . . . . . K45,

K344, K345, K702, K704, K813

\@minipagefalse . . . . A107, B189,

B216, B227, G95, G128, G190

\@minipagerestore . . . . . . B215, \underline{B217}

\@minipagetrue . . . . . . . . . B215, G94 \@minus . . . . . . . . . . . . . . . . . . . . .

\underline{d13}, K1458–K1460, K1463, K1464

\@missingfileerror . . . . . . . . . . . .

. . . . . . . . . k147, \underline{k154}, 380, L324 \@miv . . . . . . . . . . . . . . . . . . . . . . . \underline{e3} \@mkboth . . . . . . . . . . . . . . . . J11, J13 \@mklab . . . . . . . . . . . . . . . . A38, \underline{A87} \@mkpream . . . . . . . . C142, C166, \underline{C185} \@mparbottom . . . . . . . G209, G210,

K97, K324, K1091, K1099–K1102 \@mpargs . . . . . . . . . . . . . . B206, B230

\@mparswitchfalse . . . . . . . . . . . K81

\@mpfn . B212, G229, G234, G274, \underline{G278} \@mpfootins . . . . . . . . . . . . . B221,

B222, B225, \underline{B231}, B234, B235

\@mpfootnotetext . . . . . . . B213, \underline{B233}

\@mplistdepth . . . . . . . . . . B214, \underline{B231} \@multicnt . . . . . . . . . . . . . C263,

C265–C267, C274–C276, D38, D39, D41, \underline{D305}, D342, D344– D347, D351, D355, D364, D368

\@multiplelabels . . . . . . . . . . . . .

. . . . . . . k26, w25, \underline{w31}, y25, y31 \@multiput . . . . . . . . . . . . . D36, D37 \@multispan . . . . . . . C264, C268, \underline{C272} \@namedef . . . . . . . . . . . . . \underline{d27}, 34,

k108, m110, m111, m133, n378, w28, y113, z242, z243, C134, E12, E13, E18, E19, E23–E25

\@nameuse . . . . . . . . . . . . . . . . . . .

\underline{d28}, 34, k100, k107, E23, J5, K451 \@nbitem . . . . . . . . . . . . . . A100, \underline{A129} \@ne . . . . . . . . . . . . . . . . . . . . . . . \underline{b16} \@needsf@rmat . . . . . L247, L250, L255 \@needsformat . . . . . L235, L245, L249 \@negargfalse . . . . . . . . . . . . . . . D86 \@negargtrue . . . . . . . . . . . . . . . . D85 \@newcommand . . . . . . . . . . . . . d46, \underline{d47} \@newctr . . . . . . . . . . . . . . u8, u10, E8 \@newenv . . . . . . . . . . d116, d117, \underline{d127} \@newenva . . . . . . . . . . . . . d114, d115 \@newenvb . . . . . . . . . . . . . d116, d117 \@newl@bel . . . . . . . . . . I10, \underline{w22}, y13 \@newline . . . . . . . . . . . . . . . . i30, \underline{i31} \@newlistfalse . . . . . \underline{A29}, \underline{A33}, A107 \@newlisttrue . . . . . . . \underline{A29}, \underline{A33}, A59 \@next . . . . . . . . . . . . . G39, G174,

K9, K144, K240, K630, K1080 \@nextchar . . C192, C193, C223–C225 \@nil . . . . . . . . . . . . . . . . . . . a103,

a104, c4, c10, d30–d32, d101, d245, d246, f13, f19, f27, j15, l85, m275, m288, m367, m427, m430, m431, m439, n306, n307, n309, n322, n328, n332, n333, n373, n394, n401, n509, n523, o16, o34, o43, o47, p31, p278, p286, p319, p828, p830, t38, t42, C260, C261, L25, L27, L58, L59, L65, L187, L190, L283, L290

\@nmbrlistfalse . . . . . A33, A38, A60 \@nmbrlisttrue . . . . . . . . . . . . . A131 \@nnil . . . . . . . . . \underline{f13}, f20–f22, f28,

m183, n133, n135, n299, n301, n315, n317, n322, n336, n338, n345, n360, n361, n363, n394, n401

                                       \@no@font@optfalse . . . . . . . . . . . \underline{o119}

\@no@pgbk . . . . . . . . . . . . . . . i3, i4, \underline{i5} \@nobreakfalse . . . . . . . . . . . . . . .

. . i35, A116, F63, F81, F103, G90 \@nobreaktrue . . . . . . . . . . . F79, G89 \@nocnterr . . . . . . . . . . . . . . . . . \underline{g222} \@nocounterr … \underline{g222}, u3, u5, u11, E21 \@nodocument . . . . . . . . . . . . \underline{g229}, y46

                                       \@noitemargfalse . . . . . . . \underline{A32}, A117

\@noitemargtrue . . . . . . . . . \underline{A32}, A89 \@noitemerr . \underline{g274}, i121, i141, A57, A69

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@noligs . . . . . . . . . . y106, y127, \underline{y144} \@nolnbk . . . . . . . . . . . . . . . . . . . . . \underline{i7} \@nolnerr . . . . . . \underline{g219}, i8, i12, i22, y64 \@nomath . \underline{m2}, m253, q31, q49, q51, q56

\@noparitemfalse . . . . . . . . \underline{A30}, A90

\@noparitemtrue . . . . . . . . . \underline{A30}, A49

\@noparlistfalse . . . . . . . . \underline{A31}, A50

\@noparlisttrue . . . . . . . . . \underline{A31}, A49 \@normalcr . . . . . . . . \underline{i24}, B188, K442 \@normalsize . . . . . . . . . . . . . . L4, L5

\@noskipsecfalse . . . . . . . . . k36, F64

\@noskipsectrue . . . . . . . . . \underline{F21}, F63 \@notdefinable d102, d103, d107, \underline{g214} \@notprerr . . . . . . . . . . . . . \underline{g278}, k46 \@nthm . . . . . . . . . . . . . . . . . . . E3, \underline{E4} \@nxttabmar . . . . . . . . . . \underline{C11}, C23,

C25, C27, C56, C91, C92, C94, C95 \@obsoletefile . . . . . . . . . . . . . . \underline{k181} \@oddfoot . . J11, J14, J15, K103, K454 \@oddhead . . . . . J11, J14, K102, K454

\@onefilewithoptions . . . . . . . . . .

… L275, L279, L285, L294, L342

\@onelevel@sanitize . . . . . . \underline{d271}, G21

\@onlypreamble . . . . . . . \underline{d33}, d156, d158, d167, d175, k50, k56, k70, k183, k209, l22, l23, l71, l72, l77, l108, l130, l160, l161, m26, m90, m92, m98, m113, m140, m155, m176, m181, m197, m378, n379, o18, o26, o32, o69, o73, o78, o83, o88, o98, o116–o118, o124, o128, o133, p8, p10, p35, p37, p43– p45, p77, p95, p165, p168, p171, p203, p239, p241, p243, p256, p271, p318, p320, p362, p401, p417, p494, p533, p536, p577, p580, p583, p605, p658, p693, p697, p700, p753, p773, p777, p841, t119, t120, w30, H11, H26, L16, L17, L24, L26, L32, L34, L37, L40, L41, L48, L51, L52, L56, L64, L66, L69, L70, L73, L80, L89, L97, L99, L110, L113, L114, L125–L127, L134, L140, L153, L166, L178, L180, L185, L191, L196, L200, L203, L211, L216, L219, L222, L231, L244, L249, L255, L264, L269, L293, L342, L344, L353, L364, L365, L368, L375, L384, L391, L392, L400, L405, L410, L487, L488

\@opargbegintheorem . . . . . . E32, \underline{E35}

\@opcol K193, K201, K290, K308, \underline{K313} \@options . . . . . . . . . . . . . . . . . \underline{L179} \@othm . . . . . . . . . . . . . . . . . . E3, \underline{E20} \@outerparskip A8, A59, A74, A95, A129 \@outputbox . . . . . . . . . . . . . . . . . .

K99, K331, K333, K352, K355, K356, K380, K382, K383, K388, K391, K396, K398, K405, K411, K413, K481, K512, K518, K528, K529, K552, K559, K621, K622, K624, K628, K1402, K1408, K1416

\@outputdblcol . . . . . . . . K316, K1399 \@outputpage . . . . . . . . . . . . . . . . .

K299, K318, \underline{K436}, K1423, K1431 \@oval . . . . . . . . . . . . . . . D246, \underline{D247} \@ovbtrue . . . . . . . . . . . . . . . . . D248 \@ovdx . . . . . . . . \underline{D228}, D256, D262,

D264, D275, D277, D331– D334, D348, D349, D351, D363

\@ovdy . . . . . . . . \underline{D228}, D257, D263, D264, D269, D273, D338– D341, D352, D353, D355, D367

\@ovhorz . . . . . . . . . D261, D262, \underline{D274} \@ovltrue . . . . . . . . . . . . . . . . . D248 \@ovri . . B17, \underline{D228}, D255, D269, D278 \@ovro … \underline{D228}, D255, D262, D263,

D268, D273, D274, D283, D290 \@ovrtrue . . . . . . . . . . . . . . . . . D248 \@ovttrue . . . . . . . . . . . . . . . . . D248 \@ovvert . . . . . . . . . D259, D260, \underline{D266} \@ovxx . . . . . . . . . . . . . . . . . \underline{D228},

D250, D252, D256, D260, D261, D274, D328–D330, D334, D343, D344, D350, D351, D362

\@ovyy . . . . . . . . \underline{D228}, D251, D252, D257, D262, D266, D335–D337, D341, D343, D354, D355, D366

\@p@pfilename . . . . . . . . L25, L27, L32 \@pagedp . . . . . . . . . . . . . . . . K96,

K237, K242, K764, K1109, K1119 \@pageht . K95, K238, K242, K244–

K246, K251, K763, K1092, K1099 \@par . . . . . . . . . . . . . . . . . . . . \underline{h3}, h6

\@parboxrestore B162, B188, B211,

B238, G8, G78, G187, G243, K150 \@parboxto . . . . . . . . . . . . . . . . \underline{B157} \@parmoderr . . . . . . . . \underline{g264}, G37, G173 \@parse@version . . L58, L59, L65, L66 \@partaux . . . . . . . . . . . . . . . . \underline{k5},

k72, k88, k90, k91, k97, k104–k106 \@partlist . . . . . . . . . . . . . . k69, k84 \@partswfalse . . . . . . . . . . . . . . . . k8 \@partswtrue . . . . . . . . . . . . . . . . k68 \@pass@ptions . L105, L110–L112, L318

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@pboxswfalse . . . . . . . . . . B160, B204 \@pboxswtrue . . . . . . . . . . . . . . . B170 \@penup . . . . . . . . . . . . . . . . z117, z118 \@percentchar . . . . . . . . a48, a417,

a419, a421, L436, L437, L439, L441 \@picbox . . . . . . . . \underline{D6}, D21, D27, D28 \@picht . . . . . . . . . . . . . \underline{D6}, D20, D27 \@picture . . . . . . . . . . . . . . D12, \underline{D18} \@pkgextension \underline{L14}, L38, L49, L67,

L111, L202, L205, L221, L285, L386 \@plus . . \underline{d13}, i201, F15, F114, J32,

K1458–K1460, K1463, K1464, K1468–K1470, K1474–K1476

\@pnumwidth . . . . . . . . . . . . . . . . F124 \@popfilename . . . . . . . . . . . \underline{L18}, L339

\@pr@videpackage . . . . . L88, L90, L97

\@preamble . . . . . . . . . . . . . C142, C143, C149, C169, C180– C182, C186, C201, C208, C227

\@preamblecmds . . \underline{d33}, k47, L495, L496 \@preamerr . . . . . . . \underline{g249}, C197, C248

\@process@pti@ns . . . . . . . . . . . . .

. . . . . . . L152, L165, L167, L178

\@process@ptions . . L139, L141, L153
\@protected@testopt . . . . . . . d57, \underline{d69}

\@providesfile . . a40, a41, \underline{L100}, \underline{N175} \@ptionlist . . . . . . . . . . . . . . . . . .

\underline{L35}, L72, L138, L309, L315, L387 \@pushfilename . . . . . . . . . . \underline{L18}, L295 \@put . . . . . . . . . . . . \underline{D245}, D264, D290 \@qend . . . . . . . . . . . . . . . . d102, \underline{d245} \@qrelax . . . . . . . . . . . . . . d103, \underline{d245} \@rc@ifdefinable . d96, \underline{d98}, d206, l19 \@reargdef . . . . . . . . . . . . . . . . . \underline{d88} \@refundefined . . . . . . . . k37, \underline{w3}, y23 \@reinserts . . . . . . . K258, K261, \underline{K366} \@removeelement . . . . . . . . . \underline{f32}, L182 \@reqcolroom . . . . . . . . . . . . K763,

K764, K767, K769, K770, K775, K779, K781, K808, K809, K907, K909, K911, K914, K916, \underline{K1212}, K1329, K1333, K1336

\@reset@ptions …. L300, L340, \underline{L345}

\@resetactivechars . . . . . \underline{K423}, K439

\@resethfps . . . . . . . . . . . K874, \underline{K1279} \@restorepar … \underline{h6}, i151, i168, 60, A83

\@reversemarginfalse . . . . G210, K80
\@reversemargintrue . . . . . . . . . G209

\@rightmark . . . . . . . . . . . . . . \underline{J16}, J28 \@rightskip . . . . . y73, y76, A52, B184 \@rjfieldfalse . . . . . . . . . . C33, C58 \@rjfieldtrue . . . . . . . . . . . . . . . C98 \@roman . . . . . . . . . . . . . . . . . u26, \underline{u31} \@rsbox . . . . . . . . . . . . . . . B258, \underline{B259} \@rtab . . . . . . . . . . . . . . . . . C52, \underline{C66} \@rule . . . . . . . . . . . . . . . . B246, \underline{B247} \@sanitize . . \underline{d269}, H7, H17, H23, H32 \@savebox . . . . . . . . . . . . . . B57, \underline{B60} \@savemarbox . . . . . . G178, G180, \underline{G182} \@savepicbox . . . . . . . . . . . . B57, \underline{B64} \@savsf i37, i48, i61, i71, i76, i84, i95, i99 \@savsk . . . . . . . . . . . i36, i40, i47,

i55, i57, i62, i70, i77, i85, i94, i98 \@scolelt . . . . . . . . . . . . K577, K619 \@sdblcolelt . . . . . . . . . . K593, K620 \@seccntformat . . . . . . . . . . F38, \underline{F71} \@secondoftwo . . . . . . . . . . . . a35,

\underline{d179}, d243, w21, J17, L44, L60, L78 \@secpenalty . . . . . . . . . i20, \underline{F19}, F29 \@sect . . . . . . . . . . . . . . . . . F33, \underline{F34} \@seqncr . . . . . . . . . . . . . . . . . . . \underline{z241} \@setckpt . . . . . . . . . . k104, k108, y12

\@setfloattypecounts . . . . . . . . . .

. . . . . . K747, K892, K968, \underline{K1226} \@setfontsize . . . . . . . . . . . . . . . \underline{q56} \@setfps . . . . . . . . . . . . . . . . . . . \underline{G18} \@setfpsbit … G53, G56, G59, \underline{K1270} \@setminipage . . . . . . G85, \underline{G93}, G199 \@setnobreak . . . . . . . G84, \underline{G87}, G198 \@setpar . . . . . . . . . . . . . . \underline{h3}, 60, A54 \@setref . . . . . . . . . . . . . . . . . . . \underline{w10} \@setsize . . . . . . . . . . . . . . . . . . \underline{q56} \@settab . . . . . . . . . . . . . . . C52, \underline{C73} \@settodim . . . . . . . . . . . . . . . . . . \underline{x6} \@settopoint . . . . . . . . . . . . . . . . \underline{x11} \@sharp . . . . . . . C148, C167, C188,

C203, C204, C210–C212, C226 \@shipoutsetup . . . . . . . . . . . . . \underline{K436} \@shortstack . . . . . . . . . . . . D63, D64 \@sline . . . . . . . . . . . D81, \underline{D84}, D139 \@spaces . . . . . . . . . . . . . . . . . . . \underline{g192} \@specialoutput . . . . . . . . . . . . \underline{K187}

\@specialpagefalse . . . . . . K76, K451
\@specialpagetrue . . . . . . . . . . . . J9

\@specialstyle . . . . . . . . . . . J9, K451 \@sptoken . . . . . . . . . . . . . d252, \underline{d262} \@sqrt . . . . . . . . . . . . . . . . . . . . . \underline{z188} \@ssect . . . . . . . . . . . . . . . . F32, \underline{F72} \@stackcr . . . . . . . . . . . . . . D70, \underline{D73} \@star@or@long . . . . . . . . \underline{d39}, d44,

d90, d112, d118, d148, d155, d188 \@startcolumn . . . . . K194, K201, \underline{K564}

\@startdblcolumn   \underline{K564}, K1429, K1435

\@startfield . . . . . . . . . . . . . . . . .

. C30, \underline{C38}, C72, C84, C98, C101 \@startline . . . . . . \underline{C22}, C49–C51, C63 \@startpbox . . . . . . . . . . . . . C144,

C168, C189, C225, \underline{C277}, C279

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@startsection . . . . . . . . . . . . . . \underline{F22} \@starttoc . . . . . . . . . . . . . . . . . \underline{F97} \@stopfield . . . . . . C33, \underline{C40}, C51,

C66, C73, C98, C99, C103, C105 \@stopline . . . . . . . . . \underline{C33}, C48, C65 \@stpelt . . . . . . . . . . . . p41, u13, u14 \@strip@args . . . . . . . . . . . . . . . . . \underline{l78} \@svector . . . . . . . . . . . . D131, \underline{D139} \@sverb . . . . . . . . . . . y129, y130, y137 \@svsec . . . . . . . . . F36, F38, F43, F51 \@svsechd . . . . . . . . . . . F50, F66, F76 \@sxverbatim . . . . . . . . . . . . \underline{y88}, y113 \@tabacckludge . . . . . . . . . . l180, l181 \@tabacol . . . . . . . . . . . . . C135, \underline{C181} \@tabarray . . . . . . . C129, C137, \underline{C138} \@tabclassiv . . . . . . . . . . . C137, \underline{C223} \@tabclassz . . . . . . . . . . . . C136, \underline{C205} \@tabcr . . . . . . . . . . . . . . . . \underline{C48}, C54 \@tabfbox . . . . . . . . . . \underline{C16}, C61, C62 \@tablab . . . . . . . . . . . . . . . C53, \underline{C99} \@tabminus . . . . . . . . . . . . . C53, \underline{C94} \@tabplus . . . . . . . . . . . . . . C53, \underline{C91} \@tabpush . . . . . . . . . . . . . . . . . . .

\underline{C11}, C58, C65, C103, C106, C108 \@tabrj . . . . . . . . . . . . . . . . C53, \underline{C97} \@tabular . . . . . . . . C133, C134, \underline{C135} \@tabularcr . . . . . . . . . . . . C137, \underline{C156} \@tempboxa . . . . . . . . . \underline{e13}, x6, x7,

A119, A123–A125, B13–B16, B21–B24, B100, B116, B123, B133, B207, B230, B265–B267, B274–B277, D172, D173, D243, D244, D255, D258, D263, D264, D283, D284, D289, D290, D356, D372, F86, F87, G176, G203, K234, K278, K279, K417, K466, K478, K479, K510, K514, K526, K532, K539–K542, K546, K554

\@tempcnta . . . . . . . d76, d77, d81, \underline{e7}, p585–p588, p592, C172– C174, D87, D88, D110–D112, D121–D124, D126, D127, D140, D141, D146, D147, D149– D151, D154–D164, D193–D197, D215–D220, D237–D240, D242, D244, D267, D271, D285–D288, D294–D299, D347, D361, G41, G47, G49, G62, G63, G69, G70, K14, K16, K18, K641, K642, K657, K660, K693, K696, K804, K971, K974, K1081, K1083, K1086, K1088, K1090, K1112, K1260, K1261, K1265, K1271, K1275, N39, N44–N46 \@tempcntb … d80, d81, d83, d84,

\underline{e7}, p586, p590, p592, D148– D150, D152–D154, D267, D268, D271, D272, G67–G69, K15, K18, K19, K1271–K1273, N40, N44

\@tempdima . . . . . . \underline{e10}, z104, z107, z113, B27, B28, B115, B116, B121–B123, B125, B161, B162, B205, B209, B248, B250, B263, B265, B271, B274, C34, C35, C68–C71, C162, C163, D106, D107, D109–D114, D236–D238, D244, D256, D257, D259, D260, D286, D288, D293– D295, F119, F120, F126, G104, G106, G140–G142, K160–K162, K386, K388, K389, K394, K399, K403, K408, K412, K637, K638, K643, K647, K1033, K1034, K1037, K1038, K1091–K1094, K1097, K1100, K1103, K1105, K1377, K1378, K1380, K1381

\@tempdimb . . . . . . . . . . \underline{e10}, m449, m453, n133, n134, n399, n432, n433, n442, n443, n447, n469, n472, n475, n477, B164, B165, B264, B266, B272, B275, D107, D108, D252–D254, D281, D282, D291, D292, K643–K645, K647

\@tempdimc . . . . . . . . . . . . . . \underline{e10},

n426, n427, n429, n430, n432, n433 \@tempskipa . . . . . . . . . . . . . . . . . .

. \underline{e14}, i8–i10, n135, n136, A73– A75, A94–A96, A129, A130, F23, F25, F26, F29, F40, F41, F58, F59, F61, F67, F68, F72, F73, K1149, K1150, K1152, K1160

\@tempskipb . . . . . . . . . . \underline{e14}, i103–

i105, i107, i108, i116, i133, i136 \@tempswafalse …. I13, a25, a487,

a498, a502, a520, a559, a562, a621, k82, m69, p205, p258, p322, p403, p816, p822, t76, y14, y98, K663, K699, K977, L415

\@tempswatrue . . . . . . . . . . . . . . . . . I13, a26, a482, a555, e9, k80, k85, m72, p208, p261, p325, p406, p779, t66, y38, y103, K979, K1002, K1338, K1355, L413

\@temptokena . . . . . . . . . \underline{e16}, y41, y42 \@testdef . . . . . . . . . . . . . . . y13, \underline{y36} \@testfalse . . . . . . . . . . . . . . . . . K13 \@testfp . . K632, K643, \underline{K1263}, K1389

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\@testopt . . . . . . . . . . . . d20, d46,

\underline{d67}, d71, d114, i3, i4, i7, i11, z228 \@testpach . . . . . . . . . . . . C193, C241 \@testpatch . . . . . . . . . . . . . . . . \underline{C241} \@testtrue . . K19, K633, K645, K1267

\@text@composite . . . . . . . . . . . . . \underline{l78}
\@text@composite@x . . . . . . . . . . . . \underline{l78}

\@textbottom . . . . . . . . . . . . . . . . .

J32, J34, K358, K400, K414, \underline{K420}

\@textfloatsheight . . K324, K760,

K762, K811, K812, K817, \underline{K1212} \@textmin . . . . . . . . . . . . . . . . . . .

G164, G165, K91, K762, K766, K769, K770, K911, K995, K997, K1013, K1320, K1322, K1324

\@textsuperscript . G223, G225, \underline{G226}

\@texttop . J32, J34, K354, K381, \underline{K420} \@tf@r . . . . . . . . . . . . . . . . . . . f25, f26 \@tfor . . . . . . . . . . . . . . \underline{f25}, k130,

k190, t67, B36, C191, D249, G42 \@tforloop . . . . . . . . . . . f27, f28, f30 \@thanks . . . . . . . . . . . . . . . F10, \underline{F13} \@thefnmark . . . . . . . . . . . . . B240,

G222, G223, G230, G235, G245, G254, G259, G270, G275

\@thefoot … K103, K454, K457, K489 \@thehead … K102, K454, K456, K474 \@themargin … K53, K455, K457, K465 \@themark . . . . . J18, J21, J24–J26, \underline{J29} \@thm . . . . . . . . . . . E12, E18, E24, \underline{E26} \@thmcounter . . . . . . . . . E11, E17, \underline{E33} \@thmcountersep . . . . . . . . . E10, \underline{E33} \@title . . . . . . . . . . . . . . . . . . . . . \underline{F3} \@tocrmarg . . . . . . . . . . . . . . . . F115 \@toodeep …. \underline{g239}, A34, A138, A149 \@toplist K43, K280, K281, K505,

K511, K521, K522, K700, K712 \@topnewpage . . . . . . . . . . . . . . . \underline{K131} \@topnum . . . . . . . . . . . . . . . G153,

K84, K697, K698, K712, K716, K724, K954, K959, K1185, K1206

\@toproom G155, K85, K700, K712, K1186 \@topsep . . . . . . . \underline{A1}, A50, A51, A102 \@topsepadd . . \underline{A1}, A46, A48, A50, A81

\@totalleftmargin . . . . . . . . y95,

\underline{A9}, A42, A43, B183, C34, C57, C61 \@tracemessage . . . . . . . . . . . . \underline{K1174} \@traceval . . . . . . . . . . . . . . . \underline{K1174} \@trivlist . . . . . . . . . A39, \underline{A46}, A61 \@tryfcolumn K567, K584, \underline{K598}, K1390 \@trylist … K607, K610, K630, K637

\@twoclasseserror . . . . . . L193, \underline{L406}
\@twocolumnfalse . . . . . . . K78, K126

\@twocolumntrue . . . . . . . . . . . . K138

                                       \@twoloadclasserror . . . . . L338, \underline{L401}

\@twosidefalse . . . . . . . . . . . . . . K79 \@typein . . . . . . . . . . . . d19, d20, d26

                                       \@typeset@protect . . . . d70, d211,

\underline{d218}, d220, l25, l32, l167, l175, q57 \@uclclist . . . . . . . . . . . . . . . . \underline{N117} \@undefined . . . . . . . . . . . I33, a15,

a16, a50–a52, a73, a81, a89, a96, a147, a151, a177, a184, a244, a245, a284, a383, a415, a442, b86, b89, d190, g31, k41, k42, k117, m310, m395, m463, t101, D321, L4, L328, L354, L446, L449, N141, N180–N184

                                       \@unexpandable@noexpand . . . . . . \underline{d186}

                                       \@unexpandable@protect  \underline{d186}, d223,

d229, d234, k61, C187, J19, J22

                                       \@unknownoptionerror L349, \underline{L376}, L389
                                       \@unprocessedoptions . . . . . . . . . .

. . . . . . . L177, L325, L329, L391 \@unused . . . . . . . d4, g15, g35, g62, \underline{k3}

                                       \@unusedoptionlist . . . . . . . . . . . .

. k11, k13, \underline{L10}, L130, L131, L183 \@upline . . . . . . . . . D165, \underline{D166}, D172 \@upordown D91, D92, D100, D117, D143 \@upvector . . . . . . . . . . . D138, \underline{D172} \@use@ption . . . . . . . . . . . . . . . . . .

… L148, L160, L170, L172, \underline{L181}

                                       \@use@text@encoding . . . . . . . . . . \underline{l131}

\@vbsphack . . . . . . . . . . . . . . . . . . \underline{i91} \@verb . . . . . . . . . . . . . . . . y129, y137 \@verbatim . . . . . . . . . \underline{y93}, y110, y113 \@vereq . . . . . . . . . . . . . . . . r361, r362 \@viiipt . . . . . . . . . . . . . . . . . . \underline{m482} \@viipt . . . . . . . . . . . . . . . . . . . \underline{m481} \@vipt . . . . . . . . . . . . . . . . . . . . \underline{m480} \@vline . . . . . . . . . . . . . . . D80, \underline{D165} \@vobeyspaces . . . . . . . \underline{y85}, y110, y137 \@vpt . . . . . . . . . . . . . . . . . . . . . \underline{m479} \@vspace . . . . . . . . . . . . . . . . . . . \underline{i144} \@vspacer . . . . . . . . . . . . . . . . . . \underline{i144} \@vtryfc . . . . . . . . . . . . . K613, K621 \@vvector . . . . . . . . . . . . D130, \underline{D138} \@vwrend . . . . . . . . . L444, L488, L494 \@warning . . . . . . . . . . . . . . \underline{g188}, l281 \@wckptelt . . . . . . . . . . . . k105, k106 \@whiledim . . . . . . . . . . . \underline{f7}, D44, D99 \@whilenoop . . . . . . . . . . . . . . . . . . . \underline{f3} \@whilenum … d81, \underline{f3}, C173, D39,

D194, D196, D216, D219, D361 \@whilesw \underline{f10}, K195, K290, K299, K1430 \@whileswnoop . . . . . . . . . . . . . . . . \underline{f10} \@wholewidth . . . . . B85, B87, B88,

B90, B92–B95, \underline{D2}, D48, D50,

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

D57, D167, D170, D207, D214, D270, D276, D317, D318, D358

\@width . . . . . . . . . b193, \underline{d13}, i193, l246, n146, r502, B90, B92, B129, B136, B250, B280, C142, C163, C240, C259, D119, D167, D170, D186, D193, D207, D214, D270, D358, G217, K1119, K1413

\@wrglossary . . . . . . . . . . . . H24, \underline{H27} \@wrindex . . . . . . . . . . . . . . . H8, \underline{H12} \@writeckpt . . . . . . . . . . . . . k95, k103 \@writefile . . . . . . . . . k25, \underline{y39}, F110 \@writesetup . . . . . . . . . . . . . . . \underline{K436}

\@wrong@font@char . . . . . . . . . . . .

. . . . . . . . l132, l136, m396, \underline{m407} \@wtryfc . . . . . . . . . . . . . K621, K628 \@x@protect . . . . . . . . . . . . . d73, \underline{d210} \@x@sf . . . . . . . . . . . . . . . G264, G266

\@xDeclareMathDelimiter . . . . . . .

. . . . . . . . . . . . p602, p659, p693 \@xaddvskip . . . . . . . . . . . . . i103, i117 \@xarg . . . . . . . . . . D77, D80, D85,

D89, D90, D118, D120, D125, D126, D130, D136, D144, \underline{D302}

\@xargarraycr . . . . . C154, C161, \underline{C162} \@xargdef . . . . . . . . . . . . . . . . . . \underline{d47} \@xarraycr . . . . . . . . . . . . C151, C152 \@xbitor . . . . . . . . . . . . . . . K13, K15 \@xcentercr . . . . . . . . . . . . . . y65, \underline{y66} \@xdblarg . . . . . . . . . . . . . . . . . . \underline{d267} \@xdblfloat . . . . . . . . . . . . . . . . \underline{G146} \@xdim . . . . . . . . . . . . . . . . . . D34,

D40, D42, \underline{D306}, D362–D365, D371 \@xeqncr . . . . . . . . . . . . . . . . . . . \underline{z220} \@xexnoop . . . . . . . . . . . . . \underline{C170}, C176 \@xexpast . . . . . . . . . . . . . C171, \underline{C172} \@xfloat . . . . . . . . . . G13, \underline{G18}, G148 \@xfootnote . . . . . . . . . . . G229, \underline{G232} \@xfootnotemark . . . . . . . G252, \underline{G256} \@xfootnotenext . . . . . . . G269, \underline{G272} \@xhline . . . . . . . . . . . . . . C253, \underline{C254} \@xifnch . . . . . . . . . . . . . . d253, \underline{d263} \@xiipt . . . . . . . . . \underline{m486}, r84, r86, r87 \@xipt . . . . . . . . . . . . . . . . . \underline{m485}, r83 \@xivpt . . . . . . . . . . . . \underline{m487}, r85, r87 \@xmpar . . . . . . . . . . . . . . G177, \underline{G178} \@xnewline . . . . . . . . . . . . i26, i27, \underline{i30} \@xnext . . . . . . . . . . . . . . . . K10, K11 \@xnthm . . . . . . . . . . . . . . . . . . E5, \underline{E6} \@xobeysp . . . . . . . . . . . . . . . y86, \underline{y87}

\@xprocess@ptions . L139, L154, L166

\@xpt . . . . . . . . . . . \underline{m484}, r82, r85, r86 \@xsect . . . . . . . . . . . . . F57, \underline{F58}, F77 \@xtabcr . . . . . . . . . . . . . . . C48, \underline{C49} \@xtabularcr . . . . . . . . . . . C157, \underline{C159} \@xthm . . . . . . . . . . . . . . . . . E28, \underline{E29} \@xtryfc . . . . . . . . . . . . . K610, K630 \@xtypein . . . . . . . . . . . . . . . d20, d21 \@xverbatim . . . . . . . . . . . . . \underline{y88}, y110 \@xviipt . . . . . . . . . . . \underline{m488}, r86, r88 \@xxpt . . . . . . . . . . . . . \underline{m489}, r87, r88 \@xxvpt . . . . . . . . . . . . . . . . \underline{m490}, r88 \@xxxii . . . . . . . . . . \underline{e2}, l331, l333,

G68, K631, K641, K642, K1229 \@xympar . . . . . . . . . G179, G181, \underline{G201} \@yarg . . . . . . . . . . . . . . . . . . D77,

D81, D85, D86, D91, D125, D131, D138, D140, D165, \underline{D302}

\@yargarraycr . . . . . C155, C161, \underline{C164} \@yargdef . . . . . . . . d51, d62, \underline{d75}, d89 \@ydim D35, D40, D42, D307, D366–D370 \@yeqncr . . . . . . . . . . . . . . . . . . . \underline{z220} \@ympar . . . . . . . . . . . . . . G177, \underline{G180} \@ynthm . . . . . . . . . . . . . . . . . E5, \underline{E14} \@ythm . . . . . . . . . . . . . . . . . E28, \underline{E29} \@ytryfc . . . . . . . . . . . . . K634, K635 \@yyarg … D85–D87, D90, D144, \underline{D302} \@ztryfc . . . . . . . . . . . . . K637, K641 \[ . . . . . . . . . . . . . . . . m360, r179,

z155, \underline{z155}, z180, z255, \underline{z255}, N70 \\ . . . . . . . . . . . . . . . . . a21, a189–

a192, a195, a202–a205, a208, a215–a218, a221, a228, a230, a231, a234, a237, b13, d185, d269, g273, \underline{i24}, i208, k189, k204, l406, m348, n67, r173, r185, y70, y76, y81, y90, z202, z290, B188, B264, B266, C54, C129, C137, C145, D70, K442, N55

\{ . . a3, a7, a21, b2, b13, g25, l258,

l408, m349, r171, y89, z55, z96, N58 \} . . . . . a8, a21, b3, b13, g24, l259,

l409, m350, r172, y89, z55, N59 \] . . . . . . . . . . . b232, m361, r180,

\underline{z155}, z166, z181, z265, \underline{z265}, N71 \^…. a10, a19, a22, a61, a248, b7,

b9, b11, b14, b160, b161, b173, b174, d5, d270, i208, i210, i212, l187, l238, l294, l357, l404, l486, l493, l497, l502, l507, l512, l519, l525, l526, l532, l537, m346, m347, m352, L416–L418, L445, L448, L451, N56, N62–N65, N78–N80, N107–N110, N112–N115

\_. . . . . . . . . . . . . . . a22, b8, b14,

d270, l264, r176, z151, z152, N57 \` . . . . . . . . . l188, l295, l326, l355,

l423, l484, l491, l495, l500, l505,

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

l510, l517, l521, l522, l530, l535, q154, y138, B179, C53, K441, N72

\| . . . . . . . . l407, r184, r459, u43, N73 \~ . . . . . . . . . . . . . . . . . . a22, b10,

b14, d270, g23, i185, l195, l239, l296, l358, l405, l487, l499, l503, l513, l529, l533, y132, y142, N60

\␣ . . . . . . I17, a21, a38, b13, b160, b176, d269, d283, g22–g25, g28, i184, m345, m473, o11, r174, y85–y87, E36, E38, L102, N50

A

\A . . . . . . . . . . . . . . . . . . . N75, N102 \a . . . . . . . . . . . . . \underline{l180}, \underline{C1}, N76, N91 \AA . . . . . . . . . . l196, l334, l377, N130 \aa . . . . . . . . . . l201, l328, l387, N130

\abovedisplayshortskip . . b141, z298
\abovedisplayskip . . . . . . . . . . . .

…. b140, z291, z293, z295–z298 \accent . . . . . . . . . l75, l305, l329, l370 \active . . . . . . . . . a11, a61, a248,

b10, b11, b173, b174, b176, y85, y86, y131, y140, z137, z151, L416–L418, L445, L448, L451

\acute . . . . . . . . . . . . . . . . . . . . . r403

\addcontentsline . F46, F52, \underline{F104}, G5

\addpenalty . . . . . . . . . . . . . . \underline{i124},

A81, A101, A103, F29, K268, K822 \addto@hook . . . . . . . . m125, m127,

\underline{m478}, p187, p219, p223, p281, p285, p302, p426, p432, p440, p456, p459, p462, p788, p795, p798

\addtocontents . . . . . . . . . F105, \underline{F107} \addtocounter . . . . . . . . . . . . . u5, u12 \addtolength . . . . . \underline{x5}, z293, z295, 207 \addtotcounter . . . . . . . . . . . . . . 199 \addtoversion . . . . . . . . . . . . . . . \underline{o130} \addvspace . . . . . . . . . . . . . . \underline{i110},

y66, A81, A102, A103, A130, F29 \adjdemerits . . . . . . . . . . . . . . . . b118 \AE . . . . . . . . . . l197, l309, l378, N130 \ae . . . . . . . . . . l202, l312, l388, N130

\afterassignment . . . . b189, b192,

d224, d230, l169, l177, m244, z117 \aftergroup . . . . . . . . . m66, m258,

n156, n220, p62, p87, t44, y135, B73, K437, K446, K447, K494

\aleph . . . . . . . . . . . . . . . . . . . . . r226 \alloc@ . . b47–b51, b53–b56, \underline{b57}, m23

\allocationnumber . . . . . . . . . . . .

. . \underline{b37}, b59–b61, b67–b69, C4, C9 \allowbreak . . . . . . . . . . . . . \underline{b196}, z38 \Alph . . . . . . . . . . . . . . . . . . . \underline{u25}, 199 \alph . . . . . . . . . . . . . . . . . . . \underline{u25}, 199 \alpha . . . . . . . . . . . . . . . . . . . . . r186 \alpha@elt . . . . . . . . . . . . . . . . . .

\underline{p36}, p191, p376, p478, p787, p788 \alpha@list . . . . . . . . . . . . . . . . . .

. . p32, \underline{p34}, p200, p364, p376, p421, p476, p477, p783, p789, p790

\amalg . . . . . . . . . . . . . . . . . . . . . r290 \and . . . . . . . . . . . . . . . . . . . . 293, \underline{F14} \angle . . . . . . . . . . . . . . . . . . . . . r242 \approx . . . . . . . . . . . . . . . . . . . . r330 \arabic . . . . . . . . . . . . . \underline{u25}, 199, E33 \arccos . . . . . . . . . . . . . . . . . . . . . z13 \arcsin . . . . . . . . . . . . . . . . . . . . . z10 \arctan . . . . . . . . . . . . . . . . . . . . . z16 \arg . . . . . . . . . . . . . . . . . . . . . . . . z26 \array . . . . . . . . . . . . . . . . \underline{C127}, \underline{C139} \arraycolsep . . . . . . . . . . . . . . . . .

z205, z206, z303, z304, C181, \underline{C231}

\arrayrulewidth . . . . . . . . . . . . . .

…. C218, \underline{C231}, C239, C240, C252, C256, C259, C269, C271

\arraystretch . . . . . C140, C141, \underline{C235} \Arrowvert . . . . . . . . . . . . . . . . . r455 \arrowvert . . . . . . . . . . . . . . . . . r453

\ArticleClassFoundInCurrentDirectory

. . . . . . . . . . . . . . . . . a398, a400 \ast . . . . . . . . . . . . . . . . . . . r155, r306 \asymp . . . . . . . . . . . . . . . . . . . . . r354 \AtBeginDocument . . . . . I34, J30, \underline{L361} \AtBeginDvi . . . . . . . . . . . . . . . . . \underline{K65} \AtEndDocument . . . . . . . . . . . . . \underline{L361} \AtEndOfClass . . . . . . . . . . z254, \underline{L361} \AtEndOfPackage . . . . . . . . L177, \underline{L361} \atopwithdelims . . . . . . . . . . z53–z55 \aut@global . . . . . . d54, d86, d124,

d134, d138, d144, d196, \underline{d277}, d281 \author . . . . . . . . . . . . . . . . . . 293, \underline{F5}

B

\b . . . . . . . . . . . . . . . . l189, l301, l366 \backslash . . . . . . . . . . . . . r173, r474 \badness . . . . . . . . . . . . . . . . . . . b97 \bar . . . . . . . . . . . . . . . . . . . . . . . r407 \baselineskip . . . . . . . . . . . b159,

b187, b223, n140–n142, n144, n145, r398, z100, z101, z109, z115, z119, B186, C149, D67, D176, K173, K204, K462, K482

\baselinestretch . . . . . . . . . . . . .

… m235, n118, n119, n138, \underline{n199}

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\batchmode . . . . . . . . . a477, a550,

k166, k167, o96, q121, N150, N171 \begin . . . . . . . . . . . . . g230, g233,

n7, r4, s4, y47, \underline{y48}, z258, F14, F16, G127, G134, G136, L229, M3

\belowdisplayshortskip . . b143, z297
\belowdisplayskip . . . . . . b142, z296

\best@size … n400, n434, n440, n446 \beta . . . . . . . . . . . . . . . . . . . . . . r187 \bezier . . . . . . . . . . . 268, D324, \underline{D325} \bfdefault . . . . . . . . . . . . . . q14, \underline{r32} \bfseries . . . . . . . . . . . . . . . . . . .

I20, q12, q13, t18, w13, E36, E38

\bgroup . . . . . . . . . . . . . . . . . . . . \underline{b171} \bibcite . . . . . . . . . . . . . . . I7, I9, \underline{I10} \bibdata . . . . . . . . . . . . . . . . \underline{I25}, I29 \bibitem . . . . . . . . . . . . . . . . . . . . . \underline{I3} \bibliography . . . . . . . . . . . . \underline{I27}, 319

\bibliographystyle . . . . . . . . \underline{I32}, 319

\bibstyle . . . . . . . . . . . . . . . \underline{I25}, I37 \Big . . . . . . . . . . . . . . . . r505, z42–z44 \big . . . . . . . . . . . . . . . . r504, z39–z41 \bigbreak . . . . . . . . . . . . . . . . . . \underline{b203} \bigcap . . . . . . . . . . . . . . . . . . . . r262 \bigcirc . . . . . . . . . . . . . . . . . . . r303 \bigcup . . . . . . . . . . . . . . . . . . . . r263 \Bigg . . . . . . . . . . . . . . . r507, z48–z50 \bigg . . . . . . . . . . . . . . . r506, z45–z47 \Biggl . . . . . . . . . . . . . . . . . . . . . . z48 \biggl . . . . . . . . . . . . . . . . . . . . . . z45 \Biggm . . . . . . . . . . . . . . . . . . . . . . z49 \biggm . . . . . . . . . . . . . . . . . . . . . . z46 \Biggr . . . . . . . . . . . . . . . . . . . . . . z50 \biggr . . . . . . . . . . . . . . . . . . . . . . z47 \Bigl . . . . . . . . . . . . . . . . . . . . . . . z42 \bigl . . . . . . . . . . . . . . . . . . . . . . . z39 \Bigm . . . . . . . . . . . . . . . . . . . . . . . z43 \bigm . . . . . . . . . . . . . . . . . . . . . . . z40 \bigodot . . . . . . . . . . . . . . . . . . . r270 \bigoplus . . . . . . . . . . . . . . . . . . r269 \bigotimes . . . . . . . . . . . . . . . . . r268 \Bigr . . . . . . . . . . . . . . . . . . . . . . . z44 \bigr . . . . . . . . . . . . . . . . . . . . . . . z41 \bigskip . . . . . . . . . . . . . . . b208, \underline{i177} \bigskipamount . b207, i179, \underline{i180}, G213 \bigsqcup . . . . . . . . . . . . . . . . . . r273

\bigtriangledown . . . . . . . . . . . . r278

\bigtriangleup . . . . . . . . . . . . . . r277 \biguplus . . . . . . . . . . . . . . . . . . r261 \bigvee . . . . . . . . . . . . . . . . . . . . r259 \bigwedge . . . . . . . . . . . . . . . . . . r260 \binoppenalty . . . . . . . . . . . . . . . b109 \bm@b . . . . . . . . . . . . . . . . . . . . . . \underline{B21} \bm@c . . . . . . . . . . . . . . . . . . . . . . \underline{B21} \bm@l . . . . . . . . . . . . . . . . . . . . . . \underline{B21} \bm@r . . . . . . . . . . . . . . . . . . . . . . \underline{B21} \bm@s . . . . . . . . . . . . . . . . . . . . . . \underline{B21} \bm@t . . . . . . . . . . . . . . . . . . . . . . \underline{B21} \bmod . . . . . . . . . . . . . . . . . . . . . . . z35 \boldmath . . . . . . . . . . . . . . . j15, q49 \bordermatrix . . . . . . . . . . . . . . . \underline{z103} \bot . . . . . . . . . . . . . . . . . . . . . . . r241 \botfigrule . . . . . . . . . . . K531, \underline{K1477} \botmark . . . . . . . . . . . . . . . J27, K497 \bottomfraction . . . . . . . G157, \underline{K1446} \bowtie . . . . . . . . . . . . . . . . . . . . r379 \Box . . . . . . . . . . . . . . . . . . . . . . . q92 \boxmaxdepth . . . . . . . . . . . . . . . . .

…. b134, D247, D281, K334, K353, K397, K504, K513, K553

\brace . . . . . . . . . . . . . . . . . . . . . . z55 \braceld . . r439, r443, r444, r446, r448 \bracelu . . . . . . . . . . . r441, r445, r447 \bracerd . . . . . . . . . . . r440, r445, r447 \braceru . . . . . . . . . . . r442, r444, r448 \bracevert . . . . . . . . . . . . . . . . . \underline{r492} \brack . . . . . . . . . . . . . . . . . . . . . . z54 \break . . . . . . . . . . . . . \underline{b196}, b201, i23 \breve . . . . . . . . . . . . . . . . . . . . . r408 \brokenpenalty . . . . . . . . . . . . . . b114 \buildrel . . . . . . . . . . . . . . r370, \underline{z95} \bullet . . . . . . . . . . . . . . . . . . . . r292 \bx@A . . . . . . . . . . . . . . . . . . K21, K39 \bx@B . . . . . . . . . . . . . . . . . . K22, K39 \bx@C . . . . . . . . . . . . . . . . . . K23, K39 \bx@D . . . . . . . . . . . . . . . . . . K24, K39 \bx@E . . . . . . . . . . . . . . . . . . K25, K39 \bx@F . . . . . . . . . . . . . . . . . . K26, K40 \bx@G . . . . . . . . . . . . . . . . . . K27, K40 \bx@H . . . . . . . . . . . . . . . . . . K28, K40 \bx@I . . . . . . . . . . . . . . . . . . K29, K40 \bx@J . . . . . . . . . . . . . . . . . . K30, K40 \bx@K . . . . . . . . . . . . . . . . . . K31, K41 \bx@L . . . . . . . . . . . . . . . . . . K32, K41 \bx@M . . . . . . . . . . . . . . . . . . K33, K41 \bx@N . . . . . . . . . . . . . . . . . . K34, K41 \bx@O . . . . . . . . . . . . . . . . . . K35, K42 \bx@P . . . . . . . . . . . . . . . . . . K36, K42 \bx@Q . . . . . . . . . . . . . . . . . . K37, K42 \bx@R . . . . . . . . . . . . . . . . . . K38, K42

C \c . . . . . . . . . . . . . l190, l304, l369,

l448, l450, l475, l477, l490, l516 \c@bottomnumber . . G151, G156, \underline{K1444} \c@dbltopnumber . . G150, G162, \underline{K1451} \c@enumi . . . . . . . . . . . . . . . . . . \underline{A133} \c@enumii . . . . . . . . . . . . . . . . . \underline{A133}

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\c@enumiv . . . . . . . . . . . . . . . . . \underline{A133} \c@equation . . . . . . . . \underline{z182}, z215, z310

\c@errorcontextlines . . . . . . . . . \underline{g181}

\c@footnote . . . . . . . . F11, G219, G258 \c@mpfootnote . . . . . . . . . . B212, G221 \c@ncel . . . . . . . . . . . . . . . . r364, r365 \c@page . . . . . v3, v6, v7, K117, K1086 \c@secnumdepth … F35, F47, F53, \underline{F88} \c@tocdepth . . . . . . . . . . . . . \underline{F88}, F113 \c@topnumber . . . . . G149, G153, \underline{K1440} \c@totalnumber … G152, G158, \underline{K1447} \cal . . . . . . . . . . . . . . . . . . . . . . . \underline{q155}

\calculate@math@sizes . . . \underline{m444}, n173

\cap . . . . . . . . . . . . . . . . . . . . . . . r283 \caption . . . . . . . . . . . . . . . . . . . . G4 \cases . . . . . . . . . . . . . . . . . . . . . . \underline{z96} \cdot . . . . . . . . . . . . . . . . . . . . . . r305 \cdotp . . . . . . . . . . . . . . . . . r392, r397 \cdots . . . . . . . . . . . . . . . . . . . . . r397 \cdp@elt . . . . . . . . . . . . . . . . m71,

\underline{m91}, m102, m103, m122, m125, m127, p123, p207, p260, p324, p405

\cdp@list . m73, \underline{m89}, m103, m129,

m130, p141, p209, p262, p326, p407 \center . . . . . . . . . . . . . . . . . . . . y69 center (environment) . . . . . . . . . . \underline{y69} \centering . . . . . . . . . . . . . . y69, y70 \centerline . . . . . . . . . . . . . . . . \underline{B281} \cf@encoding l34, l41, l44, l54, l133,

l140, m203, m213, m223, \underline{m242} \ch@ck . . . . . . b58, b63–b66, \underline{b70}, L425 \changes . . . . . . . . . . . . . . . . . . G135 \char . . . . . a577, a578, a591, a592,

a647, a648, l303, l306, l336, l343, l350, l368, l371, l376, l557, q55, y143, z135, D124, D151, D164, D172, D175, D244, D268, D272, D285, D286, D288, D299

\chardef . . a11, a17, a18, b10, b16– b20, b51, b54–b56, b68, b217– b219, e2, l10, m23, C4, C9, L424

\check . . . . . . . . . . . . . . . . . . . . . r409 \check@command . . . . . . . . . d155, \underline{d157} \check@icl . . . . . . . . . . . . . . . t9, \underline{t26} \check@icr . . . . . . . . . . . . . . . t9, \underline{t26}

\check@mathfonts . . m264, m266, \underline{n204}

\check@nocorr@ . . . . . . . . . . . . . . . \underline{t26} \check@range . . . . . . m316, n335, \underline{n336} \check@single . . . . . m317, n334, \underline{n359} \CheckCommand . . . . . . . . . . . . . . . \underline{d155} \checkfont . . . . . . . . . a476, a488–

a490, a499, a500, a503, a504, a521–a523, a549, a560, a563, a622

\chi . . . . . . . . . . . . . . . . . . . . . . . r206 \choose . . . . . . . . . . . . . . . . . . . . . z53 \circ . . . . . . . . . . . . . . . . . . . . . . r302 \circle . . . . . . . . . . . . . . . . . . . \underline{D279} \citation . . . . . . . . . . . . \underline{I11}, I19, I42 \cite . . . . . . . . . . . . . . . . . . . \underline{I12}, 319 \cl@@ckpt . . . . . . . . . . . . . . k105, u15 \cl@page . . . . . . . . . . . . . . . . . . . . v4 \ClassError . . . . . . . . . . . . . . . . . . \underline{g88} \ClassInfo . . . . . . . . . . . . . . . . . . \underline{g88} \ClassWarning . . . . . . . . . . . . . . . . \underline{g88}

                                       \ClassWarningNoLine . . . . . . . . . . . \underline{g88}

\cleaders . . . . . . . . . b230, r434, r437

                                       \cleardoublepage . . . . . . . . . . . \underline{K117}

\clearpage . . . . . . . . . . . . . . . . . . k76, k94, y8, y45, \underline{K104}, K117, K122, K132, K303, K309, K1394

\cline . . . . . . . . . . . . . . . . . . . . \underline{C260} \clubpenalty . . . . . . . . . . . . . . . . .

… b111, k18, F65, F69, F82, F84 \clubsuit . . . . . . . . . . . . . . . . . . r254 \col@number … \underline{K74}, K127, K140, K151 \colon . . . . . . . . . . . . . . . . . . . . . r393

                                       \color@begingroup . . . . . . . m470,

z75, z91, B13, \underline{B47}, B101, B208, B241, C39, C43, G247, K337

\color@endbox . . . . . . . . . . . . \underline{B47},

G131, G193, K155, K476, K491

                                       \color@endgroup . . . . . . m474, z75,

z91, B13, \underline{B47}, B59, B80, B103, B228, B244, C41, G250, K341

\color@hbox . . . . . . . . \underline{B47}, K468, K483 \color@setgroup . . . . . \underline{B47}, B59, B78 \color@vbox \underline{B47}, G75, G184, G204, K146 \columnsep . . . . . . . . . k20, K60, K134 \columnseprule . . . . . . . . K61, K1413 \columnwidth . . . . . . k17, k20, k21,

k23, B210, B237, G78, G243, K59, K123–K125, K133–K137, K1111, K1113, K1410, K1415

\cong . . . . . . . . . . . . . . . . . . . . . . r361 \contentsline . . . . . . . . . . F105, \underline{F112} \coprod . . . . . . . . . . . . . . . . . . . . r258 \copyright . . . . . . . . . . l235, l237, \underline{q75} \cos . . . . . . . . . . . . . . . . . . . . . . . . z12 \cosh . . . . . . . . . . . . . . . . . . . . . . . z14 \cot . . . . . . . . . . . . . . . . . . . . . . . . z18 \coth . . . . . . . . . . . . . . . . . . . . . . . z19 \count@ a13, a121–a123, a128, a312–

a314, a319, \underline{b41}, b193, b194, c5– c9, c11, d137, d142, n22, n256, n258, n280, n281, p184, p186, p190, p503–p505, p545–p547,

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

p588–p590, p617–p619, p625– p627, p670–p672, p678–p680, p720–p722, p728–p730, t94, t97, D360–D362, D365, D366, D369, D373, N87, N88, N97, N99

\countdef . . a13, b37–b39, b41, b47, v3 \cr . . . . . . . b167, z106, z110, z210,

z240, z307, C143, C152, C159, C163, C164, C270, D72, D74, D75

\crcr . . . . . . . . . . . . . . . . . . b224, l302, l306, l308, l367, l372, l374, l376, l556, q77, r242, r243, r245, r363, r365, r368, r418–r428, r430, z97, z99–z101, z106, z108– z110, z128, z129, C130, C131, D72

\csc . . . . . . . . . . . . . . . . . . . . . . . . z21 \cup . . . . . . . . . . . . . . . . . . . . . . . r284

\curr@fontshape . . . . . . . . . . l148,

m63, \underline{m280}, m290, m294, m296, m381, m387, m390, m396, m403, m405, n92, n100, n121, n449, n473, n519, n536, p145, p150

\curr@math@size . . . . . . . . . . . . . .

… \underline{m269}, n210, n216, n229, n238 \CurrentOption . . . . . . . l279–l281,

\underline{L11}, L132, L142–L144, L149, L156–L158, L161, L168, L169, L173–L175, L182, L184, L188– L190, L299, L378, L379, L388, L389

D

\d . . . . . . . . . . . . . . . . l191, l307, l373 \dag . . . . . . . . . . . . . . . . . . . . . . . l262 \dagger . . . . . . . . . l262, r286, u42, u43 \dashbox . . . . . . . . . . . . . . . . . . \underline{D176} \dashv . . . . . . . . . . . . . . . . . . . . . r314 \date . . . . . . . . . . . . . . . . . . . . 293, \underline{F7} \day . . . . . . . . . . . . . . a127, a318, L440 \dblfigrule . . . . . . . . . . . K556, \underline{K1477}

\dblfloatpagefraction . . G166, \underline{K1454}

\dblfloatsep K542, K554, K1036, \underline{K1461}

\dbltextfloatsep . . . . . . . . . . . . .

K153, K161, K558, K1035, \underline{K1461} \dbltopfraction . . . . . . . G163, \underline{K1453} \dcrseventeen . . a539, a604, a632, a660 \ddag . . . . . . . . . . . . . . . . . . . . . . l263 \ddagger . . . . . . . . l263, r285, u42, u44 \ddot . . . . . . . . . . . . . . . . . . . . . . r405 \ddots . . . . . . . . . . . . . . . . . . . . . r400 \deadcycles . . . . . . . . . y35, y45, K228

\declare@robustcommand . . . . . . . \underline{d188}

\DeclareErrorFont \underline{m363}, p154, q101, r28

\DeclareFixedFont . . . . . . . . . . . \underline{m48}

                                       \DeclareFontEncoding . . . . . . . . . .

l289, l354, l543, l563, \underline{m93}, r45–r48

                                       \DeclareFontEncoding@ m97, m99, m113
                                       \DeclareFontEncodingDefaults . . .

. . . . . . . . . . \underline{m141}, o80, o81, r15

                                       \DeclareFontFamily . . . . \underline{m68}, o75, o76
                                       \DeclareFontShape . . . . . . . . . . . .

… \underline{m27}, \underline{m29}, o15, o17, o71, o72

                                       \DeclareFontShape@ . . . . . . . m30, m31
                                       \DeclareFontSubstitution . . . . . . .

. . . . . . . . \underline{m114}, r16, r17, r49–r52

                                       \DeclareMathAccent . . . . . . . . . . . .

. . . . . . . . . p495, p533, r403–r414

                                       \DeclareMathAlphabet . . . . . . . . . .

. . . . . . . . . o109, o113, o115, o122, p321, p362, p484, r71–r74

                                       \DeclareMathAlphabetCharacter . p596
                                       \DeclareMathDelimiter . . . . . . . . .

. p598, p605, r449, r451, r453, r455, r457, r460, r462, r464, r466, r468, r470, r472, r474, r476, r478, r480, r482, r484, r486, r488, r490, r492, r494, r496

                                       \DeclareMathRadical . p701, p753, r416
                                       \DeclareMathSizes . . . . \underline{m178}, r77–r88
                                       \DeclareMathSizes* . . . . . . . . . . \underline{m178}
                                       \DeclareMathSymbol . . . . . . . p537,

p577, p597, r89–r114, r116– r169, r171–r173, r186–r226, r228–r238, r240, r241, r246– r249, r251–r264, r266–r271, r273–r279, r281, r283–r322, r324, r326, r328–r338, r340– r344, r346, r348, r350–r360, r375, r377, r391–r393, r439–r442

                                       \DeclareMathVersion p169, p171, q1, q2
                                       \DeclareOldFontCommand . . . \underline{t104}, t120

\DeclareOption …. l278, n29, n37,

n45, n53, n56, n60, 380, \underline{L115}, L399 \DeclareOption* . . . . . . . . . 380, \underline{L115}

                                       \DeclarePreloadSizes . . . . . . . . . .

. . . . . . . \underline{m158}, o85, o86, s19, s21–s23, s25–s30, s34, s38, s43, s45, s49, s50, s53, s54, s57, s58, s64

                                       \DeclareRobustCommand . . . . . . I12,

\underline{d188}, g4, g11, g33, g60, i24, i183, i187, i191, j3, j14, l257– l264, l267, l270, m198, m226– m228, m232, m234, m252, n113, q3, q6, q9, q12, q15, q18, q21, q24, q27, q30, q75, q79, r382, r384, r395, t3, t105, z188, z245, G224, N117, N124

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\DeclareSizeFunction . \underline{n377}, n464,

n465, n480, n481, n489, n490, n502, n503, n531, n532, n543, n544

\DeclareSymbolFont . . . . . . . . . . . .

. . . . . . o126, p204, p239, r60–r63

\DeclareSymbolFontAlphabet . . . . .

. . . . . . . . . . p774, p777, r68–r70

\DeclareSymbolFontAlphabet@ . . . .

. . . . . . . . . . . . p775, p778, p841

\DeclareTextAccent . . . . . . . . . . . .

… \underline{l74}, l290–l300, l355–l365, l566

\DeclareTextAccentDefault . . . . . .

. . . . . . \underline{l154}, l182–l195, l231, l234

\DeclareTextCommand . . . . . . . . . . .

. . . . . . \underline{l3}, l66, l75, l301, l304, l307, l328, l330, l332, l334, l337, l344, l366, l369, l373, l375, l554

\DeclareTextCommandDefault . . . . .

. . . . . . . \underline{l65}, l155, l158, l235, l238–l241, l244, l249, l254–l256

\DeclareTextComposite . \underline{l78}, l430–l539
\DeclareTextCompositeCommand . . . \underline{l78}
\DeclareTextFontCommand . . . . . . .

. . . . . . . . . . . . \underline{t1}, t14–t24, t119

\DeclareTextSymbol . . \underline{l3}, l309–l327,

l377–l429, l544–l553, l564, l565

\DeclareTextSymbolDefault . . . . . .

. . . . . . \underline{l154}, l196–l230, l232, l233 \default@ds . . . . . . . . . . . . . . . . . .

… L124, \underline{L135}, L171, L347, L349

\default@family . . . . . . . . . . . . . .

. m104, m134, m369, m372, m391 \default@M . m111, m149, m152, \underline{m156} \default@mextra . . . . . . . . . . . \underline{o1}, \underline{o79}

\default@series . . . . . . . . . . . . . .

. m104, m135, m370, m373, m388 \default@shape . . . . . . . . . . . . . . .

. m105, m136, m371, m374, m386 \default@T . m143, m146, \underline{m156}, m219

\defaulthyphenchar . . . . . . . . . . . b121
\defaultscriptratio . . . . m449, \underline{m460}
\defaultscriptscriptratio m450, \underline{m460}
\defaultskewchar . . . . . . . . . . . . b122
\define@mathalphabet . . . . . . \underline{o1}, \underline{o121}
\define@mathgroup . . . . . . . . \underline{o1}, \underline{o125}

\define@newfont . . . . . . . m272, \underline{m282} \deg . . . . . . . . . . . . . . . . . . . . . . . . z34 \delcode . . . . . . . . . . p699, r177–r185 \delimiter . . . . . . . . . . . . p630, p695

\delimiterfactor . . . . . . . . . . . . b123
\delimitershortfall . . . . . . . . . . b135

\Delta . . . . . . . . . . . . . . . . . . . . . r216 \delta . . . . . . . . . . . . . . . . . . . . . r189 \depth . . . . . . . . . . . . . . . . . B16, B19 \det . . . . . . . . . . . . . . . . . . . . . . . . z30 \DH . . . . . . . . . . . . . . . . . . l379, N131 \dh . . . . . . . . . . . . . . . . . . l389, N131 \Diamond . . . . . . . . . . . . . . . . . . . q93 \diamond . . . . . . . . . . . . . . . . . . . r291 \diamondsuit . . . . . . . . . . . . . . . . r255 \dim . . . . . . . . . . . . . . . . . . . . . . . . z28 \dimen@ a442, a449, a456, \underline{b41}, b190,

b191, g31, g32, i160, i165, l335, l336, m183, m187, m191, m448– m450, m454, n423–n426, n430, z62, z63, z117–z120, B273, B276, K355, K357, K382, K384

\dimen@i . . . . . . . . . . . . . . . . . . . \underline{b41} \dimen@ii . . . . . . . . . . . . . . . . . . \underline{b41} \dimendef . . . . . . . . . . . b42–b44, b48 \discretionary . . . . . . . . . . d10, z135 \displ@y . . . . . . . . . . z122, z126, z127 \displaylines . . . . . . . . . . . . . . . z127 \displaymath . . . . . . . . . . . . . . . . z180 displaymath (environment) . . . . . . \underline{z178} \displaystyle . . . . . . . . r420, r423,

r426, r428, z56, z128, z204, z207, z244, z262, z278, z302, z305

\displaywidowpenalty . . . . . . . . . b113

\displaywidth . . z128, z203, z250, z281 \div . . . . . . . . . . . . . . . . . . . . . . . r294 \DJ . . . . . . . . . . . . . . . . . . l380, N131 \dj . . . . . . . . . . . . . . . . . . l390, N131 \do . . . . . . . . . . . . . . I16, I40, a21,

a22, a68, b13, b14, d36, d82, f3, f7, f16, f26, k46, k48, k84, k131, k190, k196, m310–m326, t69, y107, y128, y138, y144, B36, C173, C192, D39, D44, D99, D195, D197, D217, D220, D249, D361, G44, L76, L142, L156, L168, L173, L188, L388, L443, L494

\do@noligs . . . . . . . . . . . . \underline{y139}, y144

\do@subst@correction  \underline{m58}, n454, n527

\DocInput . . . . . . . . . . . n8, r5, s5, M4 \document . . . . . . . . . . . . . . . . \underline{k10}, 71

\document@select@group . . . p96, p158

\documentclass . . . . . . . n2, r2, s2,

\underline{L192}, L199, L225, L228, L408, M2 \documentstyle . . . . . . . . . \underline{L197}, L408

\dorestore@version . p62, p85, p87, p95

\dospecials . . . . . . . . . . . . . . . . . .

. . a21, a68, b13, y107, y128, L443 \dot . . . . . . . . . . . . . . . . . . . . . . . r412 \doteq . . . . . . . . . . . . . . . . . . . . . r370 \dotfill . . . . . . . . . . . . . . . . . . . \underline{b229} \dots . . . . . . . . . . . . . . . . . . l270, l273

\doublehyphendemerits . . . . . . . . b116
File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\doublerulesep …. C214, \underline{C231}, C255 \Downarrow . . . . . . . . . . . . . . . . . r470 \downarrow . . . . . . . . . . . . . . . . . r464 \downbracefill . . . . . . . . . . r425, r443 \ds@ . . . . . . . . . . . . . . . . . . L137, L351 \dt@pfalse . . . . . . . . . . . . . . . . . z123 \dt@ptrue . . . . . . . . . . . . . . . . . . z122 \dump . . . . . . . . . . . . . . . . . . . . . N189

E

\egroup . . . . . . . . . . . . . . . . . . . . \underline{b171} \eject . . . . . . . . . . . . . . . . . . . . . \underline{b201} \ell . . . . . . . . . . . . . . . . . . . . . . . r230 \em . . . . . . . . . . . . . . . . . q30, q31, t24

\emergencystretch . . . . b96, J37, J43

\emph . . . . . . . . . . . . . . . . . . . . . . . \underline{t24} \empty . . . . . . . . . . . . . . . . . . . . . \underline{b169} \empty@sfcnt . . . . . . . . . . . . m321,

n464, n465, n468, n486, n495, n539 \emptyset . . . . . . . . . . . . . . . . . . r237 \enc@update . . . . . . . . . . . . . . . . . .

. . m204, m206, m222, \underline{m225}, n129

\encodingdefault . . . . . . . . . . . . .

. . . . . . l279, l285, p159, q80, \underline{r38} \end . . . . . . . . . . . . . a16, d8, d245,

g234, n9, r6, s6, \underline{y56}, y90, y91, z269, F15, F16, L455, L471, M5

\end@dblfloat . . . . . . . . . . . . . . \underline{G113} \end@float . . . . . . . \underline{G97}, G122, G206 \endarray . . . . . . . . . . . . . . . . . \underline{C130} \endcenter . . . . . . . . . . . . . . . . . y72 \enddisplaymath . . . . . . . . . . . . . z181 \enddocument . . . . . . . . . . . . . . . . . \underline{y5} \endenumerate . . . . . . . . . . . . . . A146 \endeqnarray . . . . . . . . . . . . z212, z243 \endequation . . . . . . . . . . . . . . . . z184

\endfilecontents . . . . . . . . . . . \underline{L412}

\endflushleft . . . . . . . . . . . . . . . y79 \endflushright . . . . . . . . . . . . . . y83 \endgraf . . . . . . . . . . . . . . \underline{b166}, B162 \enditemize . . . . . . . . . . . . . . . . A157 \endline . . . . . . . . . . . . . . \underline{b166}, z106 \endlinechar a146, a311, d23, d25, k162 \endlist . . . . . . . . . . \underline{A65}, A146, A157 \endlrbox . . . . . . . . . . . . . . . . . . \underline{B80} \endmath . . . . . . . . . . . . . . . . . . . z179 \endminipage . . . . . . . . . . . . . . . \underline{B218} \endpicture . . . . . . . . . . . . . . . . . \underline{D25} \endsloppypar . . . . . . . . . . . . . . . . J41 \endtabbing . . . . . . . . . . . . . . . . . \underline{C64} \endtabular . . . . . . . . . . . . . . . . \underline{C130} \endtabular* . . . . . . . . . . . . . . . \underline{C130} \endtrivlist . . . . . . y72, y79, y83,

y111, z283, A66, \underline{A67}, C65, E39 \endverbatim . . . . . . . . . . . \underline{y110}, y114

                                       \enlargethispage . . . . . . . . . . \underline{K1126}
                                       \enlargethispage* . . . . . . . . . \underline{K1126}

\enskip . . . . . . . . . . . . . . . . . . . . \underline{i205} \enspace . . . . . . . . . . . . . . . . . . . \underline{i202} \ensuremath . . . . . . . . u42, \underline{z245}, G227 \enumerate . . . . . . . . . . . . . . . . A137 enumerate (environment) . . . . . . \underline{A137} environments:

center . . . . . . . . . . . . . . . . . . . \underline{213} displaymath . . . . . . . . . . . . . . . \underline{220} enumerate . . . . . . . . . . . . . . . . . \underline{236} eqnarray* . . . . . . . . . . . . . . . . . \underline{222} eqnarray . . . . . . . . . . . . . \underline{221}, \underline{223} equation . . . . . . . . . . . . . \underline{220}, \underline{223} filecontents . . . . . . . . . . . . . 378 flushleft . . . . . . . . . . . . . . . . . \underline{213} flushright . . . . . . . . . . . . . . . . \underline{213} itemize . . . . . . . . . . . . . . . . . . \underline{237} lrbox . . . . . . . . . . . . . . . . . . . 238 math . . . . . . . . . . . . . . . . . . . . . \underline{220} minipage . . . . . . . . . . . . . . . . 239 sloppypar . . . . . . . . . . . . . . . . . \underline{324}

                                          thebibliography . . . . . . . . . . 319

verbatim* . . . . . . . . . . . . . . . . . \underline{214} \epsilon . . . . . . . . . . . . . . . . . . . r190 \eqnarray . . . . . . . . . . . . . . z195, z242 eqnarray (environment) …. \underline{z190}, \underline{z284} eqnarray* (environment) . . . . . . . \underline{z241} \eqno . . . . . . . . . . . . . . . . . . . . . . z184 \equation . . . . . . . . . . . . . . . . . . z183 equation (environment) …. \underline{z182}, \underline{z272} \equiv . . . . . . . . . . . . . . . . . . . . . r353 \err@rel@i . . . . . . . . . \underline{o89}, o122, o126 \errhelp a159, a397, a450, a492, a514,

a533, c24, g42, g69, M12, N3, N33 \errmessage . . . . . . . . . . . . . . . a4,

a164, a289, a348, a375, a400, a453, a493, a515, a534, a614, a642, a671, b74, c25, g50, g75, m383, n385, n515, o55, M16, N35

                                       \error@fontshape . . . . . . . . . . . . .

. . m364, m384, n107, n517, p144

                                       \errorcontextlines . . . . . . . . . . . .

. . . . . . . . . b94, b126, b245, g181 \errorstopmode a479, a552, b237, N188 \escapechar . . . . . . . . . . . . . . . . . .

. a541, d92, d137, d142, d150, m286, m414, n183, p52, p102, p143

\eta . . . . . . . . . . . . . . . . . . . . . . . r192 \evensidemargin . . . . . . . . K52, K457

                                       \every@math@size . . . m51, n189, \underline{n201}

\everycr . . b222, z123, z126, z203, z299 \everydisplay …. m261, \underline{m262}, m267

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\everyjob c28, p163, N156, N157, N159 \everymath . . . . . . m260, \underline{m262}, m265 \everypar . k36, y46, y108, 60, A83,

A84, A107, A115, B181, B216, C62, F28, F64, F70, F80, F85, G95

new␣stuff . . . . . . . . . . . . . . . . . . \underline{p38}

\execute@size@function . . . . . . . .

. . . . . . . . n318, n346, n364, \underline{n381} \ExecuteOptions . . . . . n57, n70, \underline{L186}

\exhyphenpenalty . . . . . . . b108, b195

\exists . . . . . . . . . . . . . . . . . . . . r248 \exp . . . . . . . . . . . . . . . . . . . . . . . . z31 \external@font . . . . . . . . . . . n84,

n87, n98, n102, n104, n347, n365, n439, n477, n549, n551, n553

\extra@def . . . . . . . . . . . . . . . \underline{o1}, \underline{o74} \extracolsep . . . . . . . . . . . . . . . \underline{C126}

\extract@alph@from@version . . . . .

. . . . . . . . . . . m420, \underline{m426}, p106 \extract@font . . . . . . . . . . . m297, \underline{n81}

\extract@fontinfo . . . . . . n314, n321
\extract@rangefontinfo . . . . . . . .

… m314, \underline{n331}, n338, n361, n394 \extract@sizefn … m311, \underline{n305}, n328

F

\f@baselineskip . . . . . . . . . . . . . .

… m233, m240, m376, n119, n136, n140, n155, n169, n180, n194

\f@encoding . . . . . . . . . . . . . . . . . .

l146, \underline{m198}, m217, m220, m221, m223, m242, m275, m280, m333, m335, m337, m341, m368, m380, n91, n261, n507, p129

\f@family …. \underline{m226}, m236, m276, m280, m333, m335, m337, m341, m372, m391, n91, p129

\f@linespread . . \underline{m236}, n118, n137,

n138, n141, n149, n152, n163, n166 \f@series . . . . . . j15, \underline{m226}, m237,

m277, m280, m373, m388, q67 \f@shape . . . . . . . . . . . . . . . \underline{m226},

m238, m278, m280, m374, m386 \f@size . . . . . . j6, l148, m63, m233,

m239, m279, m375, m405, m447, m448, m451, m452, n119, n121, n134, n154, n169, n172, n175, n180, n187, n194, n206, n209, n215, n229, n238, n239, n242, n247, n315, n322, n341, n343, n362, n425, n427, n429, n445, n446, n451, n469, n485, n494, n512, n520, n525, n537, n555

\f@user@size . . n445, n450, n512, n525 \fam . . . . . . . . . . . . . . . . . . . . . . . m24 \familydefault . . . . . . . p160, q81, \underline{r38} \fbox . . . . . . . . . . . . . . 238, \underline{B98}, B107 \fboxrule . . . . . . . . . . \underline{B96}, B118,

B121, B127, B129, B136, B137, N9 \fboxsep . . . . . . . . . . . . . . . . \underline{B96},

B102, B117, B122, B132, B134, N8 \filbreak . . . . . . . . . . . . . . . . . . \underline{b199} \filec@ntents . L413, L415, L419, L487 \filecontents . . . . . . . . . . . . . . \underline{L412} filecontents (environment) . . . . . 378 \filename@area . . . . . . a188, a194,

a201, a207, a214, a220, a227, k148, k173, k176, k192, k204, k206

\filename@base . . . . . . . . . . . a236,

a359, k148, k173, k176, k199, k204 \filename@dot . . . . . . . . . . a234, a237 \filename@ext … a232, a234, a360,

k149, k169, k170, k173, k176, k200

\filename@parse . . . . . . . 1, 5, a52,

\underline{a184}, a356, a371, k146, k168, k197 \filename@path . . a189, a190, a195,

a202, a203, a208, a215, a216, a221

\filename@simple . . . . . . . . . . . . .

…. a192, a205, a218, a228, a230 \fill . . . . . . . . . . . . . . . . . . . . . . \underline{i199}

\finalhyphendemerits . . . . . . . . . b117

\finph@nt . . . . . . . . . . . . z75, z77, z78 \finsm@sh . . . . . . . . . . . . z91, z93, z94 \firstmark . . . . . . . . . . . . . J28, K497 \fix@penalty . . . . . . . . . . . . . . . . . \underline{t80} \fixed@sfcnt . . m326, n543, n544, n547 \flat . . . . . . . . . . . . . . . . . . . . . . r251

\floatingpenalty . . . . . . . . . . . G242
\floatpagefraction . . . . . G160, \underline{K1450}

\floatsep . . . . . . . . . . . . . . K515,

K533, K540, K1330, K1379, \underline{K1455} \flushbottom . . . . . . . . . . . . . . . . . \underline{J33} \flushleft . . . . . . . . . . . . . . . . . y74 flushleft (environment) . . . . . . . \underline{y74} \flushright . . . . . . . . . . . . . . . . . y80 flushright (environment) . . . . . . . \underline{y80} \fmtname …. \underline{c1}, c28, c31, L234, L238 \fmtversion . . . . . . . . . . . . . . . . . .

. \underline{c1}, c10, c30, c33, g1, m1, C1, D1, K4, L251, L254, N140, N166

\fmtversion@topatch . . . . . . N138,

N140, N152, N153, N165, N173 \fnsymbol . . . . . . . . . . . . . . . \underline{u25}, 199 \font . . . . . . . . . . . . . . . . . . . a478,

a551, a575, a589, a645, b227, l250–l252, l338, l345, m54, m62, m64, n84, q31, q54, q66, s8–s10, t64

\font@info …. n99, n321, n394, n401

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\font@name . . . . . . . . . . l147, l151, m61, m167, m169, m271, m288, m404, n84, n88, n90, n105, n120, n123, n126, n284–n288, n293

\font@submax . . . . . . . . \underline{n407}, n442,

n443, y18, y20, N25, N27, N36 \fontdimen . . b227, l250–l252, l338,

l345, q31, q66, t64, D48, D50, D317 \fontencoding . . . . . . . . . . . . . . . .

…. l285, \underline{m198}, m229, p159, r14 \fontfamily … \underline{m226}, p160, q5, q8, q11 \fontname . . . . . . . . . . . . . . . . . . m64 \fontseries . . . . . \underline{m226}, p161, q14, q17 \fontshape . . . . . . . . . . . . . . l348,

\underline{m226}, p162, q20, q23, q26, q29 \fontsize . . j7, m52, \underline{m234}, q60, G227 \fontsubfuzz . . . . . . . . \underline{n407}, n447, y18 \footins . . . . . . . . . . . . . . . G212–

G215, G238, K243–K246, K277, K330, K336, K340, K368

\footnote . . . . . . . . . . . . . . . . . \underline{G229} \footnotemark . . . . . . . . . . . F9, \underline{G251} \footnoterule . . . . . B224, G216, K339 \footnotesep . B243, \underline{G228}, G241, G249 \footnotesize . . . . . . . . . . B236, G239 \footnotetext . . . . . . . . . . F11, \underline{G268} \footskip . . . . . . . . . . . . . K56, K482 \forall . . . . . . . . . . . . . . . . . . . . r247 \fps@dbl . . . . . . . . . . . . . . . . . . . \underline{G18} \frac . . . . . . . . . . . . . . . . . . . . . . \underline{z187} \frame . . . . . . . . . . . . . . . . \underline{B82}, B144 \framebox . . . . . . . . . . . . . . 238, \underline{B105} \frenchspacing . . . . . \underline{b154}, y110, y137 \frown . . . . . . . . . . . . . . . . . . . . . r356

\frozen@everydisplay . . . \underline{m260}, \underline{m266}
\frozen@everymath . . . . . \underline{m260}, \underline{m264}

\fussy . . . . . . . . . . . . . . . . . . . . . . \underline{J42} \futurelet d250, d263, t62, z139, C252

G

\g@addto@macro \underline{L358}, L362, L366, L367

\G@refundefinedfalse . . . . . . . . . . w5
\G@refundefinedtrue . I21, I43, \underline{w3}, w12

\Gamma . . . . . . . . . . . . . . . . . . . . . r215 \gamma . . . . . . . . . . . . . . . . . . . . . r188 \gcd . . . . . . . . . . . . . . . . . . . . . . . . z33 \ge . . . . . . . . . . . . . . . . . . . . . . . r327 \gen@sfcnt … m322, n480, n481, n484 \genb@sfcnt … m323, n489, n490, n493 \genb@x . . . . . . . . . . . . . . . n494, \underline{n497} \genb@y . . . . . . . . . . . . . . . . . . . . \underline{n497} \GenericError \underline{g19}, g91, g122, g153, n62 \GenericInfo . . . . . . . . . . . . . . \underline{g4},

g112, g143, g173, n31, n34, n39, n75

                                       \GenericWarning . . . . . . . . . . \underline{g11},

g102, g133, g164, n42, n47, n50, n78 \geq . . . . . . . . . . . . . . . . . . . r326, r327 \get@cdp . . . . . p278, p286, p319, p320

                                       \get@external@font . . . n83, \underline{n96}, n526
                                       \getanddefine@fonts . . . . . . m415,

m433, \underline{n274}, p53, p91, p103, p187, p249, p283, p285, p302, p425, p426, p458, p459, p794, p795

\GetFileInfo . . . . . . . . . . . . . . . . . . r3 \getlinechar . . . . . . . . . . . . . . . \underline{D121} \gets . . . . . . . . . . . . . . . . . . . . . . r345 \gg . . . . . . . . . . . . . . . . . . . . . . . r340 \glb@currsize . . . . . . . . . . . . k34,

m257, \underline{n171}, n206, n210, n216, n239 \glb@settings . m258, \underline{n171}, n218, n249 \globaldefs …. m416, n185, p54, p104 \glossary . . . . . . . . . . . 317, F109,

H22, \underline{H32}, J20, J23, K473, K488 \glossaryentry . . . . . . . . . . . . . . H29 \goodbreak . . . . . . . . . . . . . . . . . \underline{b199} \grave . . . . . . . . . . . . . . . . . . . . . r404 \group@elt . . . . . p26, p185, p217,

p220, p223, p242, p243, p246, p826 \group@list . . . . . . . . . . . . . p189,

p227, p240, p241, p245, p246, p275, p497, p539, p608, p611, p661, p664, p711, p714, p781, p832

\guillemotleft . . . . . . . . . . . . . . l391 \guillemotright . . . . . . . . . . . . . l392 \guilsinglleft . . . . . . . . . . . . . . l393 \guilsinglright . . . . . . . . . . . . . l394

H \H . . . . . . . . . . . . . . . . . g27, l186,

l297, l360, l443, l451, l470, l478 \h@false . . . . . . . . . . . . . . . . . . . . z65 \h@true . . . . . . . . . . . . . . . . . z66, z67 \halign … b222, z84, z128, z203, z299 \hangindent . . . . . . . . . . . . . . . . . F87 \hat . . . . . . . . . . . . . . . . . . . . . . . r410 \hb@xt@ . . . . . . . . . . . . . . . . . \underline{d16},

l331, z128, z208, z248, z262, z277, z307, B28, B43, B116, B281, B285, B286, C35, D21, D31, D40, D135, D167, D170, D173, D175, D176, D245, D274, D371, F124, F126, K470, K485, K1111, K1409, K1410, K1415

\hbadness . . . . . . . . . . . . . b104, m473 \hbar . . . . . . . . . . . . . . . . . . . . . . r227 \headheight . . . . . . . . . . . . K54, K466 \headsep . . . . . . . . . . . . . . K55, K480 \heartsuit . . . . . . . . . . . . . . . . . r256

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\height . . . . . . . . . . . . . . . . B15, B18 \hexnumber@ . . . . . . . . . . . . . p512,

p520, p535, p554, p562, p570, p579, p582, p591, p592, p620, p628, p673, p681, p695, p696, p699, p724, p732, p737, p739, \underline{q71}

\hfuzz . . . . . . b127, J38, J39, J45, J46 \hgl@ . . . . . . . . . . . . . . . . . b192, b193 \hglue . . . . . . . . . . . . . . . . . . . . . \underline{b189} \hideskip . . . . . . . . . . . . . . \underline{b79}, b213 \hidewidth . \underline{b213}, l302, l303, l306,

l308, l367, l368, l371, l374, l376 \hline . . . . . . . . . . . . . . . . \underline{C251}, C254 \holdinginserts . . . . . . . . . . . . . b95 \hom . . . . . . . . . . . . . . . . . . . . . . . . z29 \hookleftarrow . . . . . . . . . . . . . . r378 \hookrightarrow . . . . . . . . . . . . . r376 \hphantom . . . . . . . . . . . . . . . . . . . z66 \hrule . b190, b229, i161, i169, l246,

r245, r502, B88, B93, B127, B137, C252, C269, D276, G217

\hrulefill . . . . . . . . . . . . . . . . . \underline{b229} \hspace . . . . . . . . . . . . . . . . . . . . \underline{i191} \hyphenation . . . . . . . . . . . . . . . . \underline{l162} \hyphenpenalty . . . . . . . . . . . . . . b107

I

\I . . . . . . . . . . . . . . \underline{b160}, L449, N107 \i . . . . . . . . . l203, l313, l395, l430,

l522, l524, l526, l528, N112, N118 \ialign . . . . . . . . . . . . \underline{b222}, b224,

r242, r363, r418, r421, r424, r427, z97, z99, z107, C142, D72

\if@afterindent . . . . . . . . . \underline{F78}, F83

\if@compatibility . . . . . . . . \underline{L2}, L194

\if@endpe . . . . . . . . . . . . . . . y58, \underline{A85} \if@eqnsw . . . . . . . . . . . . . . \underline{z190}, z239 \if@fcolmade . . . . . . . . . . . . . . . . .

\underline{K74}, K195, K290, K299, K568, K585, K612, K640, K1393, K1430

\if@filesw . . . . . . . . . . . . . . . I4, I8, I19, I28, I36, I42, \underline{k7}, k29, k77, k89, k96, k103, y10, y24, F99

\if@firstamp . . . . . . . . . . . . . . . \underline{C178}

\if@firstcolumn . . . . . . . . . . \underline{K74},

K177, K209, K292, K1083, K1400 \if@ignore . . . . . . . . . . . . . . . \underline{y4}, y59 \if@inlabel . \underline{A28}, A49, A68, A98, A108 \if@inmath . . . . . . . . . . . . \underline{m268}, n219 \if@insert . . . . . . . . . . . . . . \underline{K74},

K732, K838, K872, K942, K1058 \if@minipage . . . . . . . . . . . . . . . . .

. . i112, i126, y94, A93, \underline{B189}, C60 \if@mparswitch . . . . . . . . \underline{K74}, K1085

                                       \if@multiplelabels . . . . . . . . . . . \underline{w31}

\if@negarg …. \underline{D76}, D94, D108, D143 \if@newlist . . . . . . . . . . . . . . . . . .

. y111, \underline{A29}, \underline{A33}, A54, A69, A100 \if@nmbrlist . . . . . . . . . . . A33, A117 \if@no@font@opt . . . . . . . . o100, \underline{o119} \if@nobreak i35, i128, k65, A100, F28,

F80, G88, J21, J25, K266, K820 \if@noitemarg . . . . . . . . . . \underline{A32}, A117 \if@noparitem . . . . . . . . . . . \underline{A30}, A97 \if@noparlist . . . . . . . . . . . \underline{A31}, A71 \if@noskipsec …. A47, \underline{F21}, F22, F64 \if@ovb . . . . . . . . . . \underline{D222}, D262, D267 \if@ovl . . . . . . . . . . \underline{D222}, D260, D277 \if@ovr . . . . . . . . . . \underline{D222}, D259, D275 \if@ovt . . . . . . . . . . \underline{D222}, D261, D271 \if@partsw . . . . . . . . . . . . . . . \underline{k7}, k81 \if@pboxsw . . . . . . . . . . . . B174, B245

                                       \if@reversemargin . . . . . K80, K1088
                                       \if@reversemarginpar . . . . . . . . . \underline{K74}

\if@rjfield . . . . . . . . . . . . . \underline{C21}, C33 \if@specialpage . . . . . . . . \underline{K74}, K450 \if@tempswa … I47, a25–a27, a491,

a501, a505, a524, a561, a564, a623, \underline{e9}, k87, m74, p210, p263, p327, p408, p825, t70, y26, y100, K665, K701, K1023, L434

\if@test . . . . . . K12, K634, K646,

K707, K788, K797, K923, K1028 \if@twocolumn … k19, G16, G114,

\underline{K74}, K118, K198, K208, K291, K315, K570, K603, K1082, K1394

\if@twoside . . . . . . . \underline{K74}, K117, K453 \ifdt@p . . . . . . . . . . . . . . . . z121, z123 \iff . . . . . . . . . . . . . . . . . . . . . . . r390 \IfFileExists … \underline{a120}, a385, a404,

\underline{k114}, k141, k152, 71, 380, N134

                                       \ifG@refundefined . . . . . . . . . w3–w5

\ifh@ . . . . . . . . . . . . . . . . . . . z64, z81 \ifin@ . . . . . . . . . . . . . . . . . . a605,

a633, a661, o40, o42, \underline{p1}, p13, p174, p274, p276, p337, p350, p420, p422, p450, p498, p509, p540, p551, p609, p612, p632, p662, p665, p709, p712, p715, p782, p784, p813, L78, L147, L159

\ifinner . . . . . . z154, z168, G36, G172 \ifmath@fonts . . . . . . . . . . \underline{m177}, n176 \ifnot@nil . . . . . . . . \underline{n297}, n316, n337 \ifodd . . . . . . . . p756, D181, D201,

G47, K19, K117, K454, K657, K660, K693, K696, K804, K807, K971, K974, K1086, K1265, K1273

                                       \ifrestore@version . . . . p42, p43, p56
File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\iftest . . . . . . . . . . . a283, a337, a367 \ifv@ . . . . . . . . . . . . . . . . . . . z64, z80 \ifvbox . . . . . . . . . . K249, K348, K369 \ignorespaces . . . . . . . . . . . . . I7,

I9, i10, i63, i78, i87, i211, k49, m231, y59, y67, y68, z176, A44, A126, B79, B243, C49–C51, C63, C72, C85, C90, C93, C96, C98, C101, C169, C210–C212, C225, D24, D32, D43, D74, D75, E30, E32, F70, G7, G10, G249

\Im . . . . . . . . . . . . . . . . . . . . . . . r233 \imath . . . . . . . . . . . . . . . . . . . . . r228 \in . . . . . . . . . . . . . . . . . . . r337, r364 \in@ . . . . . . a543, o39, o41, \underline{p1}, p12,

p173, p273, p275, p333, p346, p419, p421, p448, p496, p507, p538, p549, p607, p610, p630, p660, p663, p707, p710, p713, p780, p783, p811, L77, L144, L158

\in@@ . . . . . . . . . . . . . . . . . . . . p3, p5 \in@false . . . . . . . . . . . . . . . . . . . p4 \in@true . . . . . . . . . . . . . . . . . . . . p4 \include . . . . . . . . . . . . . . . . . \underline{k71}, 71 \includeonly . . . . . . . . . . . . . . \underline{k68}, 71 \indent . . . . . . . . . . . . A68, A98, C61 \index . . . . . . . . . . . . . . 317, F109,

H6, \underline{H17}, J20, J23, K472, K487 \indexentry . . . . . . . . . . . . . . . . . H14 \inf . . . . . . . . . . . . . . . . . . . . . . . . z25 \infty . . . . . . . . . . . . . . . . . . . . . r235 \input . . . . . . . . . . . . . . a15, a116,

a119, a176, a428, d7, \underline{k143}, n16, o8, o96, q131, q142, q152, r10– r13, r20, r21, r25, r26, r55– r58, y15, 71, 380, L198, N23, N139

\input@path . . . . . . . . . . . . . . . . 1, 4, a51, a73, a75, a81, a83, a89, a91, a96, a98, a108, \underline{a175}, a383, a409, a414, a415, a417, a419, a421, a425, a430, a436, k117, k131

\InputIfFileExists . . . \underline{k140}, k145,

k153, k172, l280, q105, q123, q134, q144, 71, 380, L321, M8, N17

\inputlineno . a245, b86–b88, g183,

g186, q104, N81, N92, N103, N111 \insc@unt . \underline{b37}, b47–b49, b51, b62–b67 \insert b69, G238, K368, K369, K1160

\install@mathalphabet . . . . . . . . .

\underline{m410}, m427, m434, p193, p196, p280, p281, p378, p430, p433, p440, p455, p456, p463, p796, p798

\int . . . . . . . . . . . . . . . . . . . . . . . r265

\interdisplaylinepenalty . . . . . . .

. . . . . . . . . . . i16, z52, z125, z225

\interfootlinepenalty . . . . . . . . \underline{b150}
\interfootnotelinepenalty . . . . . .

. . . . . . . . . . . . . b150, i21, G240

\interlinepenalty . . . . . . . . . . . .

… i14, y101, y104, F44, F74, F117, G240, K268, K822, K826

\intextsep . . . . . . . . . . . . . K808,

K812, K824, K827, K834, \underline{K1455} \intop . . . . . . . . . . . . . . . . . r264, r265 \iota . . . . . . . . . . . . . . . . . . . . . . r194 \is@range . . . . . . . . m315, n332, \underline{n333} \ishortstack . . . . . . . . . . . . . . . . \underline{D62} \itdefault . . . . . . . . . . . . . . q29, \underline{r34} \item . . . . . . . . . . . . . . . . . . I4, I8,

g276, y69, y74, y80, y93, z261, z276, \underline{A88}, A127, C59, E36, E38

\itemindent . . . . . \underline{A9}, A36, A62, A121 \itemize . . . . . . . . . . . . . . . . . . A148 itemize (environment) . . . . . . . . \underline{A148} \itemsep . . . . . . . . . . . . . . . \underline{A1}, A103 \iterate . . . . . . . . . . . . a28, a29, \underline{b178} \itshape . . . . . . . . . . . . . . . . l346,

q27, q28, q32, t20, E36, E38, G221

J

\J . . . . . . . . . . . . . . . . . . . . . . . N109 \j . . . . . . . . . . . l204, l314, l396, N118 \jmath . . . . . . . . . . . . . . . . . . . . . r229 \Join . . . . . . . . . . . . . . . . . . . . . . q91 \joinrel . . . . . . . r371, r376, r378–

r381, r383, r385, r386, r388, r389 \jot . . . . . . . . . . . . . . . z51, z122, z232

K

\k . . . . . . . . l375, l432, l437, l459, l464 \kappa . . . . . . . . . . . . . . . . . . . . . r195 \ker . . . . . . . . . . . . . . . . . . . . . . . . z27 \kill . . . . . . . . . . . . . . . . . . . . . . C51

L

\L . . . . . . . l198, l330, l381, L446, N131 \l . . . . . . . . . . . l205, l332, l397, N131 \l@ngrel@x . . d41, d42, \underline{d43}, d87, d135 \label \underline{w32}, F109, J20, J23, K471, K486 \labelsep . . \underline{A9}, A122, A126, E36, E38 \labelwidth \underline{A9}, A61, A122, A123, A125 \Lambda . . . . . . . . . . . . . . . . . . . . r218 \lambda . . . . . . . . . . . . . . . . . . . . r196 \land . . . . . . . . . . . . . . . . . . . . . . r280 \langle . . . . . . . . . . . . . . . . . . . . r478 \language … b35, b56, b89, b90, M10 \last@fontshape . . . . . . . m382, m397

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\lastbox . . z111, z112, A84, F83, K234 \lastpenalty . . . . . . . . . . . . . t91, t94 \lastskip b202, b203, b205, b207, i8,

i40, i41, i43, i47, i70, i98, i103, i106–i108, i113, i130, i133, i134, t81, t84, A72, A73, A94, A95, D44

\LaTeX . . . . . . . . . . . . . . . . . . . \underline{j3}, j16 \LaTeXe . . . . . . . . . . . . . . . . . . . . . \underline{j14} \lbrace . . . . . . . . . . . . . . . . l258, r482 \lbrack . . . . . . . . . . . . . . . . . . . . \underline{b164} \lccode . g22–g27, l124, y132, y142,

N89, N99, N108, N110, N112, N114 \lceil . . . . . . . . . . . . . . . . . . . . . r486 \ldotp . . . . . . . . . . . . . r391, r394, r503 \ldots . . . . . . . . . . . . . . . . . l273, r395 \le . . . . . . . . . . . . . . . . . . . . . . . r325 \leaders … b229, r245, r444, r445,

r447, r448, C269, D270, D276, F121 \leadsto . . . . . . . . . . . . . . . . . . . q94 \leavevmode . . . . . b193, \underline{b220}, b223,

b229, b230, i93, i184, l242, l305, l331, l335, t7, t102, y87, y101, y111, y126, y143, z261, z276, A47, B4, B8, B81, B83, B99, B113, B159, B203, B249, B257, C135, D65, D176, F22, F118, G263

\left . . . . . . r504–r507, z96, z102, z113 \Leftarrow . . . . . . . . . r321, r386, r389 \leftarrow . . . . . . . . . . . . . . . . . .

. r344, r345, r378, r385, r388, r436 \leftarrowfill . . . . . . . . . . r422, r436 \lefteqn . . . . . . . . . . . . . . . . . . . \underline{z244} \leftharpoondown . . . . . . . . r358, r369 \leftharpoonup . . . . . . . . . . . . . . r357 \lefthyphenmin . . . . . . . . . . b92, M11 \leftline . . . . . . . . . . . . . . . . . \underline{B281} \leftmargin . . . . . . . . . . . . . . . . . .

… \underline{A9}, A41, A42, A61, A91, A93 \leftmargini . . . . . . . . . . . . z254, \underline{A17} \leftmarginii . . . . . . . . . . . . . . . \underline{A17} \leftmarginiii . . . . . . . . . . . . . . \underline{A17} \leftmarginiv . . . . . . . . . . . . . . . \underline{A17} \leftmarginv . . . . . . . . . . . . . . . . \underline{A17} \leftmarginvi . . . . . . . . . . . . . . . \underline{A17} \leftmark . . . . . . . . . . . . . . . . . . . \underline{J26} \Leftrightarrow . . . . . . . . . . . . . r320 \leftrightarrow . . . . . . . . . . . . . r343 \leftskip . . . . . . . b215, y70, y77,

y81, y95, A52, B184, F115, F120 \leq . . . . . . . . . . . . . . . . . . . r324, r325 \lfloor . . . . . . . . . . . . . . . . . . . . r490 \lg . . . . . . . . . . . . . . . . . . . . . . . . z4 \lgroup . . . . . . . . . . . . . . . . . . . . \underline{r492} \lhd . . . . . . . . . . . . . . . . . . . . . . . q97 \lhook . . . . . . . . . . . . . . . . . r375, r376 \lim . . . . . . . . . . . . . . . . . . . . . . . . z6 \liminf . . . . . . . . . . . . . . . . . . . . . z8 \limits . . . . . . . . r426, r430, z95, z186 \limsup . . . . . . . . . . . . . . . . . . . . . z7 \line . . . . . . . . . . . . . . . . . . g261, \underline{D77} \linebreak . . . . . . . . . . . . . . . . . . \underline{i11} \linepenalty . . . . . . . . . . . . . . . . b106 \lineskip . . . . . . . . . . . . . . . . . . .

. b158, b188, b223, r362, z118, B185, C52, C149, D67, D177, K462

\lineskiplimit . . b159, b188, b225,

b226, r362, r398, z120, z124, K462 \linespread . . . . . . . . . . . . . . . . \underline{m232} \linethickness . . . . . . . . . . . . . . \underline{D56} \linewidth . . . . . . k23, z161, z262,

z277, z281, z299, A15, A41, A43, B182, C34, G148, K125, K137

\list . . . . . . . . . . . . . \underline{A34}, A142, A153 \listfiles . . . . . . . . . . . . . \underline{k186}, 380 \listparindent . . . . . . . \underline{A9}, A36, A40 \ll . . . . . . . . . . . . . . . . . . . . . . . r341 \llap . . . . . . . A144, A155, \underline{B285}, B286 \lmoustache . . . . . . . . . . . . . . . . . r449 \ln . . . . . . . . . . . . . . . . . . . . . . . . z5 \lnot . . . . . . . . . . . . . . . . . . . . . . r250 \LoadClass . . . . . . . . . . . . . . 379,

\underline{L204}, L218, L338, L395, L403, L404

\LoadClassWithOptions . . . . 379, \underline{L217}

\log . . . . . . . . . . . . . . . . . . . . . . . . z3 \Longleftarrow . . . . . . . . . . . . . . r386 \longleftarrow . . . . . . . . . . . . . . r384

\Longleftrightarrow . . . . . . r389, r390
\longleftrightarrow . . . . . . . . . . r388

\longmapsto . . . . . . . . . . . . . . . . . r387 \Longrightarrow . . . . . . . . . . . . . r381 \longrightarrow . . . . . . . . . r382, r387 \loop . . . . . . . . . . . . . a28, \underline{b178}, C275 \lor . . . . . . . . . . . . . . . . . . . . . . . r282 \lower . . . . . . . . . . . j2, r362, B125,

D23, D92, D173, D174, D210, D211 \lower@bound . . . . . . . n342, n343, \underline{n355} \lowercase . . . . . . . . . . . . . . . . . .

g29, l125, m248, y136, y143, N127 \lq . . . . . . . . . . . . . . . . . . . . . . . \underline{b162} \lrbox . . . . . . . . . . . . . . . . . . . . . \underline{B69} lrbox (environment) . . . . . . . . . . . 238

M

\M . . . . . . . . . . . . . . . . . . . . . . . . \underline{b160} \m@ne . . . . . . . . . . . . . . . . . . . . . . \underline{b39} \m@th . . . . . . . . . . \underline{b209}, b221, b231,

j5, r242, r363–r365, r367, r396, r418, r421, r424, r427, r433,

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

r436, r443, r446, r508, z59, z61, z77, z93, z96, z98, z103, z122, z199, z262, z277, z287, B174, B255, C138, F121, G222, G227

\magstep . . . . . . . . . . . . . . . . . . . \underline{b151} \magstephalf . . . . . . . . . . . . . . . . \underline{b151} \makeatletter . . . . . . . . . . . . . . . .

. a257, \underline{d264}, d280, k25, m305, m338, y15, F98, K2, L198, L301

\makeatother . . . . . . \underline{d264}, L198, N187 \makebox . . . . . . . . . . . . z161, 238, \underline{B3} \makeglossary . . . . . . . . k55, 317, \underline{H19} \makeindex . . . . . . . . . . . k54, 317, \underline{H3} \makelabel . . . . . . . . . . . . . . . . . .

A38, A64, A119, \underline{A127}, A144, A155 \MakeLowercase . . . . . . . . . N124, N133 \makeph@nt . . . . . . . . . . . . . . z72, z74 \makesm@sh . . . . . . . . . . . . . . z88, z90 \maketitle . . . . . . . . . . . . . . . . . 293 \MakeUppercase . . . . . . . . . . . . . \underline{N117} \mandatory@arg . . . . . . n374, n477,

n485, n494, n507, n509, n514, n516, n521, n523, n538, n549, n551

\mapsto . . . . . . . . . . . . . . . . . . . . r349 \mapstochar . . . . . . . . . r348, r349, r387 \marginpar . . . . . . . . . . . . . . . . \underline{G171} \marginparpush . . . . . . . . K64, K1102 \marginparsep …. K63, K1113, K1115 \marginparwidth … G186, K62, K1115 \mark . . . . . . . . . . . . . . . J21, J25, \underline{J30} \markboth . . . . . . . . . . . . . . . . . . . \underline{J18} \markright . . . . . . . . . . . . . . . . . . \underline{J18} \math . . . . . . . . . . . . . . . . . . . . . . z178 math (environment) . . . . . . . . . . . . \underline{z178} \math@bgroup . . . . . . . . \underline{m441}, n260,

n266, p47, p97, t109, t110, t117 \math@egroup . . . . . . . . . . . . . . . . .

\underline{m441}, n264, \underline{n265}, t110, t111, t118 \math@fonts . . . . . . . . . . . . . . . . . .

\underline{m411}, m416, n186, n290, p54, p104

\math@fontsfalse j8, m50, m179, m188

\math@fontstrue . . . . . . . m177, m455 \math@version . . . . . . . . . . . . . . . .

m10, \underline{m252}, m415, m419, m421, m422, m424, n184, p50, p53, p59–p61, p65, p66, p70, p100, p103, p107, p109, p111, p115, q53

\mathaccent . . . . . . . . . . . . p507, p535 \mathalpha . . p754, r89–r114, r116–

r151, r215–r225, r403–r410, r412 \mathbf . . . . . . . . . . . . . . . . . q13, r71 \mathbin … p759, r155, r156, r158,

r275–r279, r281, r283–r308, z36 \mathcal . . . . . . . . . . . . . . . . . . . . r70 \mathchar . . . . . . . . . . . . . . b221,

p549, p591, r227, r239, r501, u43 \mathchar@type . . . . . . . . . . p535,

p579, p582, p591, p695, p755, p773 \mathchardef . . . . . . . . . . . . . . . . .

. b21–b24, e3–e6, p582, r498–r500 \mathchoice . . . . . . . . . . . . . . . . . . z56 \mathclose . p762, r152, r154, r166,

r168, r172, r452, r477, r481, r485, r489, r495, z41, z44, z47, z50

\mathcode . . . . . . . . . p579, r174–r176 \mathdollar . . . . . . . . . . . . . l257, \underline{r498} \mathellipsis . . . . . . . . . . . l271, \underline{r503} \mathgroup . . . . . . . . . \underline{m22}, n257,

n263, n269, n270, n281, q68, r509 \mathhexbox . . . . . . . . . . . . . \underline{b221}, q78 \mathindent …. \underline{z252}, z263, z279, z289 \mathinner …. r394, r397, r400, r503 \mathit . . . . . . . . . . q28, r73, r76, r501 \mathnormal . . . . . . . . . . . . . . . . . . r69 \mathop . . . . . . . . . . . . p758, r258–

r264, r266–r271, r273, r274, r424, r427, z3–z34, z95, z186

\mathopen . . . . . . . . . . p761, r153, r167, r171, r450, r479, r483, r487, r491, r493, z39, z42, z45, z48

\mathord . . . . . . . p757, r159, r160, r169, r173, r186–r214, r226, r228–r238, r240, r241, r246– r249, r251–r257, r411, r413, r414, r435, r436, r439–r442, r454, r456, r458, r461, r475, r497

\mathpalette . . . . . . . . . . . . . . . . .

r361, r364, r366, z56, z60, z70, z86 \mathparagraph . . . . . . . . . . l260, \underline{r498} \mathph@nt . . . . . . . . . . . . . . z70, z76 \mathpunct p763, r157, r162, r391–r393 \mathrel . . . . . . . . . . . . . . . p760,

r161, r163–r165, r243, r309– r322, r324, r326, r328–r338, r340–r344, r346, r348, r350– r361, r364, r366, r371, r372, r374, r375, r377, r379, r380, r463, r465, r467, r469, r471, r473, z40, z43, z46, z49, z95, z186

\mathrm . . . . . . . . . . . . . . . . . . q4, r68 \mathsection . . . . . . . . . . . . l261, \underline{r498} \mathsf . . . . . . . . . . . . . . . q7, r72, r75 \mathsm@sh . . . . . . . . . . . . . . z86, z92 \mathsterling . . . . . . . . . . . l268, \underline{r498} \mathstrut . . . . . . . . . \underline{z64}, z100, z101 \mathsurround . . . . . . . . . . . . . . . b209 \mathsymbol . . . . . . . . . . . . . . . . . p584 \mathtt . . . . . . . . . . . . . . . . . q10, r74

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\mathunderscore . . . . . l242, l265, \underline{r498} \mathversion . . . . . . . . \underline{m252}, q50, q52 \matrix . . . . . . . . . . . . . . . . z98, z102 \max . . . . . . . . . . . . . . . . . . . . . . . . z22 \maxdeadcycles . . . . . . . . . . . . . . . K7 \maxdepth . . . . . . . . . . . . . . b132,

k40, K71, K353, K363, K397, K504, K513, K553, K666, N10

\maxdimen . . . . . . \underline{b79}, b133, b134, b188, b226, b237, b245, m471, n340, n399, r362, D247, D281, K218, K1123, K1150, K1155, N14

\maybe@ic . . . . . . . . . . . . t43, t44, \underline{t62} \maybe@ic@ . . . . . . . . . . . . . . . . . . \underline{t62} \mb@b . . . . . . . . . . . . . . . . . . B34, B44 \mb@l . . . . . . . B34, B38, B43, D68, D72 \mb@r . . . . . . . B34, B38, B43, D68, D72 \mb@t . . . . . . . . . . . . . . . . . . B35, B42 \mbox . . . . . . . . I20, b221, j14, l245,

q74, r396, 238, B7, \underline{B8}, D28, G227 \mddefault . . . . . . . . . . . q17, \underline{r32}, r40 \mdseries . . . . . . . . q15, q16, q77, t19 \meaning . . . . . . . . . . . . . . . . a161,

a170, a241, a308, a344, a452, d195, d273, l82, p334, p347, p448, p507, p549, p630, p707, p811

\medbreak . . . . . . . . . . . . . . . . . . \underline{b203} \medmuskip . . . . . . r511, z35, z37, z132 \medskip . . . . . . . . . . . . . . . b206, \underline{i177} \medskipamount . . . . . . b205, i178, \underline{i180} \MessageBreak … d172, \underline{g3}, g6, g13,

g36, g49, g63, g76, g197, g199, g205, l132, m395, n20, n21, n88, n281, n450, n474, n520, n537, n554, o21, o23, p289, p298, p436, t123, y19, K426, K1223, L85, L227, L238, L240, L242, L253, L308, L309, L311–L313, L315, L316, L333–L336, L380, L397, L398, L429, N26–N28, N30

\mho . . . . . . . . . . . . . . . . . . . . . . . q90 \mid . . . . . . . . . . . . . . . . . . . . . . . r313 \min . . . . . . . . . . . . . . . . . . . . . . . . z23 \minipage . . . . . . . . . . . . . . . . . \underline{B190} minipage (environment) . . . . . . . . 239 \mit . . . . . . . . . . . . . . . . . . . . . . . \underline{q155} \mkern . . . . . b231, r227, r243, r245,

r365, r371, r400–r402, r431– r438, z35, z36, z38, z63, F122

\models . . . . . . . . . . . . . . . . . . . . r380 \month . . . . . . . . . a127, a318, c8, L440 \moveright . . . . . . . . . . . . . . . . K465 \mp . . . . . . . . . . . . . . . . . . . . . . . r300 \mscount . . . . . . . . . . . . . . . . . . \underline{C272} \mskip . . . . . . i188, z35, z37, z131–z134 \mu . . . . . . . . . . . . . . . . . . . . . . . r197 \multicolumn . . . . . . . . . . . . . . . \underline{C165} \multiput . . . . . . . . . . . . . . \underline{D33}, \underline{D37} \multispan . . . . . . . . . . . . C165, \underline{C272} \muskip . . . . . . . . b29, b50, r431, r432 \muskipdef . . . . . . . . . . . . . . . . . b50

N \n@space . . . . . . . . . . . . . . . r504–r508 \nabla . . . . . . . . . . . . . . . . . . . . . r238 \narrower . . . . . . . . . . . . . . . . . . \underline{b214} \natural . . . . . . . . . . . . . . . . . . . r252 \ne . . . . . . . . . . . . . . . . . . . . . . . r323 \nearrow . . . . . . . . . . . . . . . . . . . r316

                                       \NeedsTeXFormat . . . . . . . . . . . . . .

. . . . . a256, l276, n12, \underline{L232}, L491 \neg . . . . . . . . . . . . . . . . . . . r249, r250 \negthinspace . . . . . . . . . . . . . . . \underline{i202} \neq . . . . . . . . . . . . . . . . . . . . . . . r323 \new@command . . . . . . . . . . . . . . . . .

. d44, \underline{d45}, d97, d132, d152, d207 \new@environment … d112, \underline{d113}, d126 \new@fontshape . . . . . . . . . . . . \underline{o1}, \underline{o14}

                                       \new@mathalphabet . . . . . . . . . . . .

. . . . . . . . p331, p352, p363, p401 \new@mathgroup . . . . . . . . . . \underline{m22}, p212 \new@mathversion \underline{p11}, p170, p172, p203 \new@symbolfont …. p213, p244, p256 \newbox . . . . . . \underline{b47}, b84, b211, e13,

z58, A27, B54, C16–C18, C236, D6, D308, D313, K65, K99–K101

\newcommand . . . . . . . . . \underline{d44}, 34, l4, r29–r41, D324, K1443, K1446, K1449, K1450, K1453, K1454

\newcount . . . . . . . . . . . . \underline{b47}, b87, b90, b92–b95, b97, b99, b150, e7, e8, i37, k9, n25, p18, p178, u16, z52, z190, z191, A23– A26, A45, A132, A147, B231, C11–C15, C228–C230, D302– D305, D314, F19, F88, F89, G3, G149–G152, K82, K84, K86, K88, K90, K98, K1212, K1441, K1444, K1447, K1451, N4–N6

\newcounter . . . . . . . . . . . . . . u7, 199 \newdimen . . . . . . . . . . . . . . . \underline{b47},

b79, b81, b82, b96, b149, e10– e12, i36, n356, n357, z51, z253, A9–A22, B96, B97, C3, C5– C8, C120, C231–C234, D3–D5, D7, D228–D233, D306, D307, D309–D312, G228, K50–K52,

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

K54–K64, K70, K72, K73, K85, K87, K89, K91–K97, K1213, K1214

\newenvironment . . . . . . . . . . \underline{d112}, 35 \newfam . . . . . . . . . . . . . . . . . . . . m25 \newfont . . . . . . . . . . . . . . . . . . . \underline{q54} \newhelp . . . . . . . . . . . . . . . . . . . \underline{b47} \newif . . . . . . . . . . . . . a283, \underline{d136},

e9, i35, k7, k8, m177, m268, p6, p42, w3, y4, z64, z121, z192, A28–A33, A85, B189, B245, C21, C178, D76, D222– D225, F21, F78, K12, K74–K81, L2

\newinsert . . . . . . . . . . . . . . . . . .

\underline{b62}, B232, G212, K21–K38, K1122 \newlabel . . . . . . . . . . . . . . \underline{w22}, w34 \newlanguage . . . . . . . . . . . . . . . . \underline{b56} \newlength . . . . . . . . . . . . . . . \underline{x3}, 207 \newline . . . . . . . . . . . . . . \underline{i22}, i30, i31 \newlinechar . . . . . . . . . . . . . . a19, \underline{d5}

\newmathalphabet . . . . . . . . . . . . . \underline{o99}
\newmathalphabet@@ . . . . . . . . . . . . \underline{o99}
\newmathalphabet@@@ . . . . . . . . . . . \underline{o99}

\newmuskip . . . . . . . . . . . . . . . . . \underline{b47} \newpage . . . . . . . . . K112, K118, \underline{K129} \newread . . . . . . . . . . . . . . . . . \underline{b54}, k3 \newsavebox . . . . . . . . . . . . . . 238, \underline{B54} \newskip . . . . . \underline{b47}, b80, b83, b147,

b148, e14, e15, e17, i180–i182, i199, x3, y73, z193, A2–A8, K1455–K1457, K1461, K1462, K1465–K1467, K1471–K1473

\newtheorem . . . . . . . . . . . . . . . . . . \underline{E1} \newtoks . . \underline{b47}, e16, m262, m263, n201 \newwrite . . \underline{b54}, k4–k6, F100, H4, H20 \nfss@catcodes . . . . . . . . . . . . . . .

d282, m28, m95, m305, m339, m340, \underline{m344}, o10, r19, r24, r54, K3

\nfss@text . . . . . . . \underline{q74}, t5, \underline{t101}, w13 \NG . . . . . . . . . . . . . . . . . . l382, N131 \ng . . . . . . . . . . . . . . . . . . l398, N131 \ni . . . . . . . . . . . . . . . . . . . r338, r339

\no@alphabet@error  \underline{m6}, p192, p194,

p368, p369, p383, p392, p478, p479 \noaccents@ . . . . . . . . . . . . . \underline{m463}, r48 \noalign . . . . . . . . . . . . . . . . r244,

r419, r422, r424, r425, r429, r430, z100, z101, z106, z109, z123, z232, C164, C252, C271, D75

\noboundary . . . . . . . . . . . . . a443, b98 \nobreak . . . . . . . . . . . . . . . b191,

b194, \underline{b196}, i23, i54, i162, i170, i184, i193, k65, y65, y87, B280, F60, F121, F123, G264, J21, J25

\nobreakspace . . . . . . . . . . . . . . . \underline{i183} \nocite . . . . . . . . . . . . . . . . . \underline{I39}, 319 \nocorr . . . . . . . . . . . \underline{t25}, t38, t42, t45 \nocorrlist . . . . . . . . . . . . . . t68, \underline{t100} \nofiles . . . . . . . . . . . . . . . . . \underline{k51}, 71 \noindent . . . . . . . . . . . . . . . . . . F87

\nointerlineskip . . . . . . . . \underline{b186},

r244, r419, r422, r425, r429, z160, D268, D270, K1110, K1118

\nolimits . . . . . . . . . . . r265, r272,

z3–z5, z9–z21, z26–z29, z31, z34 \nolinebreak . . . . . . . . . . . . . . . . . . \underline{i7} \non@alpherr . . . . . . . . . . . . m435,

m437, p73, p80, p83, p118, p833

\nonfrenchspacing . . . . . . \underline{b154}, b249

\nonscript . . . . . . . . . . . . . . z35, z37 \nonumber . . . . . . . . . \underline{z219}, z242, z243 \nopagebreak . . . . . . . . . . . . . . . . . . \underline{i3} \normalbaselines . . . . . \underline{b158}, z96, z98

\normalbaselineskip . . . . . . . . . . .

. . . . . . . . \underline{b147}, b159, n142, B186 \normalcolor . . . . . . . . . . . . . . . . .

. z185, z249, \underline{B47}, B223, F125, G76, K147, K338, K469, K484

\normalfont . . . . . . . . . m472, \underline{q79},

t17, y112, z185, z249, F125, G223 \normallineskip … \underline{b147}, b158, B185

\normallineskiplimit  \underline{b147}, b159, z124
\normalmarginpar . . . . . . . . . . . \underline{G209}

\normalsize . . . . . . . . . . . . . . k35,

\underline{t121}, G9, G83, G197, K461, L5 \not . . . . . . . . . . . . . . . r243, r323, r342 \not@base . . . . . . . . . . . q86, q90–q100

\not@math@alphabet . . . q4, q7, q10,

q13, q16, q19, q22, q25, q28, \underline{q33} \notin . . . . . . . . . . . . . . . . . . . . . r364 \notrace . . . . . . . . . . . . . . . . . \underline{K1174} \nu . . . . . . . . . . . . . . . . . . . . . . . r198 \null . . . . . . . . . . . \underline{b170}, l376, w17,

y101, y126, z79, z98, z116, F120

\nulldelimiterspace . . . . . b136, r508

\nullfont . . . . . . . . . . a480, a553, y47 \number . . . . . . . . . . . . . . . . . a33,

d2, m419, m422, n401, p61, p65, p108, q71, u31, L411, L440

\numberline . . . . . . F48, F54, \underline{F126}, G6 \nwarrow . . . . . . . . . . . . . . . . . . . r318

O

\O . . . . . . . . . . . l200, l311, l384, N130 \o . . . . . . . . . . . l207, l316, l400, N130 \o@lign …. \underline{b223}, l302, l308, l367, l374 \oalign . . . . . . . . . . . . . . . . \underline{b223}, l376 \obeycr . . . . . . . . . . . . . . . . . . . . i208 \obeylines \underline{b173}, y106, y121, y122, K431

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\obeyspaces . . . . . . . . . . . . \underline{b173}, K431 \oddsidemargin . . . . . K51, K53, K455 \odot . . . . . . . . . . . . . . . . . . . . . . r295 \OE . . . . . . . . . . l199, l310, l383, N130 \oe . . . . . . . . . . l206, l315, l399, N130 \of . . . . . . . . . . . . . . . . . . . z59, z189

\offinterlineskip . . . . . . . . . . . \underline{b186}

\oint . . . . . . . . . . . . . . . . . . . . . . r272 \ointop . . . . . . . . . . . . . . . . r271, r272 \oldstylenums . . . . . . . . . . . . . . . \underline{q64} \OldTeX . . . . . . . . . . . . . . . a451, a453 \Omega . . . . . . . . . . . . . . . . . . . . . r225 \omega . . . . . . . . . . . . . . . . . . . . . r208 \ominus . . . . . . . . . . . . . . . . . . . . r298 \omit z109, z110, C262, C265, C272, C276 \on@line g8, g15, \underline{g183}, y52, B75, L332 \onecolumn . . . . . . . . . . . . . . . . \underline{K120}

\OnlyDescription . . . . . . . . . . . n5, s3

\ooalign . . . . . . . . . . . . . . . \underline{b223},

l306, l371, l555, q76, r365, r367 \openup . . . . . . . . . . . . . . . . z117, z122 \operator@font . \underline{r509}, z3–z34, z36, z38 \oplus . . . . . . . . . . . . . . . . . . . . . r299 \optional@arg . . . . . . . . . . . . . . . .

… n375, n470, n472, n548, n551 \OptionNotUsed …. \underline{L128}, L135, L347 \oslash . . . . . . . . . . . . . . . . . . . . r296 \otimes . . . . . . . . . . . . . . . . . . . . r297 \outer . . . . . . . . . . . . . . . . . . . . . b11 \outer@nobreak . . . . . . . . . . . . . . .

. . G89, G129, G134, G137, G191 \outerparskip . . . . . . . . . . . . . . . . \underline{A1} \output . . . . . . . . . . . . . . . . . . . \underline{K187} \outputpenalty K189, K203, K224,

K227, K228, K265, K828, K829 \oval . . . . . . . . . . . . . . . . . . . . . \underline{D246} \over . . . . . . . . . . . . . . r370, z95, z187 \overbrace . . . . . . . . . . . . . . . . . r424 \overfullrule . . . . . . . . . . . b129, \underline{J47} \overleftarrow . . . . . . . . . . . . . . r421 \overrightarrow . . . . . . . . . . . . . r418 \owns . . . . . . . . . . . . . . . . . . . . . . r339

P

\P . . . . . . . . . . . . . . . . . . . . . . . . l260 \p@ . . . . . . . . . . . . . . . . . . . . . . . \underline{b81} \p@equation . . . . . . . . . . . . . z197, z286 \p@reset@font . . . . . . . . . . . . . . . \underline{q79} \p@selectfont . . . . . . . . . . . . . . . n117 \PackageError . . . . . . . . . . . . . . . . \underline{g88} \PackageInfo . . . . . . . . . . . . . . . . . \underline{g88} \PackageWarning . . . . . . . . . . . . . . \underline{g88}

\PackageWarningNoLine . . . . . . . . . \underline{g88}

\pagebreak . . . . . . . . . . . . . . . . . . . \underline{i3} \pagegoal . . . . . . . . . . . K1157, K1164 \pagenumbering . . . . . . . . . . . . v5, 203 \pageref . . . . . . . . . . . . . . . . . . . \underline{w10} \pageshrink . . . . . . . K389, K393, K409 \pagestyle . . . . . . . . . . . . . . . . . . \underline{J2} \pagetotal . . . . . . . . . . . . . . . . K107 \paperheight . . . . . . . . . . . . . . . . \underline{K72} \paperwidth . . . . . . . . . . . . . . . . . \underline{K72} \par . . . . . . . . . . . . . . . . . a62, b11,

b166, b174, b175, b190, b199– b201, b203, b205, b207, d6, h3, h4, h6, y45, y65, y99, A48, A70, A83, A98, A99, B177, B219, C147, C278, F23, F44, F60, F74, F125, G5, G10, G126, J40, J41, K129, K188, K443, K1163

                                       \par@deathcycles   \underline{A45}, A53, A55, A56

\paragraphmark . . . . . . . . . . . . . . \underline{F91} \parallel . . . . . . . . . . . . . . . . . . r312 \parbox . . . . . . . . . . . . . . . . 238, \underline{B145} \parboxrestore . . . . . . . . . . . . . \underline{B188} \parfillskip . . . . . . . . b146, m471,

y71, y82, y96, A52, B185, F115 \parindent . . . . . . . . . . . . . b138,

b215, b216, y71, y78, y82, y96, A40, A110, A111, B180, F65, F116

\parsep . . . . . . . . . . . . . \underline{A1}, A40, A60 \parshape . . . . . . . . . . . . . . . . . . A43 \parskip . . . . . b139, y66, y94, y96,

z295, A40, A51, A59, A60, A74, A96, A102, A129, B180, C60, K828

\partial . . . . . . . . . . . . . . . . . . . r234 \partopsep . . . . . . . . . . z293, \underline{A1}, A48

                                       \PassOptionsToClass . . . . . . 379, \underline{L105}
                                       \PassOptionsToPackage . . . . 379, \underline{L105}

\patch@level . . . . . . N141, N153, N155 \patterns . . . . . . . . . . . . . . . . . . \underline{l162} \pause . . . . . . . . . . . . . a266, a279,

a304, a351, a368, a412, a423, a438, a471, a495, a517, a536, a631

\penalty I17, b195–b200, b204, b206, b208, i5, i6, i9, i13, i26, i131, i135, t97, y101, y104, z36, z125, z232, A113, C48, G103, G107, G109, K115, K129, K130, K826

\perp . . . . . . . . . . . . . . . . . . . . . . r352 \ph@nt . . . . . . . . . . . . . . . . . . z65–z68 \phantom . . . . . . . . . . . . . . . . . . . . \underline{z64} \Phi . . . . . . . . . . . . . . . . . . . . . . . r223 \phi . . . . . . . . . . . . . . . . . . . . . . . r205 \Pi . . . . . . . . . . . . . . . . . . . . . . . r220 \pi . . . . . . . . . . . . . . . . . . . . . . . r200

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\pickup@font … l150, m168, \underline{m270},

m406, n122, n285, n287, n289 \pictur@ . . . . . . . . \underline{D9}, D53, D54, D60 \picture . . . . . . . . . . . . . . . . . . . . \underline{D9} \pm . . . . . . . . . . . . . . . . . . . . . . . r301 \pmatrix . . . . . . . . . . . . . . . . . . . z102 \pmod . . . . . . . . . . . . . . . . . . . . . . . z38 \poptabs . . . . . . . . . . . . . . g243, \underline{C105} \poptracing . . . . . . . . . . . . n130, n294

\postdisplaypenalty . . i15, z260, z274

\pounds . . . . . . . . . . . . . . . . . . . . l267 \Pr . . . . . . . . . . . . . . . . . . . . . . . . z32 \pr@@@s . . . . . . . . . . . . . . . . z142, z150 \pr@@@t . . . . . . . . . . . . . . . . z145, z150 \pr@m@s . . . . . . . . . . . . . . . . z139, z140 \prec . . . . . . . . . . . . . . . . . . . . . . r329 \preceq . . . . . . . . . . . . . . . . . . . . r332

\predisplaypenalty . . b115, z259, z273

\preload@sizes . . . . . . . . . . . . . . . \underline{o84} \pretolerance . . . . . . . . . . b102, m473 \prevdepth . . . . . . . . . b186, b190,

b191, i160, i165, z123, G104, G106 \prim@s . . . . . . . . . . . z137, z138, z150 \prime . . . . . . . . . . . . r175, r236, z139 \prime@s . . . . . . . . . . . . . . . . . . . \underline{z137} \process@table . . . . . . k33, p122, p165

\ProcessOptions . . . . . . . . . . . . . .

…. l284, n71, \underline{L136}, L179, L399

\ProcessOptions* . . . . . . . . . . . \underline{L136}

\prod . . . . . . . . . . . . . . . . . . . . . . r266 \propto . . . . . . . . . . . . . . . . . . . . r309 \protect I5, d70, d186, d202, d211,

d216, d219, d220, d222, d223, d228, d229, d234, d237, \underline{d238}, g213, g230, g233, g234, g243, g251, g261, g273, g276, g284, k61, l25, l32, l54, l62, l104, l166, l174, p397, p838, q57, t122, w12, C148, C187, F11, F48, F54, F105, G6, J19, J22, K438

\protected@edef . . . . . . . . . . . . . .

. . . . . . \underline{d221}, w37, B239, F38, G244, N121, N127, N132, N133

\protected@write . . . . . . . . . . . . .

. . k53, \underline{k57}, w33, F108, H13, H28

\protected@xdef . . . . . . . . . . . . . .

… \underline{d221}, F10, G230, G254, G270

\provide@command . . . . . . . d148, \underline{d149}

\providecommand . . . . . \underline{d148}, l7, K1196 \ProvidesClass . . . . . . . . . . . 378, \underline{L98} \ProvidesFile . . . . . . . . . . . . . . . .

. . a36, l288, l353, l542, l562, \underline{L100}

\ProvidesPackage . . . . . . . . . . . . .

. . l277, n13, 378, \underline{L81}, L98, L492

\ProvideTextCommand . . . . . . . . . \underline{l3}, l69
\ProvideTextCommandDefault . . . . . \underline{l65}

\ps@empty . . . . . . . . . . . . . . . \underline{J10}, N16 \ps@plain . . . . . . . . . . . . . . . . . . . \underline{J13} \Psi . . . . . . . . . . . . . . . . . . . . . . . r224 \psi . . . . . . . . . . . . . . . . . . . . . . . r207 \pushtabs . . . . . . . . . . . . . g243, \underline{C102} \pushtracing . . . . . . . . . . . n115, n275 \put . D29, D186–D189, D194, D196,

D208–D211, D216, D219, D359

Q

\qbezier . . . . . . . . . . . . . . . 268, \underline{D324} \qbeziermax . . . . . . . . . . . \underline{D320}, D345 \qquad . . . . . . . . . . . . . . . . . . . . . \underline{i205} \quad . . . . . . . \underline{i205}, z97, z99, z108, F71 \quotedblbase . . . . . . . . . . . . . . . l401 \quotesinglbase . . . . . . . . . . . . . l402

R

\r l192, l300, l361, l452, l479, l489, l515 \r@@t . . . . . . . . . . . . . . . . . . . z60, z61 \radical . . . . . . . . . . p705, p707, p737 \raggedbottom . . . . . . . . . . . . . . . . \underline{J31} \raggedleft . . . . . . . . . . . . . . y80, y81 \raggedright . . . . . . . . . . . . . y74, y75 \raise . . . . . . . . . . . . . . . . . . l336,

l556, q77, r367, r400, r402, z63, B265, B274, D30, D40, D91, D172, D245, D262, D288, D370

\raisebox . . . . . . . . . . . . . . 239, \underline{B256} \rangle . . . . . . . . . . . . . . . . . . . . r476 \rbrace . . . . . . . . . . . . . . . . l259, r480 \rbrack . . . . . . . . . . . . . . . . . . . . \underline{b164} \rceil . . . . . . . . . . . . . . . . . . . . . r484 \Re . . . . . . . . . . . . . . . . . . . . . . . r232 \ref . . . . . . . . . . . . . . . . . . . . . . . \underline{w10}

\refstepcounter . . . . . . . . . . \underline{w32},

z183, z275, A118, E27, F37, G4

\refsteptcounter . . . . . . . . . . . . 199

\Relbar . . . . . . . . . . . . r374, r381, r386 \relbar . . . . . . . . . . . . r372, r383, r385 \relpenalty . . . . . . . . . . . . . . . . . b110 \rem@pt . . . . . . . . . . . . . . . . . . . \underline{m245} \remove@angles . . . . . . . . . \underline{n301}, n326 \remove@nil . . . . . . . . . . . . . . . . . p27 \remove@star . . . . . . . . . . . \underline{n301}, n309 \remove@to@nnil m244, \underline{n301}, n329, n458 \removelastskip \underline{b202}, b204, b206, b208 \renew@command . . d90, \underline{d91}, d153, d161

\renew@environment . . . . . . d118, \underline{d119}

\renewcommand \underline{d90}, 35, z248, z255, z265

\renewenvironment  \underline{d118}, 35, z272, z284

\repeat . . . . . . . . a28, a30, \underline{b178}, C275

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\RequirePackage . . . . . . . . . . . . . .

…. 379, L194, \underline{L201}, L221, L395

\RequirePackageWithOptions 379, \underline{L220}

\reserved@a … a63, a67, a68, a137, a138, a141, a159, a163, a185, a192, a195, a197, a198, a205, a208, a210, a211, a218, a221, a223, a249–a251, a327, a328, a332, a357, a359, a542, a548, c4, c10, c27, d79, d83, d87, d99– d101, d103, d152–d154, d160– d163, d166, d184, d193, d198, d249, d256, f33, f37, g216, k62, k63, k84, k85, k118, k120, k125, k127, k129, k135, k139, k147, k150, k166, k167, k171, k177, k198, k202, k206, l79, l82, l85, l97, l122, l127, m38, m41, m44, m80, m83, m85, m120, m124, m184, m185, m381, m382, m394, m397, m402, m427, m430, m431, m439, n150, n152, n154, n164, n166, n169, n298, n299, n314, n315, o43, o47, p278, p287, p289, p333, p336, p346, p349, p447, p449, p507, p508, p549, p550, p630, p631, p707, p708, p810, p812, p828, p830, p831, p836, t27, t28, t33, t34, t45, t48, t67, t74, y37, y38, y50, y51, y55, y60, y61, z234– z237, z239, B36, B37, B40, B70, B76, C172, C174, C177, C192, C253, C254, D95, D97, D101, D249, G13, G14, G16, G17, G42, G46, G52, G55, G58, G61, K630, K1281, K1283, K1289, K1292, L75, L78, L79, L187, L190, L233, L234, L237, L274, L278, L289, L290, L292, L302, L341, L454, L494, L496, N38, N69, N75, N76, N78, N80, N84, N91, N93, N94, N102, N104, N105, N119–N122, N125– N128, N154, N157, N158, \underline{N179}

\reserved@b . . . . . . a64, a65, d101, d102, d194, d195, d198, d249, d258, f33, f34, f37, k83, k85, k130, k132, k134, k201, k207, l80, l83, l88, l97, m70, m72, m123, m124, m428, m439, o37, o44, o61, o63, p206, p208, p259, p261, p286–p288, p323, p325, p404, p406, p451–p453, p460, t32, t33, t46, t48, t74, t75, C175–C177, G22, G23, K575, K578, K591, K594, L76, L77, L282, L287, L290, L453, L454, N41, N43, N47, N120, N126, \underline{N179}

\reserved@c . . a65, a70, d253, d256, d258, d261, k190, k191, l81, l83, m71, m72, m429, m432, o38, o45, o51, o58, p24, p28, p207, p208, p260, p261, p324, p325, p405, p406, p428, p437, p452, p466, p620, p636, p645, p673, p684, p723, p736, p738, t47, t49, t56, N45, N66–N68, N70– N74, N77, N79, N86, N96, N181

\reserved@d . . . . . . . . . . . a68, a71, d248, d255, k189, k191, o51, o58, o60, o64, p628, p636, p645, p681, p684, p731, p736, p740, N182

\reserved@e . . . . . . . . . . . . . . o29,

o35, o60, o63, o64, p25, p30, N183 \reserved@f . . . . . . . . m163, m165,

m171, m172, n338, n349, n353, n361, n367, n370, n421, n458, n461, o17, o28, o35, o61, o63, N184

\reset@font . . . . . . . I20, \underline{q79}, w13,

B236, G82, G196, G239, J14, K460

                                \restglb@settings . . . . . . n220, \underline{n232}
                                \restore@mathversion . . p58, p77, p92
                                \restore@protect . . . . . . . . . . . . \underline{d221}
                                \restore@versionfalse . . . . . p44, p57
                                \restore@versiontrue . . p42, p45, p89

\restorecr . . . . . . . . . . . . . . . . . i212

                                \reversemarginpar . . . . . . . . . . \underline{G209}

\rfloor . . . . . . . . . . . . . . . . . . . . r488 \rgroup . . . . . . . . . . . . . . . . . . . . \underline{r492} \rhd . . . . . . . . . . . . . . . . . . . . . . . q99 \rho . . . . . . . . . . . . . . . . . . . . . . . r201 \rhook . . . . . . . . . . . . . . . . . r377, r378 \right . . . . . r504–r507, z97, z102, z115 \Rightarrow . . . . . . . . . r322, r381, r389 \rightarrow . . . . . . . . . . . . . . r346,

r347, r349, r376, r383, r388, r435 \rightarrowfill . . . . . . . . . r419, r433

                                \rightharpoondown . . . . . . . . . . . r360

\rightharpoonup . . . . . . . . . r359, r368 \righthyphenmin . . . . . . . . . b93, M11

                                \rightleftharpoons . . . . . . . . . . . r366

\rightline . . . . . . . . . . . . . . . . \underline{B281} \rightmargin . . . . . . . . . \underline{A9}, A36, A41 \rightmark . . . . . . . . . . . . . . . . . . \underline{J26} \rightskip . . . . . . . . . . . . . b216,

y70, y76, y81, y95, A52, B184, F115 \rlap . . . . . l336, z244, z249, \underline{B285}, C61

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\rlh@ . . . . . . . . . . . . . . . . . . r366, r367 \rmdefault . . . . . . . . . . . . q5, \underline{r29}, r39 \rmfamily . . . . . . . . . . . . . q3, q4, t14 \rmoustache . . . . . . . . . . . . . . . . . r451 \Roman . . . . . . . . . . . . . . . . . . \underline{u25}, 199 \roman . . . . . . . . . . . . . . . . . . \underline{u25}, 199 \romannumeral u32, u33, A37, A140, A151 \root . . . . . . . . . . . . . . . . . . z59, z189 \rootbox . . . . . . . . . . . . . z58, z59, z63 \rq . . . . . . . . . . . . . . . . . . . . . . . \underline{b162} \rule . . . . . . . . 239, B243, \underline{B246}, G249

S

\S . . . . . . . . . . . . . . . . . . . . . . . . l261 \s@fct@ . . . . . . . . . . . . . . . n386, \underline{n463} \s@fct@fixed . . . . . . . . . . . . . . . . \underline{n542} \s@fct@gen . . . . . . . . . . . . . . . . . \underline{n479} \s@fct@genb . . . . . . . . . . . . . . . . . \underline{n488} \s@fct@sgen . . . . . . . . . . . . . . . . . \underline{n479} \s@fct@sgenb . . . . . . . . . . . . . . . . \underline{n488} \s@fct@sub . . . . . . . . . . . . . . . . . \underline{n501} \s@fct@subf . . . . . . . . . . . . . . . . . \underline{n530} \samepage . . . . . . . . . . . . . . . . . . . \underline{i14} \savebox . . . . . . . . . . . . . . . . 238, \underline{B55} \sb . . . . . . . . . . . . . . . . . . . . . . . z130 \sbox . . . . . . . . . . . . . . . . . . b210,

j4, 238, A119, B57, \underline{B58}, B63, B68

\scan@@fontshape . . . . . . . . . o30, \underline{o33}

\scan@fontshape . . o2–o7, \underline{o8}, o16, \underline{o27} \scdefault . . . . . . . . . . . . . . q26, \underline{r34} \scriptfont . . . . . . . . . . . . . . . . . n292

\scriptfont@name . . . . . . . n287, n292
\scriptscriptfont . . . . . . . . . . . n293
\scriptscriptstyle . . . . . . . . z57, z59

\scriptspace . . . . . . . . . . . . . . . . b137 \scriptstyle . . . . . . . . . . . . r242, z57 \scshape . . . . . . . . . . . . . q24, q25, t22 \searrow . . . . . . . . . . . . . . . . . . . r317 \sec . . . . . . . . . . . . . . . . . . . . . . . . z20 \secdef . . . . . . . . . . . . . . . . . . . . \underline{F90} \sectionmark . . . . . . . . . . . . . . . . \underline{F91} \select@group . . . . . . . . . . . . . . . .

. . . . . \underline{m412}, m431, p46, p158, p197, p333, p386, p395, p433, p465

\selectfont …. j8, l142, l285, l348, m230, \underline{n112}, q5, q8, q11, q14, q17, q20, q23, q26, q29, q60, G225

\seriesdefault . . . . . . . p161, q82, \underline{r38}

\set@@mathdelimiter . p682, p698, p700

\set@color . . . . . . . . . . . . . . . . . \underline{B46}

\set@display@protect . . . . . . . . . .

. . . . . d3, \underline{d219}, g7, g14, g37, g64 \set@fontsize m233, m235, n119, \underline{n132} \set@mathaccent p510, p518, p534, p536 \set@mathchar . . . . . . p568, p578, p580

                                       \set@mathdelimiter . . . . . . . . . . . .

. . . . . . . . p633, p642, p694, p697

                                       \set@mathradical . . . . . . . p168, p733

\set@mathsymbol p552, p560, p581, p583

                                       \set@simple@size@args . . . . m313,

n302, n317, \underline{n324}, n345, n363

                                       \set@size@funct@args . . . . . . . . . .

. . . . . . . m318, n307, n309, \underline{n371}

                                       \set@size@funct@args@ . . . m319, \underline{n371}
                                       \set@typeset@protect . . . . . . . . . .

. . \underline{d219}, d238, C167, K445, K447 \setcounter k107, u3, u17, 199, A131,

K1442, K1445, K1448, K1452 \setlanguage . . . . . . . . . . . . . . . . b99 \setlength … \underline{x4}, z291, z296–z298,

207, B27, B115, B161, B164, B205, B263, B264, B271–B273, K1458–K1460, K1463, K1464, K1468–K1470, K1474–K1476

                                       \SetMathAlphabet . . . . . . . . . m14,

o131, o132, p402, p417, r75, r76

                                       \SetMathAlphabet@ . . . . . . . . . . . .

… p340, p409, p418, p480, p494 \setminus . . . . . . . . . . . . . . . . . . r304 \SetSymbolFont … p257, p271, r65–r67 \SetSymbolFont@ p230, p264, p272, p318 \settodepth . . . . . . . . . . . . . . . \underline{x6}, 207 \settoheight . . . . . . . . . . . . . . \underline{x6}, 207 \settowidth . . . . . . . . . . . . . . . \underline{x6}, 207 \sf@size . . . . . . . . . . . . . . . . . . . .

j7, m192, m453, n282, n286, G227 \sfcode . . . . . . b154–b157, b232, N100 \sfdefault . . . . . . . . . . . . . . . q8, \underline{r29} \sffamily . . . . . . . . . . . . . q6, q7, t15 \sh@ft . . . . . \underline{b227}, l302, l308, l367, l374 \shapedefault . . . . . . . . p162, q83, \underline{r38} \sharp . . . . . . . . . . . . . . . . . . . . . r253 \shipout . . . . . . . . . . . . . . . . . . K444 \shortstack . . . . . . . . . . . . . . . . . D63 \showboxbreadth . . . . . . . . b124, b237 \showboxdepth . . . . . b125, b237, m473 \showhyphens . . . . . . . . . . . . . . . \underline{m466} \showoutput . . . . . . . . . . . . \underline{b234}, b245 \showoverfull . . . . . . . . . . \underline{b233}, b238 \Sigma . . . . . . . . . . . . . . . . . . . . . r221 \sigma . . . . . . . . . . . . . . . . . . . . . r202 \sim . . . . . . . . . . . . . . . . . . . r350, r361 \simeq . . . . . . . . . . . . . . . . . . . . . r351 \sin . . . . . . . . . . . . . . . . . . . . . . . . z9 \sinh . . . . . . . . . . . . . . . . . . . . . . . z11 \sixt@@n . . . . . . . . . . . . . . . . a18,

\underline{b16}, b54, b55, m23, p50, p100, p502, p504, p544, p546, p587,

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

p589, p616, p618, p624, p626, p669, p671, p677, p679, p719, p721, p727, p729, D147, D161, D163, G41, G63, K680, K726, K859, K989, K1052, K1235, K1244, K1300, K1316, K1348

\size@update . . n128, n139, n158, \underline{n160} \sizefn@info . . . . . . . . . . . . . . . . .

… n308, n310, n318, n346, n364 \skew . . . . . . . . . . . . . . . . . . . . . . r431 \skip . . . . . . . . . . . . . . . . . . . b28,

b49, b65, B222, G213, K245, K336 \skip@ . . . . . . . . . . . . . . . . . . \underline{b41},

b189, b191, b192, b194, t84, t87 \skipdef . . . . . . . . . . . . . . . . b45, b49 \slash . . . . . . . . . . . . . . . . . . . . . \underline{b195} \sldefault . . . . . . . . . . . . . . q23, \underline{r34} \sloppy . . . . . . . . . . . . B187, \underline{J35}, J40 \sloppypar . . . . . . . . . . . . . . . . . . J40 sloppypar (environment) . . . . . . . . \underline{J40} \slshape . . . . . . . . . l339, q21, q22, t21 \smallbreak . . . . . . . . . . . . . . . . . \underline{b203} \smallint . . . . . . . . . . . . . . . . . . r274 \smallskip . . . . . . . . . . . . . b204, \underline{i177} \smallskipamount …. b203, i177, \underline{i180} \smash . r372, r433, r434, r437, r438, \underline{z83} \smile . . . . . . . . . . . . . . . . . . . . . r355 \sp . . . . . . . . . . . . . . . . . . . . . . . z130 \sp@n . . . . . . . . . . . . . . . . . . . . . \underline{C272} \space . . . . . . . . . . . . . . . . . . . . . \underline{b168} \spacefactor b193, b194, i48, i61, i71,

i76, i84, i95, i99, i190, G264, G266 \spaceskip . . . . . . . . . . . . . . . . . q66 \spadesuit . . . . . . . . . . . . . . . . . r257 \span . . . . . . . . . . . . . . . . . . . . . C276 \split@name . . . . . . . . . . . . . . . . . .

. . \underline{m274}, m288, m365, n509, n523 \splitmaxdepth . . . . . . . . . b133, G242 \splittopskip . . . . . . . . . . b145, G241 \sqcap . . . . . . . . . . . . . . . . . . . . . r287 \sqcup . . . . . . . . . . . . . . . . . . . . . r288 \sqrt . . . . . . . . . . . . . . . . . . . . . . \underline{z188} \sqrtsign . . . . . . r416, r417, z61, z188 \sqsubset . . . . . . . . . . . . . . . . . . q95 \sqsubseteq . . . . . . . . . . . . . . . . . r310 \sqsupset . . . . . . . . . . . . . . . . . . q96 \sqsupseteq . . . . . . . . . . . . . . . . . r311 \SS . . . . . . . . . . . . . . l256, l385, N131 \ss . . . . . . . . . . l208, l317, l403, N131 \ssf@size … m193, m454, n282, n288 \stackrel . . . . . . . . . . . . . . . . . . \underline{z186} \star . . . . . . . . . . . . . . . . . . . . . . r308 \stepcounter . . . . . . . . . . . . m424,

p40, p66, p111, u12, w36, z196, z239, z285, G229, G253, K496

\steptcounter . . . . . . . . . . . . . . . 199 \stop . . . . . . . . . . . . . . . . . . . . . . \underline{y45} \stretch . . . . . . . . . . . . . . . . . . . \underline{i201} \strip@prefix . . . . . . . . \underline{a53}, a170,

a241, a308, a344, d195, d272, \underline{m409} \strip@pt . . . . . . . . . . . . . . m187,

m191, \underline{m245}, m453, m454, n134 \strut . . . . . . . . \underline{b211}, z109, z110, C31 \strutbox . . . . . . . . . . \underline{b211}, n143,

B243, C140, C141, G242, G249 \sub@sfcnt … m324, n502, n503, n506 \subf@sfcnt … m325, n531, n532, n535

\subparagraphmark . . . . . . . . . . . \underline{F91}

\subsectionmark . . . . . . . . . . . . . \underline{F91} \subset . . . . . . . . . . . . . . . . . . . . r334 \subseteq . . . . . . . . . . . . . . . . . . r336

\subst@correction . . . . . . . m60, m66
\subst@fontshape . . . . . . . . . . \underline{o1}, \underline{o70}

\subst@size . . . . . . . . . . . . . . . . . \underline{n437}

\subsubsectionmark . . . . . . . . . . . \underline{F91}

\succ . . . . . . . . . . . . . . . . . . . . . . r328 \succeq . . . . . . . . . . . . . . . . . . . . r331 \sum . . . . . . . . . . . . . . . . . . . . . . . r267 \sup . . . . . . . . . . . . . . . . . . . . . . . . z24 \suppressfloats . . . . . . . . . . . \underline{K1198} \supset . . . . . . . . . . . . . . . . . . . . r333 \supseteq . . . . . . . . . . . . . . . . . . r335 \surd . . . . . . . . . . . . . . . . . . . . . . r239 \sw@slant . . . . . . . . . . . . . . . t70, \underline{t80} \swarrow . . . . . . . . . . . . . . . . . . . r319 \symbol . . . . . . . . . . . . . . . . l132, \underline{q54} \symletters . . . . . . . . . . . . . . . . . q68 \symoperators . . . . . . . . . . . . . . . r509

T

\T . . . . . . . . . . . . . . . . . . . . . . . . . g26 \t . . . . . . . . . . . . . . . . . . . . l234, l566 \t@st@ic . . . . . . . . . . . . . . . . t69, \underline{t73} \tabbing . . . . . . . . . . . . . . \underline{C52}, \underline{C122} \tabbingsep . . . . . . . C100, C101, \underline{C119} \tabcolsep . . . . . . . . . . . . C182, \underline{C231} \tabskip . . . . . . . . . . . b222, z126,

z127, z201, z204, z207, z209, z289, z302, z305, z307, C126, C143

\tabular . . . . . . . . . . . . . . . . . . \underline{C133} \tabular* . . . . . . . . . . . . . . . . . \underline{C134} \tabularnewline . . . . . . . . C145, \underline{C156} \tan . . . . . . . . . . . . . . . . . . . . . . . . z15 \tanh . . . . . . . . . . . . . . . . . . . . . . . z17 \tau . . . . . . . . . . . . . . . . . . . . . . . r203 \tencirc . . . . . . . . . . . s10, D47, D316

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\tencircw . . . . . . . . . . . . . . . s10, D49 \tenln . . . . . s9, D47, D48, D315, D317 \tenlnw . . . . . . . . . . . . . . s9, D49, D50 \test . . . . . . . . . a478, a480, a551, a553 \testdc a575, a576, a589, a590, a645, a646 \testfalse …. a283, a333, a362, a365 \testtrue . . . . . . . . . . . . . a330, a358 \TeX . . . . . . . . . . . . . . . . . . . . . \underline{j1}, j13 \text@command . . . . . . . . . . . . . t8, \underline{t26} \textasciicircum . . . . . . . . l238, l404 \textasciitilde . . . . . . . . . l239, l405 \textbackslash . . . . . . l221, l406, l544 \textbar . . . . . . . . . . . l222, l407, l545 \textbf . . . . . . . . . . . . . . . . . . . . . \underline{t18} \textbraceleft . . l223, l258, l408, l546 \textbraceright . l224, l259, l409, l547 \textbullet . . . . . . . . . . . . . l225, l548 \textcircled …. l231, l235, l254, l554

\textcompwordmark . . . . . . . l240, l410

\textdagger . . . . . . . . . l227, l262, l550 \textdaggerdbl . . . . . . l226, l263, l549 \textdollar . . . . . l209, l257, l337, l411 \textellipsis . . . . . . . . . . . l249, l271 \textemdash . . . . . . . . . l210, l318, l412 \textendash . . . . . . . . . l211, l319, l413 \textexclamdown . . . . . l212, l320, l414 \textfloatsep . . . . . . . . . . . . . . . .

K517, K530, K1330, K1379, \underline{K1455} \textfont . . . . . . . . . . . . . n291, z135 \textfont@name . . . . . . . . . n285, n291 \textfraction . . K1190, K1322, \underline{K1449} \textgreater . . . . . . . . l233, l415, l565 \textheight . . . . . . . . . . . . . . . . . .

. k15, k16, G139, G140, G143, G166, K57, K156, K157, K295, K322, K495, K552, K583, N14, N15

\texthyphen . . . . . . . . . l214, l322, l417 \texthyphenchar . . . . . l213, l321, l416 \textit . . . . . . . . . . . . . . . . . . . . . \underline{t20} \textless . . . . . . . . . . l232, l418, l564 \textmd . . . . . . . . . . . . . . . . . . . . . \underline{t18} \textnormal . . . . . . . . . . . . . . . . . . \underline{t14} \textparagraph . . . . . . l228, l260, l551

\textperiodcentered . . . . . . l229, l552
\textquestiondown . . . l215, l323, l419

\textquotedbl . . . . . . . . . . . . . . . l422

\textquotedblleft . . . l216, l324, l420
\textquotedblright . . . l217, l325, l421

\textquoteleft . . . . . . l218, l326, l423 \textquoteright . . . . . l219, l327, l424 \textregistered . . . . . . . . . . . . . l254 \textrm . . . . . . . . . . . . . . . . . . . . . \underline{t14} \textsc . . . . . . . . . . . . . . . . . l254, \underline{t20} \textsection …. l230, l261, l425, l553 \textsf . . . . . . . . . . . . . . . . . . . . . \underline{t14} \textsl . . . . . . . . . . . . . . . . . . . . . \underline{t20} \textsterling … l220, l268, l344, l426 \textstyle . . . . . . . . . . j16, r370, z57

                                       \textsuperscript . . . . . . . l255, \underline{G224}
                                       \TextSymbolUnavailable . . . . . . . . . \underline{l3}

\texttrademark . . . . . . . . . . . . . . l255 \texttt . . . . . . . . . . . . . . . . . . . . . \underline{t14} \textunderscore . . . . . l241, l265, l427 \textup . . . . . . . . . . . . . . . . . . . . . \underline{t20}

                                       \textvisiblespace . . . . . . . l244, l428

\textwidth . . . . . . . . . . . . . . k17, B210, G148, K58, K123, K133, K149, K470, K485, K1409, N15

\tf@size …. m192, m452, n282, n284 \TH . . . . . . . . . . . . . . . . . . l386, N131 \th . . . . . . . . . . . . . . . . . . l429, N131 \thanks . . . . . . . . . . . . . . . . . . 293, \underline{F9} thebibliography (environment) . . 319 \theequation … z185, z197, z250, z286 \thefootnote . \underline{G218}, G254, G259, G279 \thempfn . . . . . . . . . . . . . . . B212,

G230, G235, G270, G275, \underline{G278} \thempfootnote . . . . . . . . . B212, \underline{G220} \thepage I23, k59, v6, w14, w34, F105,

H14, H29, J14, K175, K205, K1095 \Theta . . . . . . . . . . . . . . . . . . . . . r217 \theta . . . . . . . . . . . . . . . . . . . . . r193 \thicklines . . . . . . . . . . . . . . . . . \underline{D46} \thickmuskip . . . . . . . . . . . . r512, z133 \thinlines . . . . . . . . . . . . . . . . . \underline{D46} \thinmuskip …. i188, r510, z131, z134 \thinspace . . . . . i188, \underline{i202}, z107, z135 \thispagestyle . . . . . . . . . . . . . . . \underline{J6} \thr@@ . . . . . . . . . . \underline{b16}, n58, n208,

n214, n223, n234, n241, n246, z208, z306, A138, A149, D155, D156, D158, D159, D190, D212

\tilde . . . . . . . . . . . . . . . . . . . . . r406 \time . . . . . . . . . a121, a125, a312, a316 \times . . . . . . . . . . . . . . . . . . . . . r307 \title . . . . . . . . . . . . . . . . . . . 293, \underline{F3} \to . . . . . . . . . . . . . . . . . . . . . . . r347 \today . . . . . . . . . \underline{a126}, a130, a138,

a141, a317, a321, a328, a332, F8 \toks . b31, b53, p375, p376, p386, p395 \toks@ …. \underline{b41}, m121, m125, m127,

m130, p183, p187, p193, p196, p201, p220, p223, p226, p245, p246, p248, p249, p279, p281, p285, p302, p305, p364, p376– p378, p424, p426, p432, p440, p444, p456, p459, p462, p470, p472, p786, p788, p790, p793,

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

p795, p798, p801, p833, p834, L120, L121, L123, L124, L359, L360

\toksdef . . . . . . . . . . . . . . . . b46, b53 \tolerance . . . . . b103, m473, J36, J44 \top . . . . . . . . . . . . . . . . . . . . . . . r240 \topfigrule . . . . . . . . . . . K516, \underline{K1477} \topfraction . . . . . . . . . . G155, \underline{K1443} \topmargin . . . . . . . . . . . . K50, K464 \topsep . . . . . . . . . . . . . z291, A2, A46 \topskip . . . . . . . b144, k39, \underline{A1}, K107 \totalheight . . . . . . . . . . . . B17–B19 \tr@ce . . . . . . . . . . . . K171, K198,

K253, K320, K376, K391–K394, K405–K409, K570, K587, K603, K605, K653, K657, K669–K672, K678, K681, K689, K693, K704, K709, K714–K717, K724, K727, K735, K744, K750, K755, K760, K766, K767, K772, K777– K779, K786, K790, K795, K799, K804, K815, K816, K818, K833, K842, K848, K857, K860, K866, K876, K880, K889, K895, K900, K905, K909, K913, K914, K921, K925, K929, K936, K945, K949, K953, K954, K958, K959, K965, K971, K981, K987, K991, K992, K997, K998, K1004, K1007– K1009, K1016–K1018, K1026, K1030, K1042, K1043, K1050, K1053, K1061, K1065, K1069, K1070, K1074, K1075, K1131, K1136, K1147, K1157, K1164, \underline{K1174}, K1219, K1232, K1233, K1237, K1240, K1242, K1245, K1248, K1250, K1291, K1298, K1303, K1309, K1314, K1318, K1324, K1332, K1333, K1340, K1345, K1350, K1352, K1358, K1360, K1367, K1394, K1395, K1404, K1420, K1425, K1433

\tracefloats . . . . . . . . . . . . . . \underline{K1174} \tracefloatvals . . . . . . . . . . . \underline{K1174} \tracingall . . . . . . . . . . . . . . . . . \underline{b241}

\tracingcommands . . . . . . . . . . . . b242

\tracingfonts . . . . . \underline{n17}, n54, n58, n86, n116, n125, n148, n178, n192, n208, n214, n223, n234, n241, n246, n255, n268, n276, n279

\tracinglostchars . . . . . . b119, b243

\tracingmacros . . . . . . . . . . . . . . b244 \tracingoff . . . . . . . . . . . . n116, n276 \tracingon . . . . . . . . . . . . n117, n277 \tracingonline . . . . . . . . . . . . . . b233 \tracingoutput . . . . . . . . . . . . . . b236 \tracingpages . . . . . . . . . . . . . . . b243

                                \tracingparagraphs . . . . . . . . . . . b244
                                \tracingrestores . . . . . . . . . . . . b244

\tracingstats . . . . . . . . . . . b242, N2 \triangle . . . . . . . . . . . . . . . . . . r246 \triangleleft . . . . . . . . . . . r275, r379 \triangleright . . . . . . . . . . r276, r379 \trivlist . . . . . . . . . . . . y69, y74,

y80, y93, z276, \underline{A60}, C59, E35, E37

                                \try@load@fontshape . . . . . . . . . . .

. . m291, m331, n510, p130, p147

                                \try@simple@size . . m312, \underline{n312}, n453

\try@simples . . n401, n405, \underline{n412}, n421 \try@size@range m320, n101, n312, \underline{n392}

                                \try@size@substitution . . n103, \underline{n397}

\try@sizes . . . . . . . . . . . . m20, m458 \tryif@simple . . . . . . . . . . n414, n420 \tryis@simple . . . . . . . . . . . . . . . \underline{n419} \ttdefault . . . . . . . . . . . . . . q11, \underline{r29} \ttfamily . . . . . . . . q9, q10, t16, y112 \tw@ . . . . . . . . . . . . . . . . . . . . . . . \underline{b16} \two@digits . . . . . . a33, a127, a128,

a318, a319, \underline{d2}, n498, \underline{L411}, L440 \twocolumn . . . . . . . . . . . . . . . . \underline{K131}

                                \type@restoreinfo . . . . . . n156, \underline{n161}

\typein . . . . . . . . . . . . . . . . . \underline{d18}, 35 \typeout . . . . . . . . a20, a58, a114,

a139, a141, a153, a168, a175, a186, a199, a212, a225, a239, a258, a262, a267, a270, a271, a280, a285, a293, a306, a325, a329, a332, a339, a342, a353, a368, a370, a379, a386, a405, a406, a413, a424, a439, a444, a457, a462, a473, a481, a484, a486, a497, a506, a509, a519, a525, a538, a554, a557, a565, a580, a583, a594, a597, a606, a616, a624, a634, a650, a653, a662, a673, c12, c28, \underline{d3}, d22, g77, 35, k52, k152, k153, k158, k195, k205, k208, m285, q106, q113, q124, q135, q145, r9, r44, H8, H24, K1175, L93, N18, N135, N142, N154, N155, N163

U \u l193, l298, l363, l431, l438, l458, l465 \uccode . . . . . . . . . . . . . . . . . . . . .

N88, N98, N107, N109, N113, N115 \uchyph . . . . . . . . . . . . . . . . . . . . b120 \unboldmath . . . . . . . . . . . . . . . . . q51

                                \undefinedpagestyle . . . . . . . . . J4, J8
File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\underbar . . . . . . . . . . . . . . . . . . \underline{b210} \underbrace . . . . . . . . . . . . . . . . . r427 \underline …. b210, 239, B251, \underline{B252} \unhcopy . . . . . . . . . b212, C238, D372 \unitlength … B33, B43, \underline{D5}, D20–

D23, D30, D31, D34, D35, D42, D78, D128, D178, D180, D193, D198, D200, D215, D217, D220, D251, D281, D292, D328, D329, D331, D332, D335, D336, D338, D339, D348, D350, D352, D354, N7

\unlhd . . . . . . . . . . . . . . . . . . . . . q98 \unpenalty . . . . . . . . . . . . . t95, y108

\unrestored@protected@xdef . . . . .

. . . . . . . \underline{d221}, G235, G259, G275 \unrhd . . . . . . . . . . . . . . . . . . . . . q100 \unvcopy . . . . . . . . . . . . . . . . . . . z111 \Uparrow . . . . . . . . . . . . . . . . . . . r468 \uparrow . . . . . . . . . . . . . . . . . . . r462 \upbracefill . . . . . . . . . . . . r430, r446 \updefault . . . . . . . . . . . q20, \underline{r34}, r41 \Updownarrow . . . . . . . . . . . . . . . . r472 \updownarrow . . . . . . . . . . . . . . . . r466 \uplus . . . . . . . . . . . . . . . . . . . . . r289 \upper@bound . . . . . . . n339–n341, \underline{n355} \uppercase . . . . . . . . . . . . . u33, N121 \upshape . . . . . . . . . . . . . . . . . . . .

l341, l556, q18, q19, q32, q77, t23

\Upsilon . . . . . . . . . . . . . . . . . . . r222 \upsilon . . . . . . . . . . . . . . . . . . . r204 \use@mathgroup . . . . . . . . . . . . . . .

… m418, m436, m438, \underline{n253}, p64, p346, p448, p451, p811, p835

\usebox . . . . . . . . . . . . . . . . . . . . \underline{B81} \usecounter . . . . . . . . . . . . \underline{A131}, A144 \usefont . . . . . . . m53, m229, q67, q80 \usepackage . . . . . . . L194, \underline{L223}, L314 \UseTextAccent . . . . . . . . . . \underline{l131}, l158 \UseTextSymbol . . . . . . . . . . \underline{l131}, l155

V

\v . . . . . . . . . . . . . . . . . . . . . l194, l299, l362, l434–l436, l440, l442, l445, l447, l449, l455, l461–l463, l467, l469, l472, l474, l476, l482

\v@false . . . . . . . . . . . . . . . . . . . . z66 \v@true . . . . . . . . . . . . . . . . . z65, z67 \vadjust . . . . . i6, i26, i151, i168, G109 \value . . . . . . . . . . . . . . . . I9, u9, 199 \varepsilon . . . . . . . . . . . . . . j16, r209 \varphi . . . . . . . . . . . . . . . . . . . . r214 \varpi . . . . . . . . . . . . . . . . . . . . . r211 \varrho . . . . . . . . . . . . . . . . . . . . r212 \varsigma . . . . . . . . . . . . . . . . . . r213 \vartheta . . . . . . . . . . . . . . . . . . r210 \vbadness . . . . . . . . . . . . . . . . . . b105 \vdash . . . . . . . . . . . . . . . . . . . . . r315 \vdots . . . . . . . . . . . . . . . . . . . . . r398 \vec . . . . . . . . . . . . . . . . . . . . . . . r411 \vector . . . . . . . . . . . . . . . g261, \underline{D125} \vee . . . . . . . . . . . . . . . . . . . r281, r282 \verb . . . . . . . . . . . . . y124, \underline{y126}, y134

\verb@balance@group . . . . . . . . . . .

. . . . . . . . y116, y118, y133, y135 \verb@egroup . . y118, y123, y133, y136 \verb@eol@error . . . . . . . . y122, y128 \verbatim . . . . . . . . . . . . . . . . . . \underline{y110} verbatim* (environment) . . . . . . . \underline{y113} \verbatim@font . . . . . y106, \underline{y112}, y127

\verbatim@nolig@list . . . . \underline{y138}, y144

\verbatim@out . . . . . . . . . . . . . . . .

… L424, L425, L433, L435, L457 \version@elt . . . . . . . . . . . . . . . . .

…. \underline{p9}, p22, p23, p180, p181, p228, p248, p339, p377, p469, p791

\version@list . . . . . . . . . \underline{p7}, p12, p23, p173, p181, p233, p254, p273, p344, p389, p419, p474, p804

\Vert . . . . . . . . . . . . . . . . . . r457, r459 \vert . . . . . . . . . . . . . . . . . . . . . . r460 \vfil . . b199, D270, K129, K307, K467 \vfilneg . . . . . . . . . . . . . . . . . . . b199 \vfuzz . . . . . . . . . . . . . . b128, J39, J46 \vgl@ . . . . . . . . . . . . . . . . . b189, b190 \vglue . . . . . . . . . . . . . . . . . . . . . \underline{b189} \vline . . . . . . . . . . . . . . . . . . . . \underline{C259} \voidb@x . . . . . . . . . . . . \underline{b81}, b220, x7 \vphantom . . . . . . . . . . . . . . . z65, z82 \vrule . b193, i193, l245, l247, n144,

r444, r445, r447, r448, B90, B92, B129, B136, B250, B280, C139, C163, C240, C259, D119, D167, D170, D185, D192, D207, D214, D270, D356, K1119, K1413

\vspace . . . . . . . . . i31, \underline{i144}, i177–i179 \vsplit . . . . . . . . . . . . . . . . . . . K278

W

\warn@rel@i . . . . . . . . . . . . . . o15,

\underline{o19}, o71, o75, o80, o85, o109, o131 \wedge . . . . . . . . . . . . . . . . . r279, r280 \widehat . . . . . . . . . . . . . . . . . . . r414 \widetilde . . . . . . . . . . . . . . . . . r413 \widowpenalty . . . . . . . . . . . . . . . b112 \width . . . . . . . . . . . . . . . . . . . . . B14 \wlog … a42, \underline{b40}, b61, b69, L95, N176 \wp . . . . . . . . . . . . . . . . . . . . . . . r231 \wr . . . . . . . . . . . . . . . . . . . . . . . r293

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx

\wrong@fontshape . . . . . . m295, \underline{m379}

X

\x . . . . . . . . . . . . . . . . . . m249, m250 \x@protect . . . . . . . . . . . . d199, \underline{d210} \Xi . . . . . . . . . . . . . . . . . . . . . . . r219 \xi . . . . . . . . . . . . . . . . . . . . . . . r199 \xxx . . . . . . . . . . . . . . . . . . . . . . . a269

Y

\year . . . . . . . . . . a127, a318, c5, L440 \yxdim . . . . . . . . . . . . . . . . . . . . \underline{D306}

Z \Z . . . . . . . . . . . . . . . . . . . N75, N102 \z . . . . . . . . . . . . . . . . . . . . N76, N91 \z@ . . . . . . . . . . . . . . . . . . . . . . . \underline{b81} \z@skip . . . . . . . . . . . . . . . . . . . . \underline{b81} \zap@space k69, L109, \underline{L256}, L273, L289 \zeta . . . . . . . . . . . . . . . . . . . . . . r191

File Key: a=ltdirchk.dtx, b=ltplain.dtx, c=ltvers.dtx, d=ltdefns.dtx,
e=ltalloc.dtx, f=ltcntrl.dtx, g=lterror.dtx, h=ltpar.dtx, i=ltspace.dtx,
j=ltlogos.dtx, k=ltfiles.dtx, l=ltoutenc.dtx, m=ltfssbas.dtx, n=ltfsstrc.dtx,
o=ltfsscmp.dtx, p=ltfssdcl.dtx, q=ltfssini.dtx, r=fontdef.dtx, s=preload.dtx,
t=ltfntcmd.dtx, u=ltcounts.dtx, v=ltpageno.dtx, w=ltxref.dtx, x=ltlength.dtx,
y=ltmiscen.dtx, z=ltmath.dtx, A=ltlists.dtx, B=ltboxes.dtx, C=lttab.dtx,
D=ltpictur.dtx, E=ltthm.dtx, F=ltsect.dtx, G=ltfloat.dtx, H=ltidxglo.dtx,
I=ltbibl.dtx, J=ltpage.dtx, K=ltoutput.dtx, L=ltclass.dtx, M=lthyphen.dtx,
N=ltfinal.dtx