[luatex] node.new does not accept subtype as string
Hans Hagen
j.hagen at xs4all.nl
Thu Apr 19 15:12:27 CEST 2018
On 4/19/2018 1:15 PM, Henri Menke wrote:
> Dear list,
>
> I was trying to dissect math lists and insert my own trash there.
> According to the LuaTeX manual for node.new one can supply id and
> subtype as strings. That means that this
>
> node.new(18,5)
>
> should be equivalent to
>
> node.new("noad","rel")
>
> Unfortunately this does not create a noad of subtype rel but subtype
> ord. It seems as if the numbers of the subtypes correspond to their
> index in node_subtypes_noad in texnodes.w.
node.subtypes("noad")
will give you back the subtypes and numbers
> I just wonder, is this a bug or am I doing it wrong? A non-working
> minimal example can be found below.
not a bug .. the subtype field is only used when allocating a whatsit
because these are different (memory wise) per subtype
so, for your noad you need
n.subtype = 5 -- rel
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
More information about the luatex
mailing list