[texhax] Force double expansion ?

Philip Taylor P.Taylor at Rhul.Ac.Uk
Wed Jul 16 22:59:11 CEST 2014

Uwe Lueck wrote:

> Are you really asking for the simple
>    \expandafter\expandafter\expandafter \futurelet
>        \expandafter\expandafter\expandafter \nexttok
>            \expandafter\expandafter\expandafter \analysenexttok

It would seem not, Uwe, since when used in the context given, it yields 
an error :

> % !TeX Program=XeTeX
> \def \examinenexttok {\message {Nexttok: \meaning \nexttok}}
> \def \whatever {\csname namespace: }
> \let \endwhatever = \csname
> \expandafter \def \csname namespace: test\endcsname {"namespace: test"}
> \tracingall
>   \expandafter\expandafter\expandafter \futurelet
>       \expandafter\expandafter\expandafter \nexttok
>           \expandafter\expandafter\expandafter \analysenexttok
>           	\whatever test\endwhatever
>  \end

which yields :

This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/W32TeX)
  restricted \write18 enabled.
entering extended mode
{vertical mode: \tracingstats}

\whatever ->\csname namespace:
! Missing \endcsname inserted.
<to be read again>
l.12  \end


Philip Taylor

More information about the texhax mailing list