[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
         \count 0 = 0
             \catcode \count 0 = \catcode `\a
         \ifnum \count 0 < 255
             \advance \count 0 by 1
         \catcode `\{ = 1
         \catcode `\} = 2
\def \showme {\passivate \aftershowme}
\def \aftershowme #1{\leftline {\tt #1}\endgroup \leftline {\scantokens {#1}}}
\showme {hello, \relax there}

More information about the texhax mailing list