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

Evan Aad oddeveneven at gmail.com
Fri Sep 1 10:39:31 CEST 2017


The first line, which sets <tab>'s catcode to 12 undoes Plain TeX's
settings, and the <tab> no longer acts like a blank space.

On Fri, Sep 1, 2017 at 11:17 AM, Julian Gilbey <julian at d-and-j.net> wrote:
>
> On Wed, Aug 30, 2017 at 07:55:55PM +0300, Evan Aad wrote:
> > 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
> >
> > [...]
> > 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.
>
> This is not correct: "Plain TeX makes <tab> act like a blank space."
> says the TeXbook (page 45), so you have a blank space, and TeX enters
> state S (skipping blanks).  It now reaches the end-of-line, and "if
> TeX is in state S (skipping blanks), the end-of-line character is
> simply dropped." (page 46).  So all that you end up with is a single
> space character, as you observed.
>
>    Julian


More information about the tex-k mailing list