Ignored character as control symbol

I will cite from my book "TeXbook naruby", page 22.

The precedence of rules of token processor is important. First rule (with highest precedence) is (a) "double caret" rule. Second rule is "creating control sequences" (b) when a character with catcode 0 occurs. And this rule says:

There are two ways. If the first character (after catcode 0) has catcode 11 (letter) then the control sequence is created from all consecutively followed characters of catcode 11 until end of line or until first character with different catcode. The token processor goes to the state S (skipping spaces) in such case. Else the first character is not the catcode 11. Then the identifier of the control sequence includes only this character. The state S after this is applied here only if the control sequence \ (backslash space) is created.

Next rule (with less priority) is (c) "normal tokens" and (d) "ignoring characters" and many other rules (e)--(i).

We can see from the text above, that only 11 and non-11 catcode is treated at the level (b) "creating control sequence". Of course, the ignored catcode is non-11, so the control sequence consisting from letters stops here. But ignored character can be single non-11 control sequence.


He means that while, with that catcode, t is ignored so TetX is printed as TeX, it is not ignored while tokenizing so \TetX does not tokenize as \TeX. (and for the same reason actually \t is a normal token as you show.


As noted in other answers, we have here a control sequence which is not a control word (the escape char then one or more letters) but rather a control symbol (the escape char then exactly one non-letter). Thus this case is not different from say \%.

The point that ignored chars cannot appear in a control word follows from the rules as described by wipet. Thus

\catcode`\t=9
\def\setup{\TeX}
\se up
\seup
\se oops
\end

will give an error on the second and third uses but not the first: we have defined a macro \se which must be followed by up, not a macro called \seup. (It will also work if you use \setup as the t is ignored, of course.)

Tags:

Tex Core