Subject: | |
From: | |
Reply To: | |
Date: | Tue, 12 Oct 2004 13:45:29 +0200 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Tue, 12 Oct 2004 10:27:53 +0200, Hendri Adriaens <[log in to unmask]> wrote:
Hi Henri,
> When reading the docs on the new naming conventions,
> I thought about the following:
> Will the rules be general enough to cope with most future
> situations? I fear that a lot of macros (especially internal
> macros) will fall in the :w category which will make the
> convention less informative.
That is not my experience. The times I've had to use the "w" type has been
in situations where I needed to gobble a user command that happened to
take an optional argument. And in those cases the reason has been that I
didn't use xparse. If I did I would define those user commands as
something like this:
\documentclass{article}
\usepackage{xparse,ldcsetup}
\InternalSyntaxOn
\def\MH_test_user_command:nn #1 #2 {#1,#2}
\DeclareDocumentCommand \usercommand { O{`opt'} m }
{ \MH_test_user_command:nn {#1}{#2} }
\begin{document}
\usercommand{uu}
\usercommand[xx]{uu}
\end{document}
Then gobbling is done on the internal macro when needed.
Perhaps you can think of other cases - if so don't hesitate to post them.
--
Morten Høgholm
|
|
|