20 Apr
2014
20 Apr
'14
8:14 a.m.
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? Goodbye, Stéphane.