[Dev-luatex] Port of GraphViz and LuaGRAPH toolkit to Windows
graham.douglas at readytext.co.uk
Sun Nov 21 13:46:52 CET 2010
Apologies in advance for the long e-mail...
I'm wondering if any other Windows users/developers
would find the following helpful/useful/interesting... if so I'd be
delighted to share the code etc for others to explore --- and improve!
Subject to making sure that distributing this work is OK in terms of the
GraphViz and LuaGRAPH toolkit licences. I need to check that.
I'm giving a bit of background info, as it may be of interest
to other developers -- perhaps I can expand this to add to a Wiki
somewhere? Any suggestions where to put it (if of interest) would
Inspired by Luigi's brilliant work on luatex lunatic
--- which still amazes me every time I look at it --
I too wanted to use GraphViz (but on Windows) to probe LuaTeX
node structures. Why should the Linux guys have all the fun ;-)))
However, I could not get the DLLs shipped with the GraphViz
distribution to work (for me anyway). Not saying they won't
work just that I could not get them to work for me.
I decided to build a fresh port of GraphViz for Windows, with a binding
to Lua using the LuaGRAPH toolkit by Herbert Leuwer.
In summary, I took the Visual Studio solution shipped with
GraphViz source code distribution and modified it to build
.lib files and then compile everything into a single DLL, including
the essential core plug-ins. I have excluded a number of libraries
including Cairo etc which I didn't want or need for my purposes. I just
wanted the core GraphViz functionality scriptable by the LuaGRAPH
toolkit and spitting out a PostScript file, which I convert to PDF
The result is a single DLL combining the LuaGRAPH toolkit
and most of the core GraphViz, giving access to the full Lua binding
written by Herbert Leuwer. Anyone who has looked at the GraphViz source
will know that it is designed to dynamically load lots of things
from external libraries (DLLs on Windows). Because the core plug-ins are
now built into in a single DLL I had to slightly modify the
initialisation and library-loading done via LuaGRAPH toolkit
--- turned out to be just a few lines of C, modifying the
LuaGRAPH toolkit function void gv_init(void) using the gvc
I have tested the DLL using examples on the GraphViz site and they seem
to work OK.
So, after this long explanation my question is would anyone else
who is working on Windows have any use for this? If so, after checking
the licences and some more testing.... I'd be delighted
to release it (but where!!!) for others to use "as is" with the note
that it is quite experimental and that I don't intend to support it.
If anyone has written Lua code for the LuaGRAPH toolkit as a way of
inspecting LuaTeX nodes I'd be extremely grateful to have some small
samples with which to further test the library.
I'd be happy to receive the community's view on whether this
Windows port of GraphViz and LuaGRAPH toolkit could be useful
to anyone --- and I'd be very grateful for Lua/LuaTeX code to
test it with :-)
LuaTeX has provided me with a fasinating hobby and I'd like to
give a little bit back, where I can.
If anyone wants a copy of the DLL (currently called "luagraph.dll) for
testing, please get in contact: it is a DEBUG version weighing in at
about 1.5 MB.
Best wishes to all
More information about the dev-luatex