[Tugindia] token from a control sequence

David Kastrup tugindia@tug.org
Wed, 30 Oct 2002 10:02:07 +0100


"Dr. Dinesh Karia" <dineshjk@earth.planet.net.in> writes:

> Dear all,
> 
>     This is yet another mail in sequel of understanding \TeX | \LaTeX.
> 
> As TTB (The TeX Book) says
> 
> ********Excerpt from TTB********
> 
> If \TeX\ sees an escape character (category 0) in any state, it
> scans the entire ^{control sequence} name as follows. (a)~If there are no
> more characters in the line, the name is empty (like |\csname\endcsname|).
> ^^{null control sequence} ^^{csname endcsname}
> Otherwise (b)~if the next character is not of category~11 (letter), the
> name consists of that single symbol. Otherwise (c)~the name consists of all
> letters beginning with the current one and ending just before the first
> nonletter, or at the end of the line. This name becomes a control sequence
> token. \TeX\ goes into state~$S$ in case~(c), or in case~(b) with respect
> to a character of category~10 (space); otherwise \TeX\ goes into state~$M$.
> 
> ********Excerpt from TTB over ********
> 
> 
> Que: Now according to (b) and (c), it should stop when it encounters @ in
> the control sequence.

No.  It says it should stop assembling a control sequence when it
encounters @ in the input stream.  Tokens that have already been
formed are not affected.

> On the other hand however, it also says that all the internal or
> private variables (and the standard constants like \@ne, \m@th,
> \count@) contains the character @. Is this not contradicting?

No.  Please read the index entry for "@ (the `at' sign)".  The first
entry in italics will explain.

> It seems that when any control sequence containing @ is used, the @ should
> have been changed to category 11. But when I saw various class and
> stylefiles, I could never trace out when the category of @ is changed. Can
> anybody help understanding this concept?

LaTeX changes this automatically before inputting style and class
files.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David.Kastrup@t-online.de