[luatex] shipout a page
zappathustra at free.fr
Tue Jun 28 17:17:53 CEST 2011
Le 28/06/2011 17:10, Patrick Gundlach a écrit :
> Am 28.06.2011 um 16:44 schrieb Paul Isambert:
>> Le 28/06/2011 16:34, Paul Isambert a écrit :
>>> Le 28/06/2011 16:03, Patrick Gundlach a écrit :
>>>> Hi Paul,
>>>>> That should be:
>>>> That is in conflict with the manual (which states that tex.shipout's argument is a number)
>>> Indeed, there's an error in the manual.
>>>> as well does not give the desired result. (There should be a 10pt by 20pt box on the first page.
>>> If I'm not mistaken, when tex.shipout() occurs, the node appended to the main vertical list hasn't been moved to box 255 yet. I can't remember exactly the places when TeX does move material to the output box, but I think you should consider them.
>> Sorry, what I've said is completely wrong. tex.shipout() does take a number as its argument. But material is added to box 255 only when TeX is calling \output. So tex.shipout() outside an output routine is very likely to shipout an empty box. I think I got it right this time :)
> Which leads to my beginning question:
> how do I ship out these boxes and go to the next page (with Lua, of course :-))
> I want to avoid \TeX as much as possible. I wonder what the "current list" is, that is written in the manual for node.write().
If I'm not mistaken (again!), the current list is... the current list.
I.e. the main vertical list in case you aren't in a \hbox or \vbox, and
those ones otherwise. Now, you're adding nodes to the MVL, which will
make it to box 255 at output time only, except perhaps if you put it
there yourself with the "special list heads" (page_head, I suppose), but
I don't know much there. Otherwise, don't add those nodes to the MVL,
but to a made-up box, which you then ship out. Hope it'll answer your
More information about the luatex