On 4/20/2014 3:14 PM, Stéphane Goujet wrote:
Hello,
I would like to know what is the recommended way to use attributes in Context.
I manage to use use them with numbers, i.e. : in Context : \attribute123=1 in Lua : has_attribute(my_node, 123)
But I would like to make that cleaner and use named attributes. What is the Context way to declare and set attributes? Is it something like this? \defineattribute[myattr] \dosetattribute{myattr}{1}
And how do I then access them from Lua? Should it look like has_attribute(mynode, attributes.myattr) or has_attribute(mynode, attributes.xxxxx("myattr")) or something else?
attributes.names[...] attributes.numbers[...] ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------