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:
Thu, 6 Jan 2011 17:50:11 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
On 06/01/2011 17:37, Paul Thompson wrote:
> The optional argument thing could be better handled by using named arguments.
> So, for \parbox, which has optional and mandatory arguments, we currently have
>
>
> \parbox[pos][height][inner-pos]{width}{text}
>
> This is mindlessly confusing in many cases.  Why not have
>
> \parbox{pos=t,height=something,innerpos=t,width=something}{text}
>
>
> The use of named arguments is vastly superior to positional arguments,
> especially when optional arguments can be specified.

Not directly relevant to the discussion about how one defines optional 
arguments, but very true in any case. I hope you'll allow one optional 
argument as 'reasonable', as this often makes sense:

   \foo[<optional-keyval-list>]{<mandatory-argument>}

At this stage, user-level syntax for LaTeX3 is undecided but I suspect 
that there is likely to be a greater use of key--value stuff where 
appropriate.

> Don't even get me started on \newcommand.

\NewDocumentCommand has only mandatory arguments :-)
-- 
Joseph Wright

ATOM RSS1 RSS2