In ConTeXt mkiv, how do I register a callback?
callback.register() does nothing (and IIRC most callbacks are frozen anyway) and somewhere I found
tasks.appendaction, but this gives me an error that
tasks is not defined (nil).
I'd like to add something to the
Edit: thanks to Khaled's answer and help from the Mailing list, I've got a solution now. The key is to create my own namespace:
and add my function:
moduledata.mystuff.show_hyph = show_hyph
and to register the function to the "finalizers" callbacks, which are the
post_linebreak_filter equivalent in ConTeXt.
See my answer for a complete example