Re: [NTG-context] Attributes

2014-04-24 Thread Hans Hagen
On 4/24/2014 1:39 AM, Stéphane Goujet wrote: On Wed, 23 Apr 2014, Hans Hagen wrote: On 4/23/2014 3:07 PM, Stéphane Goujet wrote: There is still the problem that node.has_attribute does not return nil when I expect it should, but that is luatex problem (a check that a parameter is really

Re: [NTG-context] Attributes

2014-04-24 Thread Stéphane Goujet
On Thu, 24 Apr 2014, Hans Hagen wrote: I've added a tracker item and will look at it later (no more changed at this moment to the code as we're closing in on release i.e. texlive code freeze). All right. Goodbye, Stéphane.

Re: [NTG-context] Attributes

2014-04-23 Thread Hans Hagen
On 4/22/2014 8:10 PM, Stéphane Goujet wrote: On Tue, 22 Apr 2014, Hans Hagen wrote: On 4/20/2014 3:14 PM, Stéphane Goujet wrote: I would like to know what is the recommended way to use attributes in Context. What is the Context way to declare and set attributes? Is it something like

Re: [NTG-context] Attributes

2014-04-23 Thread Stéphane Goujet
On Wed, 23 Apr 2014, Hans Hagen wrote: On 4/22/2014 8:10 PM, Stéphane Goujet wrote: Please have a look at my example (it is a bit long because it shows various possibilities) and its result. When I have not yet done a \defineattribute[myattr], node.has_attribute returns 0 when I

Re: [NTG-context] Attributes

2014-04-23 Thread Hans Hagen
On 4/23/2014 3:07 PM, Stéphane Goujet wrote: On Wed, 23 Apr 2014, Hans Hagen wrote: On 4/22/2014 8:10 PM, Stéphane Goujet wrote: Please have a look at my example (it is a bit long because it shows various possibilities) and its result. When I have not yet done a

Re: [NTG-context] Attributes

2014-04-23 Thread Stéphane Goujet
On Wed, 23 Apr 2014, Hans Hagen wrote: On 4/23/2014 3:07 PM, Stéphane Goujet wrote: There is still the problem that node.has_attribute does not return nil when I expect it should, but that is luatex problem (a check that a parameter is really an integer should be performed before calling

Re: [NTG-context] Attributes

2014-04-22 Thread Hans Hagen
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

Re: [NTG-context] Attributes

2014-04-22 Thread Stéphane Goujet
On Tue, 22 Apr 2014, Hans Hagen wrote: On 4/20/2014 3:14 PM, Stéphane Goujet wrote: I would like to know what is the recommended way to use attributes in Context. What is the Context way to declare and set attributes? Is it something like this? \defineattribute[myattr]

[NTG-context] Attributes

2014-04-20 Thread Stéphane Goujet
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