On 4-2-2010 19:03, Paweł Jackowski wrote:
 >>[...] Can one propose some way to hook "the last shipout/output is
over" moment without macros such as \bye?

luatex can never know when the last shipout occurs (the last call to
the output routine can result in multiple shipouts and macro packages
can call \shipout any time, so you need to register the last page
number and use that information; only the macro package knows when and
what

you could abuse the stop_run callback for some purposes

You're right, luatex cannot know which shipout is last. But finally it
makes the decision "done, it's high time to die". I wondered if I can
hook this moment, ie. to make the final update to pdf /Catalog or so. If
not, will do with macros.

well, if you do it at the tex end, the 'next' shipout (i.e. the one triggered by bye or end) is quite ok as it is unlikely that changes to the catalog will happen afterwards (e.g. user will not change info fields etc after their last bye)

even if you hook it into some finalizing lua code there are pitfalls

on the agenda, that is once the backend code is mostly redone) there will be finalizer callbacks for the catalog, but we delayed that because it will be part of more finalizer code (and temporary solutions can change and in turn result in messy debugging of existing code because timing is so important here)

(hm, i could make a nice technical talk about this for bachotek if there is any interest at all in such issues -)

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
dev-luatex mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/dev-luatex

Reply via email to