[tex-k] Error in TeXbook: Trailing tabs don't typeset

Evan Aad oddeveneven at gmail.com
Wed Aug 30 18:55:55 CEST 2017


I think I found an error in the TeXbook. Please vet.

Consider the following Plain TeX manuscript

---
\catcode9=12\relax% ASCII 9 is tab
.\ \ .\par%
.
.%
\bye
---

It's impossible to tell, but there's a tab just after the dot on the
third manuscript line. This manuscript typesets thus:

---
.  .
. .
---

Observe that there seem to be two spaces between the dots on the first
line, but only one space between the dots on the second line.

However, based on the TeXbook, I'd expect there two be two spaces
between the dots on the second line too: one for the tab, and one for
the carriage-return at the end of the line.

One way to explain this is that discards trailing tabs before they are
tokenized. However, this would contradicts the TeXbook, which claims
that only trailing spaces are discarded (p. 46):

> TeX deletes any `<space>` characters (number 32) that occur at the right end of an input line.

Note the specification of the number 32, which is ASCII space.


More information about the tex-k mailing list