I would like to access the other lua libraries e.g. luagraph in lualatex. If use:


I get a complaint about permission denied, which as far as I could determine relates to different libraries used in compiling the software, MSVC80 and others.

Is there a way to get past this?

  • 2
    It seems require expects a string. Have you tried require("luagraph")? Commented Aug 2, 2012 at 9:57
  • 2
    At least in texlive, libraries are restricted to the texmf-tree. That means you can't load any "system" lua library.
    – topskip
    Commented Aug 2, 2012 at 10:42
  • same applies to MiKTeX. Its sad, because there is a lot of power that now is locked away. @BrunoLeFloch That was just a lazy me.
    – Louis
    Commented Aug 2, 2012 at 13:47
  • @PatrickGundlach Do you know of a reason for that? Security perhaps? Commented Aug 2, 2012 at 14:00
  • @BrunoLeFloch I guess the main reason is portability. Security is perhaps a great side effect.
    – topskip
    Commented Aug 2, 2012 at 14:07

1 Answer 1


There are two problems here, although I can really only speak for texlive/Mac OS X. LuaTeX restricts loading modules to those that can be found with the kpathsea libray. So you might have luck putting the libraries in your document folder or perhaps using an absolute path, but I think require() won't be happy with it.

The next might not apply to windows. On my system, Mac OS X, you can't load arbitrary modules during runtime, because some symbols are stripped from the LuaTeX executable and some external libraries require them in the binary. See for example a bug report on the LuaTeX tracker.

  • I can't speak about Mac OS, but on MS Windows (as far as I could determine) its about the library that was used to compile the other packages and manifest, etc.
    – Louis
    Commented Aug 2, 2012 at 14:44
  • One can extend the search path of khathsea, but that would not solve the problem if the binaries refer to different libraries. That is the lua compiler that is embedded and the one that hold the other interesting libraries. One or two of these are the graphviz and the cd-graphics libraries. It would also have been nice to add a menu inside the tex file; for instance change the values of a problem or accept as is and then continue with the compilation of the (xyz)TeX file.
    – Louis
    Commented Aug 8, 2012 at 14:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .