A TeXnician's Haiku (Answer)

A TEXnicians Haiku


  \catcode\csname
  \romannumeral\parshape
  \endcsname\month

            ---Michael Downes

Answer:

The control sequence is that uniquely weird one known as \csname\endcsname, the no-name control sequence. What I meant by "defined in an obvious way" was that \csname\endcsname should be defined to have an integer value in the proper range for the first argument of a catcode statement---an <8-bit number> in the syntax rules of TeXbook Chapter 24. This could be accomplished in many different ways, but here are some of the more likely ones:

\expandafter \def\csname\endcsname{0}
\expandafter \let\csname\endcsname=\day
\expandafter \chardef\csname\endcsname=`\*
\expandafter \newcount\csname\endcsname

An example of a valid but non-obvious definition would be

\expandafter\def\csname\endcsname#1{#1#1}

Then in September the haiku statement would change the category of the tab character to 'ignore' while in October it would change the category of ^^J to 'space'. By the way, it seems to be a minor deficiency of plain TeX that \csname\endcsname is not initialized with the same definition as for \^^M, because if you try to enter ' \ ' (control-space) at the end of an error-recovery insertion, the final space gets silently discarded following TeX's normal practice of discarding whitespace at the end of a line, and the unsuspecting user gets an error message:

! Undefined control sequence.
l.1 Foo car \Tex
                 and then
? i\TeX\ 

[In the above line I entered ' \ ' as the last thing on the line.]

! Undefined control sequence.
   \TeX\
                
l.1 Foo car \Tex
                 and then
? 


Michael Downes <mjd@ams.org>
Last modified: Mon Oct 4 14:14:15 1999