[luatex] nodes
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Sun Dec 16 09:03:21 CET 2012
Am 16.12.2012 01:53, schrieb Paul Isambert:
> You have to reassign the first return value of node.insert_before to the
> head of the list, otherwise when the hbox is analyzed by TeX it still
> sees the original head as the first node. A much simpler version of your
> function would be:
Yes, that's true.
thanks
Herbert
>
> function markList(List)
> for n in node.traverse(List) do
> if n.id == 1 then
> markList(List.head)
> elseif n.id == 0 then
> local w = node.new("whatsit","pdf_literal")
> w.data = string.format("q 1 0 0 RG 1 w 0 -0.1 m 0 10 l S Q")
> n.head = node.insert_before(n.head, n.head, w)
> end
> end
> return true
> end
>
> Best,
> Paul
>
>
More information about the luatex
mailing list