LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

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

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

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Wed, 11 May 2011 14:49:00 +0100
Content-Type:
text/plain
Parts/Attachments:
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 [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}
  \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

ATOM RSS1 RSS2