Hello,
I have some trouble to insert something at the start
of a list.
Example (complete example file after PS):
\setbox0=\hbox{XY}
\directlua0{
do
local hlist = tex.box[0]
local pdf_literal = node.new(8,8)% \pdfliteral
pdf_literal.mode = 2 % direct
pdf_literal.data = "1 0 0 rg 1 0 0 RG"
local head = hlist.list
% local current = hlist.list.next % works
local current = hlist.list % fails
hlist.list = node.insert_before(head, current, pdf_literal)
end
}
! LuaTeX error Attempt to node.insert_before() a non-existing node.
Have I misunderstood node.insert_before()?
Yours sincerely
Heiko