TeX Primitive Control Sequences
(Alphabetical Order)

© Copyright 1998-1999, David Bausum. All Rights Reserved.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

- (discretionary hyphen)dinserts a discretionary hyphen.
/ (italic correction)cinserts an italic correction.
\] (control space)cinserts a control space.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

abovedis equivalent to `\abovewithdelims..'.
abovedisplayshortskippgis alternate glue placed before a displayed equation.
abovedisplayskippgis normal glue placed before a displayed equation.
abovewithdelimscis a generalized fraction command.
accentcplaces an accent on a character.
adjdemeritspiholds the demerits for visually incompatible adjacent lines.
advancecincreases or decreases a numeric variable.
afterassignmentcsaves a token and inserts it after the next assignment.
aftergroupcsaves a token and inserts it after the current group is complete.
atopdis equivalent to `\atopwithdelims..'.
atopwithdelimsdis a generalized fraction command with an invisible fraction bar.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

badnessiqis 0-10,000 and represents the badness of the glue settings in the last constructed box.
baselineskippgis glue added between lines to keep their baselines consistently spaced.
batchmodecacts like pressing Q in response to an error.
begingroupcstarts a group that must be ended by \endgroup.
belowdisplayshortskippgis alternate glue placed after a displayed equation.
belowdisplayskippgis normal glue placed after a displayed equation.
binoppenaltypiis the penalty for a line break after a binary operation.
botmarkcis the mark text most recently encountered on a page.
boxcputs the box's contents in the current list and empties the box.
boxmaxdepthpdis the maximum possible depth of a vertical box.
brokenpenaltypiis the penalty added after a line ending with an hyphenated word.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

catcodeiqholds the category code for a character.
charcprovides access to one of the 256 characters in a font.
chardefiqprovides an alternate way to define a control sequence that returns a character.
cleaderscinsert centered leaders.
closeinccloses an auxiliary file opened for reading.
closeoutccloses an auxiliary file opened for writing.
clubpenaltypiis the penalty added after the first line in a paragraph.
copycputs the box's contents in the current list but does not empty the box.
countiqassigns an integer to a \count register.
countdefccreates a symbolic name for a \count register.
crcis a visible command which ends one row in a table.
crcrcis an alternate to \cr.
csnamecforms a control sequence name from the characters making up a collection of tokens.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

daypiholds the current day of the month (1-31).
deadcyclesiqis the number of times \output was called since the last \shipout.
defcdefines a macro.
defaulthyphencharpiis the \hyphenchar value to use when a new font is loaded.
defaultskewcharpiis -1 or the \skewchar value for a font when it is loaded.
delcodeiqis -1 or the delimiter code for a character.
delimitercspecifies a delimiter.
delimiterfactorpiis the first parameter used to compute the size of delimeters required by \left and \right.
delimitershortfallpdis the second parameter used to compute the size of delimeters required by \left and \right.
dimeniqassigns a <dimen> to a \dimen register.
dimendefccreates a symbolic name for a \dimen register.
discretionarycspecifies a discretionary break in a paragraph.
displayindentpdis the shift amount of a line holding displayed equation.
displaylimitscrestores normal conventions for using limits with operators.
displaystylecselects display style: D or D'.
displaywidowpenaltypiis the penalty added after the penultimate line immediately preceeding a display.
displaywidthpdis the width of the line holding a displayed equation.
dividecdivides a register by an integer.
doublehyphendemeritspiholds the demerits added if two consecutive lines end with discretionary breaks.
dpiqis the depth of a box.
dumpcoutputs a format file in INITEX; otherwise it is equivalent to \end.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

edefcis similar to \def, except control sequences in the replacement text are expanded when the definition is made.
elsecbegins the false part of a conditional.
emergencystretchpdis glue used in the third pass made for bad paragraphs.
endcterminates the current job.
endcsnamecis used with \csname to make a control sequence name.
endgroupcends a group that was begun by \begingroup.
endinputcstops input from a file at the end of the current line.
endlinecharpiis the character added at end of input lines.
eqnocputs an equation number at the right-hand margin.
errhelpptis text displayed on the terminal if h is pressed after an \errmessage.
errmessagecdisplays text on the terminal and interrupts the program.
errorcontextlinespiis the number of lines to display on the terminal at an error.
errorstopmodecswitches to normal interaction for processing errors.
escapecharpiis the character used for category 0 characters when outputting control sequences.
everycrptholds tokens inserted after every \cr or nonredundent \crcr.
everydisplayptholds tokens inserted at the start of every switch to display math mode.
everyhboxptholds tokens inserted at the start of every hbox.
everyjobptholds tokens which are inserted at the start of every job.
everymathptholds tokens inserted at the start of every switch to math mode.
everyparptholds tokens added at the beginning of every paragraph.
everyvboxptholds tokens inserted at the start of every vbox.
exhyphenpenaltypiis the penalty for a line break after an explicit hyphen.
expandafterc`<token1><token2>' is equivalent to `<token1> expansion of <token2>'.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

fampiif 0-15, specifies the font family of class 7 (variable) math symbols.
ficis the concluding command of a conditional.
finalhyphendemeritspiholds the demerits added if the penultimate line in a paragraph ends with a discretionary break.
firstmarkcis the mark text first encountered on a page.
floatingpenaltypiis the penalty for insertions that are split between pages.
fontiqloads information about a font into TeX's memory.
fontdimeniqholds font paramaters.
fontnamecreturns the system file name for a font.
futureletc`<cs> <token1> <token2>' is equivalent to `\let <cs> = <token2> <token1> <token2>'.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

gdefdis equivalent to `\global\def'.
globalcis an assignment prefix which makes the assignment transcend its group.
globaldefspiif positive, all assignments are global; if negative, \global is ignored.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

haligncbegins the horizontal alignment of material (i.e., makes a table containing rows).
hangafterpiis the number of lines before hanging indentation changes.
hangindentpdis the amount of hanging indentation.
hbadnesspiis the badness above which bad hboxes are reported.
hboxcconstructs a box holding horizontal material.
hfildinserts first order infinitely stretchable horizontal glue in a horizontal or math list.
hfilldinserts second order infinitely stretchable horizontal glue in a horizontal or math list.
hfilnegdcancels the stretchability of \hfil.
hfuzzpdis the overrun allowed before overfull hboxes are reported.
hoffsetpdis a value added to the default 1-inch left margin.
holdinginsertspiis positive if insertions should remain dormant when \output is called.
hrulecmakes a rule box in vertical mode.
hsizepdis the width of normal lines in a paragraph.
hskipcinserts horizontal glue in a horizontal or math list.
hssdinserts infinitely stretchable and shrinkable horizontal glue in a horizontal or math list.
htiqis the height of a box.
hyphenationcadds words to the hyphenation exception dictionary for the current language.
hyphenchariqholds the current hyphen character used with hyphenation.
hyphenpenaltypiis the penalty for a line break after a discretionary hyphen.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

ifctests if two tokens have the same character codes (i.e., values 0-256).
ifcasecbegins a multi-case conditional.
ifcatctests if two tokens have the same category codes (i.e., values 0-16).
ifdimccompares two dimensions.
ifeofctests for the end of a file.
iffalsecis a conditional which is always false.
ifhboxcis true if a box register contains an \hbox.
ifhmodecis true if TeX is in horizontal or restricted horizontal mode.
ifinnercis true if TeX is in internal vertical, restricted horizontal, or nondisplay math mode.
ifmmodecis true if TeX is in math or display math mode.
ifnumccompares two integers.
ifoddctests for an odd integer.
iftruecis a conditional which is always true.
ifvboxcis true if a box register contains a \vbox.
ifvmodecis true if TeX is in vertical or internal vertical mode.
ifvoidcis true if a box register is void.
ifxctests if two tokens are the same.
ignorespacescmakes TeX read and expand tokens but do nothing until a nonspace token is reached.
immediatecperforms the following output command without waiting for \shipout.
indentcbegins a new paragraph indented by \parindent.
inputcinserts a file at the current position in the source file.
inputlinenoiqholds the line number of the line last read in the current input file.
insertcplaces material into an insertions class.
insertpenaltiesiqis a quantity used by TeX in two different ways.
interlinepenaltypiis the penalty added between lines in a paragraph.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

jobnamecis the underlying file name for a job.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

kerncadds a kern item to the current list.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

languagepiselects a language to use with hyphenation and \patterns.
lastboxcis void or the last hbox or vbox on the current list.
lastkerniqis the last kern on the current list or is 0.0 pt.
lastpenaltyiqis either the last penalty on the current list or 0.
lastskipiqis either the last glue or muglue on the current list or 0.0 pt.
lccodeiqholds the lowercase value for a character.
leaderscfill space using specified glue with a box or rule.
leftcmakes TeX calculate the size of the delimiter needed at the left of a subformula.
lefthyphenminpiis the minimum number of characters that must appear before the first hyphen in an hyphenated word.
leftskippgis glue added at the left of every line in a paragraph.
leqnocputs an equation number at the left-hand margin.
letcgives a control sequence a token's current meaning.
limitscdisplays limits above and below large operators (class 1).
linepenaltypiis an amount added to the \badness calculated for every line in a paragraph.
lineskippgis alternate interline glue used if the \baselineskip glue is not feasible.
lineskiplimitpdis the cutoff used to select between \baselineskip and \lineskip.
longcis a prefix for definitions which require multi-paragraph arguments.
loosenesspitells TeX to try and increase or decrease the number of lines in a paragraph.
lowercshifts a box down and appends it to the current horizontal or math list.
lowercasecconverts tokens to lowercase.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

magpiholds the magnification ratio times 1000.
markcspecifies text which should be marked.
mathaccentcmakes an accent atom from the mathchar and the following item.
mathbincassigns class 2 (binary operation) to the following character or subformula.
mathcharcspecifies a math character by giving its class, family, and font position.
mathchardefdprovides an alternate way to define a control sequence that returns a math character.
mathchoicecspecifies specific subformulas for the 4 main styles.
mathclosecassigns class 5 (closing) to the following character or subformula.
mathcodeiqholds the math character (15-bit number) for each of the 256 characters with which TeX works.
mathinnercmakes an inner atom holding the math field.
mathopcassigns class 1 (large operator) to following character or subformula.
mathopencassigns class 4 (opening) to following character or subformula.
mathordcassigns class 0 (ordinary) to following character or subformula.
mathpunctcassigns class 6 (punctuation) to following character or subformula.
mathrelcassigns class 3 (relation) to following character or subformula.
mathsurroundpdis extra space added when switching in and out of math mode.
maxdeadcyclespiis the maximum allowed value of \deadcycles before an error is generated.
maxdepthpdis the maximum depth of boxes on the main page.
meaningcadds characters describing a token to the output stream.
medmuskippmis ``medium'' math glue inserted into formulas.
messagecwrites an expanded token list on the terminal and to the log file.
mkerncadds a math kern item to the current math list.
monthpiholds the current month of the year (1-12).
moveleftcshifts a box left and appends it to the current vertical list.
moverightcshifts a box right and appends it to the current vertical list.
mskipcadds math glue to the current math list.
multiplycmultiplies a register by an integer.
muskipiqassigns <muglue> to a \muskip register.
muskipdefccreates a symbolic name for a \muskip register.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

newlinecharpiis the character which begins a new line of output.
noaligncinserts vertical mode material after a \cr in a table.
noboundarycif present, breaks ligatures and kerns.
noexpandcprevents the expansion of the following token.
noindentcbegins a new paragraph that is not indented.
nolimitscdisplays limits to the right of large operators (class 1).
nonscriptcignores immediately following glue or kern in script and scriptscript styles.
nonstopmodecacts like pressing R in response to an error.
nulldelimiterspacepdis the width of a null or missing delimiter.
nullfontiqis a predefined font with no characters.
numbercproduces the decimal equivalent of numbers.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

omitcis used in the body of a table to change an entry's template from the one in the preamble.
openincopens an auxiliary file for reading.
openoutcopens an auxiliary file for writing.
orcseparates cases in an \ifcase conditional.
outercis a prefix for a definition which restricts where the definition may be used.
outputptholds the token list used to typeset one page.
outputpenaltypiholds the penalty from the current page break.
overdis equivalent to `\overwithdelims..'.
overfullrulepdis the width of the rule appended to an overfull box.
overlinecputs a line over the following character or subformula.
overwithdelimsdis a generalized fraction command with preset fraction bar thickness.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

pagedepthiqis the actual depth of the last box on the main page.
pagefilllstretchiqis the amount of third-order infinite stretchability in the current page.
pagefillstretchiqis the amount of second-order infinite stretchability in the current page.
pagefilstretchiqis the amount of first-order infinite stretchability in the current page.
pagegoaliqis the desired height of the current page.
pageshrinkiqis the amount of finite shrinkability in the current page.
pagestretchiqis the amount of finite stretchability in the current page.
pagetotaliqis the accumulated height of the current page.
parcis an explicit command to end a paragraph.
parfillskippgis glue which finishs the last line of a paragraph.
parindentpdis the width of indentation at the beginning of a paragraph.
parshapeiqspecifies an arbitrary paragraph shape.
parskippgis extra glue put between paragraphs.
patternscis used in INITEX to add patterns to the pattern dictionary for the current language.
pausingpiif positive, the program halts after every line is read from the input file and waits for a response from the user.
penaltycadds a penalty to the current list.
postdisplaypenaltypiis the penalty added immediately after a math display.
predisplaypenaltypiis the penalty added immediately before a math display.
predisplaysizepdis the effective width of the line preceeding a displayed equation.
pretolerancepiis the acceptable \badness of lines in a paragraph before hyphenation is attempted.
prevdepthiqis the depth of the last box added to the current vertical list.
prevgrafiqis the number of lines in the paragraph most recently completed or partially completed.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

radicalcmakes a radical atom from the delimiter (27-bit number) and the math field.
raisecshifts a box up and appends it to the current horizontal or math list.
readcreads one or more lines from an auxiliary file.
relaxcis a control sequence which typesets nothing.
relpenaltypiis the penalty for a line break after a relation.
rightcmakes TeX calculate the size of the delimiter needed at the right of a subformula.
righthyphenminpiis the minimum number of characters that must appear after the last hyphen in an hyphenated word.
rightskippgis glue added at the right of every line in a paragraph.
romannumeralcconverts a number to lowercase roman numerals.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

scriptfontiqspecifies the script font for a family.
scriptscriptfontiqspecifies the scriptscript font for a family.
scriptscriptstylecselects scriptscript style: SS or SS'.
scriptspacepdis extra space added after a subscript or a superscript.
scriptstylecselects script style: S or S'.
scrollmodecacts like pressing S in response to an error.
setboxcassigns an hbox, vbox, or vtop to a box register.
setlanguagecinserts a language whatsit in restricted horizontal mode.
sfcodeiqholds the space factor value for a character.
shipoutcsends the contents of a box to the dvi file.
showcwrites a token's definition on the terminal and to the log file.
showboxcwrites the contents of a box to the log file.
showboxbreadthpiis the maximum number of items per level written by \showbox and \showlists.
showboxdepthpiis the maximum level written by \showbox and \showlists.
showlistscwrites information about current lists to the log file.
showthecwrites a value on the terminal and to the log file and interrupts the program.
skewchariqis -1 or the character used to fine-tune the positioning of math accents.
skipiqassigns <glue> to a \skip register.
skipdefccreates a symbolic name for a \skip register.
spacefactoriqcontrols interword spacing.
spaceskippgis alternate interword glue.
spanccombines adjacent entries in a table into a single entry.
specialcsends material to the dvi file for special processing.
splitbotmarkcis the mark text of the last mark in the most recent \vsplit operation.
splitfirstmarkcis the mark text of the first mark in the most recent \vsplit operation.
splitmaxdepthpdis the maximum depth of boxes created by \vsplit.
splittopskippgis special glue placed inside the box created by \vsplit.
stringcconverts a control sequence to characters.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

tabskippgis optional glue put between columns in a table.
textfontiqspecifies the text font for a family.
textstylecselects text style: T or T'.
thecreturns character tokens for an internal quantity's or parameter's current value.
thickmuskippmis ``thick'' math glue inserted into formulas.
thinmuskippmis ``thin'' math glue inserted into formulas.
timepiholds the current time in minutes after midnight (0-1439).
toksiqassigns <replacement text> to a \toks register.
toksdefccreates a symbolic name for a \toks register.
tolerancepiis the acceptable \badness of lines after hyphenation.
topmarkcis the value of \botmark on the previous page.
topskippgis special glue added before the first box on each page.
tracingcommandspiif positive, writes commands to the log file.
tracinglostcharspiif positive, writes characters not in current font to the log file.
tracingmacrospiif positive, writes to the log file when expanding macros and arguments.
tracingonlinepiif positive, writes diagnostic output to the terminal as well as to the log file.
tracingoutputpiif positive, writes contents of shipped out boxes to the log file.
tracingpagespiif positive, writes the page-cost calculations to the log file.
tracingparagraphspiif positive, writes a summary of the line-breaking calculations to the log file.
tracingrestorespiif positive, writes save-stack details to the log file.
tracingstatspiif positive, writes memory usage statistics to the log file.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

uccodeiqholds the uppercase value for a character.
uchyphpiprevents hyphenation of uppercase words unless this is positive.
underlinecputs a line under the following character or subformula.
unhboxcputs unwrapped hbox contents in the current list and empties the box.
unhcopycputs unwrapped hbox contents in the current list but does not empty the box.
unkerncremoves a kern from the current list.
unpenaltycremoves a penalty from the current list.
unskipcremoves a glue item from the current list.
unvboxcputs unwrapped vbox contents in the current list and empties the box.
unvcopycputs unwrapped vbox contents in the current list but does not empty the box.
uppercasecconverts tokens to uppercase.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

vadjustcinserts a vertical list between two lines in a paragraph.
valigncbegins the vertical alignment of material (i.e., makes a table containing columns).
vbadnesspiis the badness above which bad vboxes are reported.
vboxcconstructs a box holding vertical material.
vcenterccenters material with respect to the axis.
vfildinserts first order infinitely stretchable vertical glue in a vertical list.
vfilldinserts second order infinitely stretchable vertical glue in a vertical list.
vfilnegdcancels the stretchability of \vfil.
vfuzzpdis the overrun allowed before overfull vboxes are reported.
voffsetpdis a value added to the default 1-inch top margin.
vrulecmakes a rule box in horizontal mode.
vsizepdis the desired height of the current page.
vskipcinserts vertical glue in a vertical list.
vsplitcremoves a specified amount of material from a box register.
vssdinsert infinitely stretchable and shrinkable vertical glue in a vertical list.
vtopcis an alternate way to construct a box holding vertical material.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

wdiqis the width of a box.
widowpenaltypiis the penalty added after the penultimate line in a paragraph.
writecwrites material to an auxiliary file.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

xdefdis equivalent to `\global\edef'.
xleaderscinsert expanded leaders.
xspaceskippgis alternate intersentence glue.

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

Control Sequences

Type

Description

yearpiholds the current year (e.g., 2000).

top a b c d e f g h i j k l m n o p r s t u v w x y (family order)

© Copyright 1998-1999, David Bausum. All Rights Reserved.

TeX Primitive Control Sequences
(Family Order)

© Copyright 1998-1999, David Bausum. All Rights Reserved.

Control Sequences
FamilyNULLTypeDescription
BoxLogic-cCommand
CharacterMacro-dDerived Command
DebuggingMarks-iqInternal Quantity
File I/OMath-piParameter (integer)
FontsPage-pdParameter (dimen)
GlueParagraph-pgParameter (glue)
HyphenationPenalties-pmParameter (muglue)
InsertsRegisters-ptParameter (token)
JobTables---
Kern----

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Box

Type

Description

badnessiqis 0-10,000 and represents the badness of the glue settings in the last constructed box.
boxcputs the box's contents in the current list and empties the box.
boxmaxdepthpdis the maximum possible depth of a vertical box.
cleaderscinsert centered leaders.
copycputs the box's contents in the current list but does not empty the box.
dpiqis the depth of a box.
everyhboxptholds tokens inserted at the start of every hbox.
everyvboxptholds tokens inserted at the start of every vbox.
hbadnesspiis the badness above which bad hboxes are reported.
hboxcconstructs a box holding horizontal material.
hfuzzpdis the overrun allowed before overfull hboxes are reported.
hrulecmakes a rule box in vertical mode.
htiqis the height of a box.
lastboxcis void or the last hbox or vbox on the current list.
leaderscfill space using specified glue with a box or rule.
overfullrulepdis the width of the rule appended to an overfull box.
prevdepthiqis the depth of the last box added to the current vertical list.
setboxcassigns an hbox, vbox, or vtop to a box register.
unhboxcputs unwrapped hbox contents in the current list and empties the box.
unhcopycputs unwrapped hbox contents in the current list but does not empty the box.
unvboxcputs unwrapped vbox contents in the current list and empties the box.
unvcopycputs unwrapped vbox contents in the current list but does not empty the box.
vbadnesspiis the badness above which bad vboxes are reported.
vboxcconstructs a box holding vertical material.
vfuzzpdis the overrun allowed before overfull vboxes are reported.
vrulecmakes a rule box in horizontal mode.
vtopcis an alternate way to construct a box holding vertical material.
wdiqis the width of a box.
xleaderscinsert expanded leaders.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Character

Type

Description

\] (control space)cinserts a control space.
accentcplaces an accent on a character.
catcodeiqholds the category code for a character.
charcprovides access to one of the 256 characters in a font.
chardefiqprovides an alternate way to define a control sequence that returns a character.
endlinecharpiis the character added at end of input lines.
escapecharpiis the character used for category 0 characters when outputting control sequences.
lccodeiqholds the lowercase value for a character.
lowercasecconverts tokens to lowercase.
newlinecharpiis the character which begins a new line of output.
numbercproduces the decimal equivalent of numbers.
romannumeralcconverts a number to lowercase roman numerals.
sfcodeiqholds the space factor value for a character.
stringcconverts a control sequence to characters.
uccodeiqholds the uppercase value for a character.
uppercasecconverts tokens to uppercase.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Debugging

Type

Description

batchmodecacts like pressing Q in response to an error.
errhelpptis text displayed on the terminal if h is pressed after an \errmessage.
errmessagecdisplays text on the terminal and interrupts the program.
errorcontextlinespiis the number of lines to display on the terminal at an error.
errorstopmodecswitches to normal interaction for processing errors.
meaningcadds characters describing a token to the output stream.
messagecwrites an expanded token list on the terminal and to the log file.
nonstopmodecacts like pressing R in response to an error.
pausingpiif positive, the program halts after every line is read from the input file and waits for a response from the user.
scrollmodecacts like pressing S in response to an error.
showcwrites a token's definition on the terminal and to the log file.
showboxcwrites the contents of a box to the log file.
showboxbreadthpiis the maximum number of items per level written by \showbox and \showlists.
showboxdepthpiis the maximum level written by \showbox and \showlists.
showlistscwrites information about current lists to the log file.
showthecwrites a value on the terminal and to the log file and interrupts the program.
tracingcommandspiif positive, writes commands to the log file.
tracinglostcharspiif positive, writes characters not in current font to the log file.
tracingmacrospiif positive, writes to the log file when expanding macros and arguments.
tracingonlinepiif positive, writes diagnostic output to the terminal as well as to the log file.
tracingoutputpiif positive, writes contents of shipped out boxes to the log file.
tracingpagespiif positive, writes the page-cost calculations to the log file.
tracingparagraphspiif positive, writes a summary of the line-breaking calculations to the log file.
tracingrestorespiif positive, writes save-stack details to the log file.
tracingstatspiif positive, writes memory usage statistics to the log file.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

File I/O

Type

Description

closeinccloses an auxiliary file opened for reading.
closeoutccloses an auxiliary file opened for writing.
endinputcstops input from a file at the end of the current line.
immediatecperforms the following output command without waiting for \shipout.
inputcinserts a file at the current position in the source file.
inputlinenoiqholds the line number of the line last read in the current input file.
openincopens an auxiliary file for reading.
openoutcopens an auxiliary file for writing.
outputptholds the token list used to typeset one page.
readcreads one or more lines from an auxiliary file.
shipoutcsends the contents of a box to the dvi file.
specialcsends material to the dvi file for special processing.
writecwrites material to an auxiliary file.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Fonts

Type

Description

/ (italic correction)cinserts an italic correction.
fontiqloads information about a font into TeX's memory.
fontdimeniqholds font paramaters.
fontnamecreturns the system file name for a font.
nullfontiqis a predefined font with no characters.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Glue

Type

Description

hfildinserts first order infinitely stretchable horizontal glue in a horizontal or math list.
hfilldinserts second order infinitely stretchable horizontal glue in a horizontal or math list.
hfilnegdcancels the stretchability of \hfil.
hskipcinserts horizontal glue in a horizontal or math list.
hssdinserts infinitely stretchable and shrinkable horizontal glue in a horizontal or math list.
lastskipiqis either the last glue or muglue on the current list or 0.0 pt.
unskipcremoves a glue item from the current list.
vfildinserts first order infinitely stretchable vertical glue in a vertical list.
vfilldinserts second order infinitely stretchable vertical glue in a vertical list.
vfilnegdcancels the stretchability of \vfil.
vskipcinserts vertical glue in a vertical list.
vssdinsert infinitely stretchable and shrinkable vertical glue in a vertical list.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Hyphenation

Type

Description

- (discretionary hyphen)dinserts a discretionary hyphen.
defaulthyphencharpiis the \hyphenchar value to use when a new font is loaded.
discretionarycspecifies a discretionary break in a paragraph.
hyphenationcadds words to the hyphenation exception dictionary for the current language.
hyphenchariqholds the current hyphen character used with hyphenation.
languagepiselects a language to use with hyphenation and \patterns.
lefthyphenminpiis the minimum number of characters that must appear before the first hyphen in an hyphenated word.
patternscis used in INITEX to add patterns to the pattern dictionary for the current language.
righthyphenminpiis the minimum number of characters that must appear after the last hyphen in an hyphenated word.
setlanguagecinserts a language whatsit in restricted horizontal mode.
uchyphpiprevents hyphenation of uppercase words unless this is positive.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Inserts

Type

Description

holdinginsertspiis positive if insertions should remain dormant when \output is called.
insertcplaces material into an insertions class.
insertpenaltiesiqis a quantity used by TeX in two different ways.
splitbotmarkcis the mark text of the last mark in the most recent \vsplit operation.
splitfirstmarkcis the mark text of the first mark in the most recent \vsplit operation.
splitmaxdepthpdis the maximum depth of boxes created by \vsplit.
splittopskippgis special glue placed inside the box created by \vsplit.
vsplitcremoves a specified amount of material from a box register.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Job

Type

Description

daypiholds the current day of the month (1-31).
deadcyclesiqis the number of times \output was called since the last \shipout.
dumpcoutputs a format file in INITEX; otherwise it is equivalent to \end.
endcterminates the current job.
everyjobptholds tokens which are inserted at the start of every job.
jobnamecis the underlying file name for a job.
magpiholds the magnification ratio times 1000.
maxdeadcyclespiis the maximum allowed value of \deadcycles before an error is generated.
monthpiholds the current month of the year (1-12).
timepiholds the current time in minutes after midnight (0-1439).
yearpiholds the current year (e.g., 2000).

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Kern

Type

Description

kerncadds a kern item to the current list.
lastkerniqis the last kern on the current list or is 0.0 pt.
lowercshifts a box down and appends it to the current horizontal or math list.
moveleftcshifts a box left and appends it to the current vertical list.
moverightcshifts a box right and appends it to the current vertical list.
raisecshifts a box up and appends it to the current horizontal or math list.
unkerncremoves a kern from the current list.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Logic

Type

Description

elsecbegins the false part of a conditional.
ficis the concluding command of a conditional.
ifctests if two tokens have the same character codes (i.e., values 0-256).
ifcasecbegins a multi-case conditional.
ifcatctests if two tokens have the same category codes (i.e., values 0-16).
ifdimccompares two dimensions.
ifeofctests for the end of a file.
iffalsecis a conditional which is always false.
ifhboxcis true if a box register contains an \hbox.
ifhmodecis true if TeX is in horizontal or restricted horizontal mode.
ifinnercis true if TeX is in internal vertical, restricted horizontal, or nondisplay math mode.
ifmmodecis true if TeX is in math or display math mode.
ifnumccompares two integers.
ifoddctests for an odd integer.
iftruecis a conditional which is always true.
ifvboxcis true if a box register contains a \vbox.
ifvmodecis true if TeX is in vertical or internal vertical mode.
ifvoidcis true if a box register is void.
ifxctests if two tokens are the same.
orcseparates cases in an \ifcase conditional.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Macro

Type

Description

afterassignmentcsaves a token and inserts it after the next assignment.
aftergroupcsaves a token and inserts it after the current group is complete.
begingroupcstarts a group that must be ended by \endgroup.
csnamecforms a control sequence name from the characters making up a collection of tokens.
defcdefines a macro.
edefcis similar to \def, except control sequences in the replacement text are expanded when the definition is made.
endcsnamecis used with \csname to make a control sequence name.
endgroupcends a group that was begun by \begingroup.
expandafterc`<token1><token2>' is equivalent to `<token1> expansion of <token2>'.
futureletc`<cs> <token1> <token2>' is equivalent to `\let <cs> = <token2> <token1> <token2>'.
gdefdis equivalent to `\global\def'.
globalcis an assignment prefix which makes the assignment transcend its group.
globaldefspiif positive, all assignments are global; if negative, \global is ignored.
letcgives a control sequence a token's current meaning.
longcis a prefix for definitions which require multi-paragraph arguments.
noexpandcprevents the expansion of the following token.
outercis a prefix for a definition which restricts where the definition may be used.
relaxcis a control sequence which typesets nothing.
thecreturns character tokens for an internal quantity's or parameter's current value.
xdefdis equivalent to `\global\edef'.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Marks

Type

Description

botmarkcis the mark text most recently encountered on a page.
firstmarkcis the mark text first encountered on a page.
markcspecifies text which should be marked.
topmarkcis the value of \botmark on the previous page.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Math

Type

Description

