[luatex] tex.enableprimitives producing non-primitives?
Heiko Oberdiek
oberdiek at uni-freiburg.de
Wed Sep 23 10:43:15 CEST 2009
On Wed, Sep 23, 2009 at 10:01:29AM +0300, Élie Roux wrote:
> this mininal example fails with tex.enableprimitives('',
> tex.extraprimitives()) in the (plain) format :
>
> \directlua{tex.enableprimitives('testprefix', {'attribute'})}
>
> \testprefixattribute 3 = 4
>
> \pdfprimitive\attribute 4=5
>
> \pdfprimitive\testprefixattribute 3 = 4
>
> \end
>
> it says "Missing primitive name on l7". Is it normal ?
Afaik yes.
> This behaviour
> looks strange to me, as testprefixattribute should be a primitive...
Yes, but that doesn't matter, it needs the original primitive name.
The purpose is, to get the primitive meaning, even if the command
is redefined later as macro or whatever, e.g. after
\let\attribute\hbox
\pdfprimitive\attribute
you get the original meaning of \attribute, not a \hbox.
Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
More information about the luatex
mailing list