On 3/14/2019 8:51 AM, luigi scarso wrote:
On Thu, Mar 14, 2019 at 5:56 AM Henri Menke
mailto:henrimenke@gmail.com> wrote: Dear list,
Something has changed in MetaFun and it can no longer be used in plain LuaTeX, with neither of
luatex test.tex mtxrun --script plain test.tex
This is the error:
>> LUATEXFUNCTIONALITY >> "mp.print(LUATEXFUNCTIONALITY)" ! Equation cannot be performed (numeric=string).
MWE is below, as always.
Cheers, Henri
---
\directlua{ local mpkpse = kpse.new(arg[0], "mpost")
local function finder(name, mode, ftype) if mode == "w" then return name else return mpkpse:find_file(name,ftype) end end
local mpx = mplib.new { find_file = finder } local ret = mpx:execute[[ boolean mplib ; mplib := true ; input metafun.mp http://metafun.mp ; ]]
print(ret.log) } \bye
in mp-mlib.mpiv it seems that we should have string LUATEXFUNCTIONALITY ; LUATEXFUNCTIONALITY := runscript("mp.print(LUATEXFUNCTIONALITY)") ; instead of numeric LUATEXFUNCTIONALITY ; LUATEXFUNCTIONALITY := runscript("mp.print(LUATEXFUNCTIONALITY)") ; Now I have tex/texmf-context/metapost/context/base/mpiv$ grep -r LUATEXFUNCTIONALITY mp-mlib.mpiv:%numeric LUATEXFUNCTIONALITY ; LUATEXFUNCTIONALITY := runscript("mp.print(LUATEXFUNCTIONALITY)") ; mp-mlib.mpiv:string LUATEXFUNCTIONALITY ; LUATEXFUNCTIONALITY := runscript("mp.print(LUATEXFUNCTIONALITY)") ;
and your example looks ok.
as currently the variable is isn't used we can also comment it Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------