Am 18.11.2010 um 22:20 schrieb Aditya Mahajan:

Just a few points:

The key “command“ creates a bunch of macros, besides the „\define...“
commands to create new environment and commands with your code it creates
the following macros to access the values from your setup commands:

 - \<Name>parameter
 - \named<NAME>parameter
 - \detokenized<NAME>parameter

In order to use these commads, you must set a value for \current<name>. For example, if you have

\define<name>[one][width=10cm]

In order to access the value of width of "one", you must do:

\def\current<name>{one}

\<name>parameter{width}

(I do not remember the distinction between \<name>parameter,
\named<name>paramter, and \detokenized<name>parameters).

\<name>parameter use the value from \current<name> while \named<name>parameter
has two argument where the first argument is the name of a command or environment
created with \define<name>. \detokenized... is important when you pass values
from tex to lua and the value contains a tex command, e.g. \thinspace which
is normally expanded in this case.


The command key has like the setup key the two values yes and list,
with „command=yes“ you can write

 \define<NAME>[two][one]

I did not know that cloning was possible. The \defineenumeration commands allows for

\defineenumeration[new][old][..=..]

This clones a selected options from old to new (using copyparamters) and then sets the values of the third arguments.

\copyparameters is only used for code which doesn’t use the new parameter command
with the parent handling but this method isn’t necessary in mkiv

Would it make sense to add support for

\define<name>[two,three][one][..=..]?

You can redefine \define<name> or leave it out from \definenamespace.
What’s also is to write \define<name>[clone][parent=\????parent].

For parent it’s the best to give as argument always the same value
as you defined for the namespace, e.g. for the fancybreak module
one should write „parent=fancybreak“.

I thought that you have to write "parent=\????fancybreak".

That happens in the backend hidden from the user/author.

Wolfgang