[luatex] multiple callbacks
Hans Hagen
pragma at wxs.nl
Wed Jan 14 00:21:23 CET 2009
Karl Berry wrote:
> Excuse me for coming in late, and with such an obvious comment, but how
> about handling such callback in lua a la hooks in Emacs? The hook
> author can decide whether they want to ask that it be at the front of
> the list, the back of the list, or (default) don't care. Of course
> there are no guarantees due to multiple packages requesting the same
> thing, but at least the basic options would be provided.
that's an example of a an implementation; in principle one can build all
kind of handlers in lua and then hook the manager in the callback
function package_xyz_handler()
-- this function manages the list of callbacks of pre-linebreak_filter
end
callback.register('pre_linebreak_filter', package_xyz_handler)
(i posted an example of such a handler and of course one can extend it
with more advanced management)
however, the main problem is not such management but what exactly
happens in the individual actions; this is really up to the macro
package (writers) to keep some control over, that is: there are
manipulations that can spoil later manipulations
there are just too many possibilities (this is comparable to dealign
with fonts or encodings or auxiliary files in macro packages .. each has
its own way of doing things); implementing a manager is rather simple,
but getting macro writers to agree on something is way harder
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
-----------------------------------------------------------------
More information about the luatex
mailing list