TeX Primitive Control Sequences
(Alphabetical Order)

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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

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

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 amount to shift a line holding a 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 to the 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 parameters.
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 0.0 pt or the last kern on the current list.
lastpenaltyiqis 0 or the last penalty on the current list.
lastskipiqis 0.0 pt or the last glue or muglue on the current list.
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 the 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)


TeX Primitive Control Sequences
(Family Order)

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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 to the 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 the 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 parameters.
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 0.0 pt or the last glue or muglue on the current list.
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 0.0 pt or the last kern on the current list.
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 amount to shift a line holding a 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 0 or the last penalty on the current list.
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)


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

Description:

Example:

  1. \def\thello{Hello}
  2. \thello World. Whoops! \thello\ World.\par
  3. \thello{} World. {\it\thello} World. {\bf\thello\ } World. {\bf\thello\ }World.
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.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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 p\-eople, 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.

Related Primitives: discretionary, hyphenchar.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: font.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: over, atop, abovewithdelims.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: belowdisplayshortskip, abovedisplayskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: belowdisplayskip, abovedisplayshortskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: above, over, atop, overwithdelims, atopwithdelims.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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 Hungarian 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.

Related Primitives: char.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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}}
     % The example for several primitives uses \tstory.
     \hsize=2.5in
     \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.

Related Primitives: doublehyphendemerits, finalhyphendemerits.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: multiply, divide, count, dimen, skip, muskip.

For Additional Examples, see: day, ifnum, time

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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 working 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{#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}.}
 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.

Related Primitives: aftergroup, expandafter, futurelet, noexpand.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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---1---\par
 14. \endgroup
 15. ---2---
Produces: See typeset version.

Comments:

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

Related Primitives: afterassignment, expandafter, futurelet, noexpand.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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 the ()'s.}$$
Produces: See typeset version.

Comments:

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

Related Primitives: over, above, atopwithdelims.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: atop, abovewithdelims.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hbadness, vbadness, pretolerance, tolerance, emergencystretch.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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% The \adjdemerits reference page
     \baselineskip=12pt\tstory\par%   holds the definition of \tstory
     \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.

Related Primitives: lineskip, lineskiplimit, prevdepth.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: errorstopmode, nonstopmode, scrollmode.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


begingroup Macro
Command
Synopsis: \begingroup

Description:

Example:

  1. \catcode`\?=13 % make ? the special character for in-line verbatim
  2. \def?{\begingroup\ccflip\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.

Related Primitives: endgroup.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: abovedisplayshortskip, belowdisplayskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: abovedisplayskip, belowdisplayshortskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: relpenalty.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.  See pages 260--261 in TTB for more details.
  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.

Related Primitives: mark, firstmark, topmark.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: copy, unhbox, unvbox, unhcopy, unvcopy.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: maxdepth, vbox.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: clubpenalty, widowpenalty, interlinepenalty, hyphenpenalty, exhyphenpenalty, discretionary.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

  1. \catcode`\?=13 % make ? the special character for in-line verbatim
  2. \def?{\begingroup\ccflip\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.

Related Primitives: lccode, sfcode, uccode.

For Additional Examples, see: mathchardef, span

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: accent, chardef, mathcode.

For Additional Examples, see: mathchoice

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: char, def.

For Additional Examples, see: meaning

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: leaders, xleaders.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

  1. \def\tfn{junkjunk.tex}
  2. \openin\traux=\tfn\relax
  3. \ifeof\traux
  4.      \closein\traux
  5. \else
  6.      \closein\traux
  7.      \input\tfn\relax
  8. \fi
Produces: See typeset version.

Comments:

TeXbook References: 217. Also: 217, 280.

Related Primitives: openin, read.

For Additional Examples, see: openin

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

     \openout\twaux=junkjunk.tex\relax
     \write\twaux{{\noexpand\bf byebye}\ World}
     \closeout\twaux
Produces: See typeset version.

Comments:

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

Related Primitives: openout, write, immediate.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: widowpenalty, brokenpenalty, interlinepenalty.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: box, unhcopy, unvcopy.

For Additional Examples, see: cleaders, unhbox

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: countdef, ifodd, ifnum, advance, multiply, divide.

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: count.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: crcr, everycr, halign, valign.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


crcr Tables
Command
Synopsis: \crcr

Description:

Example:

  1. \def\er{\crcr\noalign{\hrule}}%                   \cr\cr makes a blank line
  2. \def\strutA#1#2{\vrule height#1 depth#2 width0pt}%\cr\crcr DOES NOT !
  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.

Related Primitives: cr, everycr.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: endcsname.

For Additional Examples, see: noexpand, the

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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\def\tss{th}% 10th, 20th, 30th.
 13.      \or \def\tss{st}%   1st
 14.      \or \def\tss{nd}%   2nd
 15.      \or \def\tss{rd}%   3rd
 16.      \else \def\tss{th}% xth
 17.      \fi
 18.      \ifnum\count1=1 %  adjust for 11, 12, 13.
 19.           \def\tss{th}%
 20.      \fi
 21. %     \the\count2--
 22.      #1\superscript{\tss}%
 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}, and
 28. \mkordinal{31}.\par
 29. Today is the \mkordinal{\the\day} day of the month.
Produces: See typeset version.

Comments:

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

Related Primitives: month, year, time.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


deadcycles Job
Internal Quantity
Synopsis: \deadcycles

Description:

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

Related Primitives: maxdeadcycles, output, shipout, end.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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. 1. \ta\tb.\par
  4. \begingroup
  5. \def\ta{Hello}
  6. \def\tb{ World}
  7. 2. \ta\tb.\par
  8. \endgroup
  9. 3. \ta\tb.\par
Produces: See typeset version.

Comments:

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

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: hyphenchar.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

TeXbook References: 273. Also: 273, 348.

Related Primitives: skewchar.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: mathcode, delimiter, fam.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: mathcode, delcode, fam, radical.

For Additional Examples, see: nulldelimiterspace

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: delimitershortfall, left, right.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: delimiterfactor, left, right.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: dimendef, ifdim, advance, multiply, divide, count.

For Additional Examples, see: divide, prevdepth

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

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

Comments:

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

Related Primitives: dimen.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: -, hyphenchar, hyphenation.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: displaywidth, predisplaysize, abovedisplayskip, prevgraf.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: limits, nolimits, textstyle, displaystyle.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: textstyle, scriptstyle, scriptscriptstyle, textfont, fam.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: predisplaypenalty, widowpenalty.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

     \def\tfn#1#2%
     {%
        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.
        $$
        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#2
     }
     \tfn{\hsize}{1\baselineskip}
     \tfn{0.5\hsize}{0pt}
Produces: See typeset version.

Comments:

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

Related Primitives: displayindent, predisplaysize, abovedisplayskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: advance, multiply, count, dimen, skip, muskip.

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

     
     \hsize=2.5in%                 The \adjdemerits reference page
     \setbox0=\vbox{\tstory\par}%  holds the definition of \tstory
     \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.

Related Primitives: adjdemerits, finalhyphendemerits.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: ht, wd, setbox.

For Additional Examples, see: afterassignment, boxmaxdepth, prevdepth

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


dump Job
Command
Synopsis: \dump

Description:

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

Related Primitives: end, everyjob.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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. 1. \ta\tb.\par
  5. \begingroup
  6. \def\tc{\hskip20pt}
  7. 2. \ta\tb.\par
  8. \endgroup
  9. 3. \ta\tb.\par
Produces: See typeset version.

Comments:

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

Related Primitives: def, xdef, global, long, outer.

For Additional Examples, see: advance, xdef

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: fi, ifcase, or.

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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}%  The \adjdemerits reference page holds the
     \setbox1=\vtop{\emergencystretch=1em\tstory\par}% definition of \tstory
     \hbox to 4.5in{\box0\hfil\box1}
