Re: \romannumeral-expansion after number in`<single-letter-control-sequence>-notation



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
.



Relevant Pages

  • Re: asymptote/hyperbola?
    ... >> I have no interest in refuting anything in this matter. ... He's presenting a character who's talking math. ... the passage I cited does no such thing. ...
    (rec.arts.books)
  • Re: Matter by Iain M Banks
    ... Well, I've just finished second-reading Matter, and... ... what Banks is trying to do is very impressive, ... real to make an emotionally-satisfying difference to his character. ... Her emotional Sursamen/Culture loyalty dilemna seems to have been long ...
    (rec.arts.sf.written)
  • Re: Need pkey data type of 32 < x < 64 bits size.
    ... binary types. ... Character types are for words, and trailing spaces don't ... matter, case and accents may or may not matter, and bytes that represent ...
    (microsoft.public.sqlserver.programming)
  • Re: Tauriel??
    ... it doesn't matter if it is a matter of a fundamental change or a ... and that means an elven character. ... My opinion of a number of Jackson's changes to /The Lord of the ... The target audience of Jackson's /The Hobbit/ films will of course be ...
    (rec.arts.books.tolkien)
  • Re: Who will be the first?
    ... about racism and tolerance before. ... calls for threatening or killing people whose politics you don't like. ... those lonely fights, and I'll only step in as a matter of principle, never ... character. ...
    (rec.crafts.metalworking)