## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 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 >>]

My take would be as follows:

1. As several has observed: for compatibility with LaTeX2e, spaces should
normally be skipped. This allows for formatting such as

\foo{apa}
[bepa]
{cepa}

2. Sometimes, an existing command is redefined so that an optional
argument is added at the end. In such cases, it may be preferable to make
that argument such that it does not skip spaces, for compatibility with
existing documents written under the assumption that spaces would not be
skipped at that point. In other words, if

\bar{apa} cepa

used to have a space, and \bar for some reason in a package needs to be
extended to support \bar{apa}[bepa], then \bar{apa} cepa should still have
that space.

Therefore, the solution should be to provide both, but let the
space-nonskipping variants come with a big warning in the xparse
documentation, detailing why they are usually inappropriate. In
particular, such documentation should suggest the argument order

\bar[bepa]{apa}

as preferable to

\bar{apa}[bepa]

since package authors are otherwise likely to pick one at random, never
even considering the syntactical implications.

I also think the spacious formatting

\foo{apa}
{bepa}
{cepa}

needs to be mentioned in the documentation, because I'm sure there are
plenty of LaTeX users out there who don't know this is normally possible,
and therefore would be inclined to assume thight formatting if ever
defining commands. That 2e package definitions are likely to say things like

\def\bar{%
...
\foo{apa}%
{bepa}%
{cepa}%
...
}

certainly supports the mistaken impression that spaces are not allowed
between arguments.

Lars Hellström