[luatex] node.insert_before

Taco Hoekwater taco at elvenkind.com
Tue Jul 27 19:02:04 CEST 2010


On 07/27/2010 06:01 PM, Paul Isambert wrote:
>
> node.insert_before(tex.box[0].list, tex.box[0].list.next, mybox)
>
> the same thing occurs, which makes sense: "x" is inserted before "a"'s next,
> i.e. before \baselineskip. However this doesn't work:
>
> node.insert_before(tex.box[0].list, tex.box[0].list, mybox)

The reason why this does not work is that the list node is a child
of a box, but insert_before() only sees that actual list node. The
pointer from the box to the node that is the head of the list is
unreachable to the function (I hope this is clear enough).

An extra

   tex.box[0].list = mybox

following the insert_before() is needed to create the new
parent->child relation.

Best wishes,
Taco



More information about the luatex mailing list