abovedis equivalent to `\abovewithdelims..'.
abovedisplayshortskippgis alternate glue placed before a displayed equation.
abovedisplayskippgis normal glue placed before a displayed equation.
abovewithdelimscis a generalized fraction command.
atopdis equivalent to `\atopwithdelims..'.
atopwithdelimsdis a generalized fraction command with an invisible fraction bar.
belowdisplayshortskippgis alternate glue placed after a displayed equation.
belowdisplayskippgis normal glue placed after a displayed equation.
binoppenaltypiis the penalty for a line break after a binary operation.
defaultskewcharpiis -1 or the \skewchar value for a font when it is loaded.
delcodeiqis -1 or the delimiter code for a character.
delimitercspecifies a delimiter.
delimiterfactorpiis the first parameter used to compute the size of delimeters required by \left and \right.
delimitershortfallpdis the second parameter used to compute the size of delimeters required by \left and \right.
displayindentpdis the shift amount of a line holding displayed equation.
displaylimitscrestores normal conventions for using limits with operators.
displaystylecselects display style: D or D'.
displaywidowpenaltypiis the penalty added after the penultimate line immediately preceeding a display.
displaywidthpdis the width of the line holding a displayed equation.
eqnocputs an equation number at the right-hand margin.
everydisplayptholds tokens inserted at the start of every switch to display math mode.
everymathptholds tokens inserted at the start of every switch to math mode.
fampiif 0-15, specifies the font family of class 7 (variable) math symbols.
leftcmakes TeX calculate the size of the delimiter needed at the left of a subformula.
leqnocputs an equation number at the left-hand margin.
limitscdisplays limits above and below large operators (class 1).
mathaccentcmakes an accent atom from the mathchar and the following item.
mathbincassigns class 2 (binary operation) to the following character or subformula.
mathcharcspecifies a math character by giving its class, family, and font position.
mathchardefdprovides an alternate way to define a control sequence that returns a math character.
mathchoicecspecifies specific subformulas for the 4 main styles.
mathclosecassigns class 5 (closing) to the following character or subformula.
mathcodeiqholds the math character (15-bit number) for each of the 256 characters with which TeX works.
mathinnercmakes an inner atom holding the math field.
mathopcassigns class 1 (large operator) to following character or subformula.
mathopencassigns class 4 (opening) to following character or subformula.
mathordcassigns class 0 (ordinary) to following character or subformula.
mathpunctcassigns class 6 (punctuation) to following character or subformula.
mathrelcassigns class 3 (relation) to following character or subformula.
mathsurroundpdis extra space added when switching in and out of math mode.
medmuskippmis ``medium'' math glue inserted into formulas.
mkerncadds a math kern item to the current math list.
mskipcadds math glue to the current math list.
muskipiqassigns <muglue> to a \muskip register.
muskipdefccreates a symbolic name for a \muskip register.
nolimitscdisplays limits to the right of large operators (class 1).
nonscriptcignores immediately following glue or kern in script and scriptscript styles.
nulldelimiterspacepdis the width of a null or missing delimiter.
overdis equivalent to `\overwithdelims..'.
overlinecputs a line over the following character or subformula.
overwithdelimsdis a generalized fraction command with preset fraction bar thickness.
postdisplaypenaltypiis the penalty added immediately after a math display.
predisplaypenaltypiis the penalty added immediately before a math display.
predisplaysizepdis the effective width of the line preceeding a displayed equation.
radicalcmakes a radical atom from the delimiter (27-bit number) and the math field.
relpenaltypiis the penalty for a line break after a relation.
rightcmakes TeX calculate the size of the delimiter needed at the right of a subformula.
scriptfontiqspecifies the script font for a family.
scriptscriptfontiqspecifies the scriptscript font for a family.
scriptscriptstylecselects scriptscript style: SS or SS'.
scriptspacepdis extra space added after a subscript or a superscript.
scriptstylecselects script style: S or S'.
skewchariqis -1 or the character used to fine-tune the positioning of math accents.
textfontiqspecifies the text font for a family.
textstylecselects text style: T or T'.
thickmuskippmis ``thick'' math glue inserted into formulas.
thinmuskippmis ``thin'' math glue inserted into formulas.
underlinecputs a line under the following character or subformula.
vcenterccenters material with respect to the axis.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Page

Type

Description

hoffsetpdis a value added to the default 1-inch left margin.
maxdepthpdis the maximum depth of boxes on the main page.
pagedepthiqis the actual depth of the last box on the main page.
pagefilllstretchiqis the amount of third-order infinite stretchability in the current page.
pagefillstretchiqis the amount of second-order infinite stretchability in the current page.
pagefilstretchiqis the amount of first-order infinite stretchability in the current page.
pagegoaliqis the desired height of the current page.
pageshrinkiqis the amount of finite shrinkability in the current page.
pagestretchiqis the amount of finite stretchability in the current page.
pagetotaliqis the accumulated height of the current page.
topskippgis special glue added before the first box on each page.
voffsetpdis a value added to the default 1-inch top margin.
vsizepdis the desired height of the current page.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Paragraph

Type

Description

adjdemeritspiholds the demerits for visually incompatible adjacent lines.
baselineskippgis glue added between lines to keep their baselines consistently spaced.
doublehyphendemeritspiholds the demerits added if two consecutive lines end with discretionary breaks.
emergencystretchpdis glue used in the third pass made for bad paragraphs.
everyparptholds tokens added at the beginning of every paragraph.
finalhyphendemeritspiholds the demerits added if the penultimate line in a paragraph ends with a discretionary break.
hangafterpiis the number of lines before hanging indentation changes.
hangindentpdis the amount of hanging indentation.
hsizepdis the width of normal lines in a paragraph.
ignorespacescmakes TeX read and expand tokens but do nothing until a nonspace token is reached.
indentcbegins a new paragraph indented by \parindent.
leftskippgis glue added at the left of every line in a paragraph.
lineskippgis alternate interline glue used if the \baselineskip glue is not feasible.
lineskiplimitpdis the cutoff used to select between \baselineskip and \lineskip.
loosenesspitells TeX to try and increase or decrease the number of lines in a paragraph.
noboundarycif present, breaks ligatures and kerns.
noindentcbegins a new paragraph that is not indented.
parcis an explicit command to end a paragraph.
parfillskippgis glue which finishs the last line of a paragraph.
parindentpdis the width of indentation at the beginning of a paragraph.
parshapeiqspecifies an arbitrary paragraph shape.
parskippgis extra glue put between paragraphs.
pretolerancepiis the acceptable \badness of lines in a paragraph before hyphenation is attempted.
prevgrafiqis the number of lines in the paragraph most recently completed or partially completed.
rightskippgis glue added at the right of every line in a paragraph.
spacefactoriqcontrols interword spacing.
spaceskippgis alternate interword glue.
tolerancepiis the acceptable \badness of lines after hyphenation.
vadjustcinserts a vertical list between two lines in a paragraph.
xspaceskippgis alternate intersentence glue.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Penalties

Type

Description

brokenpenaltypiis the penalty added after a line ending with an hyphenated word.
clubpenaltypiis the penalty added after the first line in a paragraph.
exhyphenpenaltypiis the penalty for a line break after an explicit hyphen.
floatingpenaltypiis the penalty for insertions that are split between pages.
hyphenpenaltypiis the penalty for a line break after a discretionary hyphen.
interlinepenaltypiis the penalty added between lines in a paragraph.
lastpenaltyiqis either the last penalty on the current list or 0.
linepenaltypiis an amount added to the \badness calculated for every line in a paragraph.
outputpenaltypiholds the penalty from the current page break.
penaltycadds a penalty to the current list.
unpenaltycremoves a penalty from the current list.
widowpenaltypiis the penalty added after the penultimate line in a paragraph.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Registers

Type

Description

advancecincreases or decreases a numeric variable.
countiqassigns an integer to a \count register.
countdefccreates a symbolic name for a \count register.
dimeniqassigns a <dimen> to a \dimen register.
dimendefccreates a symbolic name for a \dimen register.
dividecdivides a register by an integer.
multiplycmultiplies a register by an integer.
skipiqassigns <glue> to a \skip register.
skipdefccreates a symbolic name for a \skip register.
toksiqassigns <replacement text> to a \toks register.
toksdefccreates a symbolic name for a \toks register.

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

Tables

Type

Description

crcis a visible command which ends one row in a table.
crcrcis an alternate to \cr.
everycrptholds tokens inserted after every \cr or nonredundent \crcr.
haligncbegins the horizontal alignment of material (i.e., makes a table containing rows).
noaligncinserts vertical mode material after a \cr in a table.
omitcis used in the body of a table to change an entry's template from the one in the preamble.
spanccombines adjacent entries in a table into a single entry.
tabskippgis optional glue put between columns in a table.
valigncbegins the vertical alignment of material (i.e., makes a table containing columns).

top Box Character Debugging File I/O Fonts Glue Hyphenation Inserts Job Kern Logic Macro Marks Math Page Paragraph Penalties Registers Tables (alpha order)

© Copyright 1998-1999, David Bausum. All Rights Reserved.


- (discretionary hyphen) Hyphenation
Derived Command
Synopsis: \- (discretionary hyphen)

Description:

Example:

  1. \def\tstoryA{There are cries, sobs, confusion among the people, and at
  2. that moment the cardinal himself, the Grand Inquisitor, passes by the
  3. cathedral. He is an old man . . .}
  4. \def\tstoryB{There are cries, sobs, confusion a\-mong the people, and
  5. at that moment the cardinal himself, the Grand Inquisitor, passes by
  6. the cathedral. He is an old man . . .}
  7. \setbox0=\vbox{\hsize=2.25in \tstoryA}
  8. \setbox1=\vbox{\hsize=2.25in \tstoryB}
  9. \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 455. Also: 95, 283, 287, 292, 455.

See Also: discretionary, hyphenchar.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


/ (italic correction) Fonts
Command
Synopsis: \/ (italic correction)

Description:

Example:

  1. \selffamily AA
  2.        [{\it f}]   [{\it f\/}]   [\/{\it f\/}]   {\it [}f]   {\it [\/}f\/]\par
  3. \bgroup
  4.     \font\rm=cmr12 scaled 2000
  5.     \font\it=cmti12 scaled 2000
  6.     \rm[{\it f}]   [{\it f\/}]   [\/{\it f\/}]   {\it [}f]   {\it [\/}f\/]\par
  7. \egroup\par
  8. [\R0{\it f\/}] [\R1{\it f\/}] [\R2{\it f\/}] [\R3{\it f\/}] [\R4{\it f\/}]
  9. [\R5{\it f\/}] [\R6{\it f\/}] [\R7{\it f\/}] [\R8{\it f\/}] [\R9{\it f\/}]
 10. %\def\R#1{\dimen0=0.05em\multiply\dimen0 by #1\kern\dimen0\relax}
Produces: See typeset version.

Comments:

TeXbook References: 14. Also: 14, 64, 287, 292, 306, 382, 455.

See Also: font.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


\] (control space) Character
Command
Synopsis: \] (control space)

Description:

Example:

     If there were no \]'s in \tex, using \TeX{} would be more difficult
     but not impossible.
Produces: See typeset version.

Comments:

TeXbook References: 8. Also: 8, 10, 19, 73, 74, 86-87, 154, 163, 167, 283, 285, 290, 323, 351, 381.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


above Math
Derived Command
Synopsis: \above<dimen>

Description:

Example:

  1. \def\tabove#1%
  2. {%
  3.      {{2 \over 3}\above#1 {1 \over 6}} = 
  4.      {{2 \over 3}\cdot{6 \over 1}} = {12 \over 3} = 4
  5. }
  6. $$\hbox{$\tabove{1pt}$,}\quad
  7.   \hbox{$\tabove{2pt}$,}\quad
  8.   \tabove{1pt},\quad
  9.   \tabove{2pt}$$
Produces: See typeset version.

Comments:

TeXbook References: 143, 152. Also: 143, 152, 292, 444-445.

See Also: over, atop, abovewithdelims.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


abovedisplayshortskip Math (Glue)
0pt plus 3pt * Parameter (glue)
Synopsis: \abovedisplayshortskip<glue>

Description:

Example:

     \def\tfn#1#2#3#4#5% above & below regular & short skips + post-example skip
     {%
        \abovedisplayskip=#1
        \belowdisplayskip=#2
        \abovedisplayshortskip=#3
        \belowdisplayshortskip=#4
        \hfill The Fibonacci numbers are defined\break 
        by: $F_0=1$, $F_1=1$, and
        $$F_n = F_{n-1} + F_{n-2} \hbox{, for } n \ge 2.$$ 
        A related sequence $\{v_n\}$ is: 2, 1, 3, 4, 7, 11, 18, \char144\ It
        satisfies $v_n$ = $x^n + y^n$, where $x = (1 + \sqrt 5)/ 2$ 
        and $y = (1 - \sqrt 5)/ 2$.
        \vskip#5
     }
     \tfn{12pt}{12pt}{0pt}{0pt}{1\baselineskip}
     \tfn{12pt}{12pt}{3pt}{3pt}{0pt}
Produces: See typeset version.

Comments:

TeXbook References: 189. Also: 189, 274, 348, 415.

See Also: belowdisplayshortskip, abovedisplayskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


abovedisplayskip Math (Glue)
12pt plus 3pt minus 9pt * Parameter (glue)
Synopsis: \abovedisplayskip<glue>

Description:

Example:

     \def\tfn#1#2#3#4#5% above & below regular & short skips + post-example skip
     {%
        \abovedisplayskip=#1
        \belowdisplayskip=#2
        \abovedisplayshortskip=#3
        \belowdisplayshortskip=#4
        The Fibonacci numbers are defined by: $F_0=1$, $F_1=1$, and
        $$F_n = F_{n-1} + F_{n-2} \hbox{, for } n \ge 2.$$
        A related sequence $\{v_n\}$ is: 2, 1, 3, 4, 7, 11, 18, \char144\ It
        satisfies $v_n$ = $x^n + y^n$, where $x = (1 + \sqrt 5)/ 2$ 
        and $y = (1 - \sqrt 5)/ 2$.
        \vskip#5
     }
     \tfn{3pt}{3pt}{6pt}{6pt}{1\baselineskip}
     \tfn{12pt}{12pt}{6pt}{6pt}{0pt}
Produces: See typeset version.

Comments:

TeXbook References: 189. Also: 189, 190, 194, 274, 291, 348, 415.

See Also: belowdisplayskip, abovedisplayshortskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


abovewithdelims Math
Command
Synopsis: \abovewithdelims<delim1><delim2><dimen>

Description:

Example:

  1. \def\legendre{\overwithdelims()}
  2. \def\tlA{\abovewithdelims()0.4pt}
  3. \def\tlB{\abovewithdelims()1.0pt}
  4. \def\tlC{\abovewithdelims()2.0pt}
  5. $a\legendre p$, ${a\tlA p}$, ${a\tlB p}$, and ${a\tlC p}$.
  6. $$\displaylines{{a\legendre p} = +1\hbox{,\quad if\quad}a\hbox{\ R }p,\qquad
  7.            {a\tlA p} = -1\hbox{,\quad if\quad}a\hbox{\ N }p,\qquad
  8.            {a\tlC p} = -1\hbox{,\quad if\quad}a\hbox{\ N }p.\cr}$$
Produces: See typeset version.

Comments:

TeXbook References: 152. Also: 152, 292, 444-445.

See Also: above, over, atop, overwithdelims, atopwithdelims.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


accent Character
Command
Synopsis: \accent<8-bit number><optional assignments>

Description:

Example:

  1. % Accents for 9y encoding of Caslon 224:
  2. \def\'#1{{\accent00 #1}}% acute
  3. \def\u#1{{\accent01 #1}}% breve
  4. \def\v#1{{\accent02 #1}}% hacek or check
  5. \def\^#1{{\accent04 #1}}% circumflex or hat
  6. \def\"#1{{\accent05 #1}}% umlaut
  7. \def\.#1{{\accent06 #1}}% dot (over)
  8. \def\`#1{{\accent07 #1}}% grave
  9. \def\H#1{{\accent08 #1}}% long Humgarian umlaut
 10. \def\=#1{{\accent09 #1}}% macron or bar
 11. \def\r#1{{\accent11 #1}}% ring (open dot over)
 12. \def\~#1{{\accent12 #1}}% tilde
 13. \def\d#1{{\o@lign{\relax#1\crcr\hidewidth\sh@ft{10}.\hidewidth}}}% dot (under)
 14. \def\b#1{{\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%               bar (under)
 15.     \vbox to.2ex{\hbox{\char09}\vss}\hidewidth}}}
 16. \def\c#1{\setbox\z@\hbox{#1}\dimen\z@=\dp\z@\ifdim\ht\z@=1ex\accent03 #1%cedilla
 17.   \else{\ooalign{\unhbox\z@\crcr\hidewidth\lower0.9\dimen\z@ %
 18.         \hbox{\char03}\hidewidth}}\fi}
 19. \def\o#1{\setbox\z@\hbox{#1}\dimen\z@=\dp\z@\ifdim\ht\z@=1ex\accent10 #1% ogonek
 20.   \else{\ooalign{\unhbox\z@\crcr\hidewidth\lower0.9\dimen\z@ %
 21.         \hbox{\char10}\hidewidth}}\fi}
 22. %
 23. \'A \u B \v C \^D \"E \.F \`H \H I \=J \r K \~L \d M \b N \c O \o P \o A --- 
 24. \'a \u b \v c \^d \"e \.f \`g \H h \=k \r l \~m \d n \b o \c p \o q \o a
Produces: See typeset version.

Comments:

TeXbook References: 286-287, 356. Also: 9, 54, 86, 283, 286.

See Also: char.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


adjdemerits Paragraph
10000 * Parameter (integer)
Synopsis: \adjdemerits=<number>

Description:

Example:

     \gdef\tstory{There are cries, sobs, confusion among the people,
     and at that moment the cardinal himself, the Grand Inquisitor, passes
     by the cathedral. He is an old man, almost ninety, tall and erect,
     with a withered face and sunken eyes, in which there is still a gleam
     of light. He is not dressed in his brilliant cardinal's robes, as he
     was the day before, when he was burning the enemies of the Roman
     Church~\char144\kern2em\hfill Fyodor Dostoyevsky, {\it The Brothers
     Karamazov}}
     \hsize=2.5in% The \baselineskip reference page holds the definition of \tstory
     \setbox0=\vbox{\adjdemerits=0
     \doublehyphendemerits=100000
     \finalhyphendemerits=900000
     \tstory\par}
     \setbox1=\vbox{\adjdemerits=1000000
     \doublehyphendemerits=100000
     \finalhyphendemerits=900000
     \tstory\par}
     \hbox{\box0\kern0.25in\box1}
Produces: See typeset version.

Comments:

TeXbook References: 98. Also: +98, 273, @314, @348.

See Also: doublehyphendemerits, finalhyphendemerits.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


advance Registers
Command
Synopsis: \advance<numeric variables> by <quantity>

Description:

Example:

  1. \def\tpagenumber#1% page number.
  2. {%
  3.   \bgroup
  4.      \count1=#1
  5.      \ifnum\count1 > 0
  6.           \edef\tpageA{\the\count1}%
  7.           \advance\count1 by 1
  8.           \def\tpageB{\the\count1}%
  9.      \else
 10.           \count1=-\count1% This makes the page > 0.
 11.           \edef\tpageA{\romannumeral\count1}%
 12.           \advance\count1 by 1
 13.           \def\tpageB{\romannumeral\count1}%
 14.      \fi
 15.      The current page number is: \tpageA. The next page number is: \tpageB.\par
 16.   \egroup
 17. }
 18. \tpagenumber{127}
 19. \tpagenumber{-15}
Produces: See typeset version.

Comments:

TeXbook References: 118-119. Also: 21, 118-119, 218, 256, 276, 355.

See Also: multiply, divide, count, dimen, skip, muskip.

For Related Examples, see: day, ifnum, time

© Copyright 1998-1999, David Bausum. All Rights Reserved.


afterassignment Macro
Command
Synopsis: \afterassignment<token>

Description:

Example:

  1. \def\ttrA#1{[#1]}
  2. \def\ttrB#1%
  3. {%
  4.      \setbox0=\hbox{{\selffamily AD [}}%
  5.      \setbox1=\hbox{{\selffamily AD ]}}%
  6.      \raise0.45\dp0\box0 %
  7.      {\selffamily AE  #1}%
  8.      \raise0.45\dp1\box1 %
  9. }%
 10. \def\trtC#1{\def\tpage{#1}\afterassignment\ttrD\let\next=}
 11. \def\ttrD
 12. {%
 13.      \advance\tnotenumber by 1%
 14.      \unskip
 15.      \if\next.% the workign version has other special cases: e.g., `)' `,'.
 16.           .\superscript{\the\tnotenumber}%
 17.      \else
 18.           \R1\superscript{\the\tnotenumber}\ \next
 19.      \fi
 20.      \global\setbox\tnotebox=\hbox
 21.      {%
 22.           \noindent
 23.           \unhbox\tnotebox
 24.           \superscript{\the\tnotenumber}%
 25.           \R1\tpage.\quad
 26.      }%
 27. }
 28. \def\texam#1{This example \tr{151} illustrates work-in-progress
 29. \tr{176--177}. Originally, all page references \tr{213 and 217} to
 30. {\it The TeXBook} \tr{399} in the reference pages appeared directly
 31. (e.g., |[151]|) \tr{255}. --- #1.}
 32. \let\tr=\ttrA
 33. \setbox0=\vbox{\texam1}
 34. \unvbox0\vskip1\baselineskip
 35. \let\tr=\ttrB
 36. \setbox0=\vbox{\texam2}
 37. \unvbox0\vskip1\baselineskip
 38. \let\tr=\trtC
 39. \tnotenumber=0
 40. \setbox\tnotebox=\hbox{}
 41. \setbox0=\vbox{\texam3}
 42. \unvbox0\vskip0.5\baselineskip\unhbox\tnotebox
Produces: See typeset version.

Comments:

TeXbook References: 279. Also: 215, 279, 352, 364, 376, 401.

See Also: aftergroup, expandafter, futurelet, noexpand.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


aftergroup Macro
Command
Synopsis: \aftergroup<token>

Description:

Example:

  1. \def\ta{Hello}
  2. \def\tb{ World. }
  3. \def\tc{How are you?}
  4. \begingroup
  5. \aftergroup\ta
  6. \aftergroup\tb
  7. \aftergroup\tc
  8. \let\ua=\tc
  9. \let\ub=\tb
 10. \let\uc=\ta
 11. \gdef\ta{I am}
 12. \gdef\tb{ fine. }
 13. \ua\ub\uc---\par
 14. \endgroup
 15. ---
Produces: See typeset version.

Comments:

TeXbook References: 279. Also: 215, 279, 363, 374, 377, 379.

See Also: afterassignment, expandafter, futurelet, noexpand.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


atop Math
Derived Command
Synopsis: \atop

Description:

