[texhax] early reading of the v-part in template, TeX bug?
Javier Múgica de Rivera
javier at digi21.net
Sat Mar 24 08:57:53 CET 2007
I'm sorry for my previous html message. I didn't know It showed in
vervatim mode as an attached file. I'm sending the same message properly:
> 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.
No in example 1. I wrote that example precisely to show that there is no
problem in & being the argument delimiter.
> 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.)
I see. However, the problem is no the end of the template being \outer,
which I completely agree and had already guessed from some prior
examples using conditionals. The problem is taking the & as the end of
the template. In both examples 1 (that works) and 2 (that does not), TeX
is parsing the argument, so in both of them it should take the & as the
argument delimiter. You may ignore examples 3 and 4. If you look
carefully at examples 1 and 2, you will see that the only diference is
that the control sequence \saveentry comes from the template preamble in
the first case, while in the second is in the template entry itself.
When I wrote
%instead of taking the & as the end of the argument it expands it
(why?), keeps reading ahead
%and gets to the end of the template, which cannot appear in a macro
argument, hence raising
I wasn't complaining about the error at the end of the alignment, but at
TeX taking the & as the end of the template when it is parsing an
argument and is suposed to take the & as the end of the argument.
More information about the texhax