The moredefs LaTeX package

more defining commands (Frankenstein’s brain)

              Matt Swift <swift@alum.mit.edu>

Version: 1.6 Date: 1999/02/24

Documentation revision: 1999/02/26

Abstract A delightful collection of defining, expansion, and debugging commands

that make elegant programming in L^{A}TEX fun and easy.

Contents

I Discussion 2

1 Naming conventions 2 2 Conditionals 2 3 Defining commands 2

3.1 User commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 4 Controlling expansion 5 5 Gobbling 6 6 Option declaration 6 7 Toggle a boolean 6 8 Debugging 6

II Implementation 8

9 Version control 8 10 Conditionals 8 11 Defining commands 9 12 Controlling expansion 16 13 Gobbling 17 14 Option declaration 18 15 Toggle a boolean 18 16 Debugging 18

Part I

Discussion

These macros were written in response to practical programming needs. Most of the packages I have written, whether distributed or not, depend on this package. Using these constructs has saved me a lot of time and made my code much more readable—that is, maintainable and improvable. For examples of these macros in useful applications, see the packages in the Frankenstein bundle.

1 Naming conventions

The convention is that a capital E means the macro expands something just once. A lowercase e, as in \edef, means the macro expands something all the way to unexpandable tokens.

The specification ⟨\csname⟩ means a control sequence with a preceding backslash; the specification ⟨csname⟩ means a control sequence without a preceding backslash. ⟨csname⟩ arguments are expanded. Commands which take ⟨csname⟩ arguments have Name in their names.

When I write package in this documentation, I mean L^{A}TEX package or class.

2 Conditionals

\@ifundefined@cs \@ifundefined@cs{⟨\csname⟩}{⟨true⟩}{⟨false⟩} executes the ⟨true⟩ clause if

⟨\csname⟩ is not defined, and the ⟨else⟩ clause otherwise.

\IfElement … \In To check whether a token ⟨thingma⟩ is \ifx-equal to any token in a list of tokens stored in a macro ⟨list⟩, use \IfElement ⟨thingma⟩\In ⟨list⟩{⟨true⟩} {⟨false⟩}. The top-level expansion of ⟨list⟩ must be a list of tokens to compare with ⟨thingma⟩ with \ifx. If the ⟨thingma⟩ is in the ⟨list⟩, the ⟨true⟩ clause is executed; otherwise, the ⟨false⟩ clause is executed.

3 Defining commands

3.1 User commands

\InitCS \InitCS and \InitCS* take one argument, ⟨\csname⟩, and initialize it to {}. The \InitCS* non-*-form is long; the *-form is not. \InitName \InitName and \InitName* are the same but take an argument ⟨csname⟩ \InitName* without a backslash. \ShortEmpty To make it easier to avoid the problem of comparing long and non-long macros

\LongEmpty with \ifx, compare macros with \ShortEmpty and \LongEmpty.

\ReserveCS * \ReserveCS {⟨\csname⟩} reserves ⟨\csname⟩ for the current package’s use. \ReserveCS The non-*-form is long; the *-form is not. The variable is also initialized with

the \InitCS or \InitCS * as appropriate.

\ReserveName  * \ReserveName and \ReserveName* are the same but take an argument

\ReserveName ⟨csname⟩ without a backslash.

\SaveCS \SaveCS {⟨\csname⟩} saves the present value of ⟨\csname⟩ in a macro \RestoreCS (\MDSaved⟨csname⟩). The saved value is restored to ⟨\csname⟩ by \RestoreCS

{⟨\csname⟩}.

\SaveName \SaveName and \RestoreName are the same but take an argument ⟨csname⟩ \RestoreName without a backslash.

\requirecommand      \requirecommand is like \providecommand, but if the control sequence is

already defined, \CheckCommand is called to make sure it’s defined identically, whereas \providecommand assumes that if it’s already defined, the definition is appropriate. Using \requirecommand guarantees that a control sequence will have the given definition; or an error will occur.

\newtokens      \newtokens{⟨\csname⟩}, \newlet{⟨\csname⟩}{⟨\csname⟩}, and \newboolean
\newlet
\newboolean

{⟨csname⟩} give an error if their control sequence argument is already defined. \newtokens creates a token variable. \newlet does a \let assignment. \newboolean {⟨csname⟩} creates three new control sequences: two switches,

\csnametrue and \csnamefalse, and a test, \ifcsname. \newtokens is not

outer. Is there any reason this really matters?

Warning: Limitation: You can’t use \newlet to \let a command sequence to a character with a catcode not equal to 10 (space), 11 (letter), 12 (other), or 13 (active). For example, you can’t say . Also, you cannot use = with \newlet like you can with \let.

\providetokens  Like the kernel’s \providecommand, the commands \providetokens{⟨\csname⟩},
\provideboolean
\providesavebox
\providecounter
\providelength

\provideboolean{⟨csname⟩}, \providesavebox{⟨\csname⟩}, \providecounter

{⟨csname⟩}, and \providelength {⟨\csname⟩} will create a new object (or objects) based on the name ⟨\csname⟩ or ⟨csname⟩ only if they are not already defined. See the corresponding commands that begin with \new instead of \provide for a description of what kind of object is created. In contrast with \providecommand, however, these commands will write a record to the log file if their argument was already defined (\providecommand does nothing at all in this case).

\UndefineCS      \UndefineCS{⟨\csname⟩} causes ⟨\csname⟩ to be undefined. \UndefineName

