[luatex] multiple callbacks

Elie Roux elie.roux at telecom-bretagne.eu
Sun Jan 4 15:54:18 CET 2009


Hello,

As a LuaTeX style developer (Gregorio : http://home.gna.org/gregorio/), 
I'm confronted with one issue to which I don't see any solution now : 
multiple callbacks. I personally register one callback in 
post_linebreak_filter, that affects only lines with a certain attribute, 
so it would be compatible with callbacks registered by other styles.  
Currently no other style can register another callback without breaking 
mine, which is I think a strong limitation. To fix it I was thinking 
about a small lua function:

callback.add (callback_name, callback_func, priority)

that would add callback_func to a list of function, keeping an ascending 
order of priority in this list. Then it would register a callback 
function that would call all the functions in the order of the list. 
With these priorities, style developers could agree on the order their 
callbacks should be called in.

I'm not defending this option strongly, but I think it's a simple one, 
and I think it would work.

What do you think about that?
-- 
Elie


More information about the luatex mailing list