[tex-k] TeX erranously expands tokens from a token variable

Karl Berry karl at freefriends.org
Sun Aug 8 23:49:22 CEST 2021

    \edef\good{\b\the\toks0 \the\toks1}

As far as I can see:

In the \bad case, TeX has to fully expand \the\toks1 tokens in order to
see if they start with a numeral to follow the 0 in \the\toks0, i.e., to
determine the \toks register number to expand. This is described
(tersely/opaquely as usual) in The TeXbook, to my recollection, though I
didn't try to find it. Am I missing some reason why this is not the case?

In the \good case, \the\toks0 number is terminated by the space (as you
know, I'm sure). -k

More information about the tex-k mailing list.