Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- From: Ulrich Diez <eu_angelion@xxxxxxxxxxxxxx>
- Date: Mon, 13 Oct 2008 14:34:47 +0200
Enrico Gregorio wrote:
David Kastrup <dak@xxxxxxx> wrote:
Enrico Gregorio <gregorio@xxxxxxxxxxxxx> writes:
David Kastrup <dak@xxxxxxx> wrote:
And I don't know what Don was thinking when he introduced the optional
space after character constants.
It could be in order to accommodate constructions like
\edef\abc#1{\ifnum\x=#1 \y\else\z\fi}
where #1 is expected to be a <number>. If you need \abc to be
completely expandable a \relax can be something to avoid. The space
is needed when the call is \abc{42}, but the input might also be
\abc{`*} and the space would creep in.
Perhaps an obscure reason, I admit.
The space would creep in anyway if you use some count register like
\value{page}.
Well, this is LaTeX and not Plain syntax. That's why I chose \edef
for the example: probably such a construction would go inside some
definition and the good LaTeX programmer would know about passing
\c@page and not \value{page} to it.
In this case the space in question would already get
"tokenized" at the _definition_-time of \abc.
This has nothing to do with what happens at the reading-
time of \abc's arguments. Regarding that space it dosen't
matter what the arguments of \abc look like.
It doesn't matter if the preceeding argument ends with a
control- word or if it ends with a }-character. The space
is already there.
According to chapter 24 of the TeXbook, trailing spaces are
not considered part of the number if that number comes
from an <internal integer>.
<countdef token> and \count<8-bit-number> are of
<internal integer>.
[Inuitively I assumed the same treatment for `<character token>
whereby <character token> can be either a character-code,
category-code-pair or an active character or a control-sequence
whose name consits of a single character.
But syntax is: `<character token><one optional space>
which means that one trailing space-token is considered part
of the number if present. I still don't understand why the
need for seeking <one optional space> was seen here.
With `<character token> you know for certain after reading
the <character token> what the number's value should consist
of. (Also I didn't find in the TeXBook what is considered
<optional space>...) ]
Sincerely
Ulrich
.
- References:
- \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- From: Ulrich Diez
- Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- From: Donald Arseneau
- Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- From: Ulrich Diez
- Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- From: David Kastrup
- Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- From: Enrico Gregorio
- Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- From: David Kastrup
- Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- From: Enrico Gregorio
- \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- Prev by Date: Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- Next by Date: nesting unexpanded conditionals
- Previous by thread: Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation
- Next by thread: TeX Gyre Pagella font question
- Index(es):
Relevant Pages
|