[texhax] Force double expansion ?

Philip Taylor P.Taylor at Rhul.Ac.Uk
Wed Jul 16 23:12:48 CEST 2014



Philip Taylor wrote:

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

Sorry, my code tested was defective; it now works as you suggested.

% !TeX Program=XeTeX

\def \analysenexttok {\message {Nexttok: \meaning  \nexttok}}
\def \whatever {\csname namespace: }
\let \endwhatever = \endcsname
\expandafter \def  \csname namespace: test\endcsname {"namespace: test"}
   \expandafter\expandafter\expandafter \futurelet
       \expandafter\expandafter\expandafter \nexttok
           \expandafter\expandafter\expandafter \analysenexttok
           	\whatever test\endwhatever
  \end

yielding :

This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/W32TeX)
  restricted \write18 enabled.
entering extended mode
(./untitled-12.tex Nexttok: macro:->"namespace: test" [1] )
Output written on untitled-12.pdf (1 page).
SyncTeX written on untitled-12.synctex.gz.
Transcript written on untitled-12.log.





More information about the texhax mailing list