Le 21/05/2010 15:47, Khaled Hosny a écrit :
> Is there going to be support for allocating attributes from lua?

If you're asking for it, I see no reason for not providing it :-) OTOH, it may
require a few changes in the current allocation code, so I don't guarantee a
short delay for implementation.

> Having
> to resort to Te to allocate attributes from inside lua code is tricky,
> for instance I tried:
> 
> tex.sprint(luatexbase.catcodetables.latex, "\\newluatexattribute\\otfldummy")
> 
Yeah, and this won't work in every circumstance (imagine this code is run inside
and \edef, for instance).

> But it doesn't seem to work, and even if working it seems a bit hacky.

Right.

> Hiding this inside luatexbse-attr seems more sensible to me.
> 
Is the following interface ok with you?

luatexbase.newattribute(<string> name)
        - allocates a new attribute
        - stores its number in luatexbase.attributes[name]

While we're at it, would you like a luatexbase.unsetattribute() function?

Manuel.

Reply via email to