Sender: |
|
Date: |
Thu, 6 Aug 2009 09:48:55 +0100 |
Reply-To: |
|
Subject: |
|
MIME-Version: |
1.0 |
Content-Transfer-Encoding: |
7bit |
In-Reply-To: |
|
Content-Type: |
text/plain; charset=ISO-8859-1 |
From: |
|
Parts/Attachments: |
|
|
Will Robertson wrote:
> So, to perhaps summarise:
>
> m M - mandatory braced argument
> d D <x><y> - optional delimited argument; picks up material between <x>
> and <y>. Can be used for {}, (), etc. Can be followed by a default value
> to use.
> o O - shorthand for d[]
> t <x> - lookahead for optional <x>
> s - shorthand for t*
> l L - everything before the next brace (not often used, but sometimes
> useful)
>
> No longer:
>
> c<x><y> - as d() but mandatory; can perform the check manually (only a
> small processing overhead?).
> p - shorthand for d(); drop this to keep things simple.
All fine with me: I will probably look at re-working this into
xparse-alt at the weekend.
> Open issues:
>
> - Do we want to support something like 'd{[[}{]]}{default}' to allow
> \foo[[bar]] ? (I'd say no.)
I think that "d" is pretty clearly for delimiting by two *tokens*.
Anything beyond that is not supported (especially if we want to
implement d{} as an optional argument using braces).
> - Do we want to support something analogous to
> \def\foo #1\endfoo{...#1...}
> Consider active quotes, and macros like '\<...>'
> Maybe this is as important to support as 'l'.
> Could use the letter 'u{<token>}' for "until".
Perhaps. I'm not keen on active quotes, but I can see the second form
might be useful. Should not be too hard to do.
--
Joseph Wright
|
|
|