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: >> >> - \parameter >> - \namedparameter >> - \detokenizedparameter > > In order to use these commads, you must set a value for \current. For example, if you have > > \define[one][width=10cm] > > In order to access the value of width of "one", you must do: > > \def\current{one} > > \parameter{width} > > (I do not remember the distinction between \parameter, > \namedparamter, and \detokenizedparameters). \parameter use the value from \current while \namedparameter has two argument where the first argument is the name of a command or environment created with \define. \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[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[two,three][one][..=..]? You can redefine \define or leave it out from \definenamespace. What’s also is to write \define[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