[texhax] early reading of the v-part in template, TeX bug?

John Hobby hobby at research.bell-labs.com
Fri Mar 23 16:43:53 CET 2007


> I attach the file with the code and the explanation. It seems to me 
> impossible that nobody have ever hit the same problem before, so even if 
> I hope to get answers agreing that this is a bug, I rather expect to 
> receive some other explanation, perhaps the somewhat dissapointing 
> "weird feature, but not considered bug".

The "weird feature" is that the end of an alignment template is
considered "outer".  On page 206 of The TEXbook (between exercises
20.7 and 20.8), there is a double-dangerous paragraph that explains
"outer".  It fails to mention that the end of an alignment template
is treated like end of file for this purpose.  (Perhaps that is
somewhere in the chapter on alignments, but I could not find it.
TeX: The Program makes it clear that the "outerness" is intensional.)

In the example that worked, the macro is already expanded when
TeX sees the "&" that ends the template; in the example that
failed, it was trying to parse the arguments to a macro.

The purpose of this feature is to simplify error recovery
for the 99.99% of users who are not trying to do this kind
of thing.  The only potential bug is that I could not find
any place where Knuth documents this feature.



More information about the texhax mailing list