Changes

Jump to navigation Jump to search
1,545 bytes added ,  00:24, 18 November 2010
→‎Namespace Configuration: Added info supplied by Wolfgang on the ML
determine what commands will be available.
At the time of this writing (2010-09-27), this is rather
new stuff and so far neither not guaranteed to stay in contextas it is nor fully documented (and implemented?).Therefore, the following table uses double questionmarksto designate information that was only inferred indirectlyunmodified.
{|cellpadding="10" style="border:2px solid #addeff" rules="rows"! style="background:#addeff;" | Option !! Parameters and their description(''NS'' is a namespace dummy)
|-
|<tt>name</tt> || ''string'': The identifier that will be used to reference setups and parameters; e.&nbsp;g. a value of ''NS'' causes the macros <tt>\defineNS</tt> and <tt>\setupNS</tt> to be created.
|-
|<tt>parent</tt> || ''string'': a namespace identifier. Can reference itself. Functionality not yet knownShould be the same as the identifier of the module’s namespace.
|-
|<tt>type</tt> || <tt>module</tt>: intended use?? Not yet knowncreates the namespace prefixed with quadruple ''@''; other values are planned to be added in the future for internal purposes.
|-
|<tt>commandsetup</tt> || <tt>list</tt> or ''boolean'': functionality not yet knowninitiates the creation of a setup according to the <tt>name</tt> argument, e.&nbsp;g. <tt>\setupNS</tt>. The specified value influences the behaviour of the setup:{||<tt>yes</tt> || first argument of the setup accepts one parameter (<tt>\setupNS[one][..,..=..,..]</tt>);
|-
|<tt>list</tt> || first argument of the setupaccepts a comma separated list (<tt>\setupNS[one,two,three][..,..=..,..]</tt> ).|}|-|align="right" | Defines a setup <tt>command; </tt>|<tt>list</tt>or ''boolean'': ??creates auxiliary macros and the proper command to define further commands within the new namespace (<tt>\defineNS</tt>).For a <tt>name</tt> parameter ''NS'', the values of the <tt>\setupNS</tt> command will be retrievable via <tt>\NSparameter{parametername}</tt>. Further functionality not yet disclosedAdditionally, access is provided by <tt>\namedNSparameter</tt> and <tt>\detokenizedNSparameter</tt>.The <tt>\defineNS[command][..,..=..,..]</tt> can be used to create instances of a generic macro with local setups. Works like ordinary Context <tt>\definesomething</tt> commands and allows for inheritance (<tt>\defineNS[command][othercommand]</tt>). Of course, if <tt>command</tt> is set to ''list'', the first argument of <tt>\defineNS</tt> will take comma separated values.
|-
|<tt>comment</tt> || ''string'': non-functional information that will be stored along with the namespace??
|-
|<tt>version</tt> || ''number'': versioning information?? Functionality not yet known.
|-|<tt>style</tt> || ''boolean'': enables special handling for text color and style attributes.If set to ''yes'', a macro <tt>\dosetNSattributes</tt> will be created. It receives the values for the <tt>style</tt> and <tt>color</tt> arguments as supplied to the <tt>\setupNS</tt> macro which itself gets created via the <tt>setup</tt> key (see above).
|+ Optional settings for module namespaces.
|}
 
=Further Information=
* [[source:mult-aux.mkiv|Definition of <tt>\definenamespace</tt>]].
* [[System Macros]].
188

edits

Navigation menu