Example:

  1. $n \atop k = n! / k!(n-k)!,$
  2. \hbox{this doesn't work. It needs a pair of braces.}\par\vskip0.5\baselineskip
  3. ${n \atop k} = n! / k!(n-k)!$, this looks okay, but it is missing ()'s.
  4. $$n \atop k = n! / k!(n-k)!,\quad
  5. \hbox{this doesn't work. It needs a pair of braces.}$$\par
  6. $${n \atop k} = {n! \over k!(n-k)!} = n! / k!(n-k)!,\quad
  7. \hbox{this looks okay, but it is missing ()'s.}$$
Produces: See typeset version.

Comments:

TeXbook References: 143, 152. Also: 143, 145, 152, 178, 292, 444.

See Also: over, above, atopwithdelims.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


atopwithdelims Math
Derived Command
Synopsis: \atopwithdelims<delim1><delim2>

Description:

Example:

  1. \def\tchoose{\atopwithdelims()}
  2. \def\tc#1#2{{#1\tchoose #2}}
  3. $\tc nk = {n \tchoose n-k} = n! / k!(n-k)!$\quad now have needed parenthesis.
  4. $$\displaylines{\hbox{Also,}\qquad{n \tchoose k} = {n! \over k!(n-k)!}= 
  5. n!/k!(n-k!).\hfill\cr}$$
  6. {\bf Theorem 75}.\quad If $p$ is a prime, then 
  7. $$\tc p1,\ \tc p2,\ldots,\ \tc p{p-1}$$ 
  8. are divisible by $p$.
Produces: See typeset version.

Comments:

TeXbook References: 152. Also: 152, 292, 324, 360, 444.

See Also: atop, abovewithdelims.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


badness Box
Internal Quantity
Synopsis: \badness

Description:

Example:

     \def\badboxes#1#2%
     {%
          \overfullrule=0.25pt
          \setbox0=\hbox spread#2{#1}%
          \count12=\the\badness
          \setbox1=\hbox to 2.5in{\box0\hfil\the\count12}%
          \box1
     }
     \badboxes{The badness of this line is: }{-1em}
     \badboxes{The badness of this line is: }{-0.5em}
     \badboxes{The badness of this line is: }{-0.3em}
     \badboxes{The badness of this line is: }{0em}
     \badboxes{The badness of this line is: }{1em}
     \badboxes{The badness of this line is: }{2em}
     \badboxes{The badness of this line is: }{3em}
Produces: See typeset version.

Comments:

TeXbook References: 29, 229. Also: 214, 229, 271.

See Also: hbadness, vbadness, pretolerance, tolerance, emergencystretch.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


baselineskip Paragraph
Parameter (glue)
Synopsis: \baselineskip=<glue>

Description:

Example:

     \parindent=2pc \hsize=4.75in% Point size in all examples is 10pt.
     \baselineskip=11.5pt\tstory\par
     \baselineskip=12pt\tstory\par
     \baselineskip=12.5pt\tstory\par
Produces: See typeset version.

Comments:

TeXbook References: 78-80, 281. Also: 78-80, 104, 194, 253, 256, 274, 281, 342, 349, 351-352, 409, 414-415.

See Also: lineskip, lineskiplimit, prevdepth.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


batchmode Debugging
Command
Synopsis: \batchmode

Description:

Example:

  1. \batchmode
  2.   .
  3.   .
  4.   .
  5. \errorstopmode
Produces: See typeset version.

Comments:

TeXbook References: 32. Also: 32, 277, 299, 336.

See Also: errorstopmode, nonstopmode, scrollmode.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


begingroup Macro
Command
Synopsis: \begingroup

Description:

Example:

  1. \catcode`\?=13
  2. \def?{\begingroup\ccflip\obeyspaces\getword}%
  3. \def\getword#1?{#1\endgroup}%
  4. Hello ?\World? How are you\char63\kern2.5pt?\char63? See you later.
Produces: See typeset version.

Comments:

TeXbook References: 21, 279. Also: 21, 249, 262, 279, 380, 407, 419.

See Also: endgroup.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


belowdisplayshortskip Math (Glue)
7pt plus 3pt minus 4pt * Parameter (glue)
Synopsis: \belowdisplayshortskip<glue>

Description:

Example:

  1. \def\tfns#1#2#3#4#5#6% 4 skips, post-example skip, L/R equation # code.
  2. {%
  3.      \abovedisplayskip=#1
  4.      \belowdisplayskip=#2
  5.      \abovedisplayshortskip=#3
  6.      \belowdisplayshortskip=#4
  7.      \hfill The Fibonacci numbers are defined\break 
  8.      by: $F_0=1$, $F_1=1$, and
  9.      $$F_n = F_{n-1} + F_{n-2} \hbox{, for } n \ge 2.
 10.      \def\temptyF{#6}
 11.      \ifx\temptyF\empty
 12.           \leqno(13.12)$$
 13.      \else
 14.           \eqno(13.12)$$
 15.      \fi
 16.      A related sequence $\{v_n\}$ is: 2, 1, 3, 4, 7, 11, 18, \char144\ It
 17.      satisfies $v_n$ = $x^n + y^n$, where $x = (1 + \sqrt 5)/ 2$ 
 18.      and $y = (1 - \sqrt 5)/ 2$.
 19.      \vskip#5
 20. }
 21. \tfns{12pt}{12pt}{3pt}{3pt}{1\baselineskip}{}\par
 22. \tfns{12pt}{12pt}{3pt}{3pt}{0pt}{-}
Produces: See typeset version.

Comments:

TeXbook References: 189. Also: 189, 274, 348, 415.

See Also: abovedisplayshortskip, belowdisplayskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


belowdisplayskip Math (Glue)
12pt plus 3pt minus 9pt * Parameter (glue)
Synopsis: \belowdisplayskip<glue>

Description:

Example:

     \def\tfn#1#2#3#4#5% above & below regular & short skips + post-example skip
     {%
        \abovedisplayskip=#1
        \belowdisplayskip=#2
        \abovedisplayshortskip=#3
        \belowdisplayshortskip=#4
        The Fibonacci numbers are defined by: $F_0=1$, $F_1=1$, and
        $$F_n = F_{n-1} + F_{n-2} \hbox{, for } n \ge 2.\leqno(13.11)$$
        A related sequence $\{v_n\}$ is: 2, 1, 3, 4, 7, 11, 18, \char144\ It
        satisfies $v_n$ = $x^n + y^n$, where $x = (1 + \sqrt 5)/ 2$ 
        and $y = (1 - \sqrt 5)/ 2$.
        \vskip#5
     }
     \tfn{3pt}{3pt}{6pt}{6pt}{1\baselineskip}
     \tfn{12pt}{12pt}{6pt}{6pt}{0pt}
Produces: See typeset version.

Comments:

TeXbook References: 189. Also: 189, 190, 194, 274, 291, 348, 415.

See Also: abovedisplayskip, belowdisplayshortskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


binoppenalty Math (Penalties)
700 * Parameter (integer)
Synopsis: \binoppenalty

Description:

TeXbook References: 174. Also: 101, 174, 272, 322, 348, 446.

See Also: relpenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


botmark Marks
Command
Synopsis: \botmark

Description:

Example:

  1. % These lines are from the macro that makes the reference page
  2. % for a control sequence.
  3. % We have: \def\CScs{ControlSequence}, e.g., \def\CScs{botmark}
  4. % \box0 holds everything through the Synopsis line.
  5.      \mark{\currentcs\noexpand\else\CScs}
  6. % Do \eject unless following \box0 will fit on current page.
  7. % The \ifdim reference page shows this test.
  8.      \unvbox0%
  9.      \mark{\CScs\noexpand\else\CScs}
 10. % Typeset the rest of the page.
 11.      \let\currentcs=\CScs
Produces: See typeset version.

Comments:

TeXbook References: 258-260. Also: 213, 258, 259-260, 262-263, 280.

See Also: mark, firstmark, topmark.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


box Box
Command
Synopsis: \box<8-bit register number>

Description:

Example:

  1. \setbox0=\hbox{\selffamily AB ``Hello, World.''}
  2. \box0\par
  3. \setbox1=\hbox{``You were in a box, but now you are not!''}
  4. \box1\box0
Produces: See typeset version.

Comments:

TeXbook References: 120-122, 222. Also: 120-122, 151, 222, 278, 346, 354, 386, 387.

See Also: copy, unhbox, unvbox, unhcopy, unvcopy.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


boxmaxdepth Box
\maxdimen or 16383.99998pt * Parameter (dimen)
Synopsis: \boxmaxdepth

Description:

Example:

  1. \def\printboxdimensA#1%
  2. {%
  3.      \boxmaxdepth=#1%
  4.      \global\setbox1=\vbox{\hrule height 10pt depth 10pt width 20pt}%
  5.      \the\boxmaxdepth&\the\ht1&\the\dp1&\the\wd1\cr
  6. }
  7. \halign
  8. {\qquad\hfil#&&\quad\hfil#\cr
  9. \bf boxmaxdepth&\bf height&\bf depth&\bf width\cr
 10. \printboxdimensA{0pt}
 11. \printboxdimensA{5pt}
 12. \printboxdimensA{15pt}
 13. \printboxdimensA{\maxdimen}
 14. }
Produces: See typeset version.

Comments:

TeXbook References: 80-81. Also: 81, 113, 249, 255, 274, 348.

See Also: maxdepth, vbox.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


brokenpenalty Penalties (Page)
100 * Parameter (integer)
Synopsis: \brokenpenalty

Description:

TeXbook References: 104. Also: 104-105, 272, 348.

See Also: clubpenalty, widowpenalty, interlinepenalty, hyphenpenalty, exhyphenpenalty, discretionary.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


catcode Character
Internal Quantity
Synopsis: \catcode<8-bit number>

Description:

Example:

  1. \catcode`\?=13
  2. \def?{\begingroup\ccflip\obeyspaces\getword}%
  3. \def\getword#1?{#1\endgroup}%
  4. %
  5. ?\uppercase\expandafter{\romannumeral\year}\par?\par
  6. ?\ { } & $ # ^ _ ~ % Did? you know that
  7. ?\catcode`\{=1? assigns `\{' to category 1\char63
Produces: See typeset version.

Comments:

TeXbook References: 37-39. Also: 39, 134, 214, 271, 305, 343, 380-382, 384, 390-391, 421, 424.

See Also: lccode, sfcode, uccode.

For Related Examples, see: mathchardef, span

© Copyright 1998-1999, David Bausum. All Rights Reserved.


char Character
Command
Synopsis: \char<8-bit number>

Description:

Example:

  1. \def\cp{\char152}%       This will trigger an error at some point.
  2. \def\bp{\char131\relax}% Need \relax or `131 }' (with a space).
  3. \cp\ \uppercase\expandafter{\romannumeral\year}\par
  4. At the exchange rate of \bp 1 = \$1.56, \$1000 is \bp 641.03.\par
  5. cp = \meaning\cp\ and bp = \meaning\bp.
Produces: See typeset version.

Comments:

TeXbook References: 43-45. Also: 43-46, 76, 86, 155, 283, 286, 289, 340, 427, 452.

See Also: accent, chardef, mathcode.

For Related Examples, see: mathchoice

© Copyright 1998-1999, David Bausum. All Rights Reserved.


chardef Character
Internal Quantity
Synopsis: \chardef<control sequence>=<number>

Description:

Example:

     \chardef\cp=152
     \chardef\bp=131
     \cp\ \uppercase\expandafter{\romannumeral\year}\par
     At the exchange rate of \bp 1 = \$1.56, \$1000 is \bp 641.03.\par
     cp = \the\cp\ and bp = \meaning\bp.
Produces: See typeset version.

Comments:

TeXbook References: 44. Also: 44, 121, 155, 210, 214, 215, 271, 277, 336, 343, 345, 356, 452.

See Also: char, def.

For Related Examples, see: meaning

© Copyright 1998-1999, David Bausum. All Rights Reserved.


cleaders Box
Command
Synopsis: \cleaders<box or rule><glue>

Description:

Example:

  1. \def\sampletocA#1#2%
  2. {%
  3.      \setbox0=\hbox to 25pt{\vrule height 0.4pt depth 0pt width 25pt}
  4.      \setbox1=\hbox to 25pt{\vrule\hfil #2}% coincidence that both boxes use 25.
  5.      \vbox
  6.      {
  7.           \hsize=224pt% 24 pt left over!
  8.           #1\vrule\leaders\copy0\hfill\copy1\par
  9.           #1\vrule\cleaders\copy0\hfill\copy1\par
 10.           #1\vrule\xleaders\copy0\hfill\copy1\par
 11.      }
 12. }
 13. \sampletocA{\noindent}{100}
 14. \sampletocA{Strangers and Brothers}{116}
 15. \sampletocA{The Age of Reason}{178}
Produces: See typeset version.

Comments:

TeXbook References: 224. Also: 224, 225-226, 357, 374.

See Also: leaders, xleaders.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


closein File I/O
Command
Synopsis: \closein<4-bit number>

Description:

Example:

  1. \def\tfn{junkjunk.tex}
  2. \openin0=\tfn\relax
  3. \ifeof0
  4.      \closein0
  5. \else
  6.      \closein0
  7.      \input\tfn\relax
  8. \fi
Produces: See typeset version.

Comments:

TeXbook References: 217. Also: 217, 280.

See Also: openin, read.

For Related Examples, see: openin

© Copyright 1998-1999, David Bausum. All Rights Reserved.


closeout File I/O
Command
Synopsis: \closeout<4-bit number>

Description:

Example:

     \openout0=junkjunk.tex\relax
     \write0{\noexpand\bf byebye}
     \closeout0
Produces: See typeset version.

Comments:

TeXbook References: 226-228. Also: 226-228, 254, 280, 422.

See Also: openout, write, immediate.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


clubpenalty Penalties (Page)
150 * Parameter (integer)
Synopsis: \clubpenalty

Description:

TeXbook References: 104. Also: 104, 113, 272, 317, 348, 419.

See Also: widowpenalty, brokenpenalty, interlinepenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


copy Box
Command
Synopsis: \copy<8-bit register number>

Description:

Example:

  1. \setbox0=\hbox{\selffamily AB ``Hello, World.''}
  2. \copy0\par
  3. \setbox1=\hbox{``Are you still in a box?''}
  4. \copy1\copy0
Produces: See typeset version.

Comments:

TeXbook References: 120, 222. Also: 120, 151, 222, 278, 329, 374, 386, 407.

See Also: box, unhcopy, unvcopy.

For Related Examples, see: cleaders, unhbox

© Copyright 1998-1999, David Bausum. All Rights Reserved.


count Registers
Internal Quantity
Synopsis: \count<8-bit register number>=<number>

Description:

Example:

  1. \count1 = 100
  2. \count2=\count1
  3. \multiply\count2 by 3
  4. \divide\count2 by 2
  5. %\count2=1.5\count1% This does not work with count registers.
  6. The counts are: \the\count1, \the\count2.
Produces: See typeset version.

Comments:

TeXbook References: 118-122. Also: 118-122, 207-208, 271, 276, 346-347, 379.

See Also: countdef, ifodd, ifnum, advance, multiply, divide.

For Related Examples, see: advance, day, divide, ifnum, time, year

© Copyright 1998-1999, David Bausum. All Rights Reserved.


countdef Registers
Command
Synopsis: \countdef<name>=<8-bit register number>

Description:

Example:

     % count registers
     \newcount\headnum\headnum=0 %       0-2: see \def\makeheadline{}.
     \newcount\linenumber\linenumber=0 % puts lines # on :exam and :logf data.
     \newcount\notenumber\notenumber=0 % numbers \trC{} items.
Produces: See typeset version.

Comments:

TeXbook References: 119. Also: 119, 121, 210, 215, 271, 277, 346-347.

See Also: count.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


cr Tables
Command
Synopsis: \cr

Description:

Example:

  1. \def\tf#1{\omit\hfil #1\hfil}
  2. \vbox{\halign
  3. {#\hfil\quad&\quad\hfil#\quad&\quad\hfil#\quad&\quad\hfil#\cr
  4. \multispan4\hfil 1970 Federal Budget Transfers\hfil\cr
  5. \multispan4\hfil (in billions of dollars)\hfil\cr
  6. \tf{State}&\tf{Taxes}&\tf{Money}&\tf{Net}\cr
  7. &\tf{collected}&\tf{Spent}\cr
  8. New York&   22.91& 21.35& -1.56\cr
  9. New Jersey&  8.33&  6.96& -1.37\cr
 10. Connecticut& 4.12&  3.10& -1.02\cr
 11. Maine&       0.74&  0.67& -0.07\cr
 12. California& 22.29& 22.42& +0.13\cr
 13. New Mexico&  0.70&  1.49& +0.79\cr
 14. Georgia&     3.30&  4.28& +0.98\cr
 15. Mississippi& 1.15&  2.32& +1.17\cr
 16. Texas&       9.33& 11.13& +1.80\cr
 17. }}
Produces: See typeset version.

Comments:

TeXbook References: 231, 235-236. Also: 175-177, 190-197, 231-238, 245, 248, 275, 282, 351-352, 385-386, 412, 418, 421.

See Also: crcr, everycr, halign, valign.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


crcr Tables
Command
Synopsis: \crcr

Description:

Example:

  1. \def\er{\crcr\noalign{\hrule}}
  2. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
  3. \def\tm{\hskip0.5em}
  4. \halign
  5. {\strutA{8.5pt}{3.5pt}\vrule#&\tm#\hfil\tm&\tm#\hfil\tm&\tm#\hfil\tm&
  6. #\vrule\cr\er
  7. \strutA{9.5pt}{3.5pt}&january&february&march&\cr
  8. &april&may&\multispan2\vrule height3.5pt depth 3.5pt
  9.  \leaders\hrule height3.5pt depth-3.1pt\hfill\vrule\cr
 10. &june&july&\omit\vrule\tm\bf Months\hfil&\cr
 11. &august&september&\multispan2\vrule height8.5pt depth-3.0pt
 12.  \leaders\hrule height3.4pt depth-3.0pt\hfill\vrule\cr
 13. &october&november&december&\er
 14. }
Produces: See typeset version.

Comments:

TeXbook References: 249. Also: 249, 275, 282, 361-362, 385, 412, 421.

See Also: cr, everycr.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


csname Macro
Command
Synopsis: \csname<tokens>\endcsname

Description:

Example:

  1. \def\tmakedef#1#2{\expandafter\xdef\csname #1\endcsname{#2}}%
  2. \count1=0
  3. \def\mkr#1#2%
  4. {%
  5.      \global\advance\count1 by 1
  6.      \tmakedef{ref#1count}{\the\count1}%
  7.      \tmakedef{ref#1desc}{#2}%
  8. }
  9. \mkr{A}{The Big Picture}
 10. \mkr{B}{Tons of Details}
 11. \mkr{C}{The Final Hour}
 12. \global\count1=0
 13. B---\refBcount---\refBdesc
Produces: See typeset version.

Comments:

TeXbook References: 40, 213. Also: 40-41, 213, 348, 375.

See Also: endcsname.

For Related Examples, see: noexpand, the

© Copyright 1998-1999, David Bausum. All Rights Reserved.


day Job
Parameter (integer)
Synopsis: \day

Description:

Example:

  1. \def\mkordinal#1% convert 2 digit integer (1-99) to ordinal: 1st, 2nd, ...
  2. {%
  3.   {%
  4.      \count1=#1
  5. %     \the\count1-
  6.      \divide\count1 by 10 % makes most significant digit.
  7. %     \the\count1-
  8.      \count3=\count1
  9.      \multiply\count3 by 10
 10.      \count2=#1
 11.      \advance\count2 by -\count3 % makes least significant digit.
 12.      \ifcase\count2 %   check if 1, 2 or 3.
 13.      \or \def\tt{st}%   1st
 14.      \or \def\tt{nd}%   2nd
 15.      \or \def\tt{rd}%   3rd
 16.      \else \def\tt{th}% xth
 17.      \fi
 18.      \ifnum\count1=1 %  adjust for 11, 12, 13.
 19.           \def\tt{th}%
 20.      \fi
 21. %     \the\count2--
 22.      #1\superscript{\tt}%
 23.   }%
 24. }
 25. \mkordinal{1},  \mkordinal{2},  \mkordinal{3},  \mkordinal{4}, 
 26. \mkordinal{11}, \mkordinal{12}, \mkordinal{13}, \mkordinal{14}, 
 27. \mkordinal{21}, \mkordinal{22}, \mkordinal{23}, \mkordinal{24}, 
 28. \mkordinal{31}.\par
 29. Today is the \mkordinal{\the\day} of the month.
Produces: See typeset version.

Comments:

TeXbook References: 349. Also: 273, 349, 406.

See Also: month, year, time.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


deadcycles Job
Internal Quantity
Synopsis: \deadcycles

Description:

TeXbook References: 255. Also: 214, 255, 264, 271, 283, 401.

See Also: maxdeadcycles, output, shipout, end.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


def Macro
Command
Synopsis: \def<control sequence><parameter text>{<replacement text>}

Description:

Example:

  1. \def\ta{Bye}
  2. \def\tb{Bye}
  3. \ta\tb.\par
  4. \begingroup
  5. \def\ta{Hello}
  6. \def\tb{ World}
  7. \ta\tb.\par
  8. \endgroup
  9. \ta\tb.\par
Produces: See typeset version.

Comments:

TeXbook References: 203-206. Also: 44, 136, 199-208, 215, 275-276.

See Also: gdef, edef, xdef, global, long, outer, chardef, mathchardef, countdef, dimendef, muskipdef, skipdef, toksdef.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


defaulthyphenchar Hyphenation
45 (`- = 45) * Parameter (integer)
Synopsis: \defaulthyphenchar=<number>

Description:

TeXbook References: 273. Also: 273, 348, 414, 454.

See Also: hyphenchar.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


defaultskewchar Math (Character)
-1 * Parameter (integer)
Synopsis: \defaultskewchar

Description:

TeXbook References: 273. Also: 273, 348.

See Also: skewchar.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


delcode Math (Character)
Internal Quantity
Synopsis: \delcode<8-bit number>=<24-bit number>

Description:

TeXbook References: 156, 345. Also: 156, 214, 271, 290, 345.

See Also: mathcode, delimiter, fam.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


delimiter Math (Character)
Command
Synopsis: \delimiter<number>

Description:

Example:

  1. \def\tdela{\delimiter"462833A }% a space or \relax is mandatory!
  2. \def\tdelb{\delimiter"562933B }
  3. \setbox0=\vbox{\hsize=2in$\tdela x-y\tdelb(x+y)=x^2-y^2$}
  4. \def\tbox#1#2#3%
  5. {%
  6.      \setbox#1=\vbox{\hsize=1.5in$$#2\sum_{n=0}^\infty {1\over2^n}#3^2 = 4$$}
  7. }
  8. \tbox1{\tdela}{\tdelb}
  9. \tbox2{\left\tdela}{\right\tdelb}
 10. \hbox to \hsize{\quad\raise24pt\box0\hfil\raise4pt\box1\hfil\box2\quad}
Produces: See typeset version.

Comments:

TeXbook References: 156. Also: 156, 289-290, 359.

See Also: mathcode, delcode, fam, radical.

For Related Examples, see: nulldelimiterspace

© Copyright 1998-1999, David Bausum. All Rights Reserved.


delimiterfactor Math
901 * Parameter (integer)
Synopsis: \delimiterfactor

Description:

Example:

  1. \def\tf#1#2%
  2. {%
  3.    $$\delimiterfactor=#1
  4.      \delimitershortfall=#2
  5.      f(x) = \left\{\vcenter{%
  6.      \halign
  7.      {$##\hfil$&\quad ##\hfil\cr
  8.           x^2 + 2x - 1  & if $x < 0$,\cr
  9.           x^3 - 1       & if $0 \le x < 1$,\cr
 10.           x^2 + x - 1   & if $1 \le x < 2$,\cr
 11.           x^3 - x^2 + 1 & if $2 \le x$.\cr
 12.      }}%
 13.      \right.% NO right delimiter!
 14.    $$%
 15. }
 16. \setbox0 = \vbox{\hsize=2.25in\tf{901}{5pt}}
 17. \setbox1 = \vbox{\hsize=2.25in\tf{500}{\maxdimen}}
 18. \hbox to 5.0in{\quad\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 152. Also: 152, 273, 348, 446.

See Also: delimitershortfall, left, right.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


delimitershortfall Math
5pt * Parameter (dimen)
Synopsis: \delimitershortfall

Description:

Example:

  1. \setbox0 = \vbox{\hsize=2.25in\tf{901}{5pt}}
  2. \setbox1 = \vbox{\hsize=2.25in\tf{10}{12pt}}
  3. \hbox to 5.0in{\quad\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 152. Also: 152, 274, 348, 446.

See Also: delimiterfactor, left, right.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


dimen Registers
Internal Quantity
Synopsis: \dimen<8-bit register number>=<dimen>

Description:

Example:

  1. \dimen1=10pt
  2. \dimen2=1.5\dimen1
  3. \dimen3=-\dimen2
  4. \dimen4=0.66667\dimen3
  5. The dimens are: \the\dimen1, \the\dimen2, \the\dimen3, \the\dimen4.\par
  6. \dimen1=1pt
  7. \dimen2=1sp
  8. \count1=\dimen1
  9. \count2=\dimen2
 10. The counts are: \the\count1, \the\count2.\par
Produces: See typeset version.

Comments:

TeXbook References: 118-119. Also: 118-122, 271, 276, 346-347, 349, 360, 363, 395.

See Also: dimendef, ifdim, advance, multiply, divide, count.

For Related Examples, see: divide, prevdepth

© Copyright 1998-1999, David Bausum. All Rights Reserved.


dimendef Registers
Command
Synopsis: \dimendef<name>=<8-bit register number>

Description:

Example:

     % dimen registers
     \newdimen\pagewidth      % width of regular output, don't change.
     \newdimen\pagewidthA     % page width, may change.
     \newdimen\pageheight     % permanent page height, vsize changes in doublecolumn
     \newdimen\parindentA     % alternate parindent.
     \pagewidth=\hsize
     \pagewidthA=\hsize
     \pageheight=\vsize
     \parindentA=1.5pc
     \parindent=0pt
Produces: See typeset version.

Comments:

TeXbook References: 119. Also: 119, 215, 277, 346-347.

See Also: dimen.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


discretionary Hyphenation
Command
Synopsis: \discretionary{<pre-break text>}{<post-break text>}{<no-break text>}

Description:

Example:

  1. \def\tstoryA{There are cries, sobs, confusion among the people, and at
  2. that moment the cardinal himself, the Grand Inquisitor, passes by the
  3. cathedral. He is an old man . . .}
  4. \def\tstoryB{There are cries, sobs, confusion among the people, and at
  5. that m\discretionary{om-}{e}{ome}nt the cardinal himself, the Grand
  6. Inquisitor, passes by the cathedral. He is an old man . . .}
  7. \setbox0=\vbox{\hsize=2.25in \tstoryA}
  8. \setbox1=\vbox{\hsize=2.25in \tstoryB}
  9. \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 95-96. Also: 95-96, 283, 286, 287, 292.

See Also: -, hyphenchar, hyphenation.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


displayindent Math (Paragraph)
Parameter (dimen)
Synopsis: \displayindent

Description:

Example:

  1. \def\tfn#1#2#3%
  2. {%
  3.    \hangafter=-6 % lines 1-6 are shortened.
  4.    \hangindent=#1
  5.    The Fibonacci numbers are defined by: $F_0=1$, $F_1=1$, and
  6.    $$
  7.      F_n = F_{n-1} + F_{n-2} \hbox{, for } n \ge 2.\eqno(#2.)
  8.      \global\setbox#2=\hbox{(#2.) is \the\displayindent}
  9.    $$
 10.    A related sequence $\{v_n\}$ is: 2, 1, 3, 4, 7, 11, 18, \char144\ It
 11.    satisfies $v_n$ = $x^n + y^n$, where $x = (1 + \sqrt 5)/ 2$ 
 12.    and $y = (1 - \sqrt 5)/ 2$.
 13.    \vskip#3
 14. }
 15. \tfn{-144pt}{1}{1\baselineskip}
 16. \tfn{144pt}{2}{0.25\baselineskip}
 17. \hbox{The indent for \box1\ and for \box2.}
Produces: See typeset version.

Comments:

TeXbook References: 188. Also: 188, 190, 274, 291, 349.

See Also: displaywidth, predisplaysize, abovedisplayskip, prevgraf.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


displaylimits Math
Command
Synopsis: \displaylimits

Description:

Example:

  1. \mathchardef\Intop="1352
  2. \mathchardef\Sum="1350
  3. \def\tint{\Intop\nolimits}
  4. \def\tsum{\Sum}
  5. \def\tf#1#2#3%
  6. {%
  7.      $$\hbox{$#2_0^1 3x^2 = x^3]_0^1 = 1$}%
  8.           \hbox{ and $#3^\infty_{n=0}{1\over2^n} = 2$}%
  9.           \kern2pc
 10.           #2_0^1 3x^2 = x^3\Bigr]_0^1 = 1
 11.           \kern2pc
 12.           #3^\infty_{n=0}{1\over2^n} = 2
 13.           \kern2pc
 14.           \leqno{#1.}
 15.      $$
 16. }
 17. \tf 1{\tint}{\tsum}
 18. \tf 2{\tint\displaylimits}{\tsum\displaylimits}
Produces: See typeset version.

Comments:

TeXbook References: 144. Also: 144, 159, 292, 443.

See Also: limits, nolimits, textstyle, displaystyle.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


displaystyle Math
Command
Synopsis: \displaystyle

Description:

Example:

  1. \def\mkcstyle#1#2%
  2. {%
  3.      \vbox to 0pt
  4.      {%
  5.           \vss
  6.           \hbox{$#1{\atop #2^2}$}%
  7.           \kern0pt
  8.      }%
  9. }
 10. \halign{#\hfil&&\quad#\hfil\cr
 11. \it D&\it T&\it D\ftB, T\ftB&\it S&\it S\ftB&\it SS&\it SS\ftB\cr
 12. \noalign{\vskip2pt\hrule\vskip3pt}
 13. $\displaystyle x^2$&$x^2$&\mkcstyle{\displaystyle}{x}&
 14. $\scriptstyle x^2$&\mkcstyle{\textstyle}{x}&
 15. $\scriptscriptstyle x^2$&\mkcstyle{\scriptstyle}{x}\cr
 16. $\displaystyle X^2$&$X^2$&\mkcstyle{\displaystyle}{X}&
 17. $\scriptstyle X^2$&\mkcstyle{\textstyle}{X}&
 18. $\scriptscriptstyle X^2$&\mkcstyle{\scriptstyle}{X}\cr}
Produces: See typeset version.

Comments:

TeXbook References: 140-141. Also: 140-142, 292, 362.

See Also: textstyle, scriptstyle, scriptscriptstyle, textfont, fam.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


displaywidowpenalty Math (Penalties)
50 * Parameter (integer)
Synopsis: \displaywidowpenalty

Description:

TeXbook References: 104. Also: 104, 272, 348.

See Also: predisplaypenalty, widowpenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


displaywidth Math (Paragraph)
Parameter (dimen)
Synopsis: \displaywidth

Description:

Example:

     \def\tfn#1#2#3%
     {%
        The Fibonacci numbers are defined by: $F_0=1$, $F_1=1$, and
        $$
          \displaywidth=#1
          F_n = F_{n-1} + F_{n-2} \hbox{, for } n \ge 2.%\eqno(#2.)
        $$
        A related sequence $\{v_n\}$ is: 2, 1, 3, 4, 7, 11, 18, \char144\ It
        satisfies $v_n$ = $x^n + y^n$, where $x = (1 + \sqrt 5)/ 2$ 
        and $y = (1 - \sqrt 5)/ 2$.
        \vskip#3%\box0
     }
     \tfn{\hsize}{1}{1\baselineskip}
     \tfn{0.5\hsize}{2}{0pt}
Produces: See typeset version.

Comments:

TeXbook References: 188. Also: 188, 190, 274, 349.

See Also: displayindent, predisplaysize, abovedisplayskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


divide Registers
Command
Synopsis: \divide<numeric variable> by <number>

Description:

Example:

  1. \def\fixdimens#1#2% Want #1*#2/1000 and (#1*#2/1000)*1.2
  2. {%
  3.   \bgroup
  4.      \dimen1=#1pt
  5.      \count2=#2
  6.      \count1=\dimen1
  7.      \multiply\count1 by \count2
  8.      \divide\count1 by 1000
  9.      \dimen1=\count1 sp
 10.      \dimen2=1.2\dimen1% Note, `\multiply\dimen1 by 1.2' generates an error!
 11.      Original point size = #1pt with  multiplier = #2 makes:
 12.      \the\dimen1/\the\dimen2.\par
 13.   \egroup
 14. }
 15. \count1=1
 16. Before fixdimens, count1 = \the\count1.\par
 17. \fixdimens{10}{1000}
 18. \fixdimens{10}{968}
 19. \fixdimens{24}{1044}
 20. After fixdimens, count1 = \the\count1.
Produces: See typeset version.

Comments:

TeXbook References: 118. Also: 118-119, 218-219, 276, 391, 397, 398, 417.

See Also: advance, multiply, count, dimen, skip, muskip.

For Related Examples, see: day, ifnum, time, year

© Copyright 1998-1999, David Bausum. All Rights Reserved.


doublehyphendemerits Paragraph
10000 * Parameter (integer)
Synopsis: \doublehyphendemerits=<number>

Description:

Example:

     \hsize=2.5in% The \adjdemerits reference page holds the definition of \tstory
     \setbox0=\vbox{\tstory\par}
     \setbox1=\vbox{\adjdemerits=0
     \doublehyphendemerits=100000
     \tstory\par}
     \hbox{\box0\kern0.25in\box1}
Produces: See typeset version.

Comments:

TeXbook References: 98. Also: 98, 273, 348, 451.

See Also: adjdemerits, finalhyphendemerits.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


dp Box
Internal Quantity
Synopsis: \dp<8-bit register number>

Description:

Example:

  1. \setbox0=\hbox{Every box has }
  2. \setbox1=\hbox{a }
  3. The depth of box 0 is \the\dp0.\par
  4. The depth of box 1 is \the\dp1.\par
  5. \hbox{\box0\copy1 depth}
  6. The depth of box 0 is \the\dp0.\par
  7. The depth of box 1 is \the\dp1.\par
Produces: See typeset version.

Comments:

TeXbook References: 120. Also: 120, 271, 316, 388-389, 417.

See Also: ht, wd, setbox.

For Related Examples, see: afterassignment, boxmaxdepth, prevdepth

© Copyright 1998-1999, David Bausum. All Rights Reserved.


dump Job
Command
Synopsis: \dump

Description:

TeXbook References: 283. Also: 283, 286, 336, 344.

See Also: end, everyjob.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


edef Macro
Command
Synopsis: \edef<control sequence><parameter text>{<replacement text>}

Description:

Example:

  1. \def\tc{\hskip10pt}
  2. \def\ta{Bye\tc Bye}
  3. \edef\tb{Bye\tc Bye}
  4. \ta\tb.\par
  5. \begingroup
  6. \def\tc{\hskip20pt}
  7. \ta\tb.\par
  8. \endgroup
  9. \ta\tb.\par
Produces: See typeset version.

Comments:

TeXbook References: 215-216. Also: 215-216, 275, 328, 348, 373-374.

See Also: def, xdef, global, long, outer.

For Related Examples, see: advance, xdef

© Copyright 1998-1999, David Bausum. All Rights Reserved.


else Logic
Command
Synopsis: \else

Description:

Example:

  1. \def\trefont#1#2% font size & face.
  2. {%
  3.      \ifcase#1 % select font size
  4.           \or\selffamily AA
  5.           \or\selffamily AB
  6.           \or\selffamily AC
  7.           \or\selffamily AD
  8.           \or\selffamily AE
  9.           \or\selffamily AF
 10.           \or\selffamily AG
 11.           \or\selffamily BA
 12.           \else\selffamily AC
 13.      \fi
 14.      \ifcase#2 % select font face
 15.           \or\rm
 16.           \or\it
 17.           \or\bf
 18.           \or\bi
 19.           \else\rm
 20.      \fi
 21. }
 22. \trefont{1}{2}Now, \trefont{3}{1}is the time for {\it all}
 23.  {\trefont{4}{1}men} to come to the aid of \trefont{2}{3}their
 24.  \trefont{10}{3}country.
Produces: See typeset version.

Comments:

TeXbook References: 207, 210. Also: 207, 210, 213.

See Also: fi, ifcase, or.

For Related Examples, see: day, fi, futurelet, ifdim, ifhbox, ifhmode, time

© Copyright 1998-1999, David Bausum. All Rights Reserved.


emergencystretch Paragraph
0pt * Parameter (dimen)
Synopsis: \emergencystretch=<dimen>

Description:

Example:

     \hsize=2.0in\parindent=0pt
     \pretolerance=100
     \tolerance=200
     \emergencystretch=0pt
     \setbox0=\vtop{\tstory\par}
     \setbox1=\vtop{\emergencystretch=1em
     \tstory\par}
     \hbox to 4.5in{\box0\hfil\box1}
Produces: See typeset version.

Comments:

TeXbook References: 107. Also: 107, 274.

See Also: pretolerance, tolerance, badness.

For Related Examples, see: pretolerance

© Copyright 1998-1999, David Bausum. All Rights Reserved.


end Job
Command
Synopsis: \end

Description:

Example:

     \vfill\eject
     \end
Produces: See typeset version.

Comments:

TeXbook References: 26-27, 264. Also: 23, 26-27, 87, 264, 283, 286, 299, 336, 403.

See Also: deadcycles, dump.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


endcsname Macro
Command
Synopsis: \endcsname

Description:

Example:

  1. \def\getrcount#1{\csname ref#1count\endcsname}
  2. \def\getrdesc#1{\csname ref#1desc\endcsname}
  3. \halign
  4. {\qquad\hfil#\hfil&\quad\hfil#\hfil&\quad#\hfil\cr
  5. \bf Name&\bf Count&\bf Description\cr
  6. B&\getrcount B&\getrdesc B\cr
  7. A&\getrcount A&\getrdesc A\cr
  8. C&\getrcount C&\getrdesc C\cr
  9. }
Produces: See typeset version.

Comments:

TeXbook References: 40, 213. Also: 40-41, 213, 283, 348, 375.

See Also: csname.

For Related Examples, see: csname, endcsname, noexpand, the

© Copyright 1998-1999, David Bausum. All Rights Reserved.


endgroup Macro
Command
Synopsis: \endgroup

Description:

Example:

     \def\tfixcomments
     {%
          \begingroup
          \parindent=\parindentA
          \everypar={\llap{\hbox to \parindent{\char149\hss}}%
               \hangindent=\parindent\hangafter=1 }% Don't change this to =1}!
     }%
     So, to summarize:\par
     \tfixcomments
     The point is . . . \par
     We don't really know . . . \par
     Who will be held responsible?\par
     \endgroup
     Are there any questions?\par
     No. Good!
Produces: See typeset version.

Comments:

TeXbook References: 21, 279. Also: 21, 249, 262, 279, 380, 407, 419.

See Also: begingroup.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


endinput File I/O
Command
Synopsis: \endinput

Description:

Example:

  1. \input a % a.tex holds the line: \input c
  2. \input b % b.tex holds the line: \input c
  3. % c.tex holds the following lines: (see page 383 of The TeXbook).
  4. \ifx\xxcyy\relax % use \xxfile_nameyy or anything unique.
  5.      \endinput
  6. \else
  7.      \let\xxcyy=\relax
  8. \fi
  9. % This is where c.tex really starts.
 10. \newread\tr
Produces: See typeset version.

Comments:

TeXbook References: 214, 383. Also: 47, 214, 383.

See Also: input.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


endlinechar Character
13 (^^M) * Parameter (integer)
Synopsis: \endlinechar

Description:

TeXbook References: 48, 273. Also: 48, 273, 331, 348, 390-391.

See Also: escapechar, newlinechar.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


eqno Math
Command
Synopsis: \eqno<formula>

Description:

Example:

  1. \def\tfn#1#2% equation number, space.
  2. {%
  3.      $$  u_{-n} = -(xy)^{-n}u_n = (-1)^{n-1}u_n{,}#2 v_{-n} =
  4.          (-1)^nv_n.#1
  5.      $$%
  6. }
  7. \tfn{\eqno(10.14.5)}{\qquad}
  8. \tfn{\leqno(10.14.6)}{\qquad}
  9. \tfn{\eqno(10.14.7)}{\qquad\qquad}
 10. \tfn{\leqno(10.14.8)}{\qquad\qquad}
Produces: See typeset version.

Comments:

TeXbook References: 187, 293. Also: 186-187, 189-191, 193, 293, 375-376.

See Also: leqno.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


errhelp Debugging
Parameter (token)
Synopsis: \errhelp<general text>

Description:

Example:

  1. \def\checkit#1#2#3%
  2. {{%
  3.      \setbox0=\hbox{#1}%
  4.      \ifdim\wd0 > #2
  5.           \errhelp=\helpcheckitA
  6.           \errmessage{The text #1 has width = \the\wd0, which is wider than #2}%
  7.      \else
  8.           #3. \box0
  9.      \fi
 10. }}
 11. \newhelp\helpcheckitA{Try increasing the dimen used to check the text.}
 12. \checkit{Hello World}{60pt}1
 13. \checkit{Hello World}{20pt}2
Produces: See typeset version.

Comments:

TeXbook References: 280. Also: 275, 280, 347.

See Also: errmessage.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


errmessage Debugging
Command
Synopsis: \errmessage<general text>

Description:

Example:

  1. \def\checkit#1#2#3%
  2. {%
  3.      \setbox0=\hbox{#1}%
  4.      \ifdim\wd0 > #2
  5.           \errmessage{The text #1 has width = \the\wd0, which is wider than #2}%
  6.      \else
  7.           #3. \box0
  8.      \fi
  9. }
 10. \checkit{Hello World}{60pt}1
 11. \checkit{Hello World}{20pt}2
Produces: See typeset version.

Comments:

TeXbook References: 279-280. Also: 216, 279-280, 347, 418.

See Also: errhelp.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


errorcontextlines Debugging
5 * Parameter (integer)
Synopsis: \errorcontextlines

Description:

Example:

  1. \def\linkA#1%
  2.      {A \linkB{\linkC{\linkD{\linkE{\linkF{\linkG{\linkH{\linkI{#1}}}}}}}}Z}
  3. \def\linkB#1{B {#1}}
  4. \def\linkC#1{C {#1}}
  5. \def\linkD#1{D {#1}}
  6. \def\linkE#1{E {#1}}
  7. \def\linkF#1{F {#1}}
  8. \def\linkG#1{G {#1}}
  9. \def\linkH#1{H {#1}}
 10. \def\linkI#1{I \hskip2#1 B}
 11. \linkA{inyz}%This is ok
 12. \errorcontextlines=-1
 13. \linkA{axyz}
 14. \errorcontextlines=0
 15. \linkA{bxyz}
 16. \errorcontextlines=5
 17. \linkA{cxyz}
 18. \errorcontextlines=100
 19. \linkA{dxyz}
Produces: See typeset version.

Comments:

TeXbook References: 34. Also: 34, 273, 348.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


errorstopmode Debugging
Command
Synopsis: \errorstopmode

Description:

Example:

  1. \batchmode
  2.   .
  3.   .
  4.   .
  5. \errorstopmode
Produces: See typeset version.

Comments:

TeXbook References: 32. Also: 32, 33, 277, 299.

See Also: batchmode, nonstopmode, scrollmode.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


escapechar Character
92 (\) * Parameter (integer)
Synopsis: \escapechar

Description:

Example:

  1. \escapechar=-1\string\TeX ---
  2. \escapechar=63\string\TeX --- %            a ? is 63 and \ is 92.
  3. \escapechar=92\string\TeX  --- wrong!\par
  4. \escapechar=-1 \string\TeX --- %           put a space after the number,
  5. \escapechar=`?\string\TeX ---
  6. \escapechar=`\\\string\TeX  --- wrong!\par
  7. \escapechar=-1 \string\TeX ---
  8. \escapechar=63 \string\TeX ---
  9. \escapechar=92 \string\TeX \par
 10. \escapechar=-1 \string\TeX ---
 11. \escapechar=`?\relax\string\TeX --- %      or use \relax,
 12. \escapechar=`\\{}\string\TeX\par%          or use {}.
Produces: See typeset version.

Comments:

TeXbook References: 40. Also: 40, 213, 228, 273, 308, 348, 377.

See Also: string, endlinechar, newlinechar.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


everycr Tables
none * Parameter (token)
Synopsis: \everycr{<token list>}

Description:

Example:

     \everycr{\noalign{\hrule}}
     \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
     \halign
     {\vrule\strutA{10pt}{4pt}#\tabskip=0.5em&#\hfil&#\vrule&#\hfil&
      #\vrule&\hfil#\hfil&\tabskip=0pt#\vrule\cr
     &\multispan5\it\hfil New York Area Rocks\hfil&\cr
     &\omit\hfil Era\hfil&&\omit\hfil Formation\hfil&&\omit\hfil Age (years)\hfil&\cr
     &Precambrian&& Reading Prong&&   > 1 billion&\cr
     &Paleozoic&&   Manhattan Prong&& 400 million&\cr
     &Mesozoic&&    Newark Basin&&    200 million&\cr
     &Cenozoic&&    Coastal Plain&&   30,000 years&\cr 
     }
Produces: See typeset version.

Comments:

TeXbook References: 275. Also: 275, 362.

See Also: cr, crcr.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


everydisplay Math
none * Parameter (token)
Synopsis: \everydisplay{<token list>}

Description:

TeXbook References: 179. Also: 179, 275, 287, 326.

See Also: everymath, toks.

For Related Examples, see: nulldelimiterspace

© Copyright 1998-1999, David Bausum. All Rights Reserved.


everyhbox Box
none * Parameter (token)
Synopsis: \everyhbox{<token list>}

Description:

Example:

     \begingroup
     \everyhbox{\selffamily AD\it}
     \def\badboxes#1#2%
     {%
          \overfullrule=0.25pt
          \setbox0=\hbox spread#2{#1}%
          \count12=\the\badness
          \setbox1=\hbox to 2.5in{\box0\hfil\the\count12}%
          \box1
     }
     \badboxes{The badness of this line is: }{-1em}
     \badboxes{The badness of this line is: }{-0.54em}
     \badboxes{The badness of this line is: }{-0.4em}
     \badboxes{The badness of this line is: }{0em}
     \badboxes{The badness of this line is: }{1em}
     \badboxes{The badness of this line is: }{2em}
     \badboxes{The badness of this line is: }{3em}
     \endgroup
Produces: See typeset version.

Comments:

TeXbook References: 275. Also: 275, 279.

See Also: everyvbox, toks.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


everyjob Job
none * Parameter (token)
Synopsis: \everyjob{<token list>}

Description:

TeXbook References: 275. Also: 275, 336.

See Also: dump.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


everymath Math
none * Parameter (token)
Synopsis: \everymath{<token list>}

Description:

TeXbook References: 179. Also: 179, 275, 287, 293, 326.

See Also: everydisplay, toks, eqno, leqno.

For Related Examples, see: mathsurround, nulldelimiterspace

© Copyright 1998-1999, David Bausum. All Rights Reserved.


everypar Paragraph
none * Parameter (token)
Synopsis: \everypar{<token list>}

Description:

Example:

  1. \linenumber=0 % This comes from: \newcount\linenumber
  2. \everypar
  3. {%
  4.      \advance\linenumber by 1%
  5.      \setbox0=\hbox{\the\linenumber.\kern0.75em}%
  6.      \llap{\box0}%
  7. }%
  8. This example contains several short paragraphs as examples.\par
  9. The only real point is to give an example of |\everypar| and to show
 10. that it is easy to number paragraphs.\par
 11. Unfortunately, it is more difficult to number every line in a paragraph.\par
Produces: See typeset version.

Comments:

TeXbook References: 105. Also: 105, 215, 253, 262, 275, 282, 283, 333, 381, 407, 421.

See Also: toks.

For Related Examples, see: endgroup, pagedepth

© Copyright 1998-1999, David Bausum. All Rights Reserved.


everyvbox Box
none * Parameter (token)
Synopsis: \everyvbox{<token list>}

Description:

Example:

  1. \begingroup
  2. \everyvbox{\hsize=2in\noindent}
  3. \global\setbox1=\vbox{This is a paragraph without an 
  4.                initial indent. It is set justified 
  5.                left and right with \the\hsize\ long lines.}
  6. \global\setbox2=\vtop{\copy1}
  7. \endgroup% Without the group, there are tons of problems!
  8. \hbox{\box1\kern20pt\raise\dp2\box2}
Produces: See typeset version.

Comments:

TeXbook References: 275. Also: 275, 279.

See Also: everyhbox, toks.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


exhyphenpenalty Penalties (Paragraph)
50 * Parameter (integer)
Synopsis: \exhyphenpenalty

Description:

Example:

     \def\tstoryB{Several words that include a discretionary are: math-on, math-off and non-discardable.}
     \hsize4.0in
     \exhyphenpenalty=0\tstoryB\par
     \exhyphenpenalty=-400\tstoryB\par
Produces: See typeset version.

Comments:

TeXbook References: 96. Also: 96, 262, 272, 348.

See Also: hyphenpenalty, brokenpenalty, discretionary.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


expandafter Macro
Command
Synopsis: \expandafter<token1><token2>

Description:

Example:

  1. \romannumeral\year\par
  2. \uppercase{\romannumeral\year}\par
  3. \uppercase{a---\romannumeral\year---z}\par
  4. \uppercase\expandafter{\romannumeral\year}\par
Produces: See typeset version.

Comments:

TeXbook References: 213. Also: 40, 213, 215, 260, 308, 330, 348, 374-380.

See Also: afterassignment, aftergroup, futurelet, noexpand.

For Related Examples, see: csname, iffalse, noexpand, uccode

© Copyright 1998-1999, David Bausum. All Rights Reserved.


fam Math (Fonts)
-1 * Parameter (integer)
Synopsis: \fam<number>

Description:

Example:

  1. \def\tfam
  2. {%
  3.      $ \prtfam1 x^2 \rm\
  4.        \prtfam2 means\ multiply\ \fam=23 x {\rm\ by\ } x \
  5.        \prtfam3
  6.      $ \prtfam4
  7. }
  8. \def\prtfam#1{(#1.\ fam=\the\fam)\ }
  9. \def\rm{\tenrm}\tfam\par
 10. \def\rm{\fam=0 \tenrm}\tfam\par
Produces: See typeset version.

Comments:

TeXbook References: 154. Also: 154-159, 273, 289-290, 346-347, 351, 358, 414-415, 433.

See Also: textfont, scriptfont, scriptscriptfont, mathcode, delcode, delimiter.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


fi Logic
Command
Synopsis: \fi

Description:

Example:

  1. \dimen0=20pt
  2. \bgroup
  3.      \dimen0=101pt
  4.      \ifdim\dimen0 > 100pt
  5. \egroup
  6.           TRUE---dimen0 = \the\dimen0
  7.      \else
  8.           FALSE---dimen0 = \the\dimen0
  9.      \fi
Produces: See typeset version.

Comments:

TeXbook References: 207, 210. Also: 207, 210, 213.

See Also: else.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


finalhyphendemerits Paragraph
5000 * Parameter (integer)
Synopsis: \finalhyphendemerits=<number>

Description:

Example:

     \hsize=2.5in% The \adjdemerits reference page holds the definition of \tstory
     \setbox0=\vbox{\adjdemerits=0
     \doublehyphendemerits=100000
     \tstory\par}
     \setbox1=\vbox{\adjdemerits=0
     \doublehyphendemerits=100000
     \finalhyphendemerits=900000
     \tstory\par}
     \hbox{\box0\kern0.25in\box1}
Produces: See typeset version.

Comments:

TeXbook References: 98. Also: 98, 106, 273, 348, 451.

See Also: adjdemerits, doublehyphendemerits.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


firstmark Marks
Command
Synopsis: \firstmark

Description:

TeXbook References: 258-260. Also: 213, 258, 259-260, 280.

See Also: mark, botmark, topmark.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


floatingpenalty Penalties
20000 (for footnotes), 0 (for floating top insertions) * Parameter (integer)
Synopsis: \floatingpenalty

Description:

TeXbook References: 123-124. Also: 123-125, 272, 281, 363.

See Also: insertpenalties, insert.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


font Fonts
Internal Quantity
Synopsis: \font<control sequence>=<file name><at clause>

Description:

Example:

  1. \def\tmkfont#1#2#3% filename; point size; scale factor;
  2. {%
  3.      \def\emptyB{#2}%
  4.      \def\emptyC{#3}%
  5.      \ifx\emptyB\empty
  6.           \ifx\emptyC\empty
  7.                \global\font\tff=#1 % The space in `#1 %' is required!
  8.           \else
  9.                \global\font\tff=#1 scaled #3 %
 10.           \fi
 11.      \else
 12.           \global\font\tff=#1 at #2 %
 13.      \fi
 14.      . \tff\fontname\tff&
 15.      \tff The quick red fox jumped over the log.\cr
 16. }
 17. \baselineskip=14pt
 18. \halign{&\qquad#\hfil\cr
 19. 1\tmkfont{cmr10}{}{}
 20. 2\tmkfont{cmr10}{12pt}{}
 21. 3\tmkfont{cmr10}{}{1120}% Note, this results in 11.2pt.
 22. 4\tmkfont{pc2k9y}{}{}
 23. 5\tmkfont{pc2k9y}{10pt}{}
 24. 6\tmkfont{pc2k9y}{12pt}{}
 25. 7\tmkfont{pc2k9y}{11.2pt}{}
 26. 8\tmkfont{pc2k9y}{}{1120}
 27. 9\tmkfont{pc2bi9y}{10pt}{}
 28. A\tmkfont{\fontname\font}{11.3pt}{}
 29. }
Produces: See typeset version.

Comments:

TeXbook References: 16-17. Also: 16-17, 60, 210, 213-215, 271, 276-278.

See Also: fontname, fontdimen, textfont, scriptfont, scriptscriptfont, tracingstats.

For Related Examples, see: / (italic correction), mathchar

© Copyright 1998-1999, David Bausum. All Rights Reserved.


fontdimen Fonts
Internal Quantity
Synopsis: \fontdimen<parameter number><font>=<dimen>

Description:

Example:

     \def\trow#1#2%
     {%
          #1 #2&
          \the\fontdimen#1\rm&
          \the\fontdimen#1\it&
          \the\fontdimen#1\bf&
          \the\fontdimen#1\bi\cr
     }
     \halign
     {\qquad#\hfil&&\quad\hfil#\cr
     \multispan5\qquad\hfil\bf The |\fontdimen| parameters for Caslon 224 at 10pt.\hfil\cr
     \noalign{\vskip 0.25\baselineskip}
     \# Meaning&\omit\hfil\rm\fontname\rm&\omit\hfil\it\fontname\it&
                \omit\hfil\bf\fontname\bf&\omit\hfil\bi\fontname\bi\cr
     \trow{1}{slant per pt}
     \trow{2}{interword space}
     \trow{3}{interword stretch}
     \trow{4}{interword shrink}
     \trow{5}{x-height}
     \trow{6}{quad width}
     \trow{7}{extra space}
     }
Produces: See typeset version.

Comments:

TeXbook References: 443, 447. Also: 76, 157, 179, 214, 271, 277, 355-356, 375, 390, 433, 441, 447.

See Also: font.

For Related Examples, see: textfont

© Copyright 1998-1999, David Bausum. All Rights Reserved.


fontname Fonts
Command
Synopsis: \fontname<font>

Description:

Example:

  1. {\selffamily AB\bf Caslon 224 and Helvetica codes and file names}
  2. \halign{\qquad\rm#&\quad\selffamily # \fontname\rm\hfil\cr
  3. A&AA\cr
  4. B&AB\cr
  5. C&AC\cr
  6. D&AD\cr
  7. E&AE\cr
  8. F&AF\cr
  9. G&AG\cr
 10. A&BA\cr
 11. }
Produces: See typeset version.

Comments:

TeXbook References: 213. Also: 213-214.

See Also: font.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


futurelet Macro
Command
Synopsis: \futurelet<control sequence><token1><token2>

Description:

Example:

  1. \def\tfl{\futurelet\tchar\tflA}
  2. \def\tflA#1%
  3. {%
  4.      \if \tchar.%
  5.           \let\next=\relax
  6.           #1%
  7.      \else
  8.           \let\next=\tfl
  9.           \if\tchar!%
 10.                --BINGO--%
 11.           \else
 12.                -#1-%
 13.           \fi
 14.      \fi
 15.      \next
 16. }
 17. The next characters are: \tfl  aBcDeFg.\par
 18. The next characters are: \tfl  AbCdEfG.\par
 19. The next characters are: \tfl  (X:!;z).\par
 20. \vskip0.5\baselineskip
 21. \def\tflB#1%
 22. {%
 23.      \if #1.%
 24.           \let\next=\relax
 25.           #1%
 26.      \else
 27.           \let\next=\tflB
 28.           \if #1!%
 29.                --BINGO--%
 30.           \else
 31.                -#1-%
 32.           \fi
 33.      \fi
 34.      \next
 35. }
 36. The next characters are: \tflB aBcDeFg.\par
 37. The next characters are: \tflB AbCdEfG.\par
 38. The next characters are: \tflB (X:!;z).\par
Produces: See typeset version.

Comments:

TeXbook References: 207. Also: 207, 215, 262, 277, 363, 375-377, 423.

See Also: let, afterassignment, aftergroup, expandafter, noexpand.

For Related Examples, see: mathchardef

© Copyright 1998-1999, David Bausum. All Rights Reserved.


gdef Macro
Derived Command
Synopsis: \gdef<control sequence><parameter text>{<replacement text>}

Description:

Example:

  1. \def\ta{Bye}
  2. \def\tb{Bye}
  3. \ta\tb.\par
  4. \begingroup
  5. \def\ta{Hello}
  6. \gdef\tb{ World}
  7. \ta\tb.\par
  8. \endgroup
  9. \ta\tb.\par
Produces: See typeset version.

Comments:

TeXbook References: 206. Also: 206, 215, 275, 352, 407.

See Also: def, global, long, outer.

For Related Examples, see: mathchardef

© Copyright 1998-1999, David Bausum. All Rights Reserved.


global Macro
Command
Synopsis: \global

Description:

Example:

  1. \def\tm{}
  2. \begingroup
  3. \def\tm{lost }
  4. \global\def\gtm{will be }
  5. \count2 = 2
  6. \global\count3=3
  7. \advance\count2by5
  8. \global\multiply\count3 by \count2
  9. A. Non-global items \gtm\tm when a group ends.\par
 10. B. The counts are: \the\count2\ and \the\count3.\par
 11. \endgroup
 12. C. Non-global items \gtm\tm when a group ends.\par
 13. D. The counts are: \the\count2\ and \the\count3.\par
 14. \global\count3=0
Produces: See typeset version.

Comments:

TeXbook References: 206, 275. Also: 21, 119, 206, 218, 232, 256, 275, 301, 307, 320, 346.

See Also: begingroup, globaldefs, gdef, xdef, tracingstats.

For Related Examples, see: afterassignment, setbox

© Copyright 1998-1999, David Bausum. All Rights Reserved.


globaldefs Macro
0 * Parameter (integer)
Synopsis: \globaldefs

Description:

Example:

  1. \begingroup
  2. \globaldefs=1
  3. \def\tm{lost }
  4. \def\gtm{will be }
  5. \count2 = 2
  6. \count3=3
  7. \advance\count2 by 5
  8. \multiply\count3 by \count2
  9. A. Non-global items \gtm\tm when a group ends.\par
 10. B. The counts are: \the\count2\ and \the\count3.\par
 11. \endgroup
 12. C. Non-global items \gtm\tm when a group ends.\par
 13. D. The counts are: \the\count2\ and \the\count3.\par
 14. Globaldefs is now: \the\globaldefs.
 15. \global\count2=0\global\count3=0
Produces: See typeset version.

Comments:

TeXbook References: 275. Also: 238, 273, 275.

See Also: global.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


halign Tables
Command
Synopsis: \halign<box specification>{<alignment material>}

Description:

Example:

  1. \offinterlineskip
  2. \def\tf#1{\omit\hfil #1\hfil}
  3. \def\tfc#1{\omit\hfil\smash{\lower5pt\hbox{#1}}\hfil}
  4. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
  5. \def\er{\crcr\noalign{\hrule}}
  6. \setbox0=\vbox{\halign
  7. {\strutA{8.5pt}{3.5pt}\vrule#&\kern0.5em#\hfil\quad&\vrule#&\quad\hfil#\quad&
  8. \vrule#&\quad\hfil#\quad&\vrule#&\quad\hfil#\kern0.5em&#\vrule\cr\er
  9. \omit\strutA{10.5pt}{3.5pt}\vrule&\multispan7\hfil\bf 1970 Federal Budget
 10.  Transfers\hfil&\cr
 11. \omit\strutA{8.5pt}{4.5pt}\vrule&\multispan7\hfil\selffamily AG (in billions
 12.  of dollars)\hfil&\er
 13. \omit\strutA{3pt}{0pt}\vrule&\multispan7&\er
 14. \omit\strutA{10.5pt}{3.5pt}\vrule&\tfc{State}&&\tf{Taxes}&&\tf{Money}&&
 15. \tfc{Net}&\cr
 16. \omit\strutA{8.5pt}{5.0pt}\vrule&&&\tf{collected}&&\tf{Spent}&&&\er
 17. \omit\strutA{10.5pt}{3.5pt}\vrule&New York&&   22.91&& 21.35&& -1.56&\cr
 18. &New Jersey&&  8.33&&  6.96&& -1.37&\cr
 19. &Connecticut&& 4.12&&  3.10&& -1.02&\cr
 20. &Maine&&       0.74&&  0.67&& -0.07&\cr
 21. &California&& 22.29&& 22.42&& +0.13&\cr
 22. &New Mexico&&  0.70&&  1.49&& +0.79&\cr
 23. &Georgia&&     3.30&&  4.28&& +0.98&\cr
 24. &Mississippi&& 1.15&&  2.32&& +1.17&\cr
 25. \omit\strutA{8.5pt}{5.5pt}\vrule&Texas&&       9.33&& 11.13&& +1.80&\er
 26. }}
 27. \hbox to \pagewidth{\hfil\box0\hfil}
Produces: See typeset version.

Comments:

TeXbook References: 235-249. Also: 117, 190, 193-194, 235-249, 282, 286, 291, 302, 326, 352, 361-362, 386, 392.

See Also: cr, noalign, omit, span, tabskip, crcr, everycr, valign.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hangafter Paragraph
1 * Parameter (integer)
Synopsis: \hangafter=<number>

Description:

Example:

     \setbox2=\hbox{\dcrm T}%
     \hangafter=-2
     \hangindent=\wd2
     \hsize=4.75in
     \noindent
     \tstory\par% The \adjdemerits reference page holds the definition of \tstory
Produces: See typeset version.

Comments:

TeXbook References: 102-103. Also: 102, 103-104, 273, 348-349, 419.

See Also: hangindent, parshape, prevgraf.

For Related Examples, see: displayindent, endgroup, prevgraf

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hangindent Paragraph
0pt * Parameter (dimen)
Synopsis: \hangindent=<dimen>

Description:

Example:

     \hsize=4.75in
     \hangafter=3
     \hangindent=-2pc
     \noindent
     \tstory\par% The \adjdemerits reference page holds the definition of \tstory
Produces: See typeset version.

Comments:

TeXbook References: 102-103. Also: 102, 262, 274, 349, 407.

See Also: hangafter, parshape.

For Related Examples, see: displayindent, endgroup, prevgraf

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hbadness Box
1000 * Parameter (integer)
Synopsis: \hbadness

Description:

TeXbook References: 272, 302. Also: 29, 272, 302, 348, 387-388, 401.

See Also: hfuzz, badness, vbadness.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hbox Box
Command
Synopsis: \hbox<box specification>{<horizontal material>}

Description:

Example:

  1. This is \hbox{an interrupted} line.\par
  2. This is \hbox spread 1em{also an interrupted} line.\par
  3. \hbox to 3in{\vrule\hfil This is a centered line.\hfil\vrule}\par
Produces: See typeset version.

Comments:

TeXbook References: 77, 278. Also: 64-67, 77, 86, 93, 151, 159, 163, 175, 179, 185-186, 221, 222, 278, 282, 388-389.

See Also: setbox, vbox, vtop.

For Related Examples, see: cleaders, ifodd, leaders, mathchoice, vskip, vss

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hfil Glue
Derived Command
Synopsis: \hfil

Description:

Example:

     {\bf Commands used for Glue or Kern}
     \halign
     {\qquad#\hfil&\quad\hfil#&\quad\hfil#\hfil\cr
     hskip&vskip&kern\cr
     hfil&vfil&lower\cr
     hfill&vfill&raise\cr
     hfilneg&vfilneg&moveleft\cr
     hss&vss&moveright\cr
     }
Produces: See typeset version.

Comments:

TeXbook References: 71-72. Also: 71-72, 194, 235-237, 283, 285, 290, 397.

See Also: hskip, hfill, hfilneg, hss.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hfill Glue
Derived Command
Synopsis: \hfill

Description:

Example:

  1. \hbox to 3.5in{\vrule\hskip0pt plus2fill Here is an oddly 
  2. placed line.\hfill\vrule}
  3. \hbox to 3.5in{\vrule\hskip0pt plus1.75fill Here is another 
  4. one.\hfill\vrule}
  5. \hbox to 3.5in{\vrule\hskip0pt plus16383.9fil Here is a left 
  6. justified line.\hfill\vrule}
  7. \vskip1\baselineskip
  8. $ x\over(x+1)$, $ x\hfil\over(x+1)$, $ x\hfill\over(x+1)$
Produces: See typeset version.

Comments:

TeXbook References: 71-72. Also: 71-72, 142, 177, 194, 233, 283, 285, 290.

See Also: hskip, hfil.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hfilneg Glue
Derived Command
Synopsis: \hfilneg

Description:

Example:

  1. \def\cline #1{\hbox to 3in{\vrule\hfil #1\hfil\vrule}}
  2. \cline{This line is centered.}
  3. \cline{This line is NOT centered.\hfilneg}
  4. \cline{\hfilneg This line is NOT centered.}
  5. \vskip1\baselineskip
  6. $ x\over(x+1)$, $ \hfilneg x\over(x+1)$, $ x\hfilneg\over(x+1)$
Produces: See typeset version.

Comments:

TeXbook References: 72. Also: 72, 100, 233, 283, 285, 290, 397.

See Also: hskip, hfil.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hfuzz Box
0.1pt * Parameter (dimen)
Synopsis: \hfuzz

Description:

TeXbook References: 274, 302. Also: 30, 274, 302, 348, 387-388.

See Also: hbadness, vfuzz.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hoffset Page
0pt * Parameter (dimen)
Synopsis: \hoffset=<dimen>

Description:

Example:

  1. \def\theadline
  2. {%
  3.      \ifodd\pageno
  4.           \global\hoffset = 0.8125in% 13/16
  5.           \hcropmark(-1.7125,00.7)%   upper left - ODD page
  6.           \vcropmark(-1.3125,00.2)
  7. %         make other ``odd'' page assignments, e.g., cropmarks.
  8.      \else
  9.           \global\hoffset = 0.5625in% 9/16
 10.           \hcropmark(-1.4625,00.7)%   upper left - EVEN page
 11.           \vcropmark(-1.0625,00.2)
 12. %         make other ``even'' page assignments, e.g., cropmarks.
 13.      \fi
 14. %    Put material which will NOT appear on the cropped pages.
 15.      \ifcase\headnum\vskip 71pt%  0. no header
 16.      \or\firstheadline   %        1. 2 lines only
 17.      \or\regheadline     %        2. 2 lines + text - normal.
 18.      \fi
 19. }
Produces: See typeset version.

Comments:

TeXbook References: 251. Also: 251, 274, 342.

See Also: voffset, hsize, vsize.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


holdinginserts Inserts
0 * Parameter (integer)
Synopsis: \holdinginserts=<number>

Description:

TeXbook References: 125. Also: 125, 273, 400.

See Also: insert.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hrule Box
Command
Synopsis: \hrule[height<dimen> depth<dimen> width<dimen>]

Description:

Example:

  1. \vtop{\hsize=3in
  2. Here is a square hrule: \hrule width 0.25in height0.125in depth 0.125in\par
  3. Here is an hrule \hrule width 1in in a line.\par
  4. Here is the very first line of text.\par
  5. \hrule
  6. Here is the very second line of text.\par
  7. \vskip .5\baselineskip
  8. \hrule height 0.25pt%                   this makes a `thinner' line.
  9. \vskip .5\baselineskip
 10. Here is the very third line of text.\par
 11. }
Produces: See typeset version.

Comments:

TeXbook References: 221-225. Also: 24, 64, 85, 221-225, 246, 281-282, 286, 357, 420, 421.

See Also: vrule, leaders.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hsize Paragraph
6.5in * Parameter (dimen)
Synopsis: \hsize=<dimen>

Description:

Example:

     \tstory\par% The \adjdemerits reference page holds the definition of \tstory
     {\parindent=1.5pc\hsize=4.75in
     \tstory\par}
Produces: See typeset version.

Comments:

TeXbook References: 26-27, 251. Also: 26-27, 60, 101-102, 188, 237, 251, 257, 274, 340-341, 348, 387, 406, 407, 413, 415, 417.

See Also: parindent, parfillskip, hangafter, hangindent, parshape, vsize, hoffset, voffset.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hskip Glue
Command
Synopsis: \hskip<glue>

Description:

Example:

  1. Here is a line of text\par
  2. \hskip0.25in Here is a second line of text.\par
  3. \kern0.25in Here is a third line of text.\par
  4. \noindent\kern0.25in Here is a final line of text.\par
Produces: See typeset version.

Comments:

TeXbook References: 71. Also: 71, 86, 168, 283, 285, 290, 314.

See Also: hfil, hfill, hfilneg, hss, mskip, vskip, kern.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hss Glue
Derived Command
Synopsis: \hss

Description:

Example:

  1. \def\trlap#1{\hbox to 0pt{#1\hss}}
  2. {font {\tt\fontname\font}\ makes: \tt 4 \trlap/= 5. Also 5 \trlap=/ 6.
  3.  \hbox{\kern.25in\boxitA{/}{}\kern0.25in \boxitA{=}{}}}\par
  4. font \fontname\font\ makes: 4 \trlap/= 5. Also 5 \trlap=/ 6. 
  5.  \hbox{\kern.6in\boxitA{/}{}\kern0.25in \boxitA{=}{}}
Produces: See typeset version.

Comments:

TeXbook References: 71-72. Also: 71-72, 82-83, 233, 283, 285, 290, 442.

See Also: hskip, hfil.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ht Box
Internal Quantity
Synopsis: \ht<8-bit register number>

Description:

Example:

  1. \setbox0=\hbox{Every box has }
  2. \setbox1=\hbox{a }
  3. The height of box 0 is \the\ht0.\par
  4. The height of box 1 is \the\ht1.\par
  5. \hbox{\box0\copy1 height}
  6. The height of box 0 is \the\ht0.\par
  7. The height of box 1 is \the\ht1.\par
Produces: See typeset version.

Comments:

TeXbook References: 120. Also: 120, 271, 388-389, 417.

See Also: dp, wd, setbox.

For Related Examples, see: accent, boxmaxdepth

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hyphenation Hyphenation
Command
Synopsis: \hyphenation{<hyphenated words>}

Description:

Example:

  1. \def\tstoryA{There are cries, sobs, confusion among the people, and at
  2. that moment the cardinal himself, the Grand Inquisitor, passes by the
  3. cathedral. He is an old man . . .}
  4. {\language255\hyphenation{mom-ent}}
  5. \setbox0=\vbox{\hsize=2.25in \tstoryA}
  6. \setbox1=\vbox{\hsize=2.25in\language255 \tstoryA}
  7. \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 452. Also: 277, 419, 452-453, 455.

See Also: patterns, language.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hyphenchar Hyphenation
Internal Quantity
Synopsis: \hyphenchar<font>=<number>

Description:

Example:

  1. \def\tstoryA{There are cries, sobs, confusion among the people, and at
  2. that moment the cardinal himself, the Grand Inquisitor, passes by the
  3. cathedral. He is an old man . . .}
  4. \count0=\hyphenchar\font
  5. \setbox0=\vbox{\hsize=2.25in \tstoryA}
  6. \setbox1=\vbox{\hsize=2.25in\hyphenchar\font=166 \tstoryA}% 166 is an emdash
  7. \hbox to \hsize{\box0\hfill\box1}
  8. The values are: \the\count0\ and \the\hyphenchar\font.
  9. \hyphenchar\font=45 % 45 is a hyphen.
Produces: See typeset version.

Comments:

TeXbook References: 95. Also: 95, 214, 271, 273, 277, 286, 351, 395, 414, 454, 455.

See Also: defaulthyphenchar, discretionary.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


hyphenpenalty Penalties (Paragraph)
50 * Parameter (integer)
Synopsis: \hyphenpenalty

Description:

Example:

     \hsize4.15in
     \def\testhyphenpenalty#1%
     {%
          \hyphenpenalty=#1 %
          \tstory
          \par
          \vskip1\baselineskip
     }
     \testhyphenpenalty{50}% 0 & 50 make identical paragraphs for this material.
     \testhyphenpenalty{200}
     \testhyphenpenalty{-200}\unskip% remove the last \baselineskip!
Produces: See typeset version.

Comments:

TeXbook References: 96. Also: 96, 101, 272, 348, 451.

See Also: exhyphenpenalty, brokenpenalty, discretionary.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


if Logic
Command
Synopsis: \if<token1><token2>

Description:

Example:

  1. \def\tmacro#1% a `-' means use default value instead of parameter 1.
  2. {%
  3.      \if -#1
  4.           DV% default value.
  5.      \else
  6.           #1%
  7.      \fi
  8.      ---\par
  9. }
 10. \tmacro{Just a test}% Want to use passed  value of paramter.
 11. \tmacro{-}%           Want to use default value.
 12. \tmacro{- Whoops!}%   Want to use passed  value of paramter.
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 209-211, 307, 377, 379.

See Also: ifcat, ifx.

For Related Examples, see: afterassignment, futurelet

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifcase Logic
Command
Synopsis: \ifcase<number>

Description:

Example:

  1. \def\mydate
  2. {%
  3.      \number\day \ %
  4.      \ifcase\month
  5.           \or Jan\or Feb\or Mar%
  6.           \or Apr\or May\or June%
  7.           \or July\or Aug\or Sep%
  8.           \or Oct\or Nov\or Dec%
  9.      \fi
 10.      \ \number\year
 11. }
 12. \mydate
Produces: See typeset version.

Comments:

TeXbook References: 210. Also: 210, 349, 373, 390, 406.

See Also: or, else, fi.

For Related Examples, see: day, else

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifcat Logic
Command
Synopsis: \ifcat<token1><token2>

Description:

Comments:

TeXbook References: 209. Also: 209, 210, 307, 377.

See Also: if, ifx.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifdim Logic
Command
Synopsis: \ifdim<dimen1><relation><dimen2>

Description:

Example:

  1. . . .
  2. \ifdim\pagegoal < \maxdimen
  3.      \ifonepage
  4.           \vfill\eject
  5.      \else
  6.           \ifdim\dimen0 < \pagegoal
  7.                \unvbox1
  8.                \penalty200
  9.           \else
 10.                \ifdim\dimen1 < \pagegoal
 11.                     \vfill
 12.                \fi
 13.                \eject
 14.           \fi
 15.      \fi
 16. \fi
 17. \unvbox0
 18. . . .
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 209, 353, 387, 417.

See Also: ifnum.

For Related Examples, see: accent, fi

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifeof Logic
Command
Synopsis: \ifeof<4-bit number>

Description:

Example:

  1. %File I/O
  2. \newread\raux
  3. \newwrite\waux
  4. %
  5. \def\tfilesetup#1% pass file name. One could also pass: \raux & \waux.
  6. {%
  7.      \openin\raux=#1 %
  8.      \ifeof\raux
  9.           \closein\raux
 10.      \else
 11.           \closein\raux
 12.           \input #1%
 13.      \fi
 14.      \immediate\openout\waux=#1 %
 15. }
Produces: See typeset version.

Comments:

TeXbook References: 210. Also: 210, 217.

See Also: openin.

For Related Examples, see: openin

© Copyright 1998-1999, David Bausum. All Rights Reserved.


iffalse Logic
Command
Synopsis: \iffalse

Description:

Example:

  1. . . .
  2. % the next line goes in a verso (even) page header.
  3.      \setbox1=\hbox{{\selffamily AC\it\expandafter\iffalse\topmark\fi}}%
  4. . . .
  5. %The next lines are from the macro that makes the reference page for a CS.
  6. %We have: \def\CScs{ControlSequence}, e.g., \def\CScs{iffalse}
  7. %\box0 holds everything through the Synopsis line.
  8. %
  9.      \mark{\currentcs\noexpand\else\CScs}
 10. . . . % do \eject unless following \box0 will fit on current page.
 11. %       The \ifdim reference page shows this test.
 12.      \unvbox0%
 13.      \mark{\CScs\noexpand\else\CScs}
 14. . . . %typeset the rest of the page.
 15.      \let\currentcs=\CScs%
 16. . . .
Produces: See typeset version.

Comments:

TeXbook References: 210-211. Also: 210, 211, 260-261, 348, 385-386.

See Also: iftrue.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifhbox Logic
Command
Synopsis: \ifhbox<8-bit number>

Description:

Example:

  1. \def\checkbox#1%
  2. {%
  3.      \ifhbox#1
  4.         \def\tbox{HBox}%
  5.      \else
  6.           \ifvbox#1
  7.                \def\tbox{VBox}%
  8.           \else
  9.                \ifvoid#1
 10.                     \def\tbox{VOid}%
 11.                \else
 12.                     \def\tbox{BigTrouble}%
 13.                \fi
 14.           \fi
 15.      \fi
 16.      {\it box#1: \tbox}%
 17. }
 18. \setbox0=\hbox{Hello World}
 19. \setbox1=\vbox{Going, Going, Gone}
 20. \setbox2=\hbox{Time Out}
 21. \setbox3=\vbox{}
 22. \checkbox0---\checkbox1---\checkbox2---\checkbox3\par
 23. \copy0\box1\box2\copy3
 24. \checkbox0---\checkbox1---\checkbox2---\checkbox3\par
Produces: See typeset version.

Comments:

TeXbook References: 210. Also: 210, 392, 399.

See Also: ifvbox, ifvoid.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifhmode Logic
Command
Synopsis: \ifhmode

Description:

Example:

     \gdef\checkmode
     {%
          \ifhmode
               \ifinner
                    \def\tmode{RH}% restricted horizontal.
               \else
                    \def\tmode{H}%  horizontal.
               \fi
          \fi
          \ifvmode
               \ifinner
                    \def\tmode{IV}% internal vertical.
               \else
                    \def\tmode{V}%  vertical.
               \fi
          \fi
          \ifmmode
               \ifinner
                    \def\tmode{M}%  math
               \else
                    \def\tmode{DM}% display math
               \fi
          \fi
          {\it mode: \tmode}%
     }
     \checkmode\par
     \vbox{Hello \checkmode\ \hbox{World \checkmode}}
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 209, 363.

See Also: ifmmode, ifvmode, ifinner.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifinner Logic
Command
Synopsis: \ifinner

Description:

Example:

  1. \def\checkinner
  2. {%
  3.      \ifinner
  4.           \o T
  5.      \else
  6.           \o F
  7.      \fi
  8. }
  9. \checkinner\checkinner\checkmode\par
 10. \vbox{\checkinner Hello\checkinner\hbox{\checkinner World \checkmode}}
 11. $ 1+2+3+\ldots+n = {{n(n+1)}\over2}\ \checkinner $\checkinner\checkmode
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 209.

See Also: ifhmode, ifmmode, ifvmode.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifmmode Logic
Command
Synopsis: \ifmmode

Description:

Example:

     \def\L#1%
     {%
          \ifmmode
               \mkern-#1mu\relax
          \else
               \dimen0=0.05em
               \multiply\dimen0 by #1
               \kern-\dimen0\relax
          \fi
     }
     Compare: 1941--1945 with {\it 1941--1945} with {\it 1941--\L11945}\par
     $x^2/2$ vs $x^2\L1/2$ vs $X^2\L2/2$ vs $X^2\L3/2$
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 209, 215, 240, 353, 356, 360, 423.

See Also: ifhmode, ifvmode, ifinner.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifnum Logic
Command
Synopsis: \ifnum<number1><relation><number2>

Description:

Example:

  1. \def\mytime%format the time as hh:mm. Always use 2 digits for hh & mm.
  2. {%
  3.   {%
  4.      \count20=\time
  5.      \count22=\count20
  6.      \divide \count20 by 60
  7.      \count21=\count20
  8.      \multiply\count21 by -60
  9.      \advance\count22 by \count21
 10.      \ifnum\count20<10 0\fi
 11.      \the\count20:%
 12.      \ifnum\count22<10 0\fi
 13.      \the\count22
 14.   }%
 15. }
 16. \count20=-100
 17. Time is: \the\time, and count20 = \the\count20.\par
 18. Better time is: \mytime, and count20 = \the\count20.
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 208, 209, 218-219.

See Also: ifodd, ifdim.

For Related Examples, see: advance, day, time, year

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifodd Logic
Command
Synopsis: \ifodd<number>

Description:

Example:

  1. . . .
  2. \ifodd\pageno
  3. \else
  4.      \fixpage{}{1}%  Do header and footer cleanup 1.
  5. \fi
  6. \vfill
  7. \eject
  8. \ifodd\pageno
  9. \else
 10.      \fixpage{0}{1}% Do header and footer cleanup 2.
 11.      \hbox to 0pt{}% \eject won't work unless `something' is on the page.
 12.      \vfil
 13.      \eject
 14. \fi
 15. . . .
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 207, 209, 416, 418-419.

See Also: ifnum.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


iftrue Logic
Command
Synopsis: \iftrue

Description:

Example:

  1. . . .
  2. % the next line goes in a recto (odd) page header.
  3.      \setbox1=\hbox{{\selffamily AC\it\iftrue\botmark\fi}}%
  4. . . .
  5. %The next lines are from the macro that makes the reference page for a CS.
  6. %We have: \def\CScs{ControlSequence}, e.g., \def\CScs{iftrue}
  7. %\box0 holds everything through the Synopsis line.
  8. %
  9.      \mark{\currentcs\noexpand\else\CScs}
 10. . . . % do \eject unless following \box0 will fit on current page.
 11. %       The \ifdim reference page shows this test.
 12.      \unvbox0%
 13.      \mark{\CScs\noexpand\else\CScs}
 14. . . . %typeset the rest of the page.
 15.      \let\currentcs=\CScs%
 16. . . .
Produces: See typeset version.

Comments:

TeXbook References: 210-211. Also: 210, 211, 260-261, 348.

See Also: iffalse.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifvbox Logic
Command
Synopsis: \ifvbox<8-bit number>

Description:

Example:

  1. \def\checkvbox#1%
  2. {%
  3.      \ifvbox#1
  4.           \o T%
  5.      \else
  6.           \o F%
  7.      \fi
  8. }
  9. \setbox1=\vbox{Twenty One}
 10. \setbox2=\vbox{Twenty Two}
 11. \checkvbox1---\checkvbox2\par
 12. \copy1\box2
 13. \checkvbox1---\checkvbox2
Produces: See typeset version.

Comments:

TeXbook References: 210. Also: 210.

See Also: ifhbox, ifvoid.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifvmode Logic
Command
Synopsis: \ifvmode

Description:

Example:

  1. \checkmode\par
  2. \vbox{\checkmode\ Hello \checkmode\ \hbox{World \checkmode}}
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 209.

See Also: ifhmode, ifmmode, ifinner.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifvoid Logic
Command
Synopsis: \ifvoid<8-bit number>

Description:

Example:

  1. \def\checkvoid#1%
  2. {%
  3.      \ifvoid#1
  4.           V%
  5.      \else
  6.           N%
  7.      \fi
  8. }
  9. \setbox1=\hbox{}
 10. \setbox2=\hbox{Twenty Two}
 11. \checkvoid1---\checkvoid2\par
 12. Where is box 1\copy1\box2\par
 13. \checkvoid1---\checkvoid2
Produces: See typeset version.

Comments:

TeXbook References: 210. Also: 210, 256.

See Also: ifhbox, ifvbox.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ifx Logic
Command
Synopsis: \ifx<token1><token2>

Description:

Example:

  1. \def\tmacro#1%
  2. {%
  3.      \def\temptyA{#1}%
  4.      \ifx\temptyA\empty
  5.           DV% default value.
  6.      \else
  7.           #1%
  8.      \fi
  9.      --\par
 10. }
 11. \tmacro{Just a test}
 12. \tmacro{- Whoops!}
 13. \tmacro{}
Produces: See typeset version.

Comments:

TeXbook References: 210. Also: 210, 215, 307, 384, 375-377, 418.

See Also: if, ifcat.

For Related Examples, see: endinput

© Copyright 1998-1999, David Bausum. All Rights Reserved.


ignorespaces Paragraph
Command
Synopsis: \ignorespaces<optional spaces>

Description:

TeXbook References: 279. Also: 279, 333, 355, 424.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


immediate File I/O
Command
Synopsis: \immediate<write or openout or closeout>

Description:

Example:

     \immediate\openout0=junkjunk.tex\relax
     \immediate\write0{\noexpand\bf byebye}
     \immediate\closeout0
Produces: See typeset version.

Comments:

TeXbook References: 227. Also: 226-228, 280, 422, 423.

See Also: write, openout, closeout.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


indent Paragraph
Command
Synopsis: \indent

Description:

Example:

     \parindent=2pc
     \indent |\indent| provides one way to start a new paragraph.\par
     \indent Also, it can \indent add space anywhere in the paragraph.\par
     \noindent |\noindent| also starts a paragraph, but it does not do the indent.\par
     Finally, |\par| provides a way to end a paragraph that is not followed by a blank line.
Produces: See typeset version.

Comments:

TeXbook References: 86, 101. Also: 86, 94, 101, 263, 282, 286, 291, 355.

See Also: parindent, noindent.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


input File I/O
Command
Synopsis: \input<file name>

Description:

Example:

     \input a % a.tex holds the line: \input c
     \input b % b.tex holds the line: \input c
     % c.tex holds the line: \newread\tr
Produces: See typeset version.

Comments:

TeXbook References: 199, 214. Also: 7, 9, 25-27, 47, 199, 214, 217, 380, 382-383, 403, 422.

See Also: endinput, inputlineno.

For Related Examples, see: endinput, openin

© Copyright 1998-1999, David Bausum. All Rights Reserved.


inputlineno File I/O
Internal Quantity
Synopsis: \inputlineno

Description:

Example:

     The current line number is: \the\inputlineno.
Produces: See typeset version.

TeXbook References: 214. Also: 214, 271.

See Also: input.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


insert Inserts
Command
Synopsis: \insert<8-bit number>{<vertical mode material>}

Description:

Example:

  1. % Footnotes
  2. \newinsert\footins  % create Footnotes insertions class.
  3. \count\footins=1000 % footnote magnification factor (1 to 1)
  4. \dimen\footins=\vsize % maximum footnotes per page
  5. \skip\footins=12pt plus 24pt% space added when footnote is present
  6. % End Notes
  7. \newinsert\notes %create Endnotes insertions class.
  8. \count\notes=0 % endnotes don't appear on current page.
  9. \dimen\notes=\maxdimen
 10. \skip\notes=0pt % no extra space on current page for endnotes.
Produces: See typeset version.

Comments:

TeXbook References: 122-125. Also: 95, 122-125, 259, 280-281, 363, 416, 424, 454.

See Also: holdinginserts, floatingpenalty, insertpenalties, vsplit.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


insertpenalties Inserts
Internal Quantity
Synopsis: \insertpenalties

Description:

TeXbook References: 123-125, 254. Also: 111, 114, 123-125, 214, 254, 256, 271.

See Also: floatingpenalty, insert.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


interlinepenalty Penalties (Page)
0 (100 for footnotes) * Parameter (integer)
Synopsis: \interlinepenalty

Description:

TeXbook References: 104. Also: 104, 272, 363, 406, 419.

See Also: clubpenalty, widowpenalty, brokenpenalty, linepenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


jobname Job
Command
Synopsis: \jobname

Description:

Example:

  1. \def\basedir{\string~/doc/tre/}%
  2. \def\myfilenameA
  3. {%
  4.   \bgroup
  5.      \selffamily AG
  6.      \setbox0=\hbox
  7.      {%
  8.           \ifx\basedir\empty
  9.                \string~/.../
 10.           \else
 11.                \basedir
 12.           \fi
 13.           \jobname.tex%
 14.      }%
 15.      \setbox1=\hbox
 16.      {
 17.           \mydatetime% see reference pages for: \month & \ifnum.
 18.      }%
 19.      \hbox to \pagewidth
 20.      {%
 21.           \box0
 22.           \hfil
 23.           -- \number\pageno\ --%
 24.           \hfil
 25.           \box1
 26.      }%
 27.   \egroup
 28. }
 29. The document name is: \jobname\par
 30. \myfilenameA
Produces: See typeset version.

Comments:

TeXbook References: 213. Also: 213, 214, 336.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


kern Kern
Command
Synopsis: \kern<dimen>

Description:

Example:

  1. A kern may be used \kern0.25in anywhere.\par
  2. \kern0.25in However, the results may be unexpected if the mode is wrong.\par
  3. \noindent\kern0.25in See what I mean?
Produces: See typeset version.

Comments:

TeXbook References: 280. Also: 10, 40, 66, 75, 87, 168, 256, 263, 280, 306, 389, 394-395, 416, 424, 454-455.

See Also: hskip, vskip, mkern.

For Related Examples, see: ifmmode

© Copyright 1998-1999, David Bausum. All Rights Reserved.


language Hyphenation
0 * Parameter (integer)
Synopsis: \language=<number>

Description:

Example:

  1. {\language254\hyphenation{am-ong}}
  2. {\language255\hyphenation{I-nquisitor}}
  3. \def\tlangX{\lefthyphenmin=2\righthyphenmin=1\language254}
  4. \def\tlangY{\lefthyphenmin=1\righthyphenmin=1\language255}
  5. \def\tstoryA{\tlangX There are cries, sobs, confusion among the
  6. people, and at that moment the cardinal himself, the Grand Inquisitor,
  7. passes by the cathedral. He is an old man . . .}
  8. \def\tstoryB{\tlangX There are cries, sobs, confusion among the
  9. people, and at that moment the cardinal himself, the Grand \tlangY
 10. Inquisitor, passes by the cathedral. He is an old man . . .}
 11. \count0=\the\language
 12. \setbox0=\vbox{\hsize=2.25in \tstoryA}
 13. \setbox1=\vbox{\hsize=2.25in\language255 \tstoryB}
 14. \hbox to \hsize{\box0\hfill\box1}
 15. The values are: \the\count0\ and \the\language.
Produces: See typeset version.

Comments:

TeXbook References: 455. Also: 273, 346-347, 455.

See Also: setlanguage, hyphenation, patterns, lefthyphenmin, righthyphenmin.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lastbox Box
Command
Synopsis: \lastbox

Description:

Example:

  1. \setbox0=\hbox{Box 0}
  2. \setbox1=\hbox{Box 1}
  3. \setbox2=\hbox{Box 2}
  4. \setbox3=\hbox{Box 3}
  5. \setbox4=\hbox{Box 4}
  6. \setbox5=\vtop
  7. {
  8.      \copy0
  9.      \copy1
 10.      \copy2
 11.      \copy3
 12.      \copy4
 13.      \vskip 2pt
 14.      \global\setbox6=\lastbox
 15. }
 16. \setbox7=\vtop
 17. {
 18.      \copy0
 19.      \copy1
 20.      \copy2
 21.      \copy3
 22.      \copy4
 23.      \global\setbox8=\lastbox
 24.      \vskip 2pt
 25. }
 26. \hbox{\box5\hskip 20pt\box7}
 27. \halign{%
 28. &\quad#&#\hfil\cr
 29. &\bf Box&&\bf Width&&\bf Contents\cr
 30. &6&&\the\wd6&&\copy6\cr
 31. &8&&\the\wd8&&\copy8\cr
 32. }
Produces: See typeset version.

Comments:

TeXbook References: 222. Also: 222, 278, 354, 392, 398, 399.

See Also: lastkern, lastpenalty, lastskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lastkern Kern
Internal Quantity
Synopsis: \lastkern

Description:

Example:

     \def\kernbreakup
     {%
          \ifdim\lastkern=0pt
               lastkern is: 0pt.
          \else
               \dimen0=\lastkern
               lastkern is: \the\dimen0
          \fi
     }
     \def\mkbox#1%
     {%
          \setbox0=\vbox{\kern 6pt\hbox{Hello}\kern #1}%
          \setbox1=\vbox{\unvcopy0\kernbreakup}%
          \box1
     }
     \mkbox{4pt}
Produces: See typeset version.

Comments:

TeXbook References: 214. Also: 214, 271.

See Also: unkern, lastbox, lastpenalty, lastskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lastpenalty Penalties
Internal Quantity
Synopsis: \lastpenalty

Description:

Example:

  1. \def\penaltybreakup
  2. {%
  3.      \setbox1=\hbox{\unhcopy0\global\count1=\lastpenalty}%
  4.      \setbox2=\hbox
  5.      {%
  6.           \unhbox2
  7.           \ifnum\count1=0
  8.                WHOOPS: %
  9.           \else
 10.                lastpenalty is: \the\count1 \ %
 11.           \fi
 12.      }%
 13. }
 14. \def\mkbox#1#2%
 15. {%
 16.      \setbox0=\hbox{#2\penalty #1}%
 17.      \penaltybreakup
 18.      \box0 \ %
 19. }
 20. \box2
 21. \noindent\mkbox{100}{Hello}%
 22. \mkbox{10\kern12pt}{Brave New}%
 23. \mkbox{0}{World}\par
 24. \box2
Produces: See typeset version.

Comments:

TeXbook References: 214. Also: 214, 271.

See Also: unpenalty, lastbox, lastkern, lastskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lastskip Glue
Internal Quantity
Synopsis: \lastskip

Description:

Example:

     \def\skipbreakup
     {%
          \skip0=\lastskip
          \ifdim\skip0=0pt
               WHOOPS: lastskip is: \the\skip0
          \else
               lastskip is: \the\skip0
          \fi
     }
     \def\mkbox#1%
     {%
          \setbox0=\vbox{\kern 6pt\hbox{Hello}\vskip #1}%
          \setbox1=\vbox{\unvcopy0\skipbreakup}%
          \box1
     }
     \mkbox{4pt plus 3pt minus 2pt}
     \mkbox{0pt plus 3pt minus 2pt}
Produces: See typeset version.

Comments:

TeXbook References: 214. Also: 214, 223, 271, 392.

See Also: unskip, lastbox, lastkern, lastpenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lccode Character
Internal Quantity
Synopsis: \lccode<8-bit number>

Description:

TeXbook References: 41. Also: 41, 214, 271, 345, 452-454.

See Also: uccode, catcode, sfcode, lowercase, hyphenation.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


leaders Box
Command
Synopsis: \leaders<box or rule><glue>

Description:

Example:

     \def\sampletocB#1#2%
     {%
          \hbox to 3in
          {%
               #1% 0.0625 makes 16 dots per inch.
               \leaders
                    \hbox to 0.0625in{\hfil.\hfil}
                    \hfill
               \hbox to 0.25in{\hfil #2}%
           }
     }
     \def\sampleheader#1%
     {%
          \hbox to 3in
          {%
               {\it #1}%
               \kern3pt
               \leaders
                    \hrule height 0.25pt
                    \hfill
          }
     }
     \sampletocB{\noindent}{100}
     \sampletocB{Strangers and Brothers}{116}
     \sampletocB{The Age of Reason}{178}
     \sampleheader{Strangers And Brothers}
     \sampleheader{The Age of Reason}
Produces: See typeset version.

Comments:

TeXbook References: 223-225, 281, 285. Also: 95, 110, 223, 224, 225, 357, 392-394.

See Also: cleaders, xleaders, hrule.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


left Math
Command
Synopsis: \left<delim1><subformula>\right<delim2>

Description:

Example:

  1. ${\bigl||x| - |y|\bigr|} = {\left||x| - |y|\right|}$\par
  2. Let $p$ be any odd prime which does not divide $a(a^2 - 1)$. We take
  3. $$m = {a^{2p} - 1 \over a^2 - 1} = 
  4.      \left({a^p - 1 \over a - 1}\right)
  5.      \left({a^p + 1 \over a + 1}\right),\leqno(6.9.2)$$ 
  6. so that $m$ is clearly composite. Now \dots
Produces: See typeset version.

Comments:

TeXbook References: 148-149. Also: 148-150, 155-157, 171, 196, 292, 437.

See Also: right, delcode, delimiter.

For Related Examples, see: delimiterfactor, nulldelimiterspace, vcenter

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lefthyphenmin Hyphenation
2 * Parameter (integer)
Synopsis: \lefthyphenmin=<number>

Description:

Example:

  1. \def\tstoryA{There are cries, sobs, confusion among the people, and at
  2. that moment the cardinal himself, the Grand Inquisitor, passes by the
  3. cathedral. He is an old man . . .}
  4. {\language255\hyphenation{m-oment}}
  5. \count0=\lefthyphenmin
  6. \setbox0=\vbox{\hsize=2.25in\language255 \tstoryA}
  7. \setbox1=\vbox{\hsize=2.25in\language255\lefthyphenmin=1 \tstoryA}
  8. \hbox to \hsize{\box0\hfill\box1}
  9. The values are: \the\count0\ and \the\lefthyphenmin.
Produces: See typeset version.

Comments:

TeXbook References: 273, 454. Also: 273, 364, 454, 455.

See Also: righthyphenmin, language.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


leftskip Paragraph
0pt * Parameter (glue)
Synopsis: \leftskip=<glue>

Description:

Example:

     \parindent=1.5pc
     \tstory\par% The \adjdemerits reference page holds the definition of \tstory
     \vskip3pt
     {\leftskip=2pc
     \rightskip=\leftskip
     \noindent\tstory\par}
Produces: See typeset version.

Comments:

TeXbook References: 100-101. Also: 100-101, 274, 317, 407, 419.

See Also: rightskip, parindent, parfillskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


leqno Math
Command
Synopsis: \leqno<formula>

Description:

Example:

  1. \def\tfn#1%
  2. {%
  3.      $$ u_{-n} = -(xy)^{-n}u_n = (-1)^{n-1}u_n{,}\qquad v_{-n} =
  4.         (-1)^nv_n.#1
  5.      $$%
  6. }
  7. \tfn{\eqno\llap{(10.14.5)}}
  8. \tfn{\leqno\rlap{(10.14.6)}}
Produces: See typeset version.

Comments:

TeXbook References: 187, 293. Also: 187, 189, 293, 375-376.

See Also: eqno.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


let Macro
Command
Synopsis: \let<control sequence>=<token>

Description:

Example:

  1. \def\th{-\hskip10pt-}
  2. \def\ta{Hello\th}
  3. \def\tb{\th World }
  4. 1. \ta\tb\par
  5. \begingroup
  6. \let\tc=\ta
  7. \let\ta=\tb
  8. \let\tb=\tc
  9. 2. \ta\tb\par
 10. \endgroup
 11. 3. \ta\tb\par
Produces: See typeset version.

Comments:

TeXbook References: 206. Also: 206-207, 215, 277, 307, 309, 329, 352, 376.

See Also: def, futurelet.

For Related Examples, see: endinput, futurelet, iffalse, mathchardef

© Copyright 1998-1999, David Bausum. All Rights Reserved.


limits Math
Command
Synopsis: \limits

Description:

Example:

  1. \mathchardef\Intop="1352
  2. \mathchardef\Sum="1350
  3. \def\tint{\Intop\nolimits}
  4. \def\tsum{\Sum}
  5. \def\tf#1#2#3%
  6. {%
  7.      $$\hbox{$#2_0^1 3x^2 = x^3]_0^1 = 1$}%
  8.           \hbox{ and $#3^\infty_{n=0}{1\over2^n} = 2$}%
  9.           \kern2pc
 10.           #2_0^1 3x^2 = x^3\Bigr]_0^1 = 1
 11.           \kern2pc
 12.           #3^\infty_{n=0}{1\over2^n} = 2
 13.           \kern2pc
 14.           \leqno{#1.}
 15.      $$
 16. }
 17. \tf 1{\tint}{\tsum}
 18. \tf 2{\tint\limits}{\tsum\limits}
Produces: See typeset version.

Comments:

TeXbook References: 144. Also: 144, 159, 292, 358, 443.

See Also: nolimits, displaylimits, textstyle, displaystyle.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


linepenalty Penalties (Paragraph)
10 * Parameter (integer)
Synopsis: \linepenalty

Description:

Example:

     \def\tstoryA{There are cries, sobs, confusion among the people, and at that moment the cardinal himself, the Grand Inquisitor, passes by the cathedral. He is an old man}
     \hsize=1.9in
     \setbox0=\vtop{\linepenalty=-1000\tstoryA\par\vskip0.5\baselineskip
     \linepenalty=-5000\tstoryA\par}
     \setbox1=\vtop{\linepenalty=5000\tstoryA\par\vskip0.5\baselineskip
     \linepenalty=10000\tstoryA\par}
     \hbox{\box0\hskip1in\box1}
Produces: See typeset version.

Comments:

TeXbook References: 98. Also: 98, 272, 314, 316, 348.

See Also: badness, looseness, interlinepenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lineskip Paragraph
1pt * Parameter (glue)
Synopsis: \lineskip=<glue>

Description:

Example:

     \parindent=1.5pc\hsize=4.75in
     \baselineskip=9pt
     \lineskip=0pt
     \lineskiplimit=0pt
     \tstory\par% The \adjdemerits reference page holds the definition of \tstory
     \lineskip=2pt
     \lineskiplimit=0pt
     \tstory\par
Produces: See typeset version.

Comments:

TeXbook References: 78-80. Also: 78-80, 104, 194, 274, 281, 349, 351-352.

See Also: baselineskip, lineskiplimit.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lineskiplimit Paragraph
0pt * Parameter (dimen)
Synopsis: \lineskiplimit=<dimen>

Description:

Example:

     \parindent=1.5pc\hsize=4.75in
     \baselineskip=12pt
     \lineskip=0pt
     \lineskiplimit=0pt
     \tstory\par% The \adjdemerits reference page holds the definition of \tstory
     \baselineskip=9pt
     \lineskip=3pt
     \lineskiplimit=1pt
     \tstory\par
Produces: See typeset version.

Comments:

TeXbook References: 78-80. Also: 78-80, 104, 194, 274, 281, 349, 351-352, 362.

See Also: baselineskip, lineskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


long Macro
Command
Synopsis: \long

Description:

Example:

  1. \long\def\tempabiod#1#2% {author}{text}
  2. {%
  3.   \bgroup
  4.      \selffamily AF
  5.      \parindent=1.5pc
  6.      {\bf\noindent AUTHOR BIOGRAPHICAL DATA:}\par
  7.      \def\temptyA{#1}%
  8.      \ifx\temptyA\empty
  9.      \else
 10.           {\bf\noindent #1 }%
 11.      \fi
 12.      #2\par
 13.   \egroup
 14. }
 15. \tempabiod{Fyodor Dostoyevsky}{was born in Moscow in 1821. At the age
 16. of twenty-seven he was arrested for promoting socialism and was
 17. sentenced to be executed. On the day of the execution the Tsar changed
 18. the sentence to a prison term in Siberia \char144
 19. 
 20. After four years in Siberia and a mandetory term in the army he
 21. received a full pardon and was allowed to return to St. Petersburg.
 22. His many books include: \char144}
Produces: See typeset version.

Comments:

TeXbook References: 205-206. Also: 205-206, 210, 275, 331, 375, 378, 382.

See Also: def, edef, gdef, xdef, global, outer.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


looseness Paragraph
0 * Parameter (integer)
Synopsis: \looseness=<number>

Description:

Example:

     \hsize=4.5in
     \tstory\par
     \vskip6pt
     {\looseness=-1
     \tstory\par}
Produces: See typeset version.

Comments:

TeXbook References: 103-104. Also: 103-104, 109, 273, 342, 349.

See Also: linepenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lower Kern
Command
Synopsis: \lower<dimen><box>

Description:

Example:

     \selffamily AA
     \hskip 1in
     \hbox{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125em X}
Produces: See typeset version.

Comments:

TeXbook References: 285. Also: 66, 80, 151, 179, 285, 290.

See Also: raise, moveleft, moveright.

For Related Examples, see: halign, mathchoice

© Copyright 1998-1999, David Bausum. All Rights Reserved.


lowercase Character
Command
Synopsis: \lowercase{<token list>}

Description:

TeXbook References: 41. Also: 41, 215, 279, 307, 345.

See Also: lccode, uppercase.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mag Job
1000 * Parameter (integer)
Synopsis: \mag=<number>

Description:

TeXbook References: 60. Also: 60, 270, 273, 348.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mark Marks
Command
Synopsis: \mark{\}

Description:

TeXbook References: 258-259. Also: 95, 157, 216, 258-263, 280, 417, 454.

See Also: botmark, firstmark, topmark, splitbotmark, splitfirstmark.

For Related Examples, see: iffalse

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathaccent Math (Character)
Command
Synopsis: \mathaccent<15-bit number><single character or {subformula}>

Description:

Example:

  1. \def\Widehat{\mathaccent"0362 }% the space before the } is important!
  2. \def\Hat{\mathaccent"705E }
  3. $\Widehat x$, $\Widehat {xy}$, $\Widehat {xyz}$, $\Widehat {wxyz}$,
  4. $\Widehat {x^2}$, $\Widehat {3x^2}$, $\Widehat {3x^2+4}$\par
  5. In a paragraph we say `\^x', but in math we say `$\Hat x$'.
Produces: See typeset version.

Comments:

TeXbook References: 157, 291. Also: 135-136, 157, 170, 291, 359, 443.

See Also: mathchar, skewchar, mathord.

For Related Examples, see: skewchar

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathbin Math
Command
Synopsis: \mathbin<single character or {subformula}>

Description:

Example:

     \tf{}0
     \tf{\mathbin}1
     \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 155, 291. Also: 155, 291, 361.

See Also: mathord, mathop, mathrel, mathopen, mathclose, mathpunct, mathinner.

For Related Examples, see: mathchoice, mathord

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathchar Math (Character)
Command
Synopsis: \mathchar<15-bit number>

Description:

Example:

  1. \font\ttf =pc2ki9y at 10pt \font\ttfb =pc2bi9y at 10pt %italics & bold italics.
  2. \font\tsf =pc2ki9y at  7pt \font\tsfb =pc2bi9y at  7pt
  3. \font\tssf=pc2ki9y at  5pt \font\tssfb=pc2bi9y at  5pt
  4. \textfont15=\ttf           \textfont14=\ttfb
  5. \scriptfont15=\tsf         \scriptfont14=\tsfb
  6. \scriptscriptfont15=\tssf  \scriptscriptfont14=\tssfb
  7. \def\test #1.{#1. $\Eth = x^2$, $\eth = 2x$\par}
  8. \def\testb #1.{#1. $\caslb\Etha = x^2$, $\caslb\etha = 2x$\par}
  9. \def\caslb{\fam14 }
 10. \def\Eth{\mathchar"0FB2}
 11. \def\eth{\mathchar"0FB3}
 12. \mathchardef\Etha="7FB2
 13. \mathchardef\etha="7FB3
 14. \test 1.
 15. \testb 2.
Produces: See typeset version.

Comments:

TeXbook References: 155. Also: 155, 289.

See Also: mathcode, mathchardef, fam.

For Related Examples, see: skewchar

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathchardef Math (Character)
Derived Command
Synopsis: \mathchardef<control sequence>=<15-bit number>

Description:

Example:

  1. \mathcode`\'= "8000
  2. {\catcode`\'=\active \gdef'{^\bgroup\primeA}}% Global change to Plain Tex.
  3. \def\primeA{\prime\futurelet\next\primeB}
  4. \mathchardef\prime="0230 % Page 431 of The TeXBook shows a prime in position
  5. \def\primeB%               "30 of font 2.
  6. {%
  7.      \ifx'\next
  8.           \let\nxt=\primeC
  9.      \else
 10.           \ifx^\next
 11.                \let\nxt=\primeD
 12.           \else
 13.                \let\nxt=\egroup
 14.           \fi
 15.      \fi
 16.      \nxt
 17. }
 18. \def\primeC#1{\primeA}
 19. \def\primeD#1#2{#2\egroup}
 20. If $f(x) = 2x^3-4x^2+5x-6$, $f'(x)=6x^2-8x+5$, $f''(x)=12x-8$, $f'''(x)=12$,
 21.  and $f''''(x) = f^{(4)}(x) = 0$.\par
 22. Also, $x'\cdot x' = x'^2$. But what is $x'^{y^2}$?\par
 23. Compare f'(x) with $f'(x)$.
 24. {\catcode`\'=\active \gdef'{^\bgroup\prim@s}}%reset Plain TeX value.
Produces: See typeset version.

Comments:

TeXbook References: 155. Also: 155, 199, 214, 215, 271, 277, 289, 336, 358, 394.

See Also: mathchar.

For Related Examples, see: displaylimits

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathchoice Math
Command
Synopsis: \mathchoice{<math>}{<math>}{<math>}{<math>}

Description:

Example:

  1. \def\tsym#1#2#3% ps1, ps2, lower dimen
  2. {%
  3.      \hbox
  4.      {%
  5.           \lower#3ex\hbox
  6.           {%
  7.                \maketfont A1{#1}%
  8.                \char140 %
  9.                \kern-0.2em
 10.                \raise0.12ex
 11.                \hbox{\maketfont A1{#2}+}%
 12.                \kern-0.2em
 13.                \char141 %
 14.           }%
 15.      }%
 16. }
 17. \def\tcA{\mathbin{\tsym {14}{10}{0.15}}}
 18. \def\tc{\mathchoice
 19.      {\mathbin{\tsym {14}{10}{0.15}}}{\mathbin{\tsym {12}{10}{0.15}}}
 20.      {\mathbin{\tsym {08}{06}{0.06}}}{\mathbin{\tsym {06}{05}{0.06}}}}
 21. The symbol `$\tcA$' is built from: `\char140 +\char141'.
 22. \halign{\qquad#\hfil&\quad$\displaystyle{x {#} y}$\hfil&
 23.   \quad$\textstyle{x# y}$\hfil&
 24.   \quad$\scriptstyle{x# y}$\hfil&
 25.   \quad$\scriptscriptstyle{x# y}$\hfil\cr
 26.   &\omit\quad\bf display&\omit\quad\bf text&\omit\quad\bf script&
 27.                          \omit\quad\bf scriptscript\cr
 28.   |\tc|: &\tc  &\tc  &\tc  &\tc \cr
 29.   |\tcA|:&\tcA &\tcA &\tcA &\tcA\cr}
 30. $$\underbrace{\hbox{$x\tc  y$,\quad}
 31.   \hbox{$z^{x\tc  y}$, and\quad}
 32.   w \tc  z^{{x\tc  y}^{x\tc  y}}}_{\rm|\tc|}
 33.   \hbox{\quad vs \quad}
 34.   \underbrace{\hbox{$x\tcA y$,\quad}
 35.   \hbox{$z^{x\tcA y}$, and\quad}
 36.   w \tcA z^{{x\tcA y}^{x\tcA y}}}_{\rm|\tcA|}$$
Produces: See typeset version.

Comments:

TeXbook References: 151. Also: 151, 157, 292.

See Also: mathbin, mathclose, mathop, mathopen, mathord, mathpunct, mathrel, displaystyle, textstyle, scriptstyle, scriptscriptstyle.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathclose Math
Command
Synopsis: \mathclose<single character or {subformula}>

Description:

Example:

     \tf{}0
     \tf{\mathclose}1
     \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 155, 291. Also: 155, 291, 322, 359.

See Also: mathord, mathop, mathbin, mathrel, mathopen, mathpunct, mathinner.

For Related Examples, see: mathord

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathcode Math (Character)
Internal Quantity
Synopsis: \mathcode<8-bit number>=<15-bit number>

Description:

Example:

  1. The new math chars are: {\it \char"B2, \char"B3}, {\bi ^^b2, and ^^b3}. 
  2. The mathcodes are: ^^b2=\the\mathcode"B2, ^^b3=\the\mathcode"B3.\par
  3. \font\ttf =pc2ki9y at 10pt \font\ttfb =pc2bi9y at 10pt %italics & bold italics.
  4. \font\tsf =pc2ki9y at  7pt \font\tsfb =pc2bi9y at  7pt
  5. \font\tssf=pc2ki9y at  5pt \font\tssfb=pc2bi9y at  5pt
  6. \textfont15=\ttf           \textfont14=\ttfb
  7. \scriptfont15=\tsf         \scriptfont14=\tsfb
  8. \scriptscriptfont15=\tssf  \scriptscriptfont14=\tssfb
  9. \def\test #1.{#1. $\char"B2 = x^2$, $^^b3 = 2x$\par}
 10. \def\testb #1.{#1. $\caslb ^^b2 = x^2$, $\caslb\char"B3 = 2x$\par}
 11. \test 1. 
 12. \mathcode"B2="0FB2 \test 2.
 13. \mathcode"B3="0FB3 \test 3.
 14. \def\caslb{\fam14 }\testb 4.
 15. \mathcode"B2="7FB2 \testb 5.
 16. \mathcode"B3="7FB3 \testb 6.\test 7.
Produces: See typeset version.

Comments:

TeXbook References: 154-155. Also: 134, 154-155, 214, 271, 289, 319, 326, 344.

See Also: mathchar, delcode, delimiter, fam, char.

For Related Examples, see: fam, mathchardef

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathinner Math
Command
Synopsis: \mathinner<single character or {subformula}>

Description:

Example:

  1. \mathchardef\ldotpA="613A
  2. \def\ldotsA{\mathinner{\ldotpA\ldotpA\ldotpA}}
  3. \def\ldotsB{\ldotpA\ldotpA\ldotpA}\par
  4. $|x\ldotsA y|$ vs $|x\ldotsB y|$
  5. $$2\int_0^1 3x^2 dx = 2\left[x^3\right]_0^1 = 2.\hskip0.25in
  6.   2\int_0^1 3x^2 dx = 2\Bigl[x^3\Bigr]_0^1  =2. \hskip0.25in
  7.   2\int_0^1 3x^2 dx = 2\mathinner{\Bigl[x^3\Bigr]_0^1} = 2.$$
Produces: See typeset version.

Comments:

TeXbook References: 158, 170, 291. Also: 155, 170-171, 199, 291, 359.

See Also: mathord, mathop, mathbin, mathrel, mathopen, mathclose, mathpunct.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathop Math
Command
Synopsis: \mathop<single character or {subformula}>

Description:

Example:

     \tf{}0
     \tf{\mathop}1
     \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 155, 291. Also: 155, 178, 291, 324-325, 361.

See Also: mathord, mathbin, mathrel, mathopen, mathclose, mathpunct, mathinner.

For Related Examples, see: mathord

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathopen Math
Command
Synopsis: \mathopen<single character or {subformula}>

Description:

Example:

     \tf{}0
     \tf{\mathopen}1
     \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 155, 291. Also: 155, 291, 322, 359.

See Also: mathord, mathop, mathbin, mathrel, mathclose, mathpunct, mathinner.

For Related Examples, see: mathord

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathord Math
Command
Synopsis: \mathord<single character or {subformula}>

Description:

Example:

  1. \def\p#1{\tp{#1}{\Eth}}% see the \mathchar   reference page for \Eth.
  2. \def\P#1{\tp{#1}{\tcA}}% see the \mathchoice reference page for \tcA.
  3. \def\tp#1#2%
  4. {%
  5.      $x
  6.      \ifcase#1
  7.         \mathord % class 0
  8.      \or\mathop %        1
  9.      \or\mathbin %       2
 10.      \or\mathrel %       3
 11.      \or\mathopen %      4
 12.      \or\mathclose %     5
 13.      \or\mathpunct %     6
 14.      \fi
 15.      #2
 16.      y$
 17. }
 18. \halign{\quad#&&\quad\hfil#\hfil\cr
 19. &\multispan7\bf\hfil Spacing and Classes in Math Expressions\hfil\cr
 20. &\multispan7\quad\leaders\hrule height 7pt depth-6.6pt\hfill\cr
 21. \noalign{\kern-7pt}
 22. &\it Ordinary&\it Operator&\it Binary&\it Relation&\it Opening&\it Closing&
 23.  \it Punctuation\cr
 24. &\p0&\p1&\p2&\p3&\p4&\p5&\p6\cr
 25. &\P0&\P1&\P2&\P3&\P4&\P5&\P6\cr}
 26. \def\tf#1#2%
 27. {%
 28.      \setbox#2=\vbox{\hsize=2.4in
 29.      $$#1f#1(#1x#1)#1=#1\sum_{#1{#1i#1=#1 0}}^{#1\infty}#1a_{#1i}#1x^{#1i}
 30.      \hbox{,\ where\ }#1a_{#1i}#1={#1{#1f#1{^{#1{#1(#1i#1)}}#1(#10#1)}}
 31.      \over{#1{#1i#1!}}}.$$}
 32. }
 33. % f(x)=\sum_{i=0}^\infty a_ix^i\hbox{,\ where\ }a_i={f^{(i)}(0)\over i!}
 34. \tf{}0
 35. \tf{\mathord}1
 36. \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 155, 291. Also: 88-89, 155, 291.

See Also: mathop, mathbin, mathrel, mathopen, mathclose, mathpunct, mathinner.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathpunct Math
Command
Synopsis: \mathpunct<single character or {subformula}>

Description:

Example:

     \tf{}0
     \tf{\mathpunct}1
     \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 155, 291. Also: 155, 291.

See Also: mathord, mathop, mathbin, mathrel, mathopen, mathclose, mathinner.

For Related Examples, see: mathord

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathrel Math
Command
Synopsis: \mathrel<single character or {subformula}>

Description:

Example:

     \tf{}0
     \tf{\mathrel}1
     \hbox to \hsize{\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 155, 291. Also: 155, 291, 359-361.

See Also: mathord, mathop, mathbin, mathopen, mathclose, mathpunct, mathinner.

For Related Examples, see: mathord

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mathsurround Math (Kern)
0pt * Parameter (dimen)
Synopsis: \mathsurround<glue>

Description:

Example:

  1. \def\tfn
  2. {%
  3.      If $h$ is odd, $h \vert u_d$. If h is even, then $u_m$ and $u_n$
  4.       are even so $u_{rm}$, $u_{sn}$, $v_{rm}$, $v_{sn}$ are all even
  5.       by (ii) and (iii).
  6.      $\the\mathsurround$ vs $ \the\mathsurround$ vs \the\mathsurround.
  7. }
  8. \everymath{\mathsurround=1pt}\tfn\vskip0.5\baselineskip
  9. \everymath{\mathsurround=0.5pt}\tfn\vskip0.5\baselineskip
 10. \everymath{}\tfn
Produces: See typeset version.

Comments:

TeXbook References: 162. Also: 97, 162, 274, 305, 314, 323, 353, 447.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


maxdeadcycles Job
25 * Parameter (integer)
Synopsis: \maxdeadcycles=<number>

Description:

TeXbook References: 255. Also: 255, 273, 348.

See Also: deadcycles.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


maxdepth Page
4pt * Parameter (dimen)
Synopsis: \maxdepth=<dimen>

Description:

TeXbook References: 113-114. Also: 112-114, 123-125, 255, 262-263, 274, 348, 400, 415.

See Also: vsize, splitmaxdepth, boxmaxdepth, pagedepth.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


meaning Debugging
Command
Synopsis: \meaning<token>

Description:

Example:

  1. \chardef\abstract=92 % Note, 92 = "5C.
  2. `\abstract'---\meaning\abstract\par
  3. \def\bads#1
  4. {
  5.      Bad
  6.      #1
  7.      spaces
  8. }%Note, \bads is missing 5 %s.
  9. \def\goods#1%
 10. {%
 11.      Good%
 12.      #1%
 13.      spaces%
 14. }
 15. \meaning\bads---\par
 16. \meaning\goods---\par
 17. \goods{! No bad }.\par
 18. \bads{! Too many }.
Produces: See typeset version.

Comments:

TeXbook References: 213. Also: 213-215, 336, 382.

See Also: show.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


medmuskip Math (Glue)
4mu plus 2mu minus 4mu * Parameter (muglue)
Synopsis: \medmuskip<muglue>

Description:

Example:

     \def\tf#1#2#3#4%
     {%
          \thinmuskip=#1
          \medmuskip=#2
          \thickmuskip=#3
          $$F_n = F_{n-1} + F_{n-2} \hbox{, for } n \ge 2.\eqno(#4.)$$
     }
     The Fibonacci numbers are defined by: $F_0=1$, $F_1=1$, and
     \tf{3mu}{4mu plus 2mu minus 4mu}{5mu plus 5mu}1
     \tf{3mu}{0mu}{5mu plus 5mu}2
     \tf{0mu}{0mu}{0mu}3
Produces: See typeset version.

Comments:

TeXbook References: 168, 170. Also: 167-168, 170, 274, 349, 446.

See Also: mskip, thinmuskip, thickmuskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


message Debugging
Command
Synopsis: \message<general text>

Description:

Example:

  1. \newlinechar=`@     % makes \message{} start on new line.
  2. \setbox0=\hbox{A}
  3. \message{@Hello There}
  4. \message{The height of box0 = \the\ht0.@}
  5. \message{The depth of box0 = \the\dp0.@ Byebye.}
  6. \message{Some message don't}
  7. \message{start on a new line.}
Produces: See typeset version.

Comments:

TeXbook References: 217. Also: 216, 217-218, 227-228, 279, 308, 328, 343-344, 355, 418.

See Also: newlinechar.

For Related Examples, see: pagedepth

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mkern Math (Kern)
Command
Synopsis: \mkern<mudimen>

Description:

Example:

  1. \def\R#1{\mkern#1mu\relax}
  2. \def\L#1{\mkern-#1mu\relax}
  3. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
  4. \def\tsq#1%
  5. {%
  6.      $\sqrt 2\R#1 x$
  7.      \ifnum#1 < 9
  8.           vs~%
  9.      \fi
 10. }
 11. \def\tint#1%
 12. {%
 13.      $\int_0^x\L#1\int_0^y dF(x,y)$
 14.      \ifnum#1 < 9
 15.           vs
 16.      \fi
 17. }
 18. \tsq0\tsq1\tsq2\tsq3\tsq4\tsq5\tsq6\tsq7\tsq8\tsq9\par
 19. \strutA{12pt}{4pt}\tint0\tint1\tint2\tint3\tint4\tint5\tint6\tint7
 20. \tint8\tint9\strutA{12pt}{4pt}\par
Produces: See typeset version.

Comments:

TeXbook References: 168. Also: 168, 280, 442.

See Also: mskip, kern.

For Related Examples, see: ifmmode

© Copyright 1998-1999, David Bausum. All Rights Reserved.


month Job
Parameter (integer)
Synopsis: \month

Description:

Example:

  1. \def\mydate
  2. {%
  3.      \number\day \ %
  4.      \ifcase\month
  5.           \or Jan\or Feb\or Mar%
  6.           \or Apr\or May\or June%
  7.           \or July\or Aug\or Sep%
  8.           \or Oct\or Nov\or Dec%
  9.      \fi
 10.      \ \number\year
 11. }
 12. \mydate
Produces: See typeset version.

Comments:

TeXbook References: 349. Also: 273, 349, 406.

See Also: day, year, time.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


moveleft Kern
Command
Synopsis: \moveleft<dimen><box>

Description:

Example:

     \hbox{This is a line of type.}
     \moveleft0.5in\vbox{This is a line of type shifted left.}
     \moveleft-0.5in\hbox{This is a line of type shifted right.}
Produces: See typeset version.

Comments:

TeXbook References: 80-81. Also: 80-81, 282, 287.

See Also: moveright, lower, raise.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


moveright Kern
Command
Synopsis: \moveright<dimen><box>

Description:

Example:

     \vbox{This is a line of type.}
     \moveright0.5in\hbox{This is a line of type shifted right.}
     \moveright-0.5in\vbox{This is a line of type shifted left.}
Produces: See typeset version.

Comments:

TeXbook References: 80-81. Also: 80-81, 221, 282.

See Also: moveleft, lower, raise.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


mskip Math (Glue)
Command
Synopsis: \mskip<muglue>

Description:

Example:

     \def\,{\mskip\thinmuskip}% These definitions use the Plain TeX values.
     \def\>{\mskip\medmuskip}
     \def\;{\mskip\thickmuskip}
     \def\!{\mskip-\thinmuskip}
     $\sqrt 2x$ vs $\sqrt 2\,x$ vs  vs $\sqrt 2\>x$ vs $\sqrt 2\;x$ vs $\sqrt 2\!x$
Produces: See typeset version.

Comments:

TeXbook References: 168. Also: 168, 290, 442.

See Also: mkern, thinmuskip, medmuskip, thickmuskip, hskip, vskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


multiply Registers
Command
Synopsis: \multiply<numeric variable> by <number>

Description:

Example:

  1. \def\fixdimens#1#2% Want to compute: #1*#2/1000 and (#1*#2/1000)*1.2
  2. {%
  3. %  \bgroup
  4.      \dimen1=#1pt
  5.      \count2=#2
  6.      \count1=\dimen1
  7.      \multiply\count1 by \count2
  8.      \divide\count1 by 1000
  9.      \dimen1=\count1 sp
 10.      \count1=\dimen1
 11.      \multiply\count1 by 12% This is a hard way to multiply by 1.2
 12.      \divide \count1 by 10 % See the divide reference page for a better way
 13.      \dimen2=\count1 sp
 14.      Original point size = #1pt with  multiplier = #2 makes:
 15.      \the\dimen1/\the\dimen2.\par
 16. %  \egroup
 17. }
 18. \count1=1
 19. Before fixdimens, count1 = \the\count1.\par
 20. \fixdimens{10}{1000}
 21. \fixdimens{10}{968}
 22. \fixdimens{24}{1044}
 23. After fixdimens, count1 = \the\count1.
Produces: See typeset version.

Comments:

TeXbook References: 118. Also: 118-119, 218, 276, 349, 391, 398.

See Also: advance, divide, count, dimen, skip, muskip.

For Related Examples, see: / (italic correction), day, divide, ifnum, time, year

© Copyright 1998-1999, David Bausum. All Rights Reserved.


muskip Math (Registers)
Internal Quantity
Synopsis: \muskip<8-bit register number>=<muglue>

Description:

Example:

  1. \muskip1=30mu plus20mu minus10mu % Do not use in, pt, ...
  2. \muskip2=40mu plus1fil %           fil, fill, filll work.
  3. Hello $a\mskip\muskip1 b\mskip\muskip2 c$ World.
  4. %\dimen1=\muskip1 % Warning, this generates a run-time error.
  5. %\count1=\muskip1 % Warning, this generates a run-time error.
  6. %\muskip1=\count1mu % This works but is of dubious value.
Produces: See typeset version.

Comments:

TeXbook References: 118, 168. Also: 118, 168, 271, 276, 349.

See Also: muskipdef, advance, multiply, divide, dimen.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


muskipdef Math (Registers)
Command
Synopsis: \muskipdef<name>=<8-bit register number>

Description:

TeXbook References: 119. Also: 119, 215, 277.

See Also: muskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


newlinechar Character
-1 * Parameter (integer)
Synopsis: \newlinechar

Description:

TeXbook References: 228. Also: 228, 273, 348.

See Also: write, message, endlinechar, escapechar.

For Related Examples, see: message, pagedepth

© Copyright 1998-1999, David Bausum. All Rights Reserved.


noalign Tables
Command
Synopsis: \noalign{<vertical/horizontal mode material>}

Description:

Example:

  1. \def\tf#1{\omit\hfil #1\hfil}
  2. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
  3. \offinterlineskip
  4. \def\er{\cr\noalign{\hrule}}
  5. \vbox{\halign
  6. {\strutA{8.5pt}{3.5pt}\vrule#&\kern0.5em#\hfil\quad&\vrule#&\quad\hfil#\quad&
  7. \vrule#&\quad\hfil#\quad&\vrule#&\quad\hfil#\kern0.5em&#\vrule\span\er
  8. \omit\strutA{10.5pt}{3.5pt}\vrule&\multispan7\hfil 1970 Federal Budget
  9.  Transfers\hfil&\cr
 10. \omit\strutA{8.5pt}{4.5pt}\vrule&\multispan7\hfil\selffamily AG (in billions
 11.  of dollars)\hfil&\er
 12. \omit\strutA{3pt}{0pt}\vrule&\multispan7&\er
 13. &\tf{State}&&\tf{Taxes}&&\tf{Money}&&\tf{Net}&\cr
 14. &&&\tf{collected}&&\tf{Spent}&&&\er
 15. \omit\strutA{10.5pt}{3.5pt}\vrule&New York&&   22.91&& 21.35&& -1.56&\cr
 16. &New Jersey&&  8.33&&  6.96&& -1.37&\cr
 17. &Connecticut&& 4.12&&  3.10&& -1.02&\cr
 18. &Maine&&       0.74&&  0.67&& -0.07&\cr
 19. &California&& 22.29&& 22.42&& +0.13&\cr
 20. &New Mexico&&  0.70&&  1.49&& +0.79&\cr
 21. &Georgia&&     3.30&&  4.28&& +0.98&\cr
 22. &Mississippi&& 1.15&&  2.32&& +1.17&\cr
 23. \omit\strutA{8.5pt}{5.5pt}\vrule&Texas&&       9.33&& 11.13&& +1.80&\er
 24. }}
Produces: See typeset version.

Comments:

TeXbook References: 237. Also: 176, 191, 193, 237, 246, 249, 282, 285-286.

See Also: halign, cr, crcr, valign.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


noboundary Paragraph
Command
Synopsis: \noboundary

Description:

Example:

     fi\hskip 0.75in 
     f\noboundary i\hskip 0.75in 
     \char102 i\hskip 0.75in 
     \char102\char105\hskip 0.75in 
     \char102\noboundary\char105
Produces: See typeset version.

Comments:

TeXbook References: 286. Also: 283, 286, 290.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


noexpand Macro
Command
Synopsis: \noexpand<token>

Description:

Example:

  1. \def\tmklabel#1#2%
  2. {%
  3.      \write\waux
  4.      {%
  5.           \noexpand\def
  6.           \expandafter\noexpand
  7.           \csname #1\endcsname
  8.           {#2}%
  9.      }%
 10. }
 11. \tmklabel{junkA}{\the\pageno}
Produces: See typeset version.

Comments:

TeXbook References: 213, 216. Also: 209, 213, 215, 216, 348, 377, 424.

See Also: afterassignment, aftergroup, expandafter, futurelet.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


noindent Paragraph
Command
Synopsis: \noindent

Description:

Example:

  1. \parindent=2pc
  2. \indent |\indent| provides one way to start a new paragraph.\par
  3. \indent Also, it can \indent add space anywhere in the paragraph.\par
  4. \noindent |\noindent| also starts a paragraph, but it does not do
  5. the \noindent indent or anything in a paragraph.\par
  6. Finally, |\par| provides a way to end a paragraph that is not followed by a blank line.
Produces: See typeset version.

Comments:

TeXbook References: 86. Also: 86, 188, 262-263, 283, 286, 291, 340-341, 355, 419.

See Also: indent.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


nolimits Math
Command
Synopsis: \nolimits

Description:

Example:

  1. \mathchardef\Intop="1352
  2. \mathchardef\Sum="1350
  3. \def\tint{\Intop\nolimits}
  4. \def\tsum{\Sum}
  5. \def\tf#1#2#3%
  6. {%
  7.      $$\hbox{$#2_0^1 3x^2 = x^3]_0^1 = 1$}%
  8.           \hbox{ and $#3^\infty_{n=0}{1\over2^n} = 2$}%
  9.           \kern2pc
 10.           #2_0^1 3x^2 = \left. x^3\right]_0^1 = 1
 11.           \kern2pc
 12.           #3^\infty_{n=0}{1\over2^n} = 2
 13.           \kern1pc
 14.           \leqno{#1.}
 15.      $$
 16. }
 17. \tf 1{\tint}{\tsum}
 18. \tf 2{\tint\nolimits}{\tsum\nolimits}
Produces: See typeset version.

Comments:

TeXbook References: 144. Also: 144, 159, 292, 358, 361.

See Also: limits, displaylimits, textstyle, displaystyle.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


nonscript Math
Command
Synopsis: \nonscript

Description:

Example:

  1. \def\tfn#1%
  2. {%
  3.      {2\over\sqrt 5\nonscript#1 + #1 1} = 
  4.      {\sqrt 5 #1 -\nonscript#1 1\over 2}
  5. }
  6. $\tfn{\kern1pt}  \hbox{\quad vs\quad}
  7.  \tfn{\kern10pt}$
  8. $$\tfn{\kern1pt} \hbox{\quad vs\quad}
  9.   \tfn{\kern10pt}$$
Produces: See typeset version.

Comments:

TeXbook References: 179. Also: 179, 290, 442, 446.

See Also: scriptstyle, scriptscriptstyle.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


nonstopmode Debugging
Command
Synopsis: \nonstopmode

Description:

Example:

  1. \nonstopmode
  2.   .
  3.   .
  4.   .
  5. \errorstopmode
Produces: See typeset version.

Comments:

TeXbook References: 32. Also: 32, 277, 299.

See Also: batchmode, errorstopmode, scrollmode.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


nulldelimiterspace Math (Kern)
1.2pt * Parameter (dimen)
Synopsis: \nulldelimiterspace<dimen>

Description:

Example:

  1. \def\tfn#1{\everymath{\nulldelimiterspace=#1}$y = {1\over2}x^2$\quad}
  2. \tfn{0pt}
  3. \tfn{0.5pt}
  4. \tfn{1pt}
  5. \tfn{1.2pt}
  6. \tfn{1.4pt}
  7. \tfn{5pt}
  8. \tfn{10pt}\vskip0.5\baselineskip
  9. \def\tbox#1#2#3#4%
 10. {%
 11.      \everydisplay{\nulldelimiterspace=#4}
 12.      \setbox#1=\vbox{\hsize=1.75in$$#2\sum_{n=0}^\infty {1/2^n}#3^2 = 4$$}
 13. }
 14. \def\tdela{\delimiter"43FA3FB }% made a typo, no such chars exist.
 15. \def\tdelb{\delimiter"53FC3FD }
 16. \tbox1{\left\tdela}{\right\tdelb}{1.2pt}
 17. \tbox2{\left\tdela}{\right\tdelb}{10pt}
 18. \def\tdela{\delimiter"462833A }% a space or \relax is mandatory!
 19. \def\tdelb{\delimiter"562933B }
 20. \tbox3{\left\tdela}{\right\tdelb}{10pt}
 21. \hbox to \hsize{\box1\hfil\box2\hfil\box3}
 22. \everydisplay{}\everymath{}
Produces: See typeset version.

Comments:

TeXbook References: 150. Also: 150, 274, 348, 442.

See Also: left, right, abovewithdelims, delimiter.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


nullfont Fonts
Internal Quantity
Synopsis: \nullfont

Description:

TeXbook References: 14, 153. Also: 14, 153, 271, 433.

See Also: font, fontdimen.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


number Character
Command
Synopsis: \number<number>

Description:

Example:

  1. \number 01234\par
  2. \number 0\par
  3. \number-0123\par
  4. \number 18.23\par
  5. \number\month/\number\day/\number\year\par% make today's date.
  6. \setbox0=\hbox{Hello World}
  7. \noindent\copy0: \number\wd0, \the\wd0\par
  8. \setbox0=\hbox to 20pt{\hss}
  9. \noindent\copy0: \number\wd0, \the\wd0\par
Produces: See typeset version.

Comments:

TeXbook References: 40-41. Also: 40-41, 213, 214, 252, 406, 424.

See Also: romannumeral.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


omit Tables
Command
Synopsis: \omit

Description:

Example:

  1. \def\tf#1{\omit\hfil #1\hfil}
  2. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
  3. \offinterlineskip
  4. \vbox{\halign
  5. {\strutA{8.5pt}{3.5pt}\vrule#&\kern0.5em#\hfil\quad&\vrule#&\quad\hfil#\quad&
  6. \vrule#&\quad\hfil#\quad&\vrule#&\quad\hfil#\kern0.5em&#\vrule\cr
  7. &\multispan7\hfil 1970 Federal Budget Transfers\hfil&\cr
  8. &\multispan7\hfil (in billions of dollars)\hfil&\cr
  9. &\tf{State}&&\tf{Taxes}&&\tf{Money}&&\tf{Net}&\cr
 10. &&&\tf{collected}&&\tf{Spent}&&&\cr
 11. &New York&&   22.91&& 21.35&& -1.56&\cr
 12. &New Jersey&&  8.33&&  6.96&& -1.37&\cr
 13. &Connecticut&& 4.12&&  3.10&& -1.02&\cr
 14. &Maine&&       0.74&&  0.67&& -0.07&\cr
 15. &California&& 22.29&& 22.42&& +0.13&\cr
 16. &New Mexico&&  0.70&&  1.49&& +0.79&\cr
 17. &Georgia&&     3.30&&  4.28&& +0.98&\cr
 18. &Mississippi&& 1.15&&  2.32&& +1.17&\cr
 19. &Texas&&       9.33&& 11.13&& +1.80&\cr
 20. }}
Produces: See typeset version.

Comments:

TeXbook References: 240, 243-244. Also: 240, 243-244, 246-247, 282.

See Also: halign, span, valign.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


openin File I/O
Command
Synopsis: \openin<4-bit number>=<file name>

Description:

Example:

  1. %\newread\raux
  2. %\newwrite\waux
  3. \def\tfilecheck#1%
  4. {%
  5.      \openin\raux=#1\relax
  6.      File ``#1'' %
  7.      \ifeof\raux
  8.           \closein\raux
  9.           does not exist.
 10.      \else
 11.           \closein\raux
 12.           exists.
 13. %         \input #1 %
 14.      \fi
 15.      \par
 16. %    \openout\waux=#1 %
 17. }
 18. \tfilecheck{junk}
 19. \tfilecheck{trechar}
 20. \tfilecheck{trechar.tex}
 21. \tfilecheck{\jobname.tmp}
Produces: See typeset version.

Comments:

TeXbook References: 216-217. Also: 216-217, 280.

See Also: closein, read, input.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


openout File I/O
Command
Synopsis: \openout<4-bit number>=<file name>

Description:

Example:

     \openout0=junkjunk.tex\relax
     \write0{\noexpand\bf byebye}
     \closeout0
Produces: See typeset version.

Comments:

TeXbook References: 226-228. Also: 226-228, 254, 280, 422, 423.

See Also: closeout, write, immediate.

For Related Examples, see: openin

© Copyright 1998-1999, David Bausum. All Rights Reserved.


or Logic
Command
Synopsis: \or

Description:

Example:

  1. \def\sillyor#1#2%
  2. {%
  3.      #1. Value is: %
  4.      \ifcase #2 %
  5.           A%
  6.      \or
  7.           B%
  8.      \or
  9.           C%
 10.      \or
 11.           D%
 12.      \else
 13.           hard to say%
 14.      \fi
 15.      .\par
 16. }
 17. \sillyor1{-15}
 18. \sillyor2{0}
 19. \sillyor3{2}
 20. \sillyor4{4}
 21. \sillyor5{0.7071}% (2^.5)/2.
 22. \sillyor6{3.14159}
Produces: See typeset version.

Comments:

TeXbook References: 210. Also: 210, 213, 406.

See Also: ifcase, else.

For Related Examples, see: else

© Copyright 1998-1999, David Bausum. All Rights Reserved.


outer Macro
Command
Synopsis: \outer

Description:

TeXbook References: 206. Also: 206, 210, 275, 354, 357, 418-419, 422.

See Also: def, edef, gdef, xdef, global, long.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


output File I/O
{\shipout\box255} * Parameter (token)
Synopsis: \output{<token list>}

Description:

TeXbook References: 253-257. Also: 125, 253-257, 275, 364, 370, 417.

See Also: shipout, outputpenalty, insertpenalties, deadcycles.

For Related Examples, see: vsize

© Copyright 1998-1999, David Bausum. All Rights Reserved.


outputpenalty Penalties
Parameter (integer)
Synopsis: \outputpenalty

Description:

TeXbook References: 125, 254. Also: 125, 254-255, 273, 349, 400, 417.

See Also: penalty, insertpenalties.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


over Math
Derived Command
Synopsis: \over

Description:

Example:

     ${1 \over 2} + {2 \over 3} = {5 \over 6}$,
     ${a \over b} + {c \over d} = {{a*d}+{b*c} \over {b*d}} = {(a*d + b*c) / (b*d)}$
     \par\vskip0.5\baselineskip
     $x + y^{2\over k+1}$ or
     $x + y^{2/(k+1)}$, which is better?\par\vskip0.5\baselineskip
     ${a+1\over b+1}x$ or
     $\bigl((a+1) / (b+1)\bigr)x$ or
     $(a+1)x / (b+1)$ or
     $(ax+x) / (b+1)$, which is better?
Produces: See typeset version.

Comments:

TeXbook References: 139, 152. Also: 139-141, 148, 152, 292, 437, 444-445.

See Also: atop, above, overwithdelims.

For Related Examples, see: above, hfill, hfilneg

© Copyright 1998-1999, David Bausum. All Rights Reserved.


overfullrule Box
5pt * Parameter (dimen)
Synopsis: \overfullrule

Description:

Example:

     \def\overfullboxes#1#2%
     {%
       \bgroup
          \overfullrule=#2%
          \setbox0=\hbox spread -1em{#1}%
          \count12=\the\badness
          \hbox to 2.5in{\box0\hfil\the\count12}%
       \egroup
     }
     \overfullboxes{The badness of this line is: }{15pt}
     \overfullboxes{The badness of this line is: }{5pt}
     \overfullboxes{The badness of this line is: }{0.5pt}
     \overfullboxes{The badness of this line is: }{0pt}
Produces: See typeset version.

Comments:

TeXbook References: 274. Also: 274, 307, 348.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


overline Math
Command
Synopsis: \overline<character or {subformula}>

Description:

Example:

     \def\ta{\overline}
     To summarize: if $ x + y = z$, 
     $\ta x + \ta y = \ta z $
      and $\ta{x^2} + \ta{y^2} = \ta{z^2}$,
      then $\ta{\ta{x^2} + \ta{y^2}} = \ta{\ta{z^2}}$.\par
     Of course, $ \ta l + \ta m \ne \ta i$.
Produces: See typeset version.

Comments:

TeXbook References: 130-131. Also: 130-131, 136, 141, 170, 291, 443.

See Also: underline.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


overwithdelims Math
Derived Command
Synopsis: \overwithdelims<delim1><delim2>

Description:

Example:

  1. \def\legendre{\overwithdelims()}
  2. \def\euler{\overwithdelims\langle\rangle}
  3. $a \legendre p$ and $a \euler b$\par
  4. If $p$ is an odd prime and $a$ is any number not divisible by $p$,
  5. then Legendre's symbol $a\legendre p$ is defined by:
  6. $$\eqalign{{a\legendre p} = +1\hbox{,\quad if\quad}a\hbox{\ R }p,\cr
  7.            {a\legendre p} = -1\hbox{,\quad if\quad}a\hbox{\ N }p.\cr}$$
Produces: See typeset version.

Comments:

TeXbook References: 152. Also: 152, 292, 444-445.

See Also: over, abovewithdelims.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pagedepth Page
Internal Quantity
Synopsis: \pagedepth

Description:

Example:

  1. \newlinechar=`@     % makes \message{} start on a new line.
  2. %
  3. \everypar={\tpageitems}
  4. \parskip=1pt plus-2.02filll minus3pt
  5. %
  6. \def\tpageitems
  7. {%
  8.      \message
  9.      {
 10.           p1=\the\pagetotal;
 11.           p2=\the\pagegoal;
 12.           p3=\the\pagedepth;
 13.           p4=\the\pagestretch;
 14.           p5=\the\pageshrink;
 15.           p6=\the\pagefilstretch;
 16.           p7=\the\pagefillstretch;
 17.           p8=\the\pagefilllstretch @
 18.      }%
 19. }
Produces: See typeset version.

Comments:

TeXbook References: 114, 123. Also: 114, 123, 214, 271.

See Also: maxdepth, pagegoal, pagetotal, pagestretch, pageshrink, pagefilstretch, pagefillstretch, pagefilllstretch.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pagefilllstretch Page
Internal Quantity
Synopsis: \pagefilllstretch

Description:

TeXbook References: 114. Also: 114, 214, 271.

See Also: pagefilstretch, pagefillstretch, pagestretch, pageshrink, pagegoal, pagetotal, pagedepth, tracingpages.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pagefillstretch Page
Internal Quantity
Synopsis: \pagefillstretch

Description:

TeXbook References: 114. Also: 114, 214, 271.

See Also: pagefilstretch, pagefilllstretch, pagestretch, pageshrink, pagegoal, pagetotal, pagedepth, tracingpages.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pagefilstretch Page
Internal Quantity
Synopsis: \pagefilstretch

Description:

TeXbook References: 114. Also: 114, 214, 271.

See Also: pagefillstretch, pagefilllstretch, pagestretch, pageshrink, pagegoal, pagetotal, pagedepth, tracingpages.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pagegoal Page
Internal Quantity
Synopsis: \pagegoal

Description:

TeXbook References: 114. Also: 114, 123, 214, 271.

See Also: vsize, pagetotal, pagedepth.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pageshrink Page
Internal Quantity
Synopsis: \pageshrink

Description:

TeXbook References: 114. Also: 114, 123, 214, 271.

See Also: pagestretch, pagefilstretch, pagefillstretch, pagefilllstretch, pagegoal, pagetotal, pagedepth, tracingpages.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pagestretch Page
Internal Quantity
Synopsis: \pagestretch

Description:

TeXbook References: 114. Also: 114, 214, 271.

See Also: pageshrink, pagefilstretch, pagefillstretch, pagefilllstretch, pagegoal, pagetotal, pagedepth, tracingpages.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pagetotal Page
Internal Quantity
Synopsis: \pagetotal

Description:

TeXbook References: 114. Also: 114, 123, 214, 271.

See Also: pagegoal, pagestretch, pageshrink, pagefilstretch, pagefillstretch, pagefilllstretch, pagedepth, tracingpages.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


par Paragraph
Command
Synopsis: \par

Description:

Example:

     \parindent=2pc
     \indent |\indent| provides one way to start a new paragraph.\par
     \indent Also, it can \indent add space anywhere in the paragraph.\par
     \noindent |\noindent| also starts a paragraph, but it does not do
     the \noindent indent or anything in a paragraph.\par
     Finally, |\par| provides a way to end a paragraph that is not followed by a blank line.
Produces: See typeset version.

Comments:

TeXbook References: 99-100. Also: 47, 86-87, 100, 135, 202, 249, 262, 283, 286, 340, 351, 380-381.

See Also: parfillskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


parfillskip Paragraph
0pt plus1fil * Parameter (glue)
Synopsis: \parfillskip=<glue>

Description:

Example:

     \hsize=4.75in
     \tstory\par% The \adjdemerits reference page holds the definition of \tstory
     \vskip3pt
     {\parfillskip=0ptplus1filll
     \tstory\par}
Produces: See typeset version.

Comments:

TeXbook References: 100. Also: 100, 188, 274, 286, 307, 315, 332, 348, 394, 419.

See Also: hsize, parindent, par.

For Related Examples, see: predisplaysize

© Copyright 1998-1999, David Bausum. All Rights Reserved.


parindent Paragraph
20pt * Parameter (dimen)
Synopsis: \parindent=<dimen>

Description:

Example:

     \hsize=4.75in
     \parskip=6pt% The \adjdemerits reference page holds the definition of \tstory
     \parindent=2pc\tstory\par
     \parindent=1pc\tstory\par
Produces: See typeset version.

Comments:

TeXbook References: 86, 101. Also: 86, 100, 101-102, 105, 262, 274, 282, 286, 291, 342, 348, 355, 394, 406, 415.

See Also: indent, noindent, hsize, parfillskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


parshape Paragraph
Internal Quantity
Synopsis: \parshape=<number><shape dimensions>

Description:

Example:

  1. \hsize=2.5in
  2. \setbox0=\vbox{\parshape=13 0pt 2.5in 0pt 2.5in 0pt 2in 0pt 2in 0pt 2in 
  3. 0pt 2.5in 0pt 2.5in 0pt 2.5in 0pt 2.5in  0.5in 2in 0.5in 2in 0.5in 2in 0pt 2.5in
  4. \noindent\vrule height10pt depth0pt width0pt\tstory\par}
  5. \copy0% The \adjdemerits reference page holds the definition of \tstory
  6. \vskip6pt
  7. \splittopskip=10pt
  8. \setbox1=\vsplit0 to 84pt
  9. \setbox2=\vbox to 84pt{\unvbox0\vfill}
 10. \hbox to 5.25in{\box1\hfil\box2}
Produces: See typeset version.

Comments:

TeXbook References: 101. Also: 101-103, 214, 271, 277, 283, 315, 349, 374.

See Also: hangafter, handindent, prevgraf.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


parskip Paragraph
0pt plus 1pt * Parameter (glue)
Synopsis: \parskip=<glue>

Description:

Example:

     \parskip=0.5\baselineskip
     \parindent=0pt
     There are many different paragraph styles. The next few . . .
     
     One style is to indent the first line of each paragraph but put no extra space between paragraph. Advantages of . . .
     
     A second style is to start each paragraph flush left and put extra space between paragraphs. This style . . .
Produces: See typeset version.

Comments:

TeXbook References: 104. Also: 79, 104-105, 262, 274, 282, 342, 348, 355, 406, 417.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


patterns Hyphenation
Command
Synopsis: \patterns{<patterns>}

Description:

TeXbook References: 453, 455. Also: 277, 453, 455.

See Also: hyphenation, language.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pausing Debugging
0 * Parameter (integer)
Synopsis: \pausing

Description:

Example:

  1. \pausing=1
  2. Line A.\par
  3. Line B.\par
  4. Line C.\par
  5. Line D.\par
  6. Line E.\par
  7. \pausing=0
Produces: See typeset version.

Comments:

TeXbook References: 303. Also: 273, 303.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


penalty Penalties
Command
Synopsis: \penalty<number>

Description:

Example:

     \setbox1=\vbox{\hsize=2.25in 1. Hello World. How are you?}
     \setbox2=\vbox{\hsize=2.25in 2. Hello World. How\penalty-10000\ are you?}
     \hbox to 4.75in{\box1\hfil\box2}
Produces: See typeset version.

Comments:

TeXbook References: 110-111. Also: 79, 97, 110-111, 174, 280, 353.

See Also: lastpenalty, vadjust.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


postdisplaypenalty Math (Penalties)
0 * Parameter (integer)
Synopsis: \postdisplaypenalty

Description:

TeXbook References: 189-190. Also: 189-190, 272.

See Also: predisplaypenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


predisplaypenalty Math (Penalties)
10000 * Parameter (integer)
Synopsis: \predisplaypenalty

Description:

TeXbook References: 189-190. Also: 189-190, 272, 348.

See Also: postdisplaypenalty, displaywidowpenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


predisplaysize Math (Paragraph)
Parameter (dimen)
Synopsis: \predisplaysize

Description:

Example:

  1. \def\tpds#1#2{\global\setbox#1=\hbox{#2) \the\predisplaysize}}
  2. \bgroup
  3. \parfillskip=330pt
  4. {\it The Fundamental Theorem of Integral Calculus.}
  5. Let $f$ be continuous on the interval $a\le x \le b$. If
  6. $$\abovedisplayshortskip=20pt
  7. F(t) = \int_a^t f(x)\,dx,\qquad a\le t \le b,\tpds2b$$                % b)
  8. then $$D_tF(t) = f(t).\tpds3c$$                                       % c)
  9. \egroup
 10. \noindent $$\hbox{For example, if } F(t) = \int_0^t 3x^2\,dx = t^3
 11.  \hbox{, then }F'(t) = 3t^2.\tpds1a$$                                 % a)
 12. \setbox0=\hbox{then\quad\quad}
 13. \hbox{\box1,\quad\box2,\quad\box3\ = \the\wd0.}
Produces: See typeset version.

Comments:

TeXbook References: 188. Also: 188, 190, 274, 349.

See Also: displayindent, displaywidth, abovedisplayskip, abovedisplayshortskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


pretolerance Paragraph
100 * Parameter (integer)
Synopsis: \pretolerance=<number>

Description:

Example:

     \hsize=1.25in\parindent=0pt
     \pretolerance=100
     \tolerance=200
     \emergencystretch=0pt
     \setbox0=\vtop{\tstory\par}
     \setbox1=\vtop{\pretolerance=10000
     \tstory\par}
     \setbox2=\vtop{\pretolerance=-1\emergencystretch=1.65em
     \tstory\par}
     \hbox to 5.0in{\box0\hfil\box1\hfil\box2}
Produces: See typeset version.

Comments:

TeXbook References: 96, 107. Also: 96, 107, 272, 317, 348, 364, 394, 451.

See Also: tolerance, emergencystretch, badness.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


prevdepth Box
Internal Quantity
Synopsis: \prevdepth

Description:

Example:

  1. \setbox0=\hbox{Box 0. Every}
  2. \setbox1=\hbox{Box 1. jogger}
  3. \setbox2=\hbox{Box 2. runs}
  4. \setbox3=\hbox{Box 3. in}
  5. \setbox4=\hbox{Box 4. place.}
  6. \vtop{
  7. \global\dimen0=\the\prevdepth\copy0
  8. \global\dimen1=\the\prevdepth\copy1
  9. \global\dimen2=\the\prevdepth\copy2
 10. \global\dimen3=\the\prevdepth\copy3
 11. \global\dimen4=\the\prevdepth\copy4
 12. \global\dimen5=\the\prevdepth
 13. }
 14. \vskip0.5\baselineskip
 15. \halign
 16. {&\quad#\hfil\cr
 17. \bf Box&\bf Depth&\bf Prevdepth\cr
 18. 0&\the \dp0& \the\dimen0\cr
 19. 1&\the \dp1& \the\dimen1\cr
 20. 2&\the \dp2& \the\dimen2\cr
 21. 3&\the \dp3& \the\dimen3\cr
 22. 4&\the \dp4& \the\dimen4\cr
 23. End&& \the\dimen5\cr
 24. }
Produces: See typeset version.

Comments:

TeXbook References: 79-80. Also: 79-80, 89, 271, 281, 282.

See Also: baselineskip, unvbox, unvcopy.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


prevgraf Paragraph
Internal Quantity
Synopsis: \prevgraf

Description:

Example:

  1. \def\ta#1{\the\prevgraf\prevgraf=#1}
  2. \hangafter=14\hangindent=3em\hsize=4.75in
  3. There are cries, sobs, confusion among the people, and at\ta{2} that
  4. moment the cardinal himself, the Grand Inquisitor, passes by\ta{4} the
  5. cathedral. He is an old man, almost ninety, tall\ta{6} and erect, with
  6. a withered face and sunken eyes, in\ta{8} which there is still a gleam
  7. of light. He is\ta{10} not dressed in his brilliant cardinal's robes,
  8. as he was\ta{12} the day before, when he was burning the enemies of
  9. the Roman Church~\char144\kern2em\hfill Fyodor Dostoyevsky, {\it The
 10. Brothers Karamazov}\the\prevgraf\par\the\prevgraf\par
Produces: See typeset version.

Comments:

TeXbook References: 103. Also: 103, 188, 190, 214, 271.

See Also: hangafter, parshape.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


radical Math
Command
Synopsis: \radical<27-bit number><single character or {subformula}>

Description:

Example:

  1. \def\sqrt{\radical"0270370 }% page 360 of TB does not have the class digit.
  2. $\mathchar"270\; \mathchar"371 \;
  3.  \mathchar"372\; \mathchar"373 \;
  4.  \mathchar"374   \mathchar"375$
Produces: See typeset version.

Comments:

TeXbook References: 157, 291. Also: 157-159, 291, 443.

See Also: delimiter.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


raise Kern
Command
Synopsis: \raise<dimen><box>

Description:

Example:

  1. \def\ttr#1%
  2. {%
  3.      \setbox0=\hbox{{\selffamily AD [}}%
  4.      \setbox1=\hbox{{\selffamily AD ]}}%
  5.      \raise0.45\dp0\box0%
  6.      {\selffamily AE  #1}%
  7.      \raise0.45\dp1\box1%
  8. }%
  9. Font AD is: {\selffamily AD \fontname\font}.\par
 10. Font AE is: {\selffamily AE \fontname\font}.\par
 11. The current font is: \fontname\font\ (10.0pt is implied).\par
 12. This requires horizontal mode \ttr{285}\ or math mode \ttr{290}.\par
 13. This requires horizontal mode [285] or math mode [290].
Produces: See typeset version.

Comments:

TeXbook References: 285. Also: 66-67, 80, 151, 179, 193, 285, 290, 408.

See Also: lower, moveleft, moveright.

For Related Examples, see: afterassignment, mathchoice

© Copyright 1998-1999, David Bausum. All Rights Reserved.


read File I/O
Command
Synopsis: \read<number> to <control sequence>

Description:

Example:

     \def\tfn{junk}
     \openin0=\tfn\relax
     \read0 to \tts
     \closein0
     |\tts|\par
     \tts \tfn.
Produces: See typeset version.

Comments:

TeXbook References: 217. Also: 215, 217, 276, 346, 401.

See Also: openin, closein.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


relax Macro
Command
Synopsis: \relax

Description:

Example:

  1. \def\tmoveA{\hskip3pt}
  2. \def\tmoveB{\hskip3pt\relax}
  3. \def\tplus#1{There she blows, six points---or in printerspeak #1 plus 6pt
  4. ---off the starboard bow.\par}
  5. \tplus{\tmoveA}
  6. \tplus{\tmoveB}
  7. \def\getcountA#1{\the\count#1}
  8. \def\getcountB#1{\the\count#1\relax}
  9. \count3 = 10
 10. \count31=15
 11. \getcountA 3% count3 is of course 10.
 12. 1. Be sure to ... \the\count3\ and \the\count31\par
 13. \getcountB 3% count3 is of course 10.
 14. 1. Be sure to ... \the\count3\ and \the\count31\par
Produces: See typeset version.

Comments:

TeXbook References: 71, 279. Also: 23, 25, 71, 240, 276, 279, 307, 353.

For Related Examples, see: / (italic correction), accent

© Copyright 1998-1999, David Bausum. All Rights Reserved.


relpenalty Math (Penalties)
500 * Parameter (integer)
Synopsis: \relpenalty

Description:

TeXbook References: 174. Also: 101, 174, 272, 322, 348, 446.

See Also: binoppenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


right Math
Command
Synopsis: \right<delim>

Description:

Example:

  1. \def\mkinvder#1.#2%
  2. {%
  3.      $$\displaylines
  4.        {%
  5.           \hbox to 0.25in{\hfil#1.\ \ }%
  6.           D_x^{-1}\left({#2}\right).\hfill\cr%
  7.        }%
  8.      $$%
  9. }
 10. In numbers 1--15 find the indicated inverse derivative.
 11. \mkinvder 1.{3x^2 + 2x + 1}
 12. \dots
 13. \mkinvder 15.{2x^2 + 7x + 3 \over x + 3}
Produces: See typeset version.

Comments:

TeXbook References: 148-149. Also: 148-150, 155-157, 171, 196, 292, 437.

See Also: left, delcode, delimiter.

For Related Examples, see: delimiterfactor, nulldelimiterspace, vcenter

© Copyright 1998-1999, David Bausum. All Rights Reserved.


righthyphenmin Hyphenation
3 * Parameter (integer)
Synopsis: \righthyphenmin=<number>

Description:

Example:

  1. \def\tstoryA{There are cries, sobs, confusion among the people, and at
  2. that moment the cardinal himself, the Grand Inquisitor, passes by the
  3. cathedral. He is an old man . . .}
  4. {\language255\hyphenation{mome-nt}}
  5. \count0=\righthyphenmin
  6. \setbox0=\vbox{\hsize=2.25in\language255 \tstoryA}
  7. \setbox1=\vbox{\hsize=2.25in\language255\righthyphenmin=2 \tstoryA}
  8. \hbox to \hsize{\box0\hfill\box1}
  9. The values are: \the\count0\ and \the\righthyphenmin.
Produces: See typeset version.

Comments:

TeXbook References: 273, 454. Also: 273, 364, 454, 455.

See Also: lefthyphenmin, language.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


rightskip Paragraph
0pt * Parameter (glue)
Synopsis: \rightskip=<glue>

Description:

Example:

     {\leftskip=0pt
     \rightskip=0pt plus2pc
     \spaceskip=.5em
     \noindent
     \tstory\par}% The \adjdemerits reference page holds the definition of \tstory
     \vskip3pt
     {\leftskip=2pc plus 1fil
     \rightskip=\leftskip
     \spaceskip=.5em
     \noindent\tstory\par}
Produces: See typeset version.

Comments:

TeXbook References: 100-101. Also: 100-101, 274, 317, 356, 393, 421.

See Also: leftskip, parindent, parfillskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


romannumeral Character
Command
Synopsis: \romannumeral<number>

Description:

Example:

  1. \romannumeral -1 \ 
  2. \romannumeral 0 \ 
  3. \romannumeral 1 \ 
  4. \romannumeral 5 \ 
  5. \romannumeral 10 \ 
  6. \romannumeral 50 \ 
  7. \romannumeral 100 \ 
  8. \romannumeral 500 \ 
  9. \romannumeral 1000 \par
 10. \number\year\ is \romannumeral\year\par
 11. \number\year\ is also \uppercase\expandafter{\romannumeral\year}\par
Produces: See typeset version.

Comments:

TeXbook References: 40-41. Also: 40-41, 213, 214, 252.

See Also: number, lowercase.

For Related Examples, see: expandafter, uccode

© Copyright 1998-1999, David Bausum. All Rights Reserved.


scriptfont Math (Fonts)
Internal Quantity
Synopsis: \scriptfont<4-bit family number>=<font identifier>

Description:

Example:

  1. \def\tmathfont#1#2#3#4#5#6#7%
  2. {%
  3.   \begingroup
  4.      \textfont0=#2
  5.      \textfont1=#3
  6.      \scriptfont0=#4
  7.      \scriptfont1=#5
  8.      \scriptscriptfont0=#6
  9.      \scriptscriptfont1=#7
 10.      \hsize=2in
 11.      \global\setbox#1=\vbox
 12.      {%
 13.           $$f(x) = \sum_{n=1}^\infty x^{n^{2}}\quad 0 < x < 1.$$
 14.      }%
 15.   \endgroup
 16. }
 17. \tmathfont{0}{\tenrm}{\teni}{\tenrm}{\teni}{\tenrm}{\teni}
 18. \tmathfont{1}{\tenrm}{\teni}{\sevenrm}{\seveni}{\fiverm}{\fivei}
 19. \hbox to 4.5in{\quad\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 153. Also: 153, 168, 213, 271, 321, 351, 414-415, 441-442.

See Also: textfont, scriptscriptfont, font, fam, scriptstyle.

For Related Examples, see: mathchar, scriptscriptfont

© Copyright 1998-1999, David Bausum. All Rights Reserved.


scriptscriptfont Math (Fonts)
Internal Quantity
Synopsis: \scriptscriptfont<4-bit family number>=<font identifier>

Description:

TeXbook References: 153. Also: 153, 168, 213, 271, 351, 414-415, 441-442.

See Also: textfont, scriptfont, font, fam, scriptscriptstyle.

For Related Examples, see: mathchar

© Copyright 1998-1999, David Bausum. All Rights Reserved.


scriptscriptstyle Math
Command
Synopsis: \scriptscriptstyle

Description:

Example:

  1. \setbox0 = \vbox{\hsize=1.5in
  2. $$\sum_{0\le i\le m \atop 0 < j < n}P(i,j)$$}
  3. \setbox1 = \vbox{\hsize=1.5in
  4. $$\sum_{\scriptstyle0\le i\le m \atop\scriptstyle 0 < j < n}P(i,j)$$}
  5. \hbox to 3.5in{\qquad\box0\hfill\box1}
Produces: See typeset version.

Comments:

TeXbook References: 140-141. Also: 140-142, 145, 179, 292.

See Also: displaystyle, textstyle, scriptstyle, scriptscriptfont, fam.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


scriptspace Math (Kern)
0.5pt * Parameter (dimen)
Synopsis: \scriptspace<dimen>

Description:

Example:

  1. \def\tfn#1#2%
  2. {{%
  3.      \everymath{\scriptspace=#2}
  4.      #1.\quad
  5.      $ x^2_i = x_i * x_i$ and $ x^2 = x * x $.
  6. }}
  7. \tfn1{0pt}\par
  8. \tfn2{0.5pt}\par
  9. \tfn3{1pt}\par
 10. \tfn4{5pt}\par
 11. \tfn5{10pt}\par
Produces: See typeset version.

Comments:

TeXbook References: 445-446. Also: 274, 348, 445-446.

See Also: scriptstyle.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


scriptstyle Math
Command
Synopsis: \scriptstyle

Description:

Example:

  1. \def\mkcstyle#1#2%
  2. {%
  3.      \vbox to 0pt
  4.      {%
  5.           \vss
  6.           \hbox{$#1{\atop #2^2}$}% The numerator is empty!
  7.           \kern0pt
  8.      }%
  9. }
 10. \halign{#\hfil&&\quad#\hfil\cr
 11. \it D&\it T&\it D\ftB, T\ftB&\it S&\it S\ftB&\it SS&\it SS\ftB\cr
 12. \noalign{\vskip2pt\hrule\vskip3pt}
 13. $\displaystyle x^2$&$x^2$&\mkcstyle{\displaystyle}{x}&
 14. $\scriptstyle x^2$&\mkcstyle{\textstyle}{x}&
 15. $\scriptscriptstyle x^2$&\mkcstyle{\scriptstyle}{x}\cr
 16. $\displaystyle X^2$&$X^2$&\mkcstyle{\displaystyle}{X}&
 17. $\scriptstyle X^2$&\mkcstyle{\textstyle}{X}&
 18. $\scriptscriptstyle X^2$&\mkcstyle{\scriptstyle}{X}\cr}
Produces: See typeset version.

Comments:

TeXbook References: 140-141. Also: 140-142, 145, 179, 292.

See Also: displaystyle, textstyle, scriptscriptstyle, scriptfont, fam.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


scrollmode Debugging
Command
Synopsis: \scrollmode

Description:

Example:

  1. \scrollmode
  2.   .
  3.   .
  4.   .
  5. \errorstopmode
Produces: See typeset version.

Comments:

TeXbook References: 32. Also: 32, 277.

See Also: batchmode, errorstopmode, nonstopmode.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


setbox Box
Command
Synopsis: \setbox<8-bit register number>=<hbox or vbox>

Description:

Example:

  1. \setbox0=\hbox{Box 0, level 1.}
  2. \setbox1=\hbox{Box 1, level 1.}
  3. \bgroup
  4.      \setbox0=\hbox{Box 0, level 2.}
  5.      \setbox1=\hbox{Box 1, level 2.}
  6.      \bgroup
  7.           \setbox0=\hbox{Box 0, level 3.}
  8.           \global\setbox1=\hbox{Box 1, level 3, global.}
  9.           \bgroup
 10.                \setbox0=\hbox{Box 0, level 4.}
 11.                \setbox1=\hbox{Box 1, level 4.}
 12.                \unhbox0\quad\unhbox1\par
 13.           \egroup
 14.           \unhbox0\quad\unhbox1\par%\box1 is now empty in all levels!
 15.      \egroup
 16.      \unhbox0\quad\unhbox1\par
 17. \egroup
 18. \unhbox0\quad\unhbox1\par
Produces: See typeset version.

Comments:

TeXbook References: 120. Also: 66-67, 77, 81, 120, 276, 279, 286, 291, 386-392.

See Also: box, hbox, vbox, vtop, vsplit, unhbox, unhcopy, unvbox, unvcopy.

For Related Examples, see: accent, cleaders

© Copyright 1998-1999, David Bausum. All Rights Reserved.


setlanguage Hyphenation
Command
Synopsis: \setlanguage<number>

Description:

Example:

  1. {\language254\hyphenation{am-ong}}
  2. {\language255\hyphenation{I-nquisitor mome-nt}}
  3. \def\tlangA{\lefthyphenmin=2\righthyphenmin=1\setlanguage254}
  4. \def\tlangB{\lefthyphenmin=1\righthyphenmin=1\setlanguage255}
  5. \def\tstoryA{\language254 There are cries, sobs, confusion among the
  6. people, and at that moment the cardinal himself, the Grand Inquisitor,
  7. passes by the cathedral. He is an old man . . .}
  8. \def\tstoryB{\setbox2=\hbox{\tlangA There are cries, sobs, confusion
  9. among the people, and at that \tlangB moment the cardinal himself, the
 10. Grand Inquisitor, passes by the cathedral. He is an old man . . .}}
 11. \setbox0=\vbox{\hsize=2.25in \tstoryA}
 12. \setbox1=\vbox{\hsize=2.25in\language255 \tstoryB\unhbox2}% First, make box2
 13. \hbox to \hsize{\box0\hfill\box1}%                          then,  unbox it.
Produces: See typeset version.

Comments:

TeXbook References: 455. Also: 287, 455.

See Also: language, lefthyphenmin, righthyphenmin.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


sfcode Character
Internal Quantity
Synopsis: \sfcode<8-bit number>

Description:

Example:

     \def\junkspacing{\sfcode`\.32767 \sfcode`\?6000 \sfcode`\!3000
       \sfcode`\:2500 \sfcode`\;2000 \sfcode`\,1500}
     \def\nonfrenchspacing{\sfcode`\.3000 \sfcode`\?3000 \sfcode`\!3000
       \sfcode`\:2000 \sfcode`\;1500 \sfcode`\,1250}
     \def\frenchspacing{\sfcode`\.1000 \sfcode`\?1000 \sfcode`\!1000
       \sfcode`\:1000 \sfcode`\;1000 \sfcode`\,1000}
     % Quotes are intentionally omitted in the following story:
     \def\tstory{Once upon a time, there was a naughty squirrel. Where shall I eat
      today? it asked. There were three options: a distant oak tree; a nearby 
     walnut tree; and a freshly-stocked bird feeder. I think }
     %
     \parindent 1.5pc
     \junkspacing \tstory\par
     \nonfrenchspacing \tstory\par
     \frenchspacing \tstory\par
Produces: See typeset version.

Comments:

TeXbook References: 76. Also: 76, 214, 271, 286, 321, 345, 351.

See Also: catcode, lccode, uccode, spacefactor.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


shipout File I/O
Command
Synopsis: \shipout<box>

Description:

TeXbook References: 253-255. Also: 227, 253-255, 279, 300, 302.

See Also: output, deadcycles, tracingstats.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


show Debugging
Command
Synopsis: \show<token>

Description:

Example:

  1. \def\tbox#1{\boxit{\hbox{#1}}}
  2. \def\tfn#1{\everymath{\nulldelimiterspace=#1}$y = {1\over2}x^2$\quad}
  3. \show\tbox
  4. \show\tfn
  5. \show The big Box.
  6. \setbox0=\tbox A
  7. \show\wd0
  8. \show\show
Produces: See typeset version.

Comments:

TeXbook References: 10. Also: 10, 213, 215, 279, 299.

See Also: meaning, showbox, showlists, showthe.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


showbox Debugging
Command
Synopsis: \showbox<8-bit number>

Description:

Example:

  1. \setbox0=\boxit{\hbox{A}}%
  2. \setbox1=\hbox{B}%
  3. \setbox2=\hbox{\boxit{\copy0}\kern25pt\boxit{\copy1}}%
  4. \setbox3=\boxit{\box2}
  5. \showboxdepth=100
  6. \showboxbreadth=100
  7. \showbox3
  8. \box3
Produces: See typeset version.

Comments:

TeXbook References: 66-67. Also: 66-67, 121, 234, 279.

See Also: showboxbreadth, showboxdepth, showlists, show, showthe.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


showboxbreadth Debugging
5 * Parameter (integer)
Synopsis: \showboxbreadth=<number>

Description:

Example:

  1. \setbox0=\boxit{\hbox{A}}%
  2. \setbox1=\hbox{B}%
  3. \setbox2=\hbox{\boxit{\copy0}\kern25pt\boxit{\copy1}}%
  4. \setbox3=\boxit{\box2}
  5. \showboxdepth=100
  6. \showboxbreadth=2
  7. \showbox3
  8. \box3
Produces: See typeset version.

Comments:

TeXbook References: 302. Also: 273, 302, 303, 348.

See Also: showboxdepth, showbox, showlists.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


showboxdepth Debugging
3 * Parameter (integer)
Synopsis: \showboxdepth=<number>

Description:

Example:

  1. \setbox0=\boxit{\hbox{A}}%
  2. \setbox1=\hbox{B}%
  3. \setbox2=\hbox{\boxit{\copy0}\kern25pt\boxit{\copy1}}%
  4. \setbox3=\boxit{\box2}
  5. \showboxdepth=2
  6. \showboxbreadth=100
  7. \showbox3
  8. \box3
Produces: See typeset version.

Comments:

TeXbook References: 302. Also: 79, 273, 302, 303, 348.

See Also: showboxbreadth, showbox, showlists.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


showlists Debugging
Command
Synopsis: \showlists

Description:

Example:

  1. Hello {\it World}. {\selffamily AB Now} . . .
  2. \showboxdepth=100
  3. \showboxbreadth=100
  4. \setbox0=\hbox{\boxit{\hbox{\selffamily AA A}}\showlists}%
  5. \box0
Produces: See typeset version.

Comments:

TeXbook References: 88-89, 158-159. Also: 88-89, 95, 112, 125, 158-159, 279, 293.

See Also: showboxbreadth, showboxdepth, showbox, show, showthe.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


showthe Debugging
Command
Synopsis: \showthe<internal quantity>

Description:

Example:

  1. \setbox0=\hbox{A}
  2. \showthe\wd0 %      these are internal quantities---page 271 of TTB.
  3. \showthe\ht0
  4. \showthe\dp0
  5. \showthe\tolerance %   this is parameter: integer---page 272
  6. \showthe\hsize %       this is parameter: dimen-----page 274
  7. \showthe\parfillskip % this is parameter: glue------page 274
  8. \showthe\medmuskip %   this is parameter: muglue----page 274
Produces: See typeset version.

Comments:

TeXbook References: 279 . Also: 121, 215, 279.

See Also: show, showbox, showlists.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


skewchar Math (Character)
Internal Quantity
Synopsis: \skewchar<font>=<-1 or 8-bit number>

Description:

Example:

  1. The skew char for the math italics font is: $\mathchar"17F$.\par
  2. The skew char for the math symbols font is: $\mathchar"230$.\par
  3. \def\tma#1#2%
  4. {%
  5.      \skewchar\teni=-1
  6.      \skewchar\tensy=-1
  7.      $ #1 $ vs $\mathaccent"14 #1$ vs
  8.      \skewchar\teni="7F
  9.      \skewchar\tensy="30
 10.      $ \mathaccent"14 #1$. Adjusted $#2*0.5mu$ units.\par
 11. }
 12. \tma{\mathchar"141}5
 13. \tma{\mathchar"241}7
 14. \tma{\mathchar"254}1
Produces: See typeset version.

Comments:

TeXbook References: 443. Also: 214, 271, 273, 277, 351, 414, 430-431, 443.

See Also: defaultskewchar, mathaccent.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


skip Registers
Internal Quantity
Synopsis: \skip<8-bit register number>=<glue>

Description:

Example:

  1. \skip1=0.75\baselineskip plus 10pt minus 6pt
  2. \skip2=1.5\skip1
  3. \skip3=-\skip2
  4. \skip4=0.66667\skip3
  5. The skips are: \the\skip1; \the\skip2; \the\skip3; \the\skip4.\par
  6. \skip5=6pt plus-4pt minus2pt
  7. \advance\skip5 by \skip1
  8. \skip6=\skip1
  9. Skip5 = \the\skip5; skip6 = \the\skip6.\par
 10. \dimen1=\skip1
 11. \count1=\dimen1
 12. \count4=\skip4
 13. Dimen1 = \the\dimen1; count1 = \the\count1; count4 = \the\count4.\par
Produces: See typeset version.

Comments:

TeXbook References: 118-122. Also: 118-122, 271, 276, 346-347, 349, 352, 363, 394.

See Also: skipdef, advance, multiply, divide, dimen.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


skipdef Registers
Command
Synopsis: \skipdef<name>=<8-bit register number>

Description:

Example:

     % skip variables from Plain TeX [349].
     \newskip\smallskipamount
     \newskip\medskipamount
     \newskip\bigskipamount
     \newskip\normalbaselineskip
     \newskip\normallineskip
     \smallskipamount=3pt plus 1pt minus 1pt
     \medskipamount=6pt plus 2pt minus 2pt
     \bigskipamount=12pt plus 4pt minus 4pt
     \normalbaselineskip=12pt
     \normallineskip=1pt
Produces: See typeset version.

TeXbook References: 119. Also: 119, 215, 277, 346-347.

See Also: skip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


spacefactor Paragraph
Internal Quantity
Synopsis: \spacefactor=<number>

Description:

Example:

  1. {\sfcode`\.3000\sfcode`\?3000\sfcode`\!3000%
  2.  \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
  3. \tstory\par}
  4. \vskip6pt
  5. {\frenchspacing
  6. \tstory\par}
Produces: See typeset version.

Comments:

TeXbook References: 76. Also: 76, 271, 285, 363, 433.

See Also: sfcode, spaceskip, xspaceskip, fontdimen.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


spaceskip Paragraph
0pt * Parameter (glue)
Synopsis: \spaceskip=<number>

Description:

Example:

     \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000%
      \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
     \xspaceskip=0pt
     \spaceskip=0.5em
     \tstory\par
Produces: See typeset version.

Comments:

TeXbook References: 76. Also: 76, 274, 317, 356, 429.

See Also: xspaceskip, spacefactor.

For Related Examples, see: rightskip

© Copyright 1998-1999, David Bausum. All Rights Reserved.


span Tables
Command
Synopsis: \span

Description:

Example:

  1. %\newdimen\digitwidth % This appears in the formatting file.
  2. \setbox0=\hbox{0}
  3. \digitwidth=\wd0
  4. \catcode`?=13
  5. \def?{\kern\digitwidth}
  6. \def\er{\crcr\noalign{\hrule}}
  7. \def\tm{\hskip0.5em}
  8. \def\tfc#1{\tm\hfil\smash{\lower5pt\hbox{#1}}\hfil\tm}
  9. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
 10. \offinterlineskip
 11. \setbox0=\vbox{\halign
 12. {\strutA{9pt}{4pt}\vrule#&\tm#\hfil\tm&\vrule#&\tm\hfil#\hfil\tm&\vrule#&
 13. \tm\hfil#\hfil\tm&\vrule#&\tm\hfil#\hfil\tm&#\vrule\cr\er
 14. &\multispan7\hfil\bf Composition of Foods\hfil&\cr
 15. \omit\strutA{0.8pt}{0pt}\vrule&\multispan7\leaders\hrule height 0.8pt\hfill&\cr
 16. &&&\multispan5\hfil Percent by Weight\hfil&\cr
 17. \omit\strutA{0.4pt}{0pt}\vrule&&&\multispan5\leaders\hrule\hfill&\cr
 18. &\omit\hfil Food\hfil&&\omit\tfc{Protein}&&\omit\tfc{Fat}&&Carbo-&\cr
 19. &&&&&&&hydrate&\er
 20. &Apples&&    ??.4&&?.5&&13.0&\cr
 21. &Halibut&&   18.4&&5.2&&?...?&\cr
 22. &Lima Beans&&?7.5&&?.8&&22.0&\cr
 23. &Milk&&      ?3.3&&4.0&&?5.0&\cr
 24. &Mushrooms&& ?3.5&&?.4&&?6.0&\cr
 25. &Rye Bread&& ?9.0&&?.6&&52.7&\er
 26. }}
 27. \hbox to \pagewidth{\hfil\box0\hfil\hfil}
Produces: See typeset version.

Comments:

TeXbook References: 238, 243-244. Also: 215, 238, 243-245, 248-249, 282, 330, 385.

See Also: halign, omit, valign.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


special File I/O
Command
Synopsis: \special{<token list>}

Description:

Example:

  1. %\special{header=clock.ps}% this goes at beginning of main formatting file.
  2. \def\mkclockA#1#2% degrees to rotate: minute, hour hands.
  3. {%
  4.      \special{ps: gsave 
  5.      currentpoint translate
  6.      1.0 -1.0 scale 
  7.      #1 #2 clock
  8.      grestore}%
  9. }
 10. The times are:\par
 11. \setbox0=\hbox to \hsize
 12. {%
 13.      \hfil
 14.      \mkclockA{0}{0}%
 15.      \kern 1in\mkclockA{-90}{-7}%
 16.      \kern 1in\mkclockA{-180}{-15}%
 17.      \kern 1in\mkclockA{-270}{-22}%
 18.      \kern 1in\mkclockA{-360}{-30}%
 19.      \hfil
 20. }
 21. \vbox to 1in{\vfil\box0\vfil}
Produces: See typeset version.

Comments:

TeXbook References: 228-229. Also: 216, 226, 228-229, 280.

See Also: write.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


splitbotmark Inserts (Marks)
Command
Synopsis: \splitbotmark

Description:

TeXbook References: 259. Also: 213, 259, 280.

See Also: mark, splitfirstmark, vsplit.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


splitfirstmark Inserts (Marks)
Command
Synopsis: \splitfirstmark

Description:

Example:

  1. \def\tstoryB{There are cries, sobs, confusion among the people, and
  2. at that moment the cardinal himself, the Grand Inquisitor
  3. \mark{Grand Inquisitor}, passes by the cathedral. He is an old man,
  4. almost ninety, tall and erect, with a withered face and sunken eyes,
  5. in which there is still a gleam of light. He is not dressed in his
  6. brilliant cardinal's robes, as he was the day before, when he was
  7. burning the enemies of the Roman Church~\char144\kern2em\hfill Fyodor
  8. Dostoyevsky, {\it The Brothers Karamazov}}
  9. \splittopskip=15.2pt
 10. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
 11. \setbox1=\vbox{\hsize=2.5in\strutA{\splittopskip}{0pt}
 12.                \mark{Hello}\tstoryB\mark{World}}
 13. \dimen0=\ht1
 14. \advance\dimen0 by \dp1
 15. \advance\dimen0 by \splittopskip
 16. \divide\dimen0 by 2
 17. \setbox0=\vsplit1 to \dimen0
 18. \setbox2=\vbox to \dimen0{\unvbox0\vfill}
 19. \setbox3=\vbox to \dimen0{\unvbox1\vfill}
 20. \hrule
 21. \hbox to \hsize{\box2\hfil\box3}
 22. \hrule
 23. \strutA{\baselineskip}{0pt}\splitfirstmark, \splitbotmark.
Produces: See typeset version.

Comments:

TeXbook References: 259. Also: 213, 259, 280.

See Also: mark, splitbotmark, vsplit.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


splitmaxdepth Inserts (Box)
4pt * Parameter (dimen)
Synopsis: \splitmaxdepth=

Description:

TeXbook References: 124. Also: 124, 274, 281, 348, 363, 417.

See Also: vsplit, splittopskip, insert.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


splittopskip Inserts (Box)
10pt * Parameter (glue)
Synopsis: \splittopskip=<glue>

Description:

Example:

  1. \splittopskip=18.3pt
  2. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
  3. \setbox1=\vbox{\hsize=2.5in\strutA{\splittopskip}{0pt}\tstory}
  4. \dimen0=\ht1
  5. \advance\dimen0 by \dp1
  6. \advance\dimen0 by \splittopskip
  7. \divide\dimen0 by 2
  8. \setbox0=\vsplit1 to \dimen0
  9. \setbox2=\vbox to \dimen0{\unvbox0\vfill}
 10. \setbox3=\vbox to \dimen0{\unvbox1\vfill}
 11. \hrule
 12. \hbox to \hsize{\box2\hfil\box3}
 13. \hrule
Produces: See typeset version.

Comments:

TeXbook References: 124. Also: 124, 274, 281, 348, 363, 397, 417.

See Also: vsplit, splitmaxdepth, insert.

For Related Examples, see: parshape

© Copyright 1998-1999, David Bausum. All Rights Reserved.


string Character
Command
Synopsis: \string<token>

Description:

Example:

  1. \def\tstring#1{\string #1\par}
  2. \tstring{Hi~\TeX.}
  3. \tstring{~\TeX\ Hi.}
  4. \tstring{\TeX\ Hi~.}
  5. \string { Hi.\par
  6. % See how \string works with the 10 special characters.
  7. \string {
  8. \string }
  9. \string \
 10. \string ^
 11. \string &
 12. \string $
 13. \string #
 14. \string _
 15. \string ~
 16. \string %
 17. \TeX
 18. \%
Produces: See typeset version.

Comments:

TeXbook References: 40, 213. Also: 40-41, 213-215, 348, 377.

See Also: escapechar.

For Related Examples, see: escapechar

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tabskip Tables
0pt * Parameter (glue)
Synopsis: \tabskip=<glue>

Description:

Example:

  1. \def\er{\crcr\noalign{\hrule}}
  2. \def\tg{0.22em plus 3em}
  3. \def\tm{\hskip\tg}
  4. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
  5. \def\mktable#1#2{\setbox#1=\vbox{\offinterlineskip
  6. \halign #2%
  7. {\vrule\strutA{10pt}{4pt}##\tabskip=\tg&##\hfil&##\vrule&##\hfil&% in a def
  8.  ##\vrule\tabskip=0pt&\tm\hfil##\hfil\tm&##\vrule\cr\er%           so use ##.
  9. &\multispan5\bf\hfil Major New York Bridges\hfil&\er
 10. &\omit\hfil Bridge\hfil&&\omit\hfil Designer\hfil&&Length&\er
 11. &Brooklen&&          J. A. Roebling&& 1595&\cr
 12. &Manhattan&&         G. Lindenthal&&  1470&\cr
 13. &Williamsburg&&      L. L. Buck&&     1600&\er
 14. &Queensborough&&     Palmer \&&&      1182&\cr
 15. &             &&     \ \ Hornbostel&&       &\er
 16. &             &&               && 1380&\cr
 17. &Triborough&&        O. H. Ammann&&
 18.   \omit\leaders\hrule height 3pt depth -2.6pt\hfill&\cr
 19. &                &&              &&   ?383&\er
 20. &Bronx Whitestone&&  O. H. Ammann&&   2300&\cr
 21. &Throgs Neck&&       O. H. Ammann&&   1800&\er
 22. &George Washington&& O. H. Ammann&&   3500&\er
 23. }}}
 24. \mktable{0}{}%
 25. \mktable{1}{spread 20pt}%
 26. \moveleft0.5in\hbox{\box0\hskip4pt\box1}
Produces: See typeset version.

Comments:

TeXbook References: 237-238. Also: 215, 237-239, 244, 247, 274, 282, 285, 354.

See Also: halign, valign.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


textfont Math (Fonts)
Internal Quantity
Synopsis: \textfont<4-bit family number>=<font identifier>

Description:

Example:

  1. \def\tmathfont#1#2#3%
  2. {%
  3.   \begingroup
  4.     \textfont0=#2
  5.     \textfont1=#3
  6.     \edef\rm{\fam0#2}
  7.     \parindent=1.5pc
  8.     \noindent #1. Font 0 is: \fontname\textfont0, and 
  9.                   font 1 is: \fontname\textfont1.
 10.     Space widths are: \the\fontdimen2\textfont0\ and 
 11.                       \the\fontdimen2\textfont1.\par
 12.     ${\rm A.\ If\ } i {\rm\ is\ prime\ to\ }m, {\rm the\ congruence\ }
 13.     ix \equiv 1 \hbox{ (mod $m$) has just 1 root. Also, \dots}$\par % p 88.
 14.     $f(x) = 3x^2 + 2x - 1$ \par
 15.   \endgroup
 16. }
 17. \tmathfont{1}{\tenrm}{\teni}
 18. \tmathfont{2}{\teni}{\tenrm}
 19. \tmathfont{3}{\rm}{\it}
 20. Compare the Caslon `A' with the CM `{\tenrm A}'.
Produces: See typeset version.

Comments:

TeXbook References: 153. Also: 153, 168, 188, 213, 271, 351, 414-415, 441-442.

See Also: scriptfont, scriptscriptfont, font, fam, displaystyle, textstyle.

For Related Examples, see: mathchar, scriptfont, scriptscriptfont

© Copyright 1998-1999, David Bausum. All Rights Reserved.


textstyle Math
Command
Synopsis: \textstyle

Description:

Example:

  1. \def\mkcstyle#1#2%
  2. {%
  3.      \vbox to 0pt
  4.      {%
  5.           \vss
  6.           \hbox{$#1{\atop #2^2}$}%
  7.           \kern0pt
  8.      }%
  9. }
 10. \halign{#\hfil&&\quad#\hfil\cr
 11. \it D&\it T&\it D\ftB, T\ftB&\it S&\it S\ftB&\it SS&\it SS\ftB\cr
 12. \noalign{\vskip2pt\hrule\vskip3pt}
 13. $\displaystyle x^2$&$x^2$&\mkcstyle{\displaystyle}{x}&
 14. $\scriptstyle x^2$&\mkcstyle{\textstyle}{x}&
 15. $\scriptscriptstyle x^2$&\mkcstyle{\scriptstyle}{x}\cr
 16. $\displaystyle X^2$&$X^2$&\mkcstyle{\displaystyle}{X}&
 17. $\scriptstyle X^2$&\mkcstyle{\textstyle}{X}&
 18. $\scriptscriptstyle X^2$&\mkcstyle{\scriptstyle}{X}\cr}
Produces: See typeset version.

Comments:

TeXbook References: 140-141. Also: 140-142, 292, 326.

See Also: displaystyle, scriptstyle, scriptscriptstyle, textfont, fam.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


the Macro
Command
Synopsis: \the<internal quantity>

Description:

Example:

  1. \def\tprim#1{#1 = \the\csname #1\endcsname}
  2. Here are some internal quantities: \tprim{inputlineno}; \tprim{spacefactor}\par
  3. Here are some integer parameters: \tprim{widowpenalty}; \tprim{showboxdepth}\par
  4. Here are some dimen parameters: \tprim{hsize}; \tprim{vsize}\par
  5. Here are some glue parameters: \tprim{baselineskip}; \tprim{topskip}\par
  6. Here are some muglue parameters: \tprim{thinmuskip}\par
  7. Here are some internal quantities: \tprim{inputlineno}; count0 = \the\count0\par
Produces: See typeset version.

Comments:

TeXbook References: 214, 271-275. Also: 214-216, 373, 375, 422.

See Also: showthe.

For Related Examples, see: day, divide, ifnum, pagedepth

© Copyright 1998-1999, David Bausum. All Rights Reserved.


thickmuskip Math (Glue)
5mu plus 5mu * Parameter (muglue)
Synopsis: \thickmuskip<muglue>

Description:

Example:

     \def\tf#1#2#3#4%
     {%
          \thinmuskip=#1%
          \medmuskip=#2%
          \thickmuskip=#3%
          $$F_n = F_{n-1} + F_{n-2} \hbox{, for } n \ge 2\leqno(#4.)$$
     }
     The Fibonacci numbers are defined by: $F_0=1$, $F_1=1$, and
     \tf{3mu}{4mu plus 2mu minus 4mu}{5mu plus 5mu}1
     \tf{3mu}{4mu plus 2mu minus 4mu}{0mu}2
     \tf{0mu}{0mu}{0mu}3
Produces: See typeset version.

Comments:

TeXbook References: 168, 170. Also: 167-168, 170, 274, 349, 446.

See Also: mskip, thinmuskip, medmuskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


thinmuskip Math (Glue)
3mu * Parameter (muglue)
Synopsis: \thinmuskip<muglue>

Description:

Example:

  1. 
  2. $\sqrt 2 x$ vs $\sqrt 2\,x$\hskip0.5in           % \def\,{\mskip\thinmuskip}
  3. $\sqrt{\log x}$ vs $\sqrt{\,\log x}$\hskip0.5in  % \def\!{\mskip-\thinmuskip}
  4. $O\bigl({1/\sqrt n}\bigr)$ vs $O\bigl({1/ \sqrt n}\,\bigr)$\par
  5. \vskip0.5\baselineskip
  6. $[0,1)$ vs $[\,0,1)$\hskip0.5in
  7. $x^2/2$ vs $x^2\!/2$\hskip0.5in
  8. $\int_0^x\int_0^y dF(x,y)$ vs $\int_0^x\!\int_0^y dF(x,y)$\par
  9. $$\int\int_D dxdy 
 10. \hskip6pt \int\!\int_D dx\,dy
 11. \hskip6pt \int\!\!\int_D dx\,\,dy
 12. \hskip6pt \int\!\!\!\int_D dx\,\,\,dy
 13. \hskip6pt \int\!\!\!\!\int_D dx\,\,\,\,dy
 14. \hskip6pt \int\!\!\!\!\!\int_D dx\,\,\,\,\,dy
 15. \hskip6pt \int\!\!\!\int_D dx\,dy$$
Produces: See typeset version.

Comments:

TeXbook References: 168, 170. Also: 167-168, 170, 274, 349, 446.

See Also: mskip, medmuskip, thickmuskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


time Job
Parameter (integer)
Synopsis: \time

Description:

Example:

  1. \def\mytimeA#1%format #1 (usually \the\time) using a.m. & p.m.
  2. {%
  3.   {%
  4.      \count20=#1 %
  5.      \count22=\count20
  6.      \divide \count20 by 60
  7.      \count21=\count20
  8.      \multiply\count21 by -60
  9.      \advance\count22 by \count21
 10.      \ifnum\count20<12
 11.           \def\tapm{ a.m.}%
 12.      \else
 13.           \def\tapm{ p.m.}%
 14.      \fi
 15.      \ifnum\count20=0
 16.           \count20=12
 17.      \fi
 18.      \ifnum\count20>12
 19.           \advance\count20 by -12
 20.      \fi
 21.      \the\count20:%
 22.      \ifnum\count22<10 0\fi
 23.      \the\count22
 24.      \tapm
 25.   }%
 26. }
 27. \mytimeA{0}---\mytimeA{30}---\mytimeA{90}---\mytimeA{720}---%
 28. \mytimeA{750}---\mytimeA{1410}\par
 29. \count20=-100
 30. Time is: \the\time, and count20 = \the\count20.\par
 31. Better time is: \mytimeA{\the\time}, and count20 = \the\count20.
Produces: See typeset version.

Comments:

TeXbook References: 349. Also: 273, 349.

See Also: day, month, year.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


toks Registers
Internal Quantity
Synopsis: \toks<8-bit register number>={<replacement text>}

Description:

TeXbook References: 212. Also: 212, 215, 262, 276.

See Also: toksdef.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


toksdef Registers
Command
Synopsis: \toksdef<name>=<8-bit register number>

Description:

TeXbook References: 212. Also: 212, 215, 277, 347, 378.

See Also: toks.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tolerance Paragraph
200 * Parameter (integer)
Synopsis: \tolerance=<number>

Description:

Example:

     \hsize=1.25in\parindent=0pt
     \pretolerance=100
     \tolerance=200
     \emergencystretch=0pt
     \setbox0=\vtop{\tstory\par}
     \setbox1=\vtop{\tolerance=10000
     \tstory\par}
     \setbox2=\vtop{\emergencystretch=1.65em
     \tstory\par}
     \hbox to 5.0in{\box0\hfil\box1\hfil\box2}
Produces: See typeset version.

Comments:

TeXbook References: 96, 107. Also: 29-30, 91, 94, 96, 107, 272, 317, 333, 342, 348, 364, 451.

See Also: pretolerance, emergencystretch, badness.

For Related Examples, see: pretolerance

© Copyright 1998-1999, David Bausum. All Rights Reserved.


topmark Marks
Command
Synopsis: \topmark

Description:

Example:

  1. % These lines are from the macro that makes the reference page
  2. % for a control sequence.
  3. % We have: \def\CScs{ControlSequence}, e.g., \def\CScs{topmark}
  4. % \box0 holds everything through the Synopsis line.
  5.      \mark{\currentcs\noexpand\else\CScs}
  6. % Do \eject unless following \box0 will fit on current page.
  7. % The \ifdim reference page shows this test.
  8.      \unvbox0%
  9.      \mark{\CScs\noexpand\else\CScs}
 10. % Typeset the rest of the page.
 11.      \let\currentcs=\CScs
Produces: See typeset version.

Comments:

TeXbook References: 258-260. Also: 213, 258, 259-260, 280.

See Also: mark, firstmark, botmark.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


topskip Page
10pt * Parameter (glue)
Synopsis: \topskip=<glue>

Description:

TeXbook References: 113-114. Also: 113-114, 124, 256, 274, 348.

See Also: vsize, splittopskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tracingcommands Debugging
0 * Parameter (integer)
Synopsis: \tracingcommands=<number>

Description:

Example:

  1. \def\checkit#1#2% The next line has a missing % !
  2. {
  3.      \setbox0=\hbox{#1}%
  4.      \ifdim\wd0 > #2%
  5.           Too wide!%
  6.      \else
  7.          \box0
  8.      \fi
  9. }
 10. \tracingcommands=1
 11. ---\checkit{Hello World}{60pt}\par
 12. \tracingcommands=0
 13. \message{Try a new one}
 14. \tracingcommands=2
 15. ---\checkit{Hello World}{20pt} Sorry.
 16. \tracingcommands=0
Produces: See typeset version.

Comments:

TeXbook References: 88, 212. Also: 88-89, 212, 273, 299.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tracinglostchars Debugging
1 * Parameter (integer)
Synopsis: \tracinglostchars=<number>

Description:

Example:

  1. \newlinechar=`@
  2. \tracinglostchars=1
  3. \message{Check for missing characters.@}
  4. 1. \char247\char250\char251\char254\quad% 250 = "fa.
  5. \message{Try it now.@}
  6. \tracinglostchars=0
  7. 2. \char247\char250\char251\char254
  8. \message{Did we catch them?@}
Produces: See typeset version.

Comments:

TeXbook References: 301. Also: 273, 301, 348, 401.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tracingmacros Debugging
0 * Parameter (integer)
Synopsis: \tracingmacros=<number>

Description:

Example:

  1. \def\checkit#1#2%
  2. {%
  3.      \setbox0=\hbox{#1}%
  4.      \ifdim\wd0 > #2%
  5.           Too wide!%
  6.      \else
  7.          \box0
  8.      \fi
  9. }
 10. \tracingmacros=1
 11. \checkit{Hello World}{60pt}\par
 12. \checkit{Hello World}{20pt} Sorry.
 13. \tracingmacros=0
Produces: See typeset version.

Comments:

TeXbook References: 205, 212. Also: 205, 212, 273, 329.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tracingonline Debugging
0 * Parameter (integer)
Synopsis: \tracingonline=<number>

Description:

TeXbook References: 303. Also: 121, 212, 273, 303.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tracingoutput Debugging
0 * Parameter (integer)
Synopsis: \tracingoutput=<number>

Description:

Example:

  1. \setbox0=\boxit{\hbox{A}}%
  2. \setbox1=\hbox{B}%
  3. \setbox2=\hbox{\boxit{\copy0}\kern25pt\boxit{\copy1}}%
  4. \setbox3=\boxit{\box2}
  5. \copy3
  6. \showboxdepth=2
  7. \showboxbreadth=4
  8. \tracingoutput=1
  9. \vfill\eject
 10. \tracingoutput=0
Produces: See typeset version.

Comments:

TeXbook References: 254. Also: 254, 273, 301-302.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tracingpages Debugging
0 * Parameter (integer)
Synopsis: \tracingpages=<number>

Description:

Example:

     \tracingpages=1
     % Put `critical' lines here . . .
     \tracingpages=0
Produces: See typeset version.

Comments:

TeXbook References: 112-113. Also: 112-114, 124, 273, 303.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tracingparagraphs Debugging
0 * Parameter (integer)
Synopsis: \tracingparagraphs=<number>

Description:

Example:

  1. \tracingparagraphs=1
  2. \dropcap{}{I}F this parameter is positive, \tex\ writes the
  3. line-breaking calculations to the log file \tr{98}. If
  4. |\tracingonline| is positive, the calculations are also displayed on
  5. the terminal. Some versions of \tex\ don't look at this parameter
  6. \tr{303}.
Produces: See typeset version.

Comments:

TeXbook References: 98-99. Also: 98-99, 273, 303.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tracingrestores Debugging
0 * Parameter (integer)
Synopsis: \tracingrestores=<number>

Description:

Example:

  1. \newlinechar=`@     % makes \message{} start on new line.
  2. \newcount\tnum
  3. \def\l{\advance\tnum by 1}
  4. \def\g{\global\advance\tnum by 1}
  5. \tnum=1
  6. \message{1. at start: tnum=\the\tnum @}
  7. \tracingrestores=1
  8. \bgroup
  9.      \message{2. new group@}
 10.      \l\g\l
 11.      {
 12.           \message{3. new group@}
 13.           \l\g\l
 14.           {
 15.                \message{4. new group@}
 16.                \g\g\g
 17.           }
 18.           \message{5. exiting group, tnum=\the\tnum @}
 19.      }
 20.      \message{6. exiting group, tnum=\the\tnum @}
 21.      \g\l
 22. \egroup
 23. \message{7. exiting group, tnum=\the\tnum @}
 24. \tracingrestores=0
Produces: See typeset version.

Comments:

TeXbook References: 301. Also: 273, 301, 303.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


tracingstats Debugging
0 * Parameter (integer)
Synopsis: \tracingstats=<number>

Description:

Comments:

TeXbook References: 300. Also: 273, 300, 303, 383.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


uccode Character
Internal Quantity
Synopsis: \uccode<8-bit number>

Description:

Example:

  1. \bgroup
  2. \uccode`m=`*
  3. Many mops are floppy!\par
  4. \uppercase{m}any mops are floppy!\par
  5. %
  6. \romannumeral -1 A\par
  7. \romannumeral 1000 B\par
  8. \romannumeral 5000 C\par
  9. \romannumeral 10000 D\par
 10. \uppercase\expandafter{\romannumeral 50000} E\par
 11. \egroup
Produces: See typeset version.

Comments:

TeXbook References: 41. Also: 41, 214, 271, 345, 348, 377, 394.

See Also: lccode, catcode, sfcode, uppercase.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


uchyph Hyphenation
1 * Parameter (integer)
Synopsis: \uchyph

Description:

Example:

  1. \def\tstoryA{There are cries, sobs, confusion among the people, and at
  2. that Moment the cardinal himself, the Grand Inquisitor, passes by the
  3. cathedral. He is an old man . . .}
  4. \count0=\uchyph
  5. \setbox0=\vbox{\hsize=2.25in \tstoryA}
  6. \setbox1=\vbox{\hsize=2.25in\uchyph=0 \tstoryA}
  7. \hbox to \hsize{\box0\hfill\box1}
  8. The values are: \the\count0\ and \the\uchyph
Produces: See typeset version.

Comments:

TeXbook References: 454. Also: 273, 348, 454.

See Also: uccode.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


underline Math
Command
Synopsis: \underline<character or {subformula}>

Description:

Example:

     \def\ta{\underline}
     To summarize: if $ x + y = z$, 
     $\ta x + \ta y = \ta z $,
      and $\ta{x_2} + \ta{y_2} = \ta{z_2}$, 
     then $\ta{\ta{x_2} + \ta{y_2}} = \ta{\ta{z_2}}$.\par
     Of course, $ \ta l + \ta m \ne \ta j $.
Produces: See typeset version.

Comments:

TeXbook References: 130-131. Also: 130-131, 141, 291, 443.

See Also: overline.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


unhbox Box
Command
Synopsis: \unhbox<8-bit register number>

Description:

Example:

     \parindent=0pt
     \setbox0=\hbox{Watch this}
     \setbox1=\hbox{line closely.}
     \setbox2=\hbox{\copy0\ \copy1}
     \setbox3=\hbox spread 2em{\copy0\ \copy1}
     \setbox4=\hbox spread 2em{\unhcopy0\ \unhcopy1}
     \setbox5=\hbox{\copy4}
     c2. \copy2\par
     u2. \unhbox2\par
     c3. \copy3\par
     u3. \unhbox3\par
     c4. \copy4\par
     u4. \unhbox4\par
     u5. \unhbox5\par
Produces: See typeset version.

Comments:

TeXbook References: 120. Also: 120, 283, 285, 293, 354, 356, 399.

See Also: unhcopy, box.

For Related Examples, see: afterassignment, setbox

© Copyright 1998-1999, David Bausum. All Rights Reserved.


unhcopy Box
Command
Synopsis: \unhcopy<8-bit register number>

Description:

Example:

     \parindent=0pt
     \setbox0=\hbox{Watch this}
     \setbox1=\hbox{line closely.}
     \setbox2=\hbox{\copy0\ \copy1}
     \setbox3=\hbox to 120pt{\copy0\ \copy1}
     \setbox4=\hbox to 120pt{\unhcopy0\ \unhcopy1}
     \setbox5=\hbox{\copy4}
     c2. \copy2\par
     u2. \unhcopy2\par
     c3. \copy3\par
     u3. \unhcopy3\par
     c4. \copy4\par
     u4. \unhcopy4\par
     u5. \unhcopy5\par
Produces: See typeset version.

Comments:

TeXbook References: 120. Also: 120, 283, 285, 293, 353.

See Also: unhbox, box, copy.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


unkern Kern
Command
Synopsis: \unkern

Description:

Example:

     \ifdim\lastkern=0pt% test for kern
     \else
          \dimen1=\lastkern %store last kern in dimen1
          \unkern %remove kern from list
     \fi
Produces: See typeset version.

Comments:

TeXbook References: 280. Also: 280.

See Also: lastkern, unpenalty, unskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


unpenalty Penalties
Command
Synopsis: \unpenalty

Description:

Example:

     \ifnum\lastpenalty=0 %test for penalty.
     \else
          \count1=\lastpenalty %store last penalty in \count1
          \unpenalty %remove penalty from list
     \fi
Produces: See typeset version.

Comments:

TeXbook References: 280. Also: 280.

See Also: lastpenalty, unkern, unskip.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


unskip Glue
Command
Synopsis: \unskip

Description:

Example:

     \ifdim\lastskip=0pt %test for glue.
     \else
          \skip1=\lastskip %store last glue in \skip1.
          \unskip %remove glue from list
     \fi
Produces: See typeset version.

Comments:

TeXbook References: 280. Also: 222-223, 280, 286, 313, 392, 418-419.

See Also: lastskip, unkern, unpenalty.

For Related Examples, see: afterassignment

© Copyright 1998-1999, David Bausum. All Rights Reserved.


unvbox Box
Command
Synopsis: \unvbox<8-bit register number>

Description:

Example:

  1. \setbox1=\vbox{\hsize=20pt\vrule height 5pt width 20pt depth 5pt}
  2. The (h, d, w) of box1 are: (\the\ht1, \the\dp1, \the\wd1).\par
  3. \def\makevbox#1#2#3%
  4. {%
  5.      \global\setbox#1=\vbox to 45pt
  6.      {
  7.           \offinterlineskip
  8.           \copy1\vskip 2pt plus#2
  9.           \copy1\vskip 2pt plus#3
 10.           \copy1
 11.      }
 12.      The (h, d, w) of box#1 are: (\the\ht#1, \the\dp#1, \the\wd#1).\par
 13. }
 14. \makevbox{2}{0pt}{0pt}
 15. \makevbox{3}{1pt}{4pt}
 16. \makevbox{4}{1fil}{1fil}
 17. \vskip 2pt
 18. \noindent
 19. \hbox{\boxit{\copy2}\kern20pt\boxit{\copy3}\kern20pt\boxit{\copy4}}
 20. \kern20pt
 21. \hbox{\boxit{\unvbox2}\kern20pt\boxit{\unvbox3}\kern20pt\boxit{\unvbox4}}
 22. \par\penalty10000\noindent
 23. \hbox to 140pt{Three boxes using |\copy|.\hfil} Three boxes using |\unvbox|.
Produces: See typeset version.

Comments:

TeXbook References: 120. Also: 120, 254, 282, 286, 354, 361, 363, 364, 392, 399, 417.

See Also: unvcopy, box.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


unvcopy Box
Command
Synopsis: \unvcopy<8-bit register number>

Description:

Example:

  1. \setbox1=\vbox{\hsize=20pt\vrule height 5pt width 20pt depth 5pt}
  2. The (h, d, w) of box1 are: (\the\ht1, \the\dp1, \the\wd1).\par
  3. \def\makevbox#1#2#3%
  4. {%
  5.      \global\setbox#1=\vbox to 45pt
  6.      {
  7.           \offinterlineskip
  8.           \copy1\vskip 2pt plus#2
  9.           \copy1\vskip 2pt plus#3
 10.           \copy1
 11.      }
 12.      The (h, d, w) of box#1 are: (\the\ht#1, \the\dp#1, \the\wd#1).\par
 13. }
 14. \makevbox{2}{1pt}{1pt}
 15. \makevbox{3}{4pt}{1pt}
 16. \makevbox{4}{1fil}{1fil}
 17. \vskip 2pt
 18. \noindent
 19. \hbox{\boxit{\copy2}\kern20pt\boxit{\copy3}\kern20pt\boxit{\copy4}}
 20. \kern20pt
 21. \hbox{\boxit{\unvcopy2}\kern20pt\boxit{\unvcopy3}\kern20pt\boxit{\unvcopy4}}
 22. \par\penalty10000\noindent
 23. \hbox to 140pt{Three boxes using |\copy|.\hfil} Three boxes using |\unvcopy|.
Produces: See typeset version.

Comments:

TeXbook References: 120. Also: 120, 282, 286, 361.

See Also: unvbox, box, copy.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


uppercase Character
Command
Synopsis: \uppercase{<token list>}

Description:

Example:

  1. \def\myname{David}
  2. \def\MYNAME{\uppercase{\myname}}
  3. \def\MYNAMEA{\uppercase\expandafter{\myname}}
  4. \myname---\MYNAME---\MYNAMEA\par
  5. \uccode`~=`X
  6. \catcode`X=13
  7. \def X{\char`Y}
  8. \def\myname{Dr.~David~Bausum}
  9. \myname---\MYNAME---\MYNAMEA\par
Produces: See typeset version.

Comments:

TeXbook References: 41. Also: 41, 215, 217, 279, 307, 345, 348, 374, 377, 394.

See Also: uccode, lowercase.

For Related Examples, see: expandafter, uccode

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vadjust Paragraph
Command
Synopsis: \vadjust{<vertical list>}

Description:

Example:

  1. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
  2. \def\ta#1%
  3. {%
  4.      \strutA{8.5pt}{3.5pt}%
  5.      \vadjust
  6.      {
  7.           \vbox to 0pt
  8.           {
  9.                \kern-1\baselineskip
 10.                \moveleft0.5in\hbox to 0.5in
 11.                {
 12.                     \strutA{8.5pt}{3.5pt}%
 13.                     \hfil#1\kern1em
 14.                }
 15.                \vss
 16.           }%
 17.      }%
 18. }
 19. \hsize=4.75in
 20. There are cries, sobs, confusion among the people, and at that moment
 21. the cardinal himself, the Grand Inquisitor, passes by the cathedral.
 22. He is an old man, almost ninety, tall and erect,\ta{100} with a
 23. withered face and sunken eyes, in which there is still a gleam of
 24. light. He is not dressed in his brilliant cardinal's robes, as he was
 25. the day before, when he was burning the enemies of the Roman
 26. Church~\char144 \kern2em\hfill Fyodor Dostoyevsky, {\it The Brothers
 27. Karamazov}\par
Produces: See typeset version.

Comments:

TeXbook References: 105. Also: 95, 105, 109, 110, 117, 259, 281, 316, 393, 454.

See Also: penalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


valign Tables
Command
Synopsis: \valign<box specification>{<alignment material>}

Description:

Example:

  1. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}
  2. \valign{&\hbox to 1in{\strutA{9pt}{3pt}#\hfil}\vfil\cr
  3. badness&box&boxmaxdepth&cleaders©&dp&everyhbox\cr
  4. everyvbox&hbadness&hbox&hfuzz&hrule&ht&lastbox\cr
  5. leaders&overfullrule&prevdepth&setbox&unhbox&unhcopy&unvbox\cr
  6. unvcopy&vbadness&vbox&vfuzz&vrule&vsplit&vtop\cr
  7. wd&xleaders\cr
  8. }
Produces: See typeset version.

Comments:

TeXbook References: 249. Also: 249, 283, 285-286, 302, 335, 397.

See Also: cr, noalign, omit, span, tabskip, crcr, everycr, halign.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vbadness Box
1000 * Parameter (integer)
Synopsis: \vbadness

Description:

TeXbook References: 272, 302. Also: 272, 348, 397, 417.

See Also: vfuzz, badness, hbadness.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vbox Box
Command
Synopsis: \vbox<box specification>{<vertical material>}

Description:

Example:

  1. \setbox0=\hbox{Here are }
  2. \setbox1=\hbox{two lines of text}
  3. \setbox2=\hbox{made by a vbox.}
  4. \setbox3=\vbox{\box1\box2}
  5. \hbox{\box0\box3}
Produces: See typeset version.

Comments:

TeXbook References: 80-82, 278. Also: 65, 80-82, 103, 151, 193, 222, 278, 388-389.

See Also: setbox, vtop, hbox, boxmaxdepth.

For Related Examples, see: special, vskip, vss

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vcenter Math (Box)
Command
Synopsis: \vcenter<box specification>{<vertical material>}

Description:

Example:

  1. $$ f(x) = \left\{
  2.           \vcenter
  3.           {%
  4.                \halign
  5.                {%
  6.                     $#\hfil$&\quad #\hfil\cr
  7.                     x^2 + 2x - 1& if $x \le 0$,\cr
  8.                     x^3 - 1     & if $x > 0$.\cr% this . ends the sentence
  9.                }%
 10.           }%
 11.           \right.%this . is a null delimiter
 12. $$
 13. %$$f(x) = \left\{\vcenter{\halign{$#\hfil$&\quad #\hfil\cr
 14. %x^2 + 2x - 1& if $x \le 0$,\cr
 15. %x^3 - 1     & if $x > 0$.\cr}}\right.$$
Produces: See typeset version.

Comments:

TeXbook References: 150-151. Also: 150-151, 159, 170, 193, 222, 242, 290, 361, 443.

See Also: vbox.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vfil Glue
Derived Command
Synopsis: \vfil

Description:

Example:

  1. \setbox0=\vbox to 1in{\hsize=2.5in Without the ending |\vfil| this box
  2. would be underfull!\vfil}
  3. \boxit{\box0}
Produces: See typeset version.

Comments:

TeXbook References: 71-72. Also: 71-72, 111, 256, 281, 286, 417.

See Also: vskip, vfill, vfilneg, vss.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vfill Glue
Derived Command
Synopsis: \vfill

Description:

Example:

  1. \vfill
  2. \eject
  3. \ifodd\pageno
  4. \else
  5.      \jmhpage{0}{1}
  6.      \hbox to 0pt{}
  7.      \vfill
  8.      \eject
  9. \fi
Produces: See typeset version.

Comments:

TeXbook References: 71-72. Also: 24, 25, 71-72, 256-257, 281, 286.

See Also: vskip, vfil.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vfilneg Glue
Derived Command
Synopsis: \vfilneg

Description:

Example:

     \def\filbreak{\vfil\penalty-200\vfilneg}
Produces: See typeset version.

Comments:

TeXbook References: 72. Also: 72, 111, 281, 286.

See Also: vskip, vfil.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vfuzz Box
0.1pt * Parameter (dimen)
Synopsis: \vfuzz

Description:

TeXbook References: 274, 302. Also: 274, 348.

See Also: vbadness, hfuzz.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


voffset Page
0pt * Parameter (dimen)
Synopsis: \voffset=<dimen>

Description:

Example:

     \voffset=-0.7in
Produces: See typeset version.

Comments:

TeXbook References: 251. Also: 251-253, 274, 342, 406.

See Also: hoffset, hsize, vsize.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vrule Box
Command
Synopsis: \vrule[height<dimen> depth<dimen> width<dimen>]

Description:

Example:

  1. Here is a square vrule: \vrule height 0.23in depth 0.02in width 0.25in\par
  2. \def\tvr#1#2#3{#1. Here is another type of vrule #2\ in a line.#3\par}
  3. \tvr A{\vrule width 1in}{}
  4. \tvr B{\vrule height 0.4pt width 1in}{}
  5. \tvr C{\vrule height 3.4pt depth -3pt width 1in}{}
  6. \tvr D{\vrule}{}
  7. \tvr E{\vrule}{\vrule height 8.5pt depth 3.5pt width 0pt}
Produces: See typeset version.

Comments:

TeXbook References: 221-224. Also: 64, 86, 151, 221-222, 224, 245-247, 281-282, 283, 357, 392, 420.

See Also: hrule, leaders.

For Related Examples, see: crcr, everycr, halign, vadjust

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vsize Page
8.9in * Parameter (dimen)
Synopsis: \vsize=<dimen>

Description:

Example:

  1. \begingroup
  2.      \output={\global\setbox\partialpage=\vbox{\unvbox255}}
  3.      \eject
  4.      \output={\doublecolumnoutA}
  5.      \hsize=\pagewidthB
  6.      \vsize=\pageheight
  7.      \advance \vsize by -\ht\partialpage
  8.      \multiply \vsize by2
  9.      . . .
Produces: See typeset version.

Comments:

TeXbook References: 113-114, 251. Also: 113-114, 251, 253, 255, 274, 340-341, 348, 400, 406, 413, 415, 417.

See Also: pagegoal, maxdepth, hsize, hoffset, voffset.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vskip Glue
Command
Synopsis: \vskip<glue>

Description:

Example:

     \hsize=2in
     \def\tcenterline#1{\hbox to \hsize{\hfil #1\hfil}}
     \moveright1.5in\vbox to 1in
     {
          \hrule
          \vskip 6pt plus 6pt minus 3pt
          \tcenterline{The Name of the Game}
          \vskip 6pt plus 6pt minus 3pt
          \tcenterline{is}
          \vskip 6pt plus 6pt minus 3pt
          \tcenterline{\it A Good Question}
          \vskip 6pt plus 6pt minus 3pt
          \hrule
     }
Produces: See typeset version.

Comments:

TeXbook References: 71-72. Also: 24, 71, 85, 191, 281, 286.

See Also: vfil, vfill, vfilneg, vss, hskip, kern.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vsplit Inserts (Box)
Command
Synopsis: \vsplit<8-bit register number> to <dimen>

Description:

TeXbook References: 124. Also: 124, 222, 259, 278, 397, 417.

See Also: splitmaxdepth, splittopskip, splitbotmark, splitfirstmark, insert.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vss Glue
Derived Command
Synopsis: \vss

Description:

Example:

  1. \def\thcropmark(#1,#2)% (horizontal,vertical) offsets.
  2. {%
  3.      \vbox to 0pt
  4.      {%
  5.           \kern #2in
  6.           \hbox
  7.           {%
  8.                \kern #1in
  9.                \vrule height 0.1pt width 0.1in
 10.           }%
 11.           \vss
 12.      }%
 13.      \nointerlineskip
 14. }
 15. \thcropmark(0.1,0.3)%upper left - ODD page
 16. \tvcropmark(0.3,0.1)
 17. \thcropmark(1.3,0.3)%upper right
 18. \tvcropmark(1.2,0.1)
 19. \thcropmark(0.1,1.7)%lower left
 20. \tvcropmark(0.3,1.8)
 21. \thcropmark(1.3,1.7)%lower right
 22. \tvcropmark(1.2,1.8)
 23. \setbox0=\vbox to 2in{\hbox to 1.545in{\hfill}\vfill}
 24. \boxitA{\box0}{}
Produces: See typeset version.

Comments:

TeXbook References: 71-72. Also: 71- 72, 255, 281, 286.

See Also: vskip, vfil.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


vtop Box
Command
Synopsis: \vtop<box specification>{<vertical material>}

Description:

Example:

  1. \setbox0=\hbox{Here are }
  2. \setbox1=\hbox{two lines of text}
  3. \setbox2=\hbox{made by a vtop.}
  4. \setbox3=\vtop{\box1\box2}
  5. \hbox{\box0\box3}
Produces: See typeset version.

Comments:

TeXbook References: 81-82, 278. Also: 81-82, 151, 222, 278, 333.

See Also: setbox, vbox, hbox.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


wd Box
Internal Quantity
Synopsis: \wd<8-bit register number>

Description:

Example:

  1. \setbox0=\hbox{Every box has }
  2. \setbox1=\hbox{a }
  3. The width of box 0 is \the\wd0.\par
  4. The width of box 1 is \the\wd1.\par
  5. \hbox{\box0\copy1 width}
  6. The width of box 0 is \the\wd0.\par
  7. The width of box 1 is \the\wd1.\par
Produces: See typeset version.

Comments:

TeXbook References: 120. Also: 120, 271, 388-389, 391, 417.

See Also: dp, ht, setbox.

For Related Examples, see: boxmaxdepth

© Copyright 1998-1999, David Bausum. All Rights Reserved.


widowpenalty Penalties (Page)
150 * Parameter (integer)
Synopsis: \widowpenalty

Description:

TeXbook References: 104. Also: 104, 113, 272, 348.

See Also: clubpenalty, brokenpenalty, interlinepenalty.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


write File I/O
Command
Synopsis: \write<number>{<token list>}

Description:

Example:

  1. \def\tmklabel#1#2%
  2. {%
  3.      \write\waux
  4.      {%
  5.           \noexpand\def
  6.           \expandafter\noexpand
  7.           \csname #1\endcsname{#2}%
  8.      }%
  9. }
 10. . . .
 11. \tmklabel{junkA}{\the\pageno}
Produces: See typeset version.

Comments:

TeXbook References: 226-228. Also: 215, 216, 226-228, 254, 280, 346, 377, 422, 424.

See Also: immediate, openout, closeout.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


xdef Macro
Derived Command
Synopsis: \xdef<control sequence><parameter text>{<replacement text>}

Description:

Example:

  1. \def\ta{Bye\tc Bye}
  2. \def\tc{\hskip10pt}
  3. \edef\tb{Bye\tc Bye}
  4. \ta\tb.\par
  5. \begingroup
  6. \def\ta{Hello\tc World}
  7. \xdef\tb{How are\tc you?}
  8. \def\tc{\hskip20pt}
  9. \ta\tb.\par
 10. \endgroup
 11. \ta\tb.\par
Produces: See typeset version.

Comments:

TeXbook References: 215-216, 275, 373, 418, 424.

See Also: edef, global, long, outer.

For Related Examples, see: csname

© Copyright 1998-1999, David Bausum. All Rights Reserved.


xleaders Box
Command
Synopsis: \xleaders<box or rule><glue>

Description:

Example:

  1. \def\sampletocC#1#2#3%
  2. {%
  3.      \bgroup
  4.           \setbox0=\hbox to 25pt{\vrule height 0.4pt depth 0pt width 25pt}
  5.           \def\tpage##1{\hbox to 25pt{\vrule\hfil ##1}}%
  6.           \setbox1=\hbox to 25pt{\vrule\hfil page}%
  7.           \hsize=224pt
  8.           \parindent=0pt
  9.           #1\leaders\copy0\hfill\tpage l\par
 10.           #2\leaders\copy0\hfill\tpage l\par
 11.           #3\leaders\copy0\hfill\tpage l\par
 12.           #1\cleaders\copy0\hfill\tpage c\par
 13.           #2\cleaders\copy0\hfill\tpage c\par
 14.           #3\cleaders\copy0\hfill\tpage c\par
 15.           #1\xleaders\copy0\hfill\tpage x\par
 16.           #2\xleaders\copy0\hfill\tpage x\par
 17.           #3\xleaders\copy0\hfill\tpage x\par
 18.      \egroup
 19. }
 20. \sampletocC{\noindent}{Strangers and Brothers}{The Age of Reason}
Produces: See typeset version.

Comments:

TeXbook References: 224. Also: 224.

See Also: cleaders, leaders.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


xspaceskip Paragraph
0pt * Parameter (glue)
Synopsis: \xspaceskip=<glue>

Description:

Example:

     \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000%
      \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
     \xspaceskip=1.0em
     \spaceskip=0pt
     \tstory\par
     \xspaceskip=1.0em
     \spaceskip=0.5em
     \tstory\par
Produces: See typeset version.

Comments:

TeXbook References: 76. Also: 76, 274, 317, 356, 429, 433.

See Also: spaceskip, spacefactor.

© Copyright 1998-1999, David Bausum. All Rights Reserved.


year Job
Parameter (integer)
Synopsis: \year

Description:

Example:

  1. \def\ckleapyear#1% check if #1 is a leap year.
  2. {%
  3.   {%
  4.      \def\tleapy{not }% Most years fail.
  5.      \count10=#1
  6.      \count1=#1
  7.      \divide\count1 by 4
  8.      \multiply\count1 by 4
  9.      \ifnum\count1=\count10 % Worrry about 100 & 400.
 10.           \count2=#1
 11.           \divide\count2 by 100
 12.           \multiply\count2 by 100
 13.           \ifnum\count2=\count10 % Not a leap year unless 400 also divides.
 14.                \count3=#1
 15.                \divide\count3 by 400
 16.                \multiply\count3 by 400
 17.                \ifnum\count3=\count10
 18.                     \def\tleapy{}% Special leap year.
 19.                \fi
 20.           \else
 21.                \def\tleapy{}% This gets regular leap years.
 22.           \fi
 23.      \fi
 24.      The year #1 is \tleapy a leap year.\par
 25.   }%
 26. }
 27. \ckleapyear{1900}
 28. \ckleapyear{1990}
 29. \ckleapyear{1996}
 30. \ckleapyear{2000}
 31. \ckleapyear{2004}
 32. \ckleapyear{\the\year}
Produces: See typeset version.

Comments:

TeXbook References: 41, 349. Also: 41, 273, 349, 406.

See Also: day, month, time.

For Related Examples, see: expandafter

© Copyright 1998-1999, David Bausum. All Rights Reserved.


Acknowledgment, Errors, Copyright, and Contacting
(Version: 0.707a. Prepared on: 1/11/1999 at: 14:04)
(Alphabetical Order) (Family Order)

Acknowledgment:
First: This material could not exist without Donald E. Knuth's work on TeX and his books: The TeXbook and TeX: The Program. My version of TeX includes the source files for both books, and I've poked around in both files trying to understand how TeX works.
Thank you, DEK.

Second: Each primitive's reference page contains a TeXbook Reference section which lists page numbers in The TeXbook for the primitive. The page numbers began as the primitive's index entry in The TeXbook. I removed the special formatting used in the index and consolidated page numbers. I added additional references for some primitives when I found a useful reference on a page which was not in the original index. For a few primitives I removed a page reference because I could not find the primitive on the page. Finally, for each primitive I picked one or two pages which seem to me most helpful in explaining how the primitive works. If you want to read in The TeXbook about a particular primitive, those page are a good place to start.

Third: The Description section on each primitive's reference page contains a number of statements which explain what the primitive does. Each statement concludes with a page reference to The TeXbook where more details may be available. For each primitive I read all appropriate page references, tried to get a global understanding of how the primitive works, and then summarized that understanding in as few words as possible keeping my comments in sync with page references to The TeXbook. BUT In some places my summary runs close to the original; in other places I've borrowered phrases or clauses from the original; and in a few places I've lifted a sentence or two from the original.

Errors:
If you find typos, minor mistakes, or major blunders in this file please send me a precise description of the problem, and I will fix things. This material exists in a pre-HTML, pre-TeX format. I run it through a custom program which makes tex and HTML files. The program uses a translation table to convert characters which have special TeX and HTML forms. I've proofread the typeset version of the tex files, but it's possible for a special character to appear correctly in typeset material but to display incorrectly and vice-versa.

If you have suggestions for improving the material, please send me your ideas, and I will consider them. I have intentionally not implemented the HTML version of the reference pages using frames. Note: my experiments show that it takes at most three mouse clicks to move between any two reference pages. Also, I am working on a 21-inch monitor which displays the equivalent of one typeset page at a time. The large monitor may distort my view of how easy it is to navigate through this material.

Copyright:
This HTML file is copyrighted, but it may be freely circulated provided it is: a) unchanged and b) free. If you wish to put it on a CD-Rom which is sold or distribute it in another form for a fee, please contact me in advance.

Contacting:
David Bausum
email: davidb@cfw.com
web-site: http://personal.cfw.com/~davidb/

© Copyright 1998-1999, David Bausum. All Rights Reserved.