Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

require("luagraph")

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?

share|improve this question
2  
It seems require expects a string. Have you tried require("luagraph")? –  Bruno Le Floch Aug 2 '12 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 Aug 2 '12 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 Aug 2 '12 at 13:47
    
@PatrickGundlach Do you know of a reason for that? Security perhaps? –  Bruno Le Floch Aug 2 '12 at 14:00
    
@BrunoLeFloch I guess the main reason is portability. Security is perhaps a great side effect. –  topskip Aug 2 '12 at 14:07
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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 Aug 2 '12 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 Aug 8 '12 at 14:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.