From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/103630 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: Can't use MetaFun with mplib anymore Date: Thu, 14 Mar 2019 08:51:10 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1141071891621992018==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="210030"; mail-complaints-to="usenet@blaine.gmane.org" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 14 08:53:26 2019 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1h4LB8-000sVm-C0 for gctc-ntg-context-518@m.gmane.org; Thu, 14 Mar 2019 08:53:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 72D87FCB37; Thu, 14 Mar 2019 08:51:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yy6xI0Y46cS3; Thu, 14 Mar 2019 08:51:24 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9947DFCB34; Thu, 14 Mar 2019 08:51:24 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B49BAFCB2A for ; Thu, 14 Mar 2019 08:51:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aTTgC8ZMa0yA for ; Thu, 14 Mar 2019 08:51:23 +0100 (CET) Original-Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 00660FC466 for ; Thu, 14 Mar 2019 08:51:22 +0100 (CET) Original-Received: by mail-lf1-f53.google.com with SMTP id d18so3491844lfn.3 for ; Thu, 14 Mar 2019 00:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=6JT2rAZjf6CMTUZTyyGWt7jek4AHRr6t5lQkoNNG6us=; b=rPkwgn0qD7dCBpW8h7fLmUfWhymbr13k9grDAMD8CiVZT7fCPZ6U1WuYmyiSiNRQr/ ZUmKo61cJyZeIX6+qfjqjeMRO/PxyGAgvDjaXsuE76dwgS3GHFMUnL1P5+suPkqMXKWX CaoGM9GIK4sydQZTYr1nbjTrZbq8joWje3Rv16ZIboXzM82jOhwMit2Fivncit6hZlgr xsICyzDMYyDrJcYabp5+nepTOYaZ5MJvN7FTgpRr3TVW7uhdVIyMfUwthX97ORXUb5gH 14e4VJlIzpMKyval7aRxyNxeeIBF0K6dcdxaT9jXyaLBHmfRkWTDS81mN4mo3Xf7mW+f QN6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=6JT2rAZjf6CMTUZTyyGWt7jek4AHRr6t5lQkoNNG6us=; b=ptxY+6BymWalgK/adsW713YJxTdUM1veEI20EAmCjgYJSX61AGmq0VkFEcce1ePeCi 2Pfb+kvgiWqp42mQA3f4cTX7jK1kkBSnWdplGKBrx00j92OoBcP4gDdyTPgAt+tiKRkp LlUaJCPh+VFppEefGDbqj01es0riOYPawGWO+mNDRk2HT6jdIjfzCqatruYS9NYevKzZ WfhcNM9/W7kSzodBpSNgGIOOy69hcIfxW/kDBY6id2ompToThkM9lRO7n4s0Ks4IHe8T fyNkHBy61n89t4QSDRVSeyEpKwJmZw/+X4V7ZhyfY9ACVS45PmKzu2+KZilNT5xv48/p 8Luw== X-Gm-Message-State: APjAAAUliOhQeIR6Zge8ynBywikuG0RSEVdim2kD4BYtj26mFoEpm52b YeRjfz5yuSMQyZwxIGhQ39gOVvt22cosDyZxQz9zKgMQ X-Google-Smtp-Source: APXvYqw5sK1Y+r98Z6Kq26dbg5X5QCdqaceXT15XB/GHVLIGtQvLIGMqcNpGJU3fhZf6PdCJ9Z4af+1nQlizzQLlwAQ= X-Received: by 2002:ac2:52ae:: with SMTP id r14mr1027805lfm.66.1552549881890; Thu, 14 Mar 2019 00:51:21 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:103630 Archived-At: --===============1141071891621992018== Content-Type: multipart/alternative; boundary="00000000000034cc390584093032" --00000000000034cc390584093032 Content-Type: text/plain; charset="UTF-8" On Thu, Mar 14, 2019 at 5:56 AM Henri Menke 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 ; > ]] > > 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. -- luigi --00000000000034cc390584093032 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Mar 14, 2019= at 5:56 AM Henri Menke <henrimenke@gmail.com> wrote:

Dear list,

Something has changed in MetaFun and it can no longer be used in plain LuaT= eX,
with neither of

=C2=A0 =C2=A0 luatex test.tex
=C2=A0 =C2=A0 mtxrun --script plain test.tex

This is the error:

=C2=A0 =C2=A0 >> LUATEXFUNCTIONALITY
=C2=A0 =C2=A0 >> "mp.print(LUATEXFUNCTIONALITY)"
=C2=A0 =C2=A0 ! Equation cannot be performed (numeric=3Dstring).

MWE is below, as always.

Cheers, Henri

---

\directlua{
local mpkpse =3D kpse.new(arg[0], "mpost")

local function finder(name, mode, ftype)
=C2=A0 =C2=A0 if mode =3D=3D "w" then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return name
=C2=A0 =C2=A0 else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return mpkpse:find_file(name,ftype)
=C2=A0 =C2=A0 end
end

local mpx =3D mplib.new {
=C2=A0 =C2=A0 find_file =3D finder
}
local ret =3D mpx:execute[[
boolean mplib ; mplib :=3D true ;
input me= tafun.mp ;
]]

print(ret.log)
}
\bye


in mp-mlib.mpiv it seems that we shoul= d have=C2=A0
string=C2=A0 LUATEXFUNCTIONALITY ; LUATEXFUNCTIONALI= TY :=3D runscript("mp.print(LUATEXFUNCTIONALITY)") ;
in= stead of
numeric LUATEXFUNCTIONALITY ; LUATEXFUNCTIONALITY :=3D r= unscript("mp.print(LUATEXFUNCTIONALITY)") ;
=C2=A0<= /div>
Now I have=C2=A0
tex/texmf-context/metapost/= context/base/mpiv$ grep -r LUATEXFUNCTIONALITY
mp-mlib.mpiv:%nume= ric LUATEXFUNCTIONALITY ; LUATEXFUNCTIONALITY :=3D runscript("mp.print= (LUATEXFUNCTIONALITY)") ;
mp-mlib.mpiv:string=C2=A0 LUATEXFU= NCTIONALITY ; LUATEXFUNCTIONALITY :=3D runscript("mp.print(LUATEXFUNCT= IONALITY)") ;

and your example looks ok= .

--
luigi
--00000000000034cc390584093032-- --===============1141071891621992018== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============1141071891621992018==--