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

Evan Aad oddeveneven at gmail.com
Sat Sep 2 19:41:49 CEST 2017


> Replacing the ISBLANK test with just a ' ' test is not right, it seems
to me.

Nor to me, but for different reasons, namely ISBLANK might be used
somewhere else, and even if it is not used elsewhere, someone might
decide to change it in the future according to their notion of what
"blank" is. Instead, change the function input_line by replacing the
test "ISBLANK(buffer[last - 1])" by "(buffer[last - 1]== ' ')".

> We must also remove trailing CR and LF characters

I agree. While this was not explicitly mentioned in the TeXbook, I
think this is implicit in the description of the input algorithm in
chapter 8 of the TeXbook: this is why a carriage-return (ASCII 13) is
inserted at the end of every input line (see p. 46).

Victor Eijkhout would also agree, since in his "TeX by Topic" he
states in describing the input routine (p. 29): "An input line is read
from an input file (minus the line terminator, if any)."



On Sat, Sep 2, 2017 at 8:21 PM, Karl Berry <karl at freefriends.org> wrote:
>
> Agreed that tabs should not be removed; we'll fix it in web2c.
> Thanks.
>
> Replacing the ISBLANK test with just a ' ' test is not right, it seems
> to me. We must also remove trailing CR and LF characters, as we have
> been doing since day one. Otherwise line ending portability madness
> would ensue.  In tex.web, Knuth can assume this is magically taken care
> of by Pascal, but ...
>
> Thanks again,
> Karl


More information about the tex-k mailing list