LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mailing list for the LaTeX3 project <[log in to unmask]>
David Carlisle <[log in to unmask]>
Tue, 3 Nov 1998 13:13:44 GMT
<v03110701b26491718673@[]> (message from Hans Aberg on Tue, 3 Nov 1998 12:11:48 +0100)
Mailing list for the LaTeX3 project <[log in to unmask]>
text/plain (30 lines)
> that makes it possible. I have no idea why it works; TeX seemed to accept it.

yes of course you can detect {} with \futurelet (you'll see similar code
in xspace.sty) the point is that you can't reliably do anything with the
information once you have it. For your quote lookahead you need to see
past the } but the role of } is rather different in \mbox{..} or
\section{...} or \sbox{...} and you don't know what sort of thing you
have, and the group may not end with } it may be & or .....

and then the question is do you expand before or after testing.

in \quote{this}\foo

do you expand \foo first in case it is defined to start with a , ?

If you decide no then sometimes your quote command will sometimes make
the wrong decision (this is what xspace does)

If you expand once (by inserting some \expandafter s at suitable places
then your quote command will make the wrong decision at slightly
different set of times.

If you try to fully expand the token to see if it ultimately produces a
, then effectively you make your entire document a `moving argument'
so all sorts of fragile commands will blow up, and commands made robust
using \protect still won't expand and so quote will still sometimes make
the wrong decision.