Bugs in The TEXbook, first printing 1

This is a list of all corrections made to The TEXbook between the first and second printings. If your copy says ‘Second printing (October 1984)’ on the copyright page, you’ve already got all of these things corrected. Otherwise, you’re a lucky owner of the rare first edition; read on. Page 29, lines 31–32 (8/25/84)

The underfull box that TEX produces in the 1.5-inch case is really bad; with such narrow limits, an occasional wide space is unavoidable. But try Page 54, lines 5–6 (4/20/84)

Appendix B shows that plain TEX handles most of the accents by using TEX’s

\accent primitive. For example, \'#1 is equivalent to {\accent19 #1}, where

Page 63, seven lines below the first illustration (2/27/84) points, a width of 5.5555 points, and a depth of zero; the letter ‘g’ has a height Page 72, line 35 (2/28/84)

from 0pt, but 0.00001filll is infinitely greater than 16383.99999fill.

Page 79, line 12 (2/28/84)

        \hbox(6.25+1.94444)x312.0, glue set 0.5783, shifted 36.0 []

Page 98, line 24 (4/13/84)

and \finalhyphendemerits=5000. Demerits are in units of “badness squared,” so the

Page 101, lines 29–30 (3/13/84)

It’s possible to control the length of lines in a much more general way, if

simple changes to \leftskip and \rightskip aren’t flexible enough for your

Page 113, bottom two lines (3/13/84)

Notice that the first “% line” of our example says t=10.0; this is a consequence

of another parameter, called \topskip. Glue disappears at a page break, but

Page 124, eighth-last line (8/25/84)

discarded, \box100 will be void after the \vsplit. And if \box100 was void before the

Page 131, display in exercise 16.8 (3/16/84)

       If$ x = y$, then $x$ is equal to $y.$

2 Bugs in The TEXbook, first printing

Page 170, table in middle of the page (2/12/84)

Right atom

Ord  Op  Bin  Rel Open Close Punct Inner

        Ord  0      1     (2)    (3)     0      0      0     (1)
        Op  1      1      *     (3)     0      0      0     (1)
        Bin  (2)    (2)     *      *     (2)     *      *     (2)
Left  Rel  (3)    (3)     *      0     (3)     0      0     (3)
atom Open  0      0      *      0      0      0      0      0
        Close  0      1     (2)    (3)     0      0      0     (1)
        Punct  (1)    (1)     *     (1)    (1)    (1)    (1)    (1)
        Inner  (1)     1     (2)    (3)    (1)     0     (1)    (1)

Page 173, line 11 (1/2/84)

       Clearly $a_i<b_i$ for~$i=1, 2, \ldots, n$.

Page 176, bottom two lines (7/20/84)

EXERCISE 18.24

Typeset the display \{ \begin{matrix}a & b & c \\ d & e & f \end{matrix} \} \{ \begin{matrix}u & x \\ v & y \\ w & z \end{matrix} \}, using \lgroup and \rgroup.

Page 189, line 18 (2/13/84)

when there is an overlap.] If e = 0 and if there is an \leqno, the equation number is

Page 204, line 31 (2/13/84)

of \a is delimited by a left brace.

Page 212, line 23 (7/8/84)

it equals 2.) Similarly, \tracingmacros=2 will trace \output, \everypar, etc.

Page 216, first five lines (8/25/84)

Expanded definitions that are made with \edef or \xdef continue to expand

tokens until only unexpandable tokens remain, except that token lists produced by ‘\the’ are not expanded further. Furthermore a token following ‘\noexpand’ will not be expanded, since its ability to expand has been nullified. These two operations can be used to control what gets expanded and what doesn’t.

Page 219, simplification of line 18 (2/15/84)

          \advance\count0 by\count2 \hexdigit}}

Page 223, lines 3–4 (3/13/84)

Chapters 24 to 26 present summaries of all TEX’s operations in all modes, and when those summaries mention a ‘⟨box⟩’ they mean one of the seven

