[texhax] dual-use input/output macro

Philip TAYLOR P.Taylor at Rhul.Ac.Uk
Fri Nov 18 15:30:45 CET 2005


Having been a little bit dismissive of Phil Ratcliffe's *solution,
I thought the least I could do was to post one of my own so that
he could have his revenge :-)

Here's my version, which satisfies Karl's demo example but which
hasn't been verified for anything more complex --

Philip Taylor
--------
\def \passivate
     {%
         \begingroup
         \count 0 = 0
         \loop
             \catcode \count 0 = \catcode `\a
         \ifnum \count 0 < 255
             \advance \count 0 by 1
         \repeat
         \catcode `\{ = 1
         \catcode `\} = 2
     }
\def \showme {\passivate \aftershowme}
\def \aftershowme #1{\leftline {\tt #1}\endgroup \leftline {\scantokens {#1}}}
\showme {hello, \relax there}
\end



More information about the texhax mailing list