[texhax] Some puzzling TeX (\@sptoken)

Uwe Lueck uwe.lueck at web.de
Wed Jun 1 13:02:03 CEST 2011

"Heiko Oberdiek" <heiko.oberdiek at googlemail.com> wrote 31.05.2011 21:14:19:
> On Tue, May 31, 2011 at 08:50:28PM +0200, Uwe Lueck wrote:
>>   \makeatletter \let\atest\@sptoken \show\atest \stop
> The syntax of \let contains optional spaces, therefore \@sptoken
> that is an (implicite) space is ignored and you get:
>   \let\atest\show
>   \atest\stop
> Probably you want:
>   \let\atest= \@sptoken
>   \show\atest
>   \stop

Thanks, indeed. Actually my code was a result of realizing
that \@sptoken behaves like a blank space, but I wondered
whether the TeXbook has an explicit rule on that. As to
`implicit', I wondered whether this is explained explicitly.

After Heiko's hint I found on TeXbook p. 153:
"When TeX's syntax allows both explicit and implicit characters,
the rules below will be careful to say so, explicitly."
I looked along the rules, not being willing to read 
the entire Chapter 24 ...

As I sometimes do (not knowing if this is allowed),
I then searched texbook.tex in a text editor and found
that the above quote continues (very next paragraph):
"The quantity <space token>, which was used in the syntax of <optional
spaces> above, stands for an explicit or implicit space. In other words,
it denotes either a character token of category 10, or a control sequence
or active character whose current meaning has been made equal to such a
token by \let or \futurelet."

What seems *not to be said explicitly*, indeed!! (see
announcement above), is that <one optional space>
may be an implicit space token. (Of course it is said

Indeed I had `=' intermediately, but missed to try `= ', I rather removed
`=`for simplification in debugging, when I had no idea what was going on.

BTW, I have discovered at this occasion that Exercise 24.6
and the \futurenonspacelet story in Appendix D, pp. 376f.
expand on space tokens.



More information about the texhax mailing list