[XeTeX] \ifincsname: unexpected behaviour after nested \csname...\endcsname
Will Robertson
wspr81 at gmail.com
Thu Jul 22 06:20:27 CEST 2010
On 2010-07-22 09:12:14 +0930, Grzegorz Murzynowski
<natror at o2.pl> said:
> I noted quite unexpectedly that nesting \csname…\endcsname, results in
> turning |\ifincsname| false: the example above typesets
>
> \before nested csname: In csname \ after nested csname: Not in csname
>
> Is it a bug or a feature? (I use nested csnames sometimes).
The same behaviour occurs in pdfTeX, so from that respect at least it's
consistent. But it definitely looks like a bug to me.
Perhaps a clarifying example:
\def\a{\ifincsname T \else F \fi}
\expandafter\string\csname
1\a
\expandafter\string\csname2\a\endcsname
3\a
\endcsname
#1 and #2 and "true" but #3 is "false". Clearly the \endcsname has
reset the "am i in a csname" switch rather than popped it back to its
previous value.
I think it would be worth sending this to the pdfTeX mailing list as well.
Cheers,
Will
More information about the XeTeX
mailing list