Page 242, line 29 (1/2/84)

a relation, the solution is to insert ‘{}’ at the beginning of the right-hand formula; TEX

Page 245, line 24 (2/15/84)

of a box that spans columns i through j, hence the glue in such a box might shrink.

Page 248, the fourth dangerous bend (2/15/84)

You have to be careful with the use of & and \span and \cr, because these tokens are intercepted by TEX’s scanner even when it is not expanding macros.

Page 249, lines 20–26 (2/15/84)

line (see Chapter 9). If you don’t want a \cr at the end of a certain line, just type ‘%’ and the corresponding \cr will be “commented out.” (This special mode doesn’t work with \+ lines, since \+ is a macro whose argument is delimited by the token ‘\cr’, not simply by a token that has the same meaning as \cr. But you can redefine \+ to overcome this hurdle, if you want to. For example, define a macro \alternateplus that is just like \+ except that its argument is delimited by the active character ^^M; then include the command ‘\let\+=\alternateplus’ as part of \obeylines.)

Page 253, lines 28–32 (4/25/84)

vertical list at what it thinks is the best place, and at such times it enters internal vertical mode and begins to read the commands in the current \output routine. When the output routine begins, \box255 contains the page that TEX has completed; the output routine is supposed to do something with this vbox. When the output routine ends, the list of items that it has constructed in internal vertical mode is placed just

Page 254, lines 1–13 (3/13/84)

TEX’s primitive command \shipout⟨box⟩ is what actually causes output. It

sends the contents of the box to the dvi file, which is TEX’s main output file; after TEX has finished, the dvi file will contain a compact device-independent encoding of instructions that specify exactly what should be printed. When a box is shipped out, TEX displays the values of \count0 through \count9 on your terminal, as explained in Chapter 15; these ten counters are also recorded in the dvi file, where they can be used to identify the page. All of the \openout, \closeout, and \write commands that appear inside of the ⟨box⟩ are performed in their natural order as that box is being shipped out. Since a \write command expands macros, as explained in Chapter 21, TEX’s scanning mechanism might detect syntax errors while a \shipout is in progress. If \tracingoutput is nonzero at the time of a \shipout, the contents of the ⟨box⟩ being shipped are written into your log file in symbolic form. You can say \shipout anywhere, not only in an output routine.

Page 255, line 33 (4/25/84)

        \nointerlineskip

Page 256, starting with line −17 (11/1/83)

6) Finally, the \dosupereject macro is designed to clear out any insertions that have been held over, whether they are illustrations or footnotes or both:

        \ifnum\insertpenalties>0
          \line{} \kern-\topskip \nobreak
          \vfill\supereject\fi

The mysterious negative \kern here cancels out the natural space of the \topskip glue that goes above the empty \line; that empty line box prevents the \vfill from disappearing into a page break. The vertical list that results from \dosupereject is placed on TEX’s list of things to put out next, just after the straggling insertions have been reconsidered as explained in Chapter 15. Hence another super-eject will occur, and the process will continue until no insertions remain.

Page 262, line 14 (2/12/84)

        \def\endindex{\mark{}\break\endgroup}

Page 262, lines 34 and 35 (2/12/84)

if \next is ‘\endindex’, the next commands executed will be ‘\vfill\mark{}\break \endgroup’; otherwise the line will be treated as a main entry.

Page 269, line 23 becomes two lines (8/25/84)

tokens like +_{12}; (3) keywords like pt ; (4) control sequence names like \dimen; or (5) the special symbols {, }, $.

Page 274, line 24 (2/15/84)

\lineskip (interline glue if \baselineskip isn’t feasible)

Page 289, slight clarification on lines 39–41 (3/10/84)

A ⟨math character⟩ defines a 15-bit number either by specifying it directly with \mathchar or in a previous \mathchardef, or by specifying a 27-bit \delimiter value; in the latter case, the least significant 12 bits are discarded.

Page 307, a slightly more explicit answer (11/3/83)

