[luatex] void box

Andreas Matthias andreas.matthias at gmail.com
Wed Feb 8 17:37:15 CET 2012


Paul Isambert wrote:

> Actually, you can do without a dummy head and without conditionals:
> 
> local list
> for i = 0, 5 do
>   local n = node.new("glyph")
>   n.font  = 1
>   n.char  = 97+i
>   list    = node.insert_after(list, nil, n)
> end
> 
> That's because node.insert_after can take `nil' as its first argument
> (in which case it simply returns the `added' node) ... a functionality
> I didn't understand what it was good for until now!

That's nice. Thanks! I didn't know that the second argument may be
nil as well! I think the documentation should be changed because
it says: "It is your responsibility to make sure that current is
really part of that list."

So, I was actually not looking for a void box but for insert_after. :)

> (I've added local's because I didn't know whether you're naturally light
> on them, which is *very bad*, or you just omit them for examples.)

I know. It was just for simplicity.


Ciao
Andreas



More information about the luatex mailing list