[Dev-luatex] Question on node.insert_before()

Taco Hoekwater taco at elvenkind.com
Tue Aug 31 15:41:17 CEST 2010


On 08/31/2010 03:29 PM, Patrick Gundlach wrote:
> Hi,
>
> this gives me an error:
>
>
> ----------------------------------------
> \directlua{
>    local second=node.new("rule")
>
>    local v=node.vpack(second)
>
>    local first=node.new("rule")
>
>    node.insert_before(v,second,first)
> }
>
> \bye
> ----------------------------------------
>
> Attempt to node.insert_before() a non-existing node
>
> I assumed that node.insert_before would put the first node before the second node and "corrects" the list pointer of v.
>
> Q: why do I get the error?

Because 'second' is not part of the chain that starts at _v_, it is
part of the chain that starts at _v.list_.

Best wishes,
Taco


More information about the dev-luatex mailing list