Khaled Hosny wrote:
Trying to get some sort of 'implicit' bidi with luatex, I though of using an (extenal) OCP filter as it is much easier than messing with luatex nodes, and it respects TeX grouping.
The attached example loads the do_bidi.py script as an \externalocp, it works fine with plain luatex, but not with 'texexec', using 'context' I get:
MtxRun | fatal error, message: luatex: execution interrupted
Any ideas? Is there a lua equivalent to \externalocp ?
Luatex crashes because it attempts to call a kpathsea function, but the kpathsea search library is never initialized by context. The crash is an oversight in luatex.exe that I will try to fix for the next version. Whether hte default context mkiv will ever support external OCPs is upto Hans, but I would not be surprised doubt it never will. To run the example, you can add \ctxlua{kpse.set_program_name('luatex')} to the top of your file, then it will work. Best wishes, Taco