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 14:49:00 +0100
text/plain (37 lines)
Hello all,

You may remember that a while ago we discussed space skipping for
optional arguments with xparse, for example

   \foo{mandatory}[optional] other text
   \foo{mandatory} [optional] other text
   \foo{mandatory}  other text

At the time, the feeling was that we should not skip spaces in these
cases, so only the first of my examples is parsed as containing an
optional argument.

I've been looking at this again, as I'm not sure this is the best
approach. When the only argument is optional

  \foo [bar]
  \foo  text

TeX will always skip spaces and so things are not consistent. In the
same way, mandatory arguments are always grabbed

  \foo {bar}

So looking again at this I think we should 'follow TeX', and be
consistent in skipping spaces in all cases. I don't like the fact that
at present there is a somewhat convoluted explanation of the behaviour
in the xparse documentation: this tends to show up when something is not
really correct! (At the same time, the implementation would be slightly
easier to follow if this change was made.)

Does this seem reasonable?
Joseph Wright