[luatex] question about loading an external lua library into Lua(La)TeX

Philipp Gesang Philipp.Gesang at alumni.uni-heidelberg.de
Tue Feb 25 22:14:19 CET 2014


Hi Mico!

···<date: 2014-02-25, Tuesday>···<from: Mico Loretan>···
>     % !TEX TS-program = lualatex
>     \documentclass{article}
>     \usepackage{luacode} % for 'luacode' environment
>     \begin{luacode}
>     require "bn" -- load 'bn' library
>     \end{luacode}
>     \begin{document}
>     Hello World.
>     \end{document}

Your example runs fine here with Luatex beta-0.78.3 (rev
4804), nothing suspicious to be found in the log either.

> Again, let me stress that the library "bn" seems to work fine
> when accessed from the package's test file, viz., test.lua. It's
> only when the library is being accessed from inside the "luacode"
> environment that things go off track. Is there some way to fix
> this?

I doubt the luacode package has anything to do with this. Try
these lines for the plain format:

  \directlua {
    local bn = require "bn"
    print (">>", bn)
  }
  \bye

This should print the table reference. If it fails as well then
packages aren’t to blame.

Best,
Philipp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20140225/8a9bdd27/attachment.bin>


More information about the luatex mailing list