Produces: See typeset version.

Comments:

TeXbook References: 107. Also: 107, 274.

Related Primitives: pretolerance, tolerance, badness.

For Additional Examples, see: pretolerance

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: deadcycles, dump.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: csname.

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: begingroup.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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% We don't want to allocate \tr twice !
Produces: See typeset version.

Comments:

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

Related Primitives: input.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: escapechar, newlinechar.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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% even left equation numbers go at the end !
  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.

Related Primitives: leqno.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

  1. \def\checkit#1#2#3% See \errmessage page for another version of \checkit
  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.

Related Primitives: errmessage.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


errmessage Debugging
Command
Synopsis: \errmessage<general text>

Description:

Example:

  1. \def\checkit#1#2#3% See \errhelp page for another version of \checkit
  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.

Related Primitives: errhelp.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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}% This makes an error unless #1 is a valid dimension
 11. \linkA{inyz}%                This becomes: \hskip2inyz and is OK
 12. \errorcontextlines=-1
 13. \linkA{axyz}%                This becomes: \hskip2axyz and is an error.
 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.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: batchmode, nonstopmode, scrollmode.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

  1. \escapechar=-1\string\TeX --- % It doesn't matter how OR if \TeX is defined
  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.

Related Primitives: string, endlinechar, newlinechar.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: cr, crcr.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: everymath, toks.