6.3. It represents the heavy bar that shows up in your output. (This bar wouldn’t be present if \overfullrule had been set to 0pt, nor is it present in an underfull box.)

Page 313, first four lines (3/13/84)

12.17. You get ‘A’ at the extreme left and ‘puzzle.’ at the extreme right, because the space between words has the only stretchability that is finite; the infinite stretchability cancels out. (In this case, TEX’s rule about infinite glue differs from what you would get in the limit if the value of 1 fil were finite but getting larger and larger. The true

Page 315, first three lines (3/13/84)

14.14. Just say \parfillskip=\parindent. Of course, TEX will not be able to find appropriate line breaks unless each paragraph is sufficiently long or sufficiently lucky; but with an appropriate text, your output will be immaculately symmetrical.

Page 324, line 16 (2/15/84)

 18.41. $$\{\underbrace{\overbrace{\mathstrut a,\ldots,a}

Page 324, first line of answer 18.44 (4/11/84)

 18.44. $$\mathop{{\sum}'}_{x\in A}f(x)\mathrel{\mathop=^{\rm def}}

Page 333, beginning of the final paragraph (12/19/83)

Note: The stated preamble solves the problem and demonstrates that TEX’s line-breaking capability can be used within tables. But this particular table is not really a good example of the use of \halign, because TEX could typeset it directly, using \everypar in an appropriate manner to set up the hanging indentation, and using \par instead of \cr. For example, one could say

Page 341, the bottom line was left out! (2/9/84)

Footline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 1009

Page 345, top three lines (1/26/84)

A mathcode is relevant only when the corresponding category code is 11 or 12; therefore many of these codes will rarely be looked at. For example, the math code for ^^M specifies the character \oplus, but it’s hard to imagine a user who would want ^^M

Page 345, line 31 (2/29/84)

\delcode`\<="26830A    \delcode`\\="26E30F    \delcode`\>="26930B

Page 347, lines 1 and 2 (3/16/84)

\count18=3  % this counter allocates math families 4, 5, 6, ...
\count19=255 % this counter allocates insertions 254, 253, 252, ...

Page 350, line 9 from the bottom (3/16/84)

font, whose information does not have to be loaded again.

Page 354, line 5 (6/7/84)

\def\ialign{\everycr={}\tabskip=0pt \halign} % initialized \halign

Page 355, lines 19–21 (7/3/84)

subdivision in a document; to use it, you say ‘\beginsection⟨section title⟩’ followed by a blank line (or \par). The macro first emits glue and penalties, designed to start a new page if the present page is nearly full; then it makes a \bigskip and puts the section

Page 355, lines 27–29 (7/3/84)

\outer\def\beginsection#1\par{\vskip0pt plus.3\vsize\penalty-250
  \vskip0pt plus-.3\vsize\bigskip\vskip\parskip
  \message{#1}\leftline{\bf#1}\nobreak\smallskip\noindent}

Page 355, line 37 (4/24/84)

\outer\def\proclaim #1. #2\par{\medbreak

Page 356, seven lines from the bottom (4/11/84)

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

Page 359, starting with line 2 (11/16/83)

\mathchardef\ldotp="602E\mathchardef\cdotp="6201\mathchardef\colon="603A
\def\ldots{\mathinner{\ldotp\ldotp\ldotp}}
\def\cdots{\mathinner{\cdotp\cdotp\cdotp}}
\def\vdots{\vbox{\baselineskip=4pt \lineskiplimit=0pt
    \kern6pt \hbox{.}\hbox{.}\hbox{.}}}
\def\ddots{\mathinner{\mskip1mu\raise7pt\vbox{\kern7pt\hbox{.}}\mskip2mu
    \raise4pt\hbox{.}\mskip2mu\raise1pt\hbox{.}\mskip1mu}}

Page 359, starting with line 19 (11/3/83)

\def\overbrace#1{\mathop{\vbox{\ialign{##\crcr\noalign{\kern3pt}
     \downbracefill\crcr\noalign{\kern3pt\nointerlineskip}
     $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
\def\underbrace#1{\mathop{\vtop{\ialign{##\crcr
     $\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern3pt\nointerlineskip}
     \upbracefill\crcr\noalign{\kern3pt}}}}\limits}

