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
"William F. Hammond" <[log in to unmask]>
Thu, 30 Sep 1999 09:42:27 -0400
text/plain (28 lines)
Dear Friends --

Frank Mittelbach <[log in to unmask]> writes:

> well xparse offers the ability to produce macros that have the look
> and feel of standard LaTeX without the need to resort to lowlevel
> programming, e.g., if you want to write a macro which has two optional
> argument (with default values) and one mandatory one you simply write
> \DeclareDocumentCommand \foo { O{default1} O{default2} n }
>   { < code for the macro where #1 is first optional #2 is second optional
>       and #3 is mandatory argument > }

This is very nice.

Since what is happening is that "foo" is being added to a namespace,
would it not be logical for the usage to be:

\DeclareDocumentCommand foo {...}{...}      ?

Of course, usage this way at variance with that of "\newcommand" might
cause confusion for an author.

(Since I do not code for TeX, I have no idea whether it might "cost"

                                  -- Bill