For Additional Examples, see: nulldelimiterspace

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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}%
          \setbox1=\hbox{\rm\the\badness}% \rm comes after the \it from \everyhbox
          \setbox2=\hbox to 2.5in{\box0\hfil\box1}%
          \box2
     }
     \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.

Related Primitives: everyvbox, toks.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

TeXbook References: 275. Also: 275, 336.

Related Primitives: dump.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: everydisplay, toks, eqno, leqno.

For Additional Examples, see: mathsurround, nulldelimiterspace

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: toks.

For Additional Examples, see: endgroup, pagedepth

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

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

Comments:

TeXbook References: 275. Also: 275, 279.

Related Primitives: everyhbox, toks.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hyphenpenalty, brokenpenalty, discretionary.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

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

Comments:

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

Related Primitives: afterassignment, aftergroup, futurelet, noexpand.

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: textfont, scriptfont, scriptscriptfont, mathcode, delcode, delimiter.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: else.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

     \hsize=2.5in
     \setbox0=\vbox{\adjdemerits=0
     \doublehyphendemerits=100000
     \tstory\par}% The \adjdemerits reference page holds the definition of \tstory
     \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.

Related Primitives: adjdemerits, doublehyphendemerits.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


firstmark Marks
Command
Synopsis: \firstmark

Description:

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

Related Primitives: mark, botmark, topmark.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: insertpenalties, insert.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: fontname, fontdimen, textfont, scriptfont, scriptscriptfont, tracingstats.

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

     \def\trow#1#2%
     {%                          the above Synopsis shows how to SET one of the
          #1 #2&               % fontdimen parameters for a font
          \the\fontdimen#1\rm& % these lines show how to READ the values for a font
          \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.

Related Primitives: font.

For Additional Examples, see: textfont

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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&\quad\rm#\cr
  3. A&AA&1\cr
  4. B&AB&2\cr
  5. C&AC&3\cr
  6. D&AD&4\cr
  7. E&AE&5\cr
  8. F&AF&6\cr
  9. G&AG&7\cr
 10. A&BA&8\cr
 11. }
Produces: See typeset version.

Comments:

TeXbook References: 213. Also: 213-214.

Related Primitives: font.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: let, afterassignment, aftergroup, expandafter, noexpand.

For Additional Examples, see: mathchardef

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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. 1. \ta\tb.\par
  4. \begingroup
  5. \def\ta{Hello}
  6. \gdef\tb{ World}
  7. 2. \ta\tb.\par
  8. \endgroup
  9. 3. \ta\tb.\par
Produces: See typeset version.

Comments:

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

Related Primitives: def, global, long, outer.

For Additional Examples, see: mathchardef

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


global Macro
Command
Synopsis: \global<assignment>

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.

Related Primitives: begingroup, globaldefs, gdef, xdef, tracingstats.

For Additional Examples, see: afterassignment, setbox

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: global.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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 \pagewidthB{\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.

Related Primitives: cr, noalign, omit, span, tabskip, crcr, everycr, valign.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hangindent, parshape, prevgraf.

For Additional Examples, see: displayindent, endgroup, prevgraf

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hangafter, parshape.

For Additional Examples, see: displayindent, endgroup, prevgraf

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: hfuzz, badness, vbadness.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: setbox, vbox, vtop.

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hskip, hfill, hfilneg, hss.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hskip, hfil.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hskip, hfil.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: hbadness, vfuzz.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: voffset, hsize, vsize.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: insert.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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 first line of text.\par
  5. \hrule
  6. Here is the 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 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.

Related Primitives: vrule, leaders.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: parindent, parfillskip, hangafter, hangindent, parshape, vsize, hoffset, voffset.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hfil, hfill, hfilneg, hss, mskip, vskip, kern.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hskip, hfil.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: dp, wd, setbox.

For Additional Examples, see: accent, boxmaxdepth

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: patterns, language.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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}%                          in the encoding
  8. The values are: \the\count0\ and \the\hyphenchar\font.%     used here.
  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.

