From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108558 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Import a metapost extension Date: Tue, 1 Sep 2020 15:04:05 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000003aff5b05ae403020" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8500"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 01 15:07:17 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kD60L-00025y-7i for gctc-ntg-context-518@m.gmane-mx.org; Tue, 01 Sep 2020 15:07:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id AB94B1A88EC; Tue, 1 Sep 2020 15:06:38 +0200 (CEST) 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 UubNLVfV0jdT; Tue, 1 Sep 2020 15:06:35 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E86F71A88F2; Tue, 1 Sep 2020 15:06:35 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 61F0F1A88EB for ; Tue, 1 Sep 2020 15:06:35 +0200 (CEST) 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 iCDCAehKVxJw for ; Tue, 1 Sep 2020 15:06:34 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.47; helo=mail-wm1-f47.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 612DF1A88E9 for ; Tue, 1 Sep 2020 15:06:34 +0200 (CEST) Original-Received: by mail-wm1-f47.google.com with SMTP id z9so1093544wmk.1 for ; Tue, 01 Sep 2020 06:06:34 -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=WtDFijSfaERNbkZ6ZWbMXwzD+LWUKzNTSd+Hu9i5gXE=; b=pzGBhpW34K1pdg6JANv11d3Ar0hJxI/ysYcYScyPrURa6LkBPAHkhTSpdzlitY8G6Q JmXZMBC5CKq2R44hQitpb9QZA8Pe6zVuQC6LKTnK2yV5dFHDcQbF4y6PQoRc+44/alpW Kb/0f1bmJHDjdlLHUdq2MNWFg5iX11DY4cwcKtX8d71JXZ2bQQ0/fBJYfcn9YER8fKsI M9PHHRrIyo3bcx3AlnveO5w26zQ4+HtghRHgC3KFmzYRaIDt1QIAkA6AD1xNqQtfjJmD ZG17+k1jBzWHRuA/WPwvTlhiD0o99DywAYD3gN1f5c9d0R3gHSA6UMpGP++S1Dd3USW9 iqsg== 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=WtDFijSfaERNbkZ6ZWbMXwzD+LWUKzNTSd+Hu9i5gXE=; b=ryQeccGwtPKxm288DbeEebWijNtMSYgG9Cvtg1niRmwJ4lOIYsZ/POIO1j7P8SebL5 D53ww6cypDJe1c4RqKv9w3IZ0EZpwDpJKl5bR3jX1tvmZD/Iso3nyooL/DiLMBXaR2wP kOVM0nNCGJQD0n+rsuymrghpos8cmEOlmSWsbTbXqqngE/7453r9ILoxjSw/8Lg4M7xN EfBOJjc3TaLDTLmCI6cid6hyA2jYpYXTFhh0OqYiFheD6Hh3zDB1uUQBwwgXsdABLWS2 LUJ0xcjyN2dp2M8JJI9wrmliACs7ckM33+1qJh/msuLRk6EJLri+kgfk8hJ6MrxCcNBf E87g== X-Gm-Message-State: AOAM530sZ3eLWYUHrxig7GH6i/4l59V606RTw9U72nGLiKVIoutfDQRT hECKdj6c3mqCdoBawZUfLM5TIof7ddpZFmav8XEeqC1kPag= X-Google-Smtp-Source: ABdhPJyFR4zLJGcLICj9ElB2uQmZzwAIHWuL2ssAx5RSef2myx7haaswVV6JNr1LNpC9CgAd7aMEnLV9Q6cgv7vPrPU= X-Received: by 2002:a1c:f609:: with SMTP id w9mr1722470wmc.150.1598965593855; Tue, 01 Sep 2020 06:06:33 -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.io gmane.comp.tex.context:108558 Archived-At: --0000000000003aff5b05ae403020 Content-Type: multipart/alternative; boundary="0000000000003aff5a05ae40301e" --0000000000003aff5a05ae40301e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Taco, Thank you for your help. I specify that this extension works perfectly by compiling the following file. input mp-scratch; Scratchversion:=3D3; beginfig(1); draw Drapeau; draw Repeter("4"); draw Avancer("100"); draw Tournerd("90"); draw FinBlocRepeter; endfig; end But what you are proposing unfortunately does not work. Fabrice Le mar. 1 sept. 2020 =C3=A0 14:25, Taco Hoekwater a = =C3=A9crit : > Hi, > > I think you need this: > > \startMPinclusions > input mp-scratch; > \stopMPinclusions > > \startMPcode > Scratchversion:=3D3; > =E2=80=A6. > > If that also doesn=E2=80=99t work, perhaps attach the log file / terminal= output > to a new message. > > Best wishes, > Taco > > > On 1 Sep 2020, at 13:07, Fabrice Couvreur > wrote: > > > > Hello > > Is it possible to import a metapost extension into a file compiled with > the lmtx engine ? > > I tried unsuccessfully with this example : > > > > %%%% begin test.tex > > > > \starttext > > \startMPcode > > input mp-scratch; > > > > Scratchversion:=3D3; > > > > draw Drapeau; > > draw Repeter("4"); > > draw Avancer("50"); > > draw Tournerd("90"); > > draw FinBlocRepeter; > > > > \stopMPcode > > \stoptext > > > > %%%% end test.tex > > > > Thanks > > Fabrice > > > _________________________________________________________________________= __________ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : http://contextgarden.net > > > _________________________________________________________________________= __________ > > Taco Hoekwater > Elvenkind BV > > > > > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --0000000000003aff5a05ae40301e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Taco,
Thank you for your help. I specify that this extension works perfectly by compiling the = following file.

