[luatex] LuaTeX as a Library
Robert Krug
destiny6 at mac.com
Fri Feb 26 02:13:33 CET 2016
Greetings,
Is there any interest in LuaTeX as a library callable from foreign (e.gg., C, Lisp,
Python) languages? With a little bit of hacking, I have succeeded in building
LuaTeX as a library and made a couple of very simple documents with Common
Lisp.
I have two sets of questions, and append to the end of this email a brief
description of what I did.
First, would you (the LuaTeX maintainers) be interested in some patch files? If so,
in what form would you want them? I can quite understand if you say that this is
not what you are interested in, or if you want to wait till 1.0 is released.
Second, should I write up some notes on the wiki? Perhaps I should wait until 1.0
is released? Or perhaps (given the crude state of my work) this would create more
problems than it is worth.
Robert
==========
Finally, here is a brief description of what I did:
(All this is on OS X 10.10.5)
Edited source/texk/web2c/Makefile.in to make the call to g++ which creates the luatex
executable verbose, grabbed the output, added:
-dynamiclib -undefined suppress -flat_namespace
and changed the output file to luatex.dylib
For some reason create_hash was not being called. I created and renamed local
copies of create_hash in those files from which it was being called. I do not
undestand the need for this.
Created a main_body_start --- everything before the call to main_control ---
and main_body_end --- everything after the call to main_control.
Made some messy hacks to main_control, and get_x_token and subsidiary functions
to prevent the call to prompt_input in next_line from grabbing standard input. This
was surely the "wrong way" to do this. Doing this correctly would (I imagine) be not
too hard for someone who knew what they were doing. But then I don't really know
what might be involved, so my judgement is probably not worth much.
More information about the luatex
mailing list