Am 25.02.2014 21:45, schrieb Mico Loretan:
The "lbn" library by Luiz Henrique de Figueiredo is described as a "fast integer-only arbitrary precision library"; see
http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lbn for a link to the source. I downloaded the tar.gz file and managed to compile the package's
code into a lua library file called "bn.so", using either Lua 5.2.3 or LuaTeX 0.76 as the "Lua executable". Running the
little test program that comes with the package, either via "lua test.lua" or via "luatex test.lua", also works without
a hitch.
I would like to be able to use this library in a Lua(La)TeX document. Consider
the following MWE:
% !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}
Unfortunately, things aren't going smoothly. Here are some excerpts from the
log file:
This is LuaTeX, Version beta-0.76.0-2013061817 (rev 4627)
(format=lualatex 2014.2.8) 25 FEB 2014 21:31
...
(/usr/local/texlive/2013/texmf-dist/tex/lualatex/luacode/luacode.sty
Package: luacode 2012/01/23 v1.2a lua-in-tex helpers (mpg)
no problem here with an up-to-date TL2013:
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
luacode.sty 2012/01/23 v1.2a lua-in-tex helpers (mpg)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
luatexbase.sty 2013/05/11 v0.6 Resource management for the LuaTeX
macro progr
ammer
luatex.sty 2010/03/09 v0.4 LuaTeX basic definition package (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
luatex-loader.sty 2010/03/09 v0.4 Lua module loader (HO)
luatexbase-compat.sty 2011/05/24 v0.4 Compatibility tools for LuaTeX
luatexbase-modutils.sty 2013/05/11 v0.6 Module utilities for LuaTeX
luatexbase-loader.sty 2013/05/11 v0.6 Lua module loader for LuaTeX
luatexbase-regs.sty 2011/05/24 v0.4 Registers allocation for LuaTeX
luatexbase-attr.sty 2013/05/11 v0.6 Attributes allocation for LuaTeX
luatexbase-cctb.sty 2013/05/11 v0.6 Catcodetable allocation for LuaTeX
luatexbase-mcb.sty 2013/05/11 v0.6 Callback management for LuaTeX
***********
Herbert