inpu= t mp-scratch;

Scratchversion:=3D3;

beginfig(1);
=C2=A0 dra= w Drapeau;
=C2=A0 draw Repeter("4");
=C2=A0 draw Avancer(&q= uot;100");
=C2=A0 draw Tournerd("90");
=C2=A0 draw Fin= BlocRepeter;
=C2=A0 endfig;
end

<= /span>

But what you are proposing = unfortunately does not work.
Fabrice

Le=C2=A0mar. 1 sept. 2020 =C3=A0=C2=A014:25, Taco Hoekwater <taco@elvenkind.com> a =C3=A9crit= =C2=A0:
Hi,

I think you need this:

\startMPinclusions
=C2=A0 input mp-scratch;
\stopMPinclusions

\startMPcode
=C2=A0 Scratchversion:=3D3;
=C2=A0 =E2=80=A6.

If that also doesn=E2=80=99t work, perhaps attach the log file / terminal o= utput to a new message.

Best wishes,
Taco

> On 1 Sep 2020, at 13:07, Fabrice Couvreur <fabrice1.couvreur@gmail.com>= ; wrote:
>
> Hello
> Is it possible to import a metapost extension into a file compiled wit= h the lmtx engine ?
> I tried unsuccessfully with this example :
>
> %%%% begin test.tex
>
> \starttext
> \startMPcode
>=C2=A0 =C2=A0input mp-scratch;
>
>=C2=A0 =C2=A0 =C2=A0Scratchversion:=3D3;
>
> draw Drapeau;
> draw Repeter("4");
> draw Avancer("50");
> draw Tournerd("90");
> draw FinBlocRepeter;
>=C2=A0
> \stopMPcode
> \stoptext
>
> %%%% end test.tex
>
> Thanks
> Fabrice
> ______________________________________________________________________= _____________
> If your question is of interest to others as well, please add an entry= to the Wiki!
>
> maillist : ntg= -context@ntg.nl / http://www.ntg.nl/mailman/listin= fo/ntg-context
> webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.ne= t
> archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
> wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
> ______________________________________________________________________= _____________

Taco Hoekwater
Elvenkind BV




___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--0000000000003aff5a05ae40301e-- --0000000000003aff5b05ae403020 Content-Type: text/x-log; charset="US-ASCII"; name="scratch-1.log" Content-Disposition: attachment; filename="scratch-1.log" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kejyqm4c0 VGhpcyBpcyBNZXRhUG9zdCwgdmVyc2lvbiAyLjAwIChUZVggTGl2ZSAyMDIwKSAoa3BhdGhzZWEg dmVyc2lvbiA2LjMuMikgIDEgU0VQIDIwMjAgMTU6MDEKKipzY3JhdGNoLTEubXAKKC9ob21lL3Zp c2VyaW9uL3RleGxpdmUvMjAyMC90ZXhtZi1kaXN0L21ldGFwb3N0L2Jhc2UvbXBvc3QubXAKKC9o b21lL3Zpc2VyaW9uL3RleGxpdmUvMjAyMC90ZXhtZi1kaXN0L21ldGFwb3N0L2Jhc2UvcGxhaW4u bXAKUHJlbG9hZGluZyB0aGUgcGxhaW4gbWVtIGZpbGUsIHZlcnNpb24gMS4wMDUpICkgKC4vc2Ny YXRjaC0xLm1wCigvaG9tZS92aXNlcmlvbi90ZXhtZi9tZXRhcG9zdC9tcC1zY3JhdGNoLm1wCigv aG9tZS92aXNlcmlvbi90ZXhtZi9tZXRhcG9zdC9MQVRFWFNjcmF0Y2gubXApCigvaG9tZS92aXNl cmlvbi90ZXhtZi9tZXRhcG9zdC9Nb3V2ZW1lbnQubXApCigvaG9tZS92aXNlcmlvbi90ZXhtZi9t ZXRhcG9zdC9BcHBhcmVuY2UubXApCigvaG9tZS92aXNlcmlvbi90ZXhtZi9tZXRhcG9zdC9Tb25z Lm1wKSAoL2hvbWUvdmlzZXJpb24vdGV4bWYvbWV0YXBvc3QvU3R5bG8ubXAKKSAoL2hvbWUvdmlz ZXJpb24vdGV4bWYvbWV0YXBvc3QvQ29udHJvbGUubXApCigvaG9tZS92aXNlcmlvbi90ZXhtZi9t ZXRhcG9zdC9FdmVuZW1lbnRzLm1wKQooL2hvbWUvdmlzZXJpb24vdGV4bWYvbWV0YXBvc3QvQmxv Yy5tcCkK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C5wZmI+XSApCjEgb3V0cHV0IGZpbGUgd3JpdHRlbjogc2NyYXRjaC0xLjEKCg== --0000000000003aff5b05ae403020 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== --0000000000003aff5b05ae403020--