[texhax] dual-use input/output macro

Uwe Lück uwe.lueck at web.de
Fri Oct 27 21:55:31 CEST 2006

What makes me very sad about my previous celebrated proposal

     \def\toshow{#1}\@onelevel at sanitize\toshow


>Karl Berry :
>>Suppose I want to show both the TeX input and its corresponding output
>>as an example.  Not big files, but just small fragments.  As in:
>>  \showme{hello, \relax there}
>>and the typeset output could be, say, two lines:
>>  hello, \relax there   % in typewriter
>>  hello, there          % in roman

is (e.g.)

   \showme{\TeX{} Users Group}

... the code version will show a blank space between \TeX and {
... while nobody types such a blank space in his code ...

I seem to have discovered this because Oleg's postings of
2005/11/17+18 reminded of a similar effect (the idea seemingly
having worked inside me unconsciously for months ...).
His second proposal involved a \catcode change
(which I dislike very much ...
Incidentally, I have just spent several (!)hours(!) to learn that
you can't explicitly change \catcode's in the second or third
argument of \@ifundefined ...)



More information about the texhax mailing list