LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

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

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

Print Reply
Joseph Wright <[log in to unmask]>
Thu, 6 Jan 2011 17:50:11 +0000
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:


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 

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

\NewDocumentCommand has only mandatory arguments :-)
Joseph Wright