Related Primitives: defaulthyphenchar, discretionary.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

     \hsize4.15in
     \def\testhyphenpenalty#1%
     {%
          \hyphenpenalty=#1 %
          \tstory% The \adjdemerits reference page holds the definition of \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.

Related Primitives: exhyphenpenalty, brokenpenalty, discretionary.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: ifcat, ifx.

For Additional Examples, see: afterassignment, futurelet

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: or, else, fi.

For Additional Examples, see: day, else, mathord

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Comments:

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

Related Primitives: if, ifx.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: ifnum.

For Additional Examples, see: accent, fi

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

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

Comments:

TeXbook References: 210. Also: 210, 217.

Related Primitives: openin.

For Additional Examples, see: openin

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: iftrue.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: ifvbox, ifvoid.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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% Each example is put in a vbox before it is typeset!
     \vbox{Hello \checkmode\ \hbox{World \checkmode}}
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 209, 363.

Related Primitives: ifmmode, ifvmode, ifinner.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


ifinner Logic
Command
Synopsis: \ifinner

Description:

Example:

  1. \def\checkinner
  2. {%
  3.      \ifinner
  4.           \o T% the accent reference page defines \o
  5.      \else
  6.           \o F
  7.      \fi
  8. }
  9. \checkinner\checkinner\checkmode\par% the ifhmode page defines \checkmode
 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.

Related Primitives: ifhmode, ifmmode, ifvmode.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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$ vs $X^2\L9/2$
Produces: See typeset version.

Comments:

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

Related Primitives: ifhmode, ifvmode, ifinner.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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% put leading `0' if necessary.
 11.      \the\count20:%
 12.      \ifnum\count22<10 0\fi% put leading `0' if necessary.
 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.

Related Primitives: ifodd, ifdim.

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: ifnum.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: iffalse.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: ifhbox, ifvoid.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


ifvmode Logic
Command
Synopsis: \ifvmode

Description:

Example:

  1. \checkmode\par% the ifhmode reference page defines \checkmode
  2. \vbox{\checkmode\ Hello \checkmode\ \hbox{World \checkmode}}
Produces: See typeset version.

Comments:

TeXbook References: 209. Also: 209.

Related Primitives: ifhmode, ifmmode, ifinner.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: ifhbox, ifvbox.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

  1. \def\tmacro#1%
  2. {%
  3.      \def\temptyA{#1}% I use temptyB, C, ... for parameters 2, 3, ...
  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.

Related Primitives: if, ifcat.

For Additional Examples, see: endinput

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


ignorespaces Paragraph
Command
Synopsis: \ignorespaces<optional spaces>

Description:

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

     \immediate\openout\twaux=junkjunk.tex\relax
     \immediate\write\twaux{{\noexpand\bf byebye}\ World}
     \immediate\closeout\twaux
Produces: See typeset version.

Comments:

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

Related Primitives: write, openout, closeout.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: parindent, noindent.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: endinput, inputlineno.

For Additional Examples, see: endinput, openin

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: input.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: holdinginserts, floatingpenalty, insertpenalties, vsplit.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


insertpenalties Inserts
Internal Quantity
Synopsis: \insertpenalties

Description:

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

Related Primitives: floatingpenalty, insert.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: clubpenalty, widowpenalty, brokenpenalty, linepenalty.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


jobname Job
Command
Synopsis: \jobname

Description:

Example:

  1. \def\basedir{\string~/doc/trm/}% Unfortunately, my version of TeX
  2. \def\myfilenameA%                doesn't provide the directory.
  3. {%
  4.   \bgroup
  5.      \selffamily AG
  6.      \setbox0=\hbox
  7.      {%
  8.           \ifx\basedir\empty% Traps potential bug if \basedir is not defined
  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 \pagewidthB
 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.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: hskip, vskip, mkern.

For Additional Examples, see: ifmmode

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: setlanguage, hyphenation, patterns, lefthyphenmin, righthyphenmin.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: lastkern, lastpenalty, lastskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: unkern, lastbox, lastpenalty, lastskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: unpenalty, lastbox, lastkern, lastskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: unskip, lastbox, lastkern, lastpenalty.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

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

Related Primitives: uccode, catcode, sfcode, lowercase, hyphenation.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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{}{100}% Count the dots. There are 44.
     \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.

Related Primitives: cleaders, xleaders, hrule.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: right, delcode, delimiter.

For Additional Examples, see: delimiterfactor, nulldelimiterspace, vcenter

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: righthyphenmin, language.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: rightskip, parindent, parfillskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: eqno.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: def, futurelet.

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

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: nolimits, displaylimits, textstyle, displaystyle.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: badness, looseness, interlinepenalty.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: baselineskip, lineskiplimit.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: baselineskip, lineskip.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


long Macro
Command
Synopsis: \long<macro-definition assignment>

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.

Related Primitives: def, edef, gdef, xdef, global, outer.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

Example:

     \hsize=4.5in
     \tstory\par% The \adjdemerits reference page holds the definition of \tstory
     \vskip6pt
     {\looseness=-1
     \tstory\par}
Produces: See typeset version.

Comments:

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

Related Primitives: linepenalty.

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. 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.

Related Primitives: raise, moveleft, moveright.

For Additional Examples, see: halign, mathchoice

This is the HTML version of TeX Reference Manual by David Bausum. © Copyright 2002, Kluwer Academic Publishers. All Rights Reserved.


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

Description:

TeXbook R