Page 359, seventh line from the bottom (2/29/84)

\def\backslash{\delimiter"026E30F }   \def\bracevert{\delimiter"000033E }

Page 361, line 3 (8/17/84)

        \def\buildrel#1\over#2{\mathrel{\mathop{\null#2}\limits^{#1}}}

Page 363, line 10 (4/26/84)

  \ifhmode\edef\@sf{\spacefactor=\the\spacefactor}\/\fi

Page 364, starting with line 10 (11/1/83)

\def\dosupereject{\ifnum\insertpenalties>0 % something is being held over
  \line{}\kern-\topskip\nobreak\vfill\supereject\fi}

Page 364, line 28 (7/8/84)

  \tracingmacros=2 \tracingparagraphs=1 \tracingrestores=1

Page 370, line 7 (3/16/84)

information about the TEX Users Group.)

Page 374, line 23 (7/8/84)

log file when \tracingmacros=2 and \tracingcommands=2. One of the important ways

Page 379, line 1 (1/12/84)

A particular item can be selected by its position number from the left:

Page 381, line 6 (2/12/84)

        \newcount\lineno % the number of file lines listed

Page 381, lines 24 and 25 (12/15/83)

Instead of listing a file verbatim, you might want to define a \verbatim macro

such that ‘\verbatim{$this$ is {\it!}}’ yields ‘$this$ is {\it!}’. It’s somewhat

Page 385, lines 22 and 23 (1/12/84)

macro, a parameter, or a token list variable; (b) when TEX must determine whether the token & or \span or \cr or \crcr is the end of an entry within an alignment.

Page 387, two paragraphs in right column (1/18/84)

A. Exactamente. Pero los profesores son tan conservadores que temerían espantar al tipo de estudiante ^{⟨⟨}apisonadora^{⟩⟩} que hace lo que le proponen para casa, obedientemente y de forma mecánica. Además, no creo que les gustase el trabajo adicional de calificar respuestas a preguntas abiertas. La forma tradicional es dejar la parte creativa para los cursos altos. Durante diecisiete años o más se enseña al estudiante a aprobar, luego de golpe, cerca de la graduación, se le pide que haga algo original.

Page 395, lines 21 and 22 (1/12/84)

Notice that the macros need to do their own checking for ligatures, and they also take appropriate actions when a paragraph begins with an opening quote. Since \kern

Page 399, line 1 (1/10/84)

Inside the output routine, \box\footins will now be a vbox of hboxes, and

Page 399, line 9 (2/28/84)

        .\hbox(7.6359+0.0)x269.62617 []

Page 407, line 4 (6/10/84)

\beginlinemode and \beginparmode are defined to initiate these modes; and another

Page 408, line 15 (12/14/83)

    P. O. Box 1009, Haga Alto, CA 94321 USA}

[Also change the ZIP code in the return address on the envelope illustrated at the bottom of page 405.]

Page 409, line 5 (2/18/84)

\font\twelveit=cmti10 at 12pt  % (a cheap substitute for cmti12)

Page 417, last six lines (8/25/84)

\parskip of 0pt plus .8pt between adjacent entries, and since there is room for more than 50 lines per column; therefore the manmac balancing routine tries to make both the top and bottom baselines agree at the end of the index. In applications where the glue is not so flexible it would be more appropriate to let the right-hand column be a little short; the best way to do this is probably to replace the command ‘\unvbox3’ by

‘\dimen2=\dp3 \unvbox3 \kern-\dimen2 \vfil’.

Page 422, lines 24–26 (2/9/84)

(The last two lines use \d@nger and \dd@nger, which are non-\outer equivalents of \danger and \ddanger; such duplication is necessary because control sequences of type \outer cannot appear within a \def.)