\UndefineName does the same for a ⟨csname⟩. Use with caution. \global works before them. \defcommand \defcommand{⟨\csname⟩}[⟨# of args⟩][⟨default for an optarg⟩] defines ⟨\csname⟩ \defcommand* in the same manner as \newcommand except no warning or error is issued if

⟨\csname⟩ is already defined.

\defcommand is very similar to the primitive \def, so why would you want to use it? For one thing, the syntax is the same as all the other L^{A}TEX defining commands, so it is easier to read, and easier to change the word defcommand to one of the other defining commands. Second, \defcommands that take arguments have simpler syntax when defining commands are nested. You still have to double the # characters in the definition body, but the argument specification (e.g., [n]) is the same as if not nested.

There is a performance-syntax tradeoff; I choose to use \defcommand whenever the command to be defined is taking an argument. When it does not take an argument, there is no difference between \def and \defcommand except that \def is faster.

I see very little reason to ever use \renewcommand. It causes an error when the control sequence is not already defined. Conceivably this is useful during development to catch programming mistakes, but much more often I find that I don’t care whether the control sequence was defined or not, and therefore the error \renewcommand might raise is inappropriate and a problem.

\NewName \NewName {⟨csname⟩}{⟨template⟩}{⟨body⟩} defines ⟨csname⟩ to expand to \NewName* ⟨body⟩ using a TEX-style argument ⟨template⟩, e.g. #1#2\@nil or simply #1#2.

The *-form is not long. If ⟨csname⟩ is already defined, an error will be signalled.

\DefName \DefName is like \NewName but no error is signalled if ⟨csname⟩ is already

\DefName* defined.

\Global If the command \Global immediately precedes \NewName, \DefName, or

\ToggleBoolean, then the definition will be global.

To do: Get something like \Global going for all the new commands, not just

\DefName and \NewName.

\CheckName \CheckName is like \NewName but instead of defining the control sequence, it \CheckName* checks whether the control sequence has the given definition. If so, no action is

taken; if not, a warning is given.

\RequireName      \RequireName is to \requirecommand as \NewName is to \newcommand. The

\RequireName* syntax is \RequireName {⟨csname⟩}{⟨template⟩}{⟨body⟩}.

\NewTextFontCommand      \NewTextFontCommand and \NewRobustCommand are just like the kernel’s
\NewRobustCommand  \DeclareTextFontCommand and \DeclareRobustCommand, but give an error in-

stead of just a warning if their first argument is already defined. \Elet \Elet expands the second token after it once and then \lets the first token to \EElet the second token. \global works before it. \EElet expands the two tokens that

come after it once each, and then \lets the first to the second. \global works before it.

\NewUserInfo \NewUserInfo [⟨user-cmd⟩]{⟨variable⟩}, where ⟨variable⟩ has some capital \NewUserInfo* letters, will define the lowercase version of ⟨variable⟩ to be a user command that

redefines ⟨variable⟩ to its argument. The argument ⟨user-cmd⟩, if supplied, is used for the user command, overriding the default of the lowercased ⟨variable⟩.

   For example, \NewUserInfo*\Subtitle defines a user command \subtitle

{⟨text⟩} which does the equivalent of \defcommand\Subtitle{⟨text⟩}.

The non-*-form is long; the *-form is not. \NewUserInfo uses \ReserveCS to initialize ⟨variable⟩; \NewUserInfo ** uses \ReserveCS *.

These have @ in their names because they are modelled after kernel commands. To do: Sort out naming comventions and write them down.

\addto@macro \addto@macro{⟨\csname⟩}{⟨tokens⟩} adds ⟨tokens⟩ to the end of {⟨\csname⟩}. \lg@addto@macro The redefinition of {⟨\csname⟩} is local. The kernel provides the global equivalent,

\g@addto@macro. \lg@addto@macro is both long and global.

\prependto@macro \prependto@macro{⟨\csname⟩}{⟨tokens⟩} adds ⟨tokens⟩ to the beginning of

\g@prependto@macro
\lg@prependto@macro

{⟨\csname⟩}. The redefinition of {⟨\csname⟩} is local. The global equivalent is

\g@prependto@macro. \lg@prependto@macro is both long and global.

4 Controlling expansion

\EExpand … \In A common construction is to \edef a scratch variable to something and then

\EExpand* . . . \In
\eExpand . . . \In
\eExpand* . . . \In
\eExecute
\eExecute*

execute the scratch variable. The \eExecute macro takes a single argument, expands it fully, then executes it.

\eExpand {⟨first tokens⟩}\In {⟨second tokens⟩} expands the ⟨first tokens⟩ inside ⟨second tokens⟩ wherever #1 occurs. \EExpand expands the first token of ⟨first tokens⟩ only once. The *-versions make each argument short. These commands can nest.

For example,

     \def\a {\b}
     \def\b {Hello }
     \eExpand\a world\In {%
       \def\c {This is a good way to avoid lots of noexpands and
               expandafters.  #1.  And I continue.}%
       \c
     }
     \EExpand\a BLOOB\In {%
       \edef#1{\b world}%
       This is a good way to avoid lots of noexpands and
       expandafters.  \a BLOOB.  And I continue.%
     }

LOOKS LIKE:

This is a good way to avoid lots of noexpands and expandafters. Hello world. And I continue. This is a good way to avoid lots of noexpands and expandafters. Hello world. And I continue.

The two commands expand to the same three sentences.

\E@car … \@nil Let T be the sequence of tokens between \E@car and \@nil. The first token \E@cdr … \@nil of T is expanded once, and \E@car...b\@nil expands to the first token of the

result.

\E@cdr...\@nil is similar, but expands to the entire result except its first token.

For example, after

    \def\a {Hello}
    \def\b { world}
  \E@car \a there\b.\@nil would expand first of all to H. And \E@cdr \a there\b.\@nil

would expand first of all to ellothere\b., and then eventually expand fully to

ellothere world..

The example is more complicated than you would normally use. Usually you want to car and cdr a sequence of tokens contained in macro \foo, and this is easy enough with \E@car\foo\@nil. To chop off the first token of \foo, \edef\foo {\E@cdr\foo\@nil}. (If you’re wondering, the space after \foo is irrelevant.)

5 Gobbling

\Gobble It occurs fairly often that you want to gobble things while \makeatother is in

\GobbleM
\GobbleO
\GobbleMM
\GobbleMO
\GobbleOM

effect, so these command names have no @’s. The M stands for a mandatory argument, and the O stands for an optional argument. For example, suppose there is a command \foo[⟨optarg⟩]{⟨marg⟩}. If you \let\foo\GobbleOM, then the arguments to \foo will be gobbled appropriately.

\Gobble is the same as \GobbleM, in imitation of the internal \@gobble.

6 Option declaration

The follwing two commands may be used in packages before the \ProcessOptions command is issued.

\DeclareBooleanOptions      \DeclareBooleanOptions {⟨on⟩}{⟨off ⟩} declares a new boolean variable

@⟨on⟩@ and makes it true if the option ⟨on⟩ is given to the package, and false if the option ⟨off ⟩ is given, or if neither is given. I think it is good programming style not to rely on the default, always declaring either ⟨on⟩ or ⟨off ⟩ with an

\ExecuteOptions statement.
\DeclareBooleanUserOptions      \DeclareBooleanUserOptions{⟨on⟩}{⟨off ⟩} is like \DeclareBooleanOptions,

but additionally declares two user commands ⟨\on⟩ and ⟨\off ⟩ which are \let to \@⟨on⟩@true and \@⟨off ⟩@false, respectively. Use this command when it is sensible to change the status of the option after the package has been loaded.

7 Toggle a boolean

\ToggleBoolean \ToggleBoolean{⟨boolean⟩} changes the state of ⟨boolean⟩ from false to true or vice versa. The argument ⟨boolean⟩ should not include an initial if or final true or false. The redefinition is local unless \Global precedes \ToggleBoolean.

8 Debugging

To do: I have plans for expanding this section in the next release with some API commands for controlling the level of debugging output.

\VerboseErrors L^{A}TEX by default gives very little context for errors. \VerboseErrors [⟨number⟩] causes L^{A}TEX to give ⟨number⟩ lines of context, or the maximum by default.

\GVerboseErrors  Like \VerboseErrors but effective globally.

\Debug \Debug {⟨number⟩} sets a debugging parameter to ⟨number⟩. I have plans to turn this into a bitwise parameter like many C programs, but right now the behavior is to issue a message with \typeout, call \VerboseErrors, and use the

parameter to assign values to \tracingoutput, \tracingpages, \tracingmacros,
and \tracingcommands.

\GDebug \GDebug {⟨number⟩} is as \Debug but its assignments are \global.

\DTypeout      \DTypeout expands to \typeout when \Debug is 1 or greater, and \GobbleM
\DDTypeout
\DDDTypeout

otherwise. \DDTypeout is \GobbleM unless \Debug is 2 or greater; \DDDTypeout

is \GobbleM unless \Debug is 3 or greater.

\DGobbleM Like \GobbleM but when \Debug is 1 or greater, tells you what it’s gobbling

with a \typeout.
\FrankenError  The commands \FrankenError, \FrankenWarning, and \FrankenInfo are de-
\FrankenWarning
\FrankenInfo

fined here for use by other Frankenstein packages and classes. They are simply wrappers for the obvious kernel commands.

Part II

Implementation

9 Version control

\fileinfo \DoXUsepackagE \HaveECitationS \fileversion \filedate \docdate \PPOptArg These definitions must be the first ones in the file.
 1 \def\fileinfo{more defining commands (Frankenstein's brain)}
 2 \def\DoXPackageS {}
 3 \def\fileversion{v1.6}
 4 \def\filedate{1999/02/24}
 5 \def\docdate{1999/02/26}
 6 \edef\PPOptArg {%
 7 \filedate\space \fileversion\space \fileinfo
 8 }

If we’re loading this file from a \ProcessDTXFile command (see the compsci package), then \JusTLoaDInformatioN will be defined; othewise we assume it is not (that’s why the FunkY NamE).

If we’re loading from \ProcessDTXFile, we want to load the packages listed in \DoXPackageS (needed to typeset the documentation for this file) and then bail out. Otherwise, we’re using this file in a normal way as a package, so do nothing. \DoXPackageS, if there are any, are declared in the dtx file, and, if you’re reading the typeset documentation of this package, would appear just above. (It’s OK to call \usepackage with an empty argument or \relax, by the way.)

 9 \makeatletter% A special comment to help create bst files.  Don't change!
10 \@ifundefined{JusTLoaDInformatioN} {%
11 }{% ELSE (we know the compsci package is already loaded, too)
12 \UndefineCS\JusTLoaDInformatioN
13 \SaveDoXVarS
14 \eExpand\csname DoXPackageS\endcsname\In {%use \csname in case it's undefined
15  \usepackage{#1}%
16 }%
17 \RestoreDoXVarS
18 \makeatother
19 \endinput
20 }% A special comment to help create bst files.  Don't change!

Now we check for L^{A}TEX2e and declare the LaTeX package.

21 \NeedsTeXFormat{LaTeX2e}
22 \ProvidesPackage{moredefs}[\PPOptArg]

10 Conditionals

We start with the conditionals section because we want to use \@ifundefined@cs in this package to make some of the subsequent definitions easier to read.

\@ifundefined@cs
23 \newcommand*\@ifundefined@cs [1] {%
24 \edef\reserved@a{%
25  \expandafter\@gobble\string #1%
26 }%
27 \@ifundefined\reserved@a
28  \@firstoftwo
29  \@secondoftwo

30 }

To do: In user macros, prepend should go into defining, e@car should go into expansion control. This is a branching command.

\IfElement\lips\string\In
\IfElement*\lips\string\In
31 \newcommand\IfElement{}
32 \def\IfElement #1\In#2{%
33 \@tempswafalse
34 \expandafter   \@tfor
35  \expandafter \sc@t@a
36  \expandafter :%
37  \expandafter =#2\do {%
38  \ifx #1\sc@t@a
39 %        \DTypeout{[\meaning #1] matches element [\meaning\sc@t@a]
40 %                 in [\string#2].}%
41  \@tempswatrue
42  \@break@tfor
43  \else
44 %        \DTypeout{[\meaning #1] matches NO elements in [\string #2].}%
45  \fi
46  }%
47 \if@tempswa
48  \expandafter\@firstoftwo
49 \else
50  \expandafter\@secondoftwo
51 \fi

52 }

11 Defining commands

\sc@star@or@long \sc@star@nothing The macros \sc@star@or@long and \sc@star@nothing are parallel to the kernel’s

\@star@or@long and \l@ngrel@x, which control whether definitions are long or

not. \sc@star@or@long causes the value of \sc@star@nothing to be either * or

empty, depending on whether it finds a * when it is called. It also sets the kernel’s \l@ngrel@x to nothing or \long, respectively. (We need both flags at least once.)

53 \newcommand*\sc@star@nothing{}
54 \newcommand*\sc@star@or@long [1] {% args: defining-command
55 \@ifstar {%
56  \let\l@ngrel@x\relax

57  \def\sc@star@nothing {*}#1%
58  }{% ELSE
59  \let\l@ngrel@x\long
60  \def\sc@star@nothing {}%
61  #1%
62 }%

63 }

\requirecommand \requirecommand* \require@command A typical application of the star mechanisms is \requirecommand.
64 \newcommand\requirecommand {%
65 \sc@star@or@long\require@command

66 }

67 \newcommand\require@command [1] {% args: \csname
68 \@ifundefined@cs{#1} {%
69  \expandafter\newcommand\sc@star@nothing
70  }{% ELSE
71  \expandafter\CheckCommand\sc@star@nothing
72 }%
73 {#1}%

74 }

\InitCS
\InitCS*
\InitName
\InitName*
\ReserveCS
\ReserveCS*
\ReserveName
\ReserveName*
\ShortEmpty
\LongEmpty

75 \newcommand\InitCS {%
76 \@star@or@long\Init@CS

77 }

78 \newcommand\Init@CS [1] {% args: \csname
79 \l@ngrel@x\def#1{}%

80 }

81 \newcommand\InitName {%
82 \sc@star@or@long\Init@Name

83 }

84 \newcommand\Init@Name [1] {% args: csname
85 \expandafter\DefName\sc@star@nothing{#1}{}{}%

86 }

87 \newcommand\ReserveCS {%
88 \sc@star@or@long\Reserve@CS

89 }

90 \newcommand\Reserve@CS [1] {% args: \csname
91 \expandafter\newcommand\sc@star@nothing{#1} {}%

92 }

93 \newcommand\ReserveName {%
94 \sc@star@or@long\Reserve@Name

95 }

96 \newcommand\Reserve@Name [1] {% args: csname
97 \expandafter\NewName\sc@star@nothing{#1}{} {}%

98 }

99 \InitCS*\ShortEmpty
100 \InitCS\LongEmpty
\sc@t@a \sc@t@b \sc@t@c \sc@t@d \sc@t@e \sc@t@f \sc@t@g Scratch variables.

101 \ReserveCS\sc@t@a
102 \ReserveCS\sc@t@b
103 \ReserveCS\sc@t@c
104 \ReserveCS\sc@t@d
105 \ReserveCS\sc@t@e
106 \ReserveCS\sc@t@f
107 \ReserveCS\sc@t@g

\newtokens \newlet Because \newtoks is \outer, we have to fool \def into allowing it to be in its argument by using \@nameuse.

108 \newcommand\newtokens [1] {% args: \csname
109 \@ifdefinable #1 {%
110  \@nameuse{newtoks}#1%

111 }% 112 }

113 \newcommand*\newlet [2] {% args: \csname-a \csname-b
114 \@ifdefinable #1 {%
115  \let #1#2%

116 }% 117 }

\providetokens \providelength \providesavebox \providecounter \newboolean \provideboolean The \newboolean command is the same as the one in the ifthen package; so that

packge won’t clash with this one. Isn’t \requirecommand nice?

118 \newcommand*\providetokens [1] {% args: \csname
119 \@ifundefined@cs{#1} {%
120  \@nameuse{newtokens}#1%
121  }{% ELSE
122  \FrankenInfo{moredefs}{\protect\providetokens\space is not reallocating
123  token variable \protect#1.\MessageBreak
124  The existing contents are [\the#1]}%

125 }% 126 }

127 \newcommand*\providelength [1] {% args: \csname
128 \@ifundefined@cs{#1} {%
129  \newlength{#1}%
130  }{% ELSE
131  \FrankenInfo{moredefs}{\protect\providelength\space is not reallocating
132  \protect#1.\MessageBreak
133  The existing value is [\the#1]}%

134 }% 135 }

136 \newcommand*\providesavebox [1] {% args: \csname
137 \@ifundefined@cs{#1} {%
138  \newsavebox{#1}%
139  }{% ELSE
140  \FrankenInfo{moredefs}{\protect\providesavebox\space is not reallocating
141  box \protect#1.}%

142 }% 143 }

144 \newcommand*\providecounter [1] {% args: string
145 \@ifundefined{c@#1} {%
146  \newcounter{#1}%
147  }{% ELSE
148  \FrankenInfo{moredefs}{\protect\providecounter\space is not reallocating
149  counter #1.\MessageBreak
150  The existing value is [\expandafter\number\csname c@#1\endcsname]}%

151 }% 152 }

153 \requirecommand*\newboolean [1] {% args: string
154 \csname newif\expandafter\endcsname\csname if#1\endcsname

155 }

156 \newcommand*\provideboolean [1] {% args: string
157 \@ifundefined {if#1} {%
158  \newboolean{#1}%
159  }{% ELSE
160  \FrankenInfo{moredefs}{\protect\provideboolean\space is not reallocating
161  \protect#1.\MessageBreak
162  The value is [\@nameuse{if#1}TRUE\else FALSE\fi]}%

163 }% 164 }

\sc@toks@a \addto@macro \lg@addto@macro \prependto@macro \g@prependto@macro \lg@prependto@macro There are still missing a couple of the permutations, but I won’t add them until I

need them. You can add them yourself in the configuration file moredefs.cfg.

165 \newtokens\sc@toks@a

166

167 \newcommand\addto@macro [2] {%
168 \sc@toks@a=\expandafter{#1#2}%
169 \edef#1{%
170  \the\sc@toks@a

171 }% 172 }

173 \newcommand\lg@addto@macro [2] {%
174 \sc@toks@a=\expandafter{#1#2}%
175 \long\xdef#1{%
176  \the\sc@toks@a

177 }% 178 }

179 \newcommand\prependto@macro [2] {%
180 \sc@toks@a=\expandafter{#2#1}%
181 \edef#1{%
182  \the\sc@toks@a

183 }% 184 }

185 \newcommand\g@prependto@macro [2] {%
186 \sc@toks@a=\expandafter{#2#1}%
187 \global\edef#1{%
188  \the\sc@toks@a

189 }% 190 }

191 \newcommand\lg@prependto@macro [2] {%
192 \sc@toks@a=\expandafter{#2#1}%
193 \long\xdef#1{%
194  \the\sc@toks@a

195 }% 196 }

\UndefineCS \UndefineName  \global works before them.
197 \newcommand\UndefineCS [1] {% args: \csname
198 \let#1\@undefined

199 }

200 \newcommand\UndefineName [1] {% args: csname
201 \expandafter\let\csname#1\endcsname\@undefined

202 }

\defcommand \defcommand* \def@command See the user documentation for a discussion of when to use this insteae of \def.

203 \newcommand\defcommand {%
204 \@star@or@long\def@command

205 }

206 \newcommand\def@command {%
207 \let\@ifdefinable\@rc@ifdefinable
208 \new@command

209 }

\DefName \DefName* \def@name \NewName \NewName* \new@name \Global \sc@global  \Global works before \DefName, \NewName, and \ToggleBoolean only!
210 \newcommand\DefName {%
211 \@star@or@long\def@name

212 }

213 \newcommand\def@name [3] {% args: arglist csname body
214 \sc@global\l@ngrel@x\@namedef{#1}#2{#3}%

215 }

216 \newcommand\NewName {%
217 \@star@or@long\new@name

218 }

219 \newcommand\new@name [3] {% args: arglist csname body
220 \@ifundefined{#1} {%
221  \sc@global\l@ngrel@x\@namedef{#1}#2{#3}%
222  }{% ELSE
223  \defcommand\reserved@a {%
224  #1%

225 }%

226  \@notdefinable

227 }% 228 }

229 \newcommand\sc@global {%
230 \relax

231 }

232 \newcommand\Global {%
233 \def\sc@global {%

234  \global\let\sc@global\relax\global

235 }% 236 }

\CheckName
\CheckName*
\check@name
\RequireName
\RequireName*
\require@name

237 \newcommand\CheckName {%
238 \@star@or@long\check@name

239 }

240 \newcommand\check@name [3] {% args: arglist csname body
241 \expandafter\DefName\sc@star@nothing{reserved@a}{#2}{#3}%
242 \expandafter\@check@eq\csname #1\endcsname\reserved@a

243 }

244 \newcommand\RequireName {%
245 \sc@star@or@long\require@name

246 }

247 \newcommand\require@name [3] {% args: arglist csname body
248 \@ifundefined{#1} {%
249  \expandafter\DefName\sc@star@nothing{#1}{#2}{#3}%
250  }{% ELSE
251  \expandafter   \expandafter
252  \expandafter \CheckName
253  \expandafter \sc@star@nothing
254  \csname #1\endcsname
255  {#2}{#3}%

256 }% 257 }

\NewTextFontCommand \NewRobustCommand \new@robustcommand \new@@robustcommand FIX doc?
258 \newcommand\NewTextFontCommand [2] {% args: \csname font-command
259 \NewRobustCommand#1[1]{%
260  \ifmmode
261  \nfss@text{#2##1}%
262  \else
263  \leavevmode
264  {\text@command{##1}%
265  #2\check@icl ##1\check@icr
266  \expandafter}%
267  \fi

268 }% 269 }

270 \newcommand\NewRobustCommand {%
271 \@star@or@long\new@robustcommand

272 }

We need a second level here because otherwise the \fi that closes \@ifdefinable will become the definition of the closing \new@command. We could use a chain of \expandafters but that would be confusing.

273 \newcommand\new@robustcommand [1] {%
274 \let\sc@t@a\relax
275 \@ifdefinable #1 {%

276  \def\sc@t@a {%
277  \new@@robustcommand #1%

278 }% 279 }%

280 \sc@t@a

281 }

282 \newcommand\new@@robustcommand [1] {%
283 \edef\reserved@a {\string#1}%
284 \def\reserved@b {#1}%
285 \edef\reserved@b {%
286  \expandafter\strip@prefix\meaning\reserved@b

287 }%

288 \edef#1{%
289  \ifx\reserved@a\reserved@b
290  \noexpand\x@protect
291  \noexpand#1%
292  \fi
293  \noexpand\protect
294  \expandafter\noexpand\csname
295  \expandafter\@gobble\string#1 \endcsname

296 }%

297 \let\@ifdefinable\@rc@ifdefinable
298 \expandafter\new@command\csname
299  \expandafter\@gobble\string#1 \endcsname

300 }

\Elet
301 \newcommand\Elet {%
302 \expandafter\let\expandafter

303 }

\EElet
304 \newcommand*\EElet {%
305 \expandafter\expandafter\expandafter\let\expandafter\expandafter

306 }

\NewUserInfo \NewUserInfo* \new@userinfo Using \lowercase in this macro is tricky, since it gets expanded only in TEX’s stomach.

307 \newcommand\NewUserInfo {%
308 \sc@star@or@long\new@userinfo

309 }

310 \newcommand*\new@userinfo [2][] {% args: [\csname] \csname
311 \expandafter\ReserveCS\sc@star@nothing{#2}%
312 \def\sc@t@b {#1}%

If we were not given the optional user-cmd, define scratch b to be a lowercase version of the variable, without the backslash. Otherwise use the user-cmd given, without the backslash.

313 \ifx\sc@t@b\ShortEmpty
314  \edef\sc@t@a {%

315  \edef\noexpand\sc@t@b{%
316  \E@cdr\string#2\@nil

317 }% 318 }%

319  \lowercase\expandafter{\sc@t@a}%
320 \else
321  \edef\sc@t@b {\E@cdr\string#1\@nil}%
322 \fi

Now define the user-cmd to be a redefinition of the variable.

323 \edef\sc@t@a {%
324  \noexpand\NewName\sc@star@nothing{\sc@t@b}{####1}
325  {\noexpand\renewcommand\sc@star@nothing\noexpand#2{####1}}

326 }%

327 \sc@t@a

328 }

\ SaveCS

\ RestoreCS

\ SaveName

\ RestoreName

329 \newcommand\SaveCS [1] {% args: \csname
330 \expandafter\newlet\csname MDSaved\E@cdr\string#1\@nil\endcsname#1%

331 }

332 \newcommand\RestoreCS [1] {% args: \csname
333 \Elet#1\csname MDSaved\E@cdr\string#1\@nil\endcsname
334 \UndefineName{MDSaved\E@cdr\string#1\@nil}%

335 }

336 \newcommand\SaveName [1] {% args: csname
337 \ReserveName{#1}%
338 \EElet\csname MDSaved#1\endcsname\sc@t@a\csname #1\endcsname

339 }

340 \newcommand\RestoreName [1] {% args: csname
341 \EElet\csname #1\endcsname\csname MDSaved#1\endcsname
342 \UndefineName{MDSaved#1}%

343 }

12 Controlling expansion

\EExpand\lips\In \EExpand*\lips\In \sc@EExpand \eExpand\lips\In \eExpand*\lips\In \sc@eExpand \eExecute \eExecute* \sc@eExecute Uses \sc@t@a, \sc@t@b, \sc@t@c.
344 \newcommand\eExpand {%
345 \sc@star@or@long\sc@eExpand

346 }

347 \NewName{sc@eExpand} {#1\In#2} {% args: object body
348 \l@ngrel@x\edef\sc@t@a{#1}%
349 \expandafter\defcommand\sc@star@nothing\sc@t@b [1] {#2}%
350 \expandafter   \sc@t@b

351  \expandafter {\sc@t@a}%

352 }

353 \newcommand\EExpand {%
354 \sc@star@or@long\sc@EExpand

355 }

When this is short, both the two args are short. \sc@star@nothing gets reset by the first \defcommand, so we save it in \sc@t@c.

356 \NewName{sc@EExpand}{#1\In#2} {% args: object body
357 \let\sc@t@c\sc@star@nothing
358 \expandafter   \expandafter
359  \expandafter \defcommand
360  \expandafter \sc@t@c
361  \expandafter \sc@t@a
362  \expandafter {#1}%
363 \expandafter\defcommand\sc@t@c\sc@t@b [1] {#2}%
364 \expandafter\sc@t@b
365  \expandafter{\sc@t@a}%

366 }

367 \newcommand\eExecute {%
368 \sc@star@or@long\sc@eExecute

369 }

370 \newcommand\sc@eExecute [1] {% args: body
371 \l@ngrel@x\edef\sc@t@a {#1}%
372 \sc@t@a

373 }

\E@car \E@cdr
374 \NewName{E@cdr} {#1\@nil} {%
375 \expandafter\@cdr #1\@nil

376 }

377 \NewName{E@car} {#1\@nil} {%
378 \expandafter\@car #1\@nil

379 }

13 Gobbling

\Gobble \GobbleM \GobbleO \GobbleMM \GobbleMO \GobbleOM \sc@gobbleOM M for mandatory arg, i.e., one token. O for optional arg, i.e., a square-brace pair.

380 \newlet\Gobble\@gobble
381 \newlet\GobbleM\@gobble
382 \NewName{GobbleO} {[#1]}

383 {}

384 \newlet\GobbleMM\@gobbletwo
385 \newcommand\GobbleOM {%
386 \@ifnextchar [
387  \sc@gobbleOM
388  \Gobble

389 }

390 \NewName{sc@gobbleOM} {[#1]#2}

391 {}

392 \newcommand\GobbleMO [1] {%
393 \@ifnextchar [
394  \GobbleO
395  {}%

396 }

14 Option declaration

\DeclareBooleanOptions
\DeclareBooleanUserOptions
397 \newcommand\DeclareBooleanOptions [2] {% args: on off
398 \newboolean{@#1@}%
399 \DeclareOption{#1} {%
400  \@nameuse{@#1@true}

401 }%

402 \DeclareOption{#2} {%
403  \@nameuse{@#1@false}

404 }% 405 }

406 \newcommand\DeclareBooleanUserOptions [2] {% args: on off
407 \DeclareBooleanOptions{#1}{#2}%
408 \ReserveName{#1}%
409 \ReserveName{#2}%
410 \EElet \csname#1\endcsname\csname @#1@true\endcsname
411 \EElet \csname#2\endcsname\csname @#1@false\endcsname

412 }

15 Toggle a boolean

\ToggleBoolean
413 \newcommand\ToggleBoolean [1] {% arg: boolean
414 \csname if#1\endcsname
415  \sc@global\csname #1false\endcsname
416 \else
417  \sc@global\csname #1true\endcsname
418 \fi

419 }

16 Debugging

\VerboseErrors \GVerboseErrors We do not use \setcounter but rather set these counters locally.

420 \newcommand*\VerboseErrors [1][\@M] {% args: [number]
421 \c@errorcontextlines #1%
422 \showboxbreadth #1%
423 \showboxdepth #1%

424 }

425 \newcommand*\GVerboseErrors [1][\@M] {% args: [number]
426 \global\c@errorcontextlines #1%
427 \global\showboxbreadth #1%
428 \global\showboxdepth #1%

429 }

\Debug \GDebug \md@maybe@global Set \debug to 0, 1, or 2.
430 \ReserveCS\md@maybe@global
431 \newcommand*\Debug {%
432 \let\md@maybe@global\relax
433 \md@debug

434 }

435 \newcommand*\GDebug {%
436 \let\md@maybe@global\global
437 \md@debug

438 }

439 \newcommand*\md@debug[1] {% args: debug-level
440 \ifnum #1 > 0%
441  \let\sc@t@a\@M
442  \md@maybe@global\def\DTypeout ##1{%
443  \typeout{##1}%

444 }%

445  \md@maybe@global\def\DGobbleM ##1{%
446  \typeout{DGobbleM: [##1]}%

447 }%

448  \ifnum #1 > 1%
449  \md@maybe@global\def\DDTypeout ##1{%
450 \typeout{##1}%

451 }%

452  \ifnum #1 > 2%
453 \md@maybe@global\def\DDDTypeout ##1{%
454 \typeout{##1}%

455 }%

456  \fi
457  \fi
458 \else
459  \let\sc@t@a\m@ne
460 \fi
461 \md@maybe@global\tracingoutput#1 %
462 \md@maybe@global\tracingpages#1 %
463 \md@maybe@global\tracingmacros#1 %
464 \md@maybe@global\tracingcommands#1 %
465 \ifx\md@maybe@global\relax
466  \VerboseErrors[\sc@t@a]%
467  \typeout{++++ Debugging [#1]\on@line}%
468 \else
469  \GVerboseErrors[\sc@t@a]%
470  \typeout{++++ Global debugging [#1]\on@line}%
471 \fi

472 }

\DTypeout \DTypeout \DTypeout \DGobbleM FIX
473 \newlet\DTypeout\GobbleM
474 \newlet\DDTypeout\GobbleM
475 \newlet\DDDTypeout\GobbleM
476 \newlet\DGobbleM\GobbleM
\FrankenError
\FrankenWarning
\FrankenInfo

477 \newcommand\FrankenWarning [2] {% args: package warning
478 \GenericWarning  % continuation message
479  {(#1)\@spaces\@spaces\@spaces\@spaces\@spaces}
480  {Frankenstein (#1) WARNING: #2}%

481 }

482 \newcommand\FrankenError [3] {% args: package error-message help-text
483 \GenericError % args: continuation message where-help what-help
484  {(#1)\@spaces\@spaces\@spaces\@spaces\@spaces}
485  {Frankenstein (#1) error: #2}
486  {See the documenation for the #1 package for more information.}
487  {#3}%

488 }

489 \newcommand\FrankenInfo [2] {% args: package info
490 \GenericInfo    % continuation message
491  {(#1)\@spaces\@spaces\@spaces\@spaces\@spaces}
492  {Frankenstein (#1) says: #2}%

493 }

Index

Numbers written in italic refer to the page where the corresponding entry is described, the ones underlined to the code line of the definition, the rest to the code lines where the entry is used.

Symbols

\@M . . . . . . 420, 425, 441

\@break@tfor . . . . . . 42

\@car . . . . . . . . . . . . 378 \@cdr . . . . . . . . . . . . 375

\@check@eq . . . . . . . 242
\@firstoftwo . . . . 28, 48

\@gobble . . . . . . 25,

295, 299, 380, 381

\@gobbletwo . . . . . . . 384
\@ifdefinable . 109,

114, 207, 275, 297

\@ifnextchar . . 386, 393

\@ifstar . . . . . . . . . 55

\@ifundefined 10, 27,

145, 157, 220, 248

\@ifundefined@cs 2,

\underline{23}, 68, 119, 128, 137 \@namedef …. 214, 221

\@nameuse . . . . 110,

120, 162, 400, 403 \@nil . . . . . 316, 321,

330, 333, 334, 374, 375, 377, 378

\@notdefinable . . . . 226
\@rc@ifdefinable . .

. . . . . . . . 207, 297

\@secondoftwo . . . 29, 50

\@spaces . . 479, 484, 491

\@star@or@long . . . .

. . . . . 76, 204, 211, 217, 238, 271

\@tempswafalse . . . . 33
\@tempswatrue . . . . . 41

\@tfor . . . . . . . . . . . 34

\@undefined . . . 198, 201

A

\addto@macro . . . . 4, \underline{165}

C

\c@errorcontextlines

. . . . . . . . 421, 426

\check@icl . . . . . . . 265

                          \check@icr . . . . . . . 265
                          \check@name . . . . . . . \underline{237}
                          \CheckCommand . . . . . 71
                          \CheckName . . . . . 4, \underline{237}
                          \CheckName* . . . . . 4, \underline{237}

\csname . . . . . . . 14, 67, 78, 90, 108, 113, 118, 127, 136, 150, 154, 197, 201, 242, 254, 258, 294, 298, 310, 329, 330, 332, 333, 338, 341, 410, 411, 414, 415, 417

D

                          \DDDTypeout . 7, 453, 475
                          \DDTypeout . 7, 449, 474

\Debug . . . . . . . . . 6, \underline{430}

                          \DeclareBooleanOptions

. . . . . . . . . 6, \underline{397}

                          \DeclareBooleanUserOptions

. . . . . . . . . 6, \underline{397}

                          \DeclareOption 399, 402

\def . . . . . . . 1–5, 32, 57, 60, 79, 233, 276, 284, 312, 442, 445, 449, 453

                          \def@command . . . . . . \underline{203}

\def@name . . . . . . . . \underline{210}

                          \defcommand . . 3, \underline{203},

223, 349, 359, 363

                          \defcommand* . . . . 3, \underline{203}

\DefName . . . . . . . . .

4, 85, \underline{210}, 241, 249 \DefName* . . . . . . 4, \underline{210} \DGobbleM . . 7, 445, \underline{473} \do . . . . . . . . . . . . . 37 \docdate . . . . . . . . . . \underline{1}

                          \DoXPackageS . . . . . . . 2
                          \DoXUsepackagE . . . . . \underline{1}
                          \DTypeout . . . . . . . .

7, 39, 44, 442, \underline{473}

E \E@car . . . . . . . . . . . \underline{374}

                                                   \E@car\lips␣␣{}\@nil 5

\E@cdr …. 316, 321,

330, 333, 334, \underline{374}

                                                   \E@cdr\lips␣␣{}\@nil 5

\edef 6, 24, 169, 181, 187, 283, 285, 288, 314, 315, 321, 323, 348, 371

\EElet . . . . . . 4, \underline{304},

338, 341, 410, 411 \eExecute . . . . . . 5, \underline{344}

                                                   \eExecute* . . . . . 5, \underline{344}

\EExpand . . . . . . . . . 353 \eExpand . . . . . . 14, 344

                                                   \EExpand*\lips␣␣{}\In

. . . . . . . . . . . . . 5

                                                   \eExpand*\lips␣␣{}\In

. . . . . . . . . . . . . 5

                                                   \EExpand*\lips\In . \underline{344}
                                                   \eExpand*\lips\{\}\In  \underline{344}
                                                   \EExpand\lips␣␣{}\In 5
                                                   \eExpand\lips␣␣{}\In 5
                                                   \EExpand\lips\{\}\In . \underline{344}
                                                   \eExpand\lips\{\}\In . \underline{344}

\Elet . . . . . . 4, \underline{301}, 333 \else 43, 49, 162, 262,

320, 416, 458, 468

                                                   \endcsname . . . . 14,

150, 154, 201, 242, 254, 295, 299, 330, 333, 338, 341, 410, 411, 414, 415, 417

\endinput . . . . . . . . 19

                                                   \expandafter . . . 25,

34–37, 48, 50, 69, 71, 85, 91, 97, 150, 154, 168, 174, 180, 186, 192, 201, 241, 242, 249, 251–253, 266, 286, 294, 295, 298, 299, 302, 305, 311, 319, 330, 349–351, 358–365, 375, 378

F

\fi . 45, 51, 162, 267, 292, 322, 418, 456, 457, 460, 471

\filedate . . . . . . . . . \underline{1} \fileinfo . . . . . . . . . \underline{1}

\fileversion . . . . . . . \underline{1}
\FrankenError . . . 7, \underline{477}
\FrankenInfo . . . . . .

… 7, 122, 131, 140, 148, 160, \underline{477}

\FrankenWarning . 7, \underline{477}

G

\g@prependto@macro .

. . . . . . . . . 4, \underline{165} \GDebug . . . . . . . . 7, \underline{430}

\GenericError . . . . . 483
\GenericInfo . . . . . . 490
\GenericWarning . . . 478

\Global . . . . . . . . 4, \underline{210} \global . . . . . . 187,

234, 426–428, 436 \Gobble . . . . . . . . 6, \underline{380} \GobbleM 6, \underline{380}, 473–476 \GobbleMM . . . . . . 6, \underline{380} \GobbleMO . . . . . . 6, \underline{380} \GobbleO . . . . . . . 6, \underline{380} \GobbleOM . . . . . . 6, \underline{380}

\GVerboseErrors . . .

. . . . . . 6, \underline{420}, 469

H

\HaveECitationS . . . . \underline{1}

I

\if@tempswa . . . . . . . 47
\IfElement . . . . . 31, 32
\IfElement*\lips{}\string\In

. . . . . . . . . . . . \underline{31}

\IfElement\lips␣␣{}\In

. . . . . . . . . . . . . 2

\IfElement\lips{}\string\In

. . . . . . . . . . . . \underline{31}

\ifmmode . . . . . . . . . 260 \ifnum …. 440, 448, 452 \ifx … 38, 289, 313, 465 \In . . . . . . . . . . . . . 14 \Init@CS . . . . . . . 76, 78

\Init@Name . . . . . 82, 84

\InitCS . . . . . . . . . 2, \underline{75} \InitCS* . . . . . . . . 2, \underline{75} \InitName . . . . . . . 2, \underline{75}

\InitName* . . . . . . 2, \underline{75}

J

\JusTLoaDInformatioN 12

L

\l@ngrel@x 56, 59, 79,

214, 221, 348, 371

\leavevmode . . . . . . . 263

\let …. 56, 59, 115, 198, 201, 207, 234, 274, 297, 302, 305, 357, 432, 436, 441, 459

\lg@addto@macro . 4, \underline{165}
\lg@prependto@macro

. . . . . . . . . 4, \underline{165} \long . . . . . 59, 175, 193

\LongEmpty . . . . . . 2, \underline{75}
\lowercase . . . . . . . 319

M

\m@ne . . . . . . . . . . . . 459

\makeatletter . . . . . . 9
\makeatother . . . . . . 18

\md@debug . 433, 437, 439

\md@maybe@global . . \underline{430}

\meaning … 39, 44, 286

\MessageBreak . . . . .

. 123, 132, 149, 161

N

\NeedsTeXFormat . . . 21
\new@@robustcommand  \underline{258}
\new@command . . 208, 298

\new@name . . . . . . . . \underline{210}

\new@robustcommand . \underline{258}
\new@userinfo . . . . . \underline{307}
\newboolean . 3, \underline{118}, 398

                          \newcommand . . . . . . .

. 23, 31, 53, 54, 64, 67, 69, 75, 78, 81, 84, 87, 90, 91, 93, 96, 108, 113, 118, 127, 136, 144, 156, 167, 173, 179, 185, 191, 197, 200, 203, 206, 210, 213, 216, 219, 229, 232, 237, 240, 244, 247, 258, 270, 273, 282, 301, 304, 307, 310, 329, 332, 336, 340, 344, 353, 367, 370, 385, 392, 397, 406, 413, 420, 425, 431, 435, 439, 477, 482, 489

                          \newcounter . . . . . . . 146
                          \newlength . . . . . . . 129

\newlet . . . . . . . . . .

3, \underline{108}, 330, 380, 381, 384, 473–476

\NewName . 4, 97, \underline{210}, 324, 347, 356, 374, 377, 382, 390

\NewName* . . . . . . 4, \underline{210}

                          \NewRobustCommand 4, \underline{258}
                          \newsavebox . . . . . . . 138
                          \NewTextFontCommand

. . . . . . . . . 4, \underline{258}

                          \newtokens . 3, \underline{108}, 165
                          \NewUserInfo . . . . 4, \underline{307}
                          \NewUserInfo* . . . 4, \underline{307}
                          \nfss@text . . . . . . . 261
                          \noexpand . . . . . . . .

. 290, 291, 293, 294, 315, 324, 325

\number . . . . . . . . . . 150

O \on@line . . . . . 467, 470

P \PPOptArg . . . . . . . \underline{1}, 22

\prependto@macro 4, \underline{165}

\protect 122, 123, 131, 132, 140, 141, 148, 160, 161, 293

\provideboolean . 3, \underline{118}
\providecounter . 3, \underline{118}
\providelength . . 3, \underline{118}
\providesavebox . 3, \underline{118}
\ProvidesPackage . . 22
\providetokens . . 3, \underline{118}

R

\relax . . . . . 56, 230,

234, 274, 432, 465

\renewcommand . . . . . 325
\require@command . . \underline{64}
\require@name . . . . . \underline{237}
\requirecommand . . .

. . . . . . . 3, \underline{64}, 153

\requirecommand* . . \underline{64}
\RequireName . . . . 4, \underline{237}
\RequireName* . . . 4, \underline{237}
\Reserve@CS . . . . . 88, 90
\Reserve@Name . . . 94, 96
\ReserveCS . . 2, \underline{75},

101–107, 311, 430

\ReserveCS* . . . . . . . \underline{75}
\reserved@a . . 24, 27,

223, 242, 283, 289

\reserved@b 284–286, 289
\ReserveName . . . . . .

3, \underline{75}, 337, 408, 409

\ReserveName* . . . . . \underline{75}
\RestoreCS . . . . . 3, 332
\RestoreDoXVarS . . . 17

                          \RestoreName . . . . 3, 340

S \SaveCS . . . . . . . . 3, 329

                          \SaveDoXVarS . . . . . . 13

\SaveName . . . . . . 3, 336

                          \sc@eExecute . . . . . . \underline{344}
                          \sc@EExpand . . . . . . . \underline{344}
                          \sc@eExpand . . . . . . . \underline{344}

\sc@global \underline{210}, 415, 417

                          \sc@gobbleOM . . . . . . \underline{380}
                          \sc@star@nothing . .

… \underline{53}, 69, 71, 85, 91, 97, 241, 249, 253, 311, 324, 325, 349, 357

                          \sc@star@or@long . .

. . . . . . \underline{53}, 65, 82, 88, 94, 245, 308, 345, 354, 368

\sc@t@a . . 35, 38, 39, \underline{101}, 274, 276, 280, 314, 319, 323, 327, 338, 348, 351, 361, 365, 371, 372, 441, 459, 466, 469

\sc@t@b \underline{101}, 312, 313, 315, 321, 324, 349, 350, 363, 364

\sc@t@c \underline{101}, 357, 360, 363

\sc@t@d . . . . . . . . . . \underline{101}
\sc@t@e . . . . . . . . . . \underline{101}
\sc@t@f . . . . . . . . . . \underline{101}
\sc@t@g . . . . . . . . . . \underline{101}

                                                   \sc@toks@a . . . . . . . \underline{165}
                                                   \ShortEmpty . . 2, \underline{75}, 313
                                                   \showboxbreadth 422, 427
                                                   \showboxdepth . 423, 428

\space . . . . . . 7, 122,

131, 140, 148, 160 \string 25, 40, 44, 283,

295, 299, 316, 321, 330, 333, 334

                                                   \strip@prefix . . . . . 286

T

                                                   \text@command . . . . . 264

\the . . 124, 133, 170,

176, 182, 188, 194

                                                   \ToggleBoolean . . 6, \underline{413}
                                                   \tracingcommands . . 464
                                                   \tracingmacros . . . . 463
                                                   \tracingoutput . . . . 461
                                                   \tracingpages . . . . . 462

\typeout . . 443, 446, 450, 454, 467, 470

U

                                                   \UndefineCS . . 3, 12, \underline{197}
                                                   \UndefineName . . . . .

. . 3, \underline{197}, 334, 342

                                                   \usepackage . . . . . . . 15

V

                                                   \VerboseErrors . . . .

. . . . . . 6, \underline{420}, 466

X

                                                   \x@protect . . . . . . . 290

\xdef . . . . . . . . 175, 193