[lltx] patch for lualatex-math.lua
Philipp Stephani
p.stephani2 at gmail.com
Sat Aug 3 23:28:39 CEST 2013
Thanks for the patch; I've already merged Philipp Gesang's equivalent patch
and will do a new release ASAP.
2013/8/3 Wolfgang Jeltsch <wolfgang at cs.ioc.ee>
> Hi Philipp,
>
> I don’t know if you have followed the recent discussion on lualatex-dev
> about an issue with the lualatex-math package.
>
> The code in lualatex-math.lua relies on unpack being a global variable,
> which was the case in Lua 5.1, but is not the case anymore in Lua 5.2.
> As a result, I get the following error when importing amsmath and
> lualatex-math in the same document:
>
> ! LuaTeX error
> .../texmf-dist/tex/lualatex/lualatex-math/lualatex-math.lua:46:
> attempt to call upvalue 'unpack' (a nil value)
> stack traceback:
> .../texmf-dist/tex/lualatex/lualatex-math/lualatex-math.lua:46:
> in function 'print_class_fam_slot'
> [string "\directlua "]:1: in main chunk.
> \__lltxmath_set_mathchar:NN ...\int_eval:n {`#2})}
> \scan_stop:
>
> Other Lua files (lualibs-basic-merged.lua, lualibs-lua.lua, and
> luaotfload-merged.lua) use the following code to work around this
> incompatibility between Lua 5.1 and Lua 5.2:
>
> if not table.unpack then
> table.unpack=_G.unpack
> elseif not unpack then
> _G.unpack=table.unpack
> end
>
> By adding this code to lualatex-math.lua at an appropriate place, I was
> able to fix the issue with lualatex-math and amsmath.
>
> I’ve attached a patch. Could this patch or some other fix for the
> problem please be incorporated into lualatex-math? Thank you.
>
> Best wishes,
> Wolfgang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/lualatex-dev/attachments/20130803/b0f31c6e/attachment.html>
More information about the lualatex-dev
mailing list