LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
From: "William F. Hammond" <[log in to unmask]>
Date: Thu, 30 Sep 1999 09:42:27 -0400
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments: 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