Oliver Heins wrote:
Hello,
I want to take a look at inserts to decide whether they should appear on the current page or not, but I don't find the appropriate callback.
You can try to use the 'buildpage_filter' callback and the tex.lists node list pointers. But be warned, this part of luatex is not fully developed yet: if you remove an item from the tex.lists.contrib_head pointer you may end up crashing luatex (this is because luatex has already decide what node it will use to break the page before calling the buildpage_filter) Best wishes, Taco
Hi Taco, [I accidentially sent you this mail per pm first; here's a copy to the list.] thanks for your quick answer. Taco Hoekwater wrote:
Oliver Heins wrote:
I want to take a look at inserts to decide whether they should appear on the current page or not, but I don't find the appropriate callback.
You can try to use the 'buildpage_filter' callback and the tex.lists node list pointers.
It looks that I can't find all the of the inserts. In the attached sample file, I have only access to the first two of five. Another question: Is there any iterator for a circular list? node.traverse ends up running in a circle (I guess that's why it's called a circular list :-). To prevent this, i indexed a table with the value of the next-field and check if this has already been seen.
But be warned, this part of luatex is not fully developed yet: if you remove an item from the tex.lists.contrib_head pointer you may end up crashing luatex (this is because luatex has already decide what node it will use to break the page before calling the buildpage_filter)
Uuuh, that sounds dangerous. Perhaps I am on the wrong track. Best regards, olli
participants (2)
-
Oliver Heins
-
Taco Hoekwater