Page 428, in the table of sixteen basic fonts (12/19/83)

[The special fonts called cmi10 and cmi7 and cmi5 should really be called cmmi10 and

cmmi7 and cmmi5.]

Bugs in The T_{E}Xbook, first printing 9

Page 433, last eight lines (8/17/84)

explained in Appendix G. If you want to increase the number of parameters past the number that actually appear in a font’s metric information file, you can assign new values immediately after that font has been loaded. For example, if some font \ff with seven parameters has just entered TEX’s memory, the command \fontdimen13\ff=5pt will set parameter number 13 to 5 pt; the intervening parameters, numbers 8–12, will be set to zero. You can even give more than seven parameters to \nullfont, provided that you assign the values before any actual fonts have been loaded.

Page 445, line 6 (11/11/83)

if (a − \frac{1}{2} θ) − (h(z) − v) < φ, increase v by the difference. Finally construct a vbox of

Page 449, line 12 (1/18/84)

immediately clear why the ‘n’ should be attached to the ‘e’ in one case but not

Page 459, left column, line 2 (1/18/84)

al-Khwârizmî, abu Ja‘far Muh.ammad

Page 460, index entry for Beethoven (8/16/84)

Change ‘von’ to ‘van’.

Page 461, third line in left column (8/25/84)

The entry for \box255 should not be indented.

Page 461, index entry for boxed material (8/2/84)

Add ‘420’.

Page 462, index entry for \colon (11/16/83)

Add page \underline{359} to this list.

Page 462, right column, third-last line (5/21/84)

[Change ‘crochets’ to ‘crotchets’; then move this entry down two lines.]

Page 463, right column, line 16 (5/20/84)

design size, 16–17, 213.

Page 464, index entry for \dump (1/10/84)

Add page 344 to this list.

Page 464, right column, line 5 (1/5/84)

Dvořák, Antonín Leopold, 409.

Page 464, index entry for \end (8/25/84)

Page number 264 should be underlined.

Page 465, index entry for \everydisplay (8/25/84)

Add page 326 to this list.

Page 465, index entry for \filbreak (7/3/84)

Delete the reference to page number 355.

Page 466, index entry for \footnote (4/26/84)

Page number 363 should be underlined.

Page 467, index entry for \hidewidth (7/3/84)

Page number 354 should be underlined.

Page 468, index entry for insertions (8/25/84)

Add pages 115–117, 122–125 to this list.

Page 469, index entry for \kern (11/1/83)

Add page 256 to this list.

Page 470, index entry for \limits (11/3/83)

Add page 359 to this list.

Page 472, right column, lines 10–11 (7/9/84)

\normalbaselines, 325, 349, \underline{351}, 414–415.

         \normalbaselineskip, \underline{349}, 414–415.

Page 472, index entry for \null (7/3/84)

Page number 351 should be underlined.

Page 472, right column, line 28 (1/3/84)

*\nullfont, 14, 153, 271, 433.

Page 476, a new index entry (8/25/84)

shifted output, see \hoffset, \voffset.

Page 476, index entry for shriek (8/25/84)

It should not be capitalized.

Page 478, index entry for Świerczkowski (9/15/84)

The middle name should be ‘Sławomir’.

Page 479, last seven lines in the left column (8/23/84)

*\tracingmacros, \underline{205}, \underline{212}, 273, 329. *\tracingonline, 121, 212, 273, \underline{303}. *\tracingoutput, \underline{254}, 273, 301–302. *\tracingpages, 112–114, 124, 273, \underline{303}.

*\tracingparagraphs, 98–99, 273, \underline{303}.
*\tracingrestores, 273, \underline{301}, \underline{303}.

*\tracingstats, 273, \underline{300}, \underline{303}, 383.

Page 479, index entry for underlined text (8/2/84)

Add ‘see also \underbar’.

Page 480, index entry for \vbox (11/1/83)

Delete page 256 from this list.