LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

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

Print Reply
Joseph Wright <[log in to unmask]>
Wed, 11 May 2011 20:20:41 +0100
text/plain (29 lines)
On 11/05/2011 20:01, Bruno Le Floch wrote:
> Not quite true. For instance, amsmath redefined \\ not to skip spaces
> when looking for an optional argument, I believe. And that works
> because \\ is a control symbol, not a control word. I think this
> choice of behaviour really needs to be supported, since it leads to
> surprises for the end-user otherwise.
>> really correct! (At the same time, the implementation would be slightly
>> easier to follow if this change was made.)
> On the other hand, emulating LaTeX2e arguments with space skipping
> seems needed as well. Is it possible to get the best of the two worlds
> with a "o_no_skip" argument specifier? Or more generally a modifier,
> say K, which makes the next argument keep spaces (except perhaps for m
> arguments where it should produce an error)?
> \DeclareDocumentCommand {\\} { Ks Ko } {...}

We did do that at one point, but the problem then became that there is
not a hard-and-fast rule. (While the AMS might be very clever in their
redefinition, I'd prefer to be consistent with things like the classic
"\item [" case even if it means rembering to do "\item{} [" and "\\{} [".)

(As a user, I'd like to see one reliable syntax, and not have to read
package documentation to explain why in one case "\foo{...} [...]" works
but in another case "\baz{...} [...]" fails.)
Joseph Wright