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:
Will Robertson <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 6 Aug 2009 17:31:15 +0930
Content-Type:
multipart/signed
Parts/Attachments:
text/plain (1069 bytes) , smime.p7s (2446 bytes)
On 06/08/2009, at 4:55 PM, Joseph Wright wrote:

> Suggestion (2):
>
> - o = standard optional LaTeX argument with no default value.
> - d = delimited optional argument where both the delimiters and  
> default
>      must be given.
> - b or n = optional braced argument (now have a choice!).

I'm more in favour of having the single letter with a possible  
optional default.
I still think that { o } and { o{default} } make the most sense.

> This means that "o" is a shortcut for "d[]{\NoValue}", and that any
> other case is handled "in full" using d.  This seems like a reasonable
> balance between making simple optional arguments easy and having a
> consistent syntax:
>
> \DeclareDocumentCommand \foo { o m } { }
> \DeclareDocumentCommand \foo { d[]{Stuff} m } { }
> \DeclareDocumentCommand \foo { d(){0,0} m } { } % Optional co- 
> ordinates

I like this way of doing coordinates. Could 'd{}{-default-}' be shoe- 
horned into this syntax as well? I suppose that would mean completely  
re-writing the parser. But then we wouldn't need another letter for my  
feature of limited value.

Will



ATOM RSS1 RSS2