From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/106238 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: macro that does not work (Metapost) Date: Tue, 11 Feb 2020 11:50:57 +0100 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5050730426888188062==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="20515"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 11 11:54:14 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 1j1TBF-0005ES-NX for gctc-ntg-context-518@m.gmane-mx.org; Tue, 11 Feb 2020 11:54:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9492F181ACC; Tue, 11 Feb 2020 11:53:44 +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 yncXLUrNrHLp; Tue, 11 Feb 2020 11:53:42 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DB03D181AC9; Tue, 11 Feb 2020 11:53:42 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 41636181AC9 for ; Tue, 11 Feb 2020 11:53:42 +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 p_Gqf5Bdaghn for ; Tue, 11 Feb 2020 11:53:41 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.45; helo=mail-wr1-f45.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 97405181AB0 for ; Tue, 11 Feb 2020 11:53:41 +0100 (CET) Original-Received: by mail-wr1-f45.google.com with SMTP id w12so11739929wrt.2 for ; Tue, 11 Feb 2020 02:53:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=gHXEmP7x1dePNer4MmY0LIdPnzrq3xbihLGWcmHT/y4=; b=sPzFQnmUKm0qK43vPCzeXj4T60ArWrnKoQSTTcVNDziSbMTwZtGWcKZDYseGaOjHqu SNaseyHAGw+WSDRvmle7rDI2iGsiazYhyYQf1fmNaXrUIadncxlnrJuAgSRu0WGQ5YeA nsZyHdrIwP3XYhnIz4Ivss62yDUjGwIdaQLp6b2aaDx8C6VE6M5hKuJOQa+Yy/d+ZYxW uRlPJ5fH02acruMOMbAJG7vzTVx7Uj4lWbH85Dl0ZpfjSUD1+fLzITuPScAkAW0+LCCK 8aNXM53cm7mb1Q8z5fKUxKRbWgRyWJ0xNE+mEoPsesqcyrQ/xxp7pN3aj3ySizFkw8jE frQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=gHXEmP7x1dePNer4MmY0LIdPnzrq3xbihLGWcmHT/y4=; b=c0eq+N46f1Sve9ys87uKkejRQwE6qdS9aUrpFVpabSv0N0aPGCXeew55sVZ67xMPra K+y8JELdD6LcjDu7wKXMl2E+D74xYrQiJyrGp6XXcTXGD+vp8SpwIfA/wxLpCDRee8cK 4CsT5ioTu2JF5TYY6WA/KmzTa5kogSuUxIf2l+szlPwur66HPBhiDXoUU7xhYKK6QOpA V8nG7Gxzx7f4Y2zT7r8txAuRpPSC3826RFp2pPi5DvJTr6Ste/NS7QCtdKlWltViyHBx joNTGAbtoIVk17xj0Yg54MK2/G6VUH2GtGe22fSqz8pIcVvxGXG7buALBs6TyOR2mgeL eFww== X-Gm-Message-State: APjAAAWpfjwxo3curqbAQ0v0ZMqVvpkd3y8dpwtjc2oDVzeZgcnJWAdH RfWoOvdlvTLvogPVBlIeAe97ec7Lr6N7BonJEN0/4HtC X-Google-Smtp-Source: APXvYqyU58ajblNef1dclnWWlYHRJqZolyQZLFM90TTeu6Us1vRbeGDNhUPNWYsOmRro1nPGLTYyy5z6TunHsLhDv0k= X-Received: by 2002:adf:b1c9:: with SMTP id r9mr7981870wra.339.1581418420848; Tue, 11 Feb 2020 02:53:40 -0800 (PST) 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:106238 Archived-At: --===============5050730426888188062== Content-Type: multipart/alternative; boundary="000000000000374ce0059e4aabe7" --000000000000374ce0059e4aabe7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I have some problems with the following macro : tex error > mp error on line 23 in file /home/viserion/macro.tex: ! Missing argument to suite. { <*> suite{ 1,0}; suite(2,1); ; That macro has more parameters than you thought. I'll continue by pretending that each missing argument is either zero or null. ! Missing argument to suite. { <*> suite{ 1,0}; suite(2,1); ; That macro has more parameters than you thought. I'll continue by pretending that each missing argument is either zero or null. ! Extra tokens will be flushed. { <*> suite{ 1,0}; suite(2,1); ; I've just read as much of that statement as I could fathom, so a semicolon should have been next. It's very puzzling... but I'll try to get myself back together, by ignoring everything up to the next `;'. Please insert a semicolon now in front of anything that you don't want me to delete. (See Chapter 27 of The METAFONTbook for an example.) [1] 13 enddef; 14 \stopMPcode 15 \starttext 16 On pr=C3=A9sente ci-dessous deux suites de dessins. 17 \startlinecorrection[blank] 18 \startmidaligned 19 \startcombination[2*1] 20 {\startMPcode 21 suite{1,0}; 22 suite(2,1); 23 >> \stopMPcode}{\tfxx \bf Suite 2} 24 \stopcombination 25 \stopmidaligned 26 \stoplinecorrection 27 \stoptext mtx-context | fatal error: return code: 256 TeX Output exited abnormally with code 1 at Tue Feb 11 11:45:53 ################################################## macro.tex ################################################## \startMPcode def suite (expr n, t) =3D begingroup numeric u; u :=3D 5mm; pickup pencircle scaled 4pt; for i=3D0 upto n: for j=3D0 upto n: drawdot (i*u,j*u) shifted(t*u,0) withcolor darkred; endfor endfor endgroup enddef; \stopMPcode \starttext On pr=C3=A9sente ci-dessous deux suites de dessins. \startlinecorrection[blank] \startmidaligned \startcombination[2*1] {\startMPcode suite{1,0}; suite(2,1); \stopMPcode}{\tfxx \bf Suite 2} \stopcombination \stopmidaligned \stoplinecorrection \stoptext Thank you. Fabrice --000000000000374ce0059e4aabe7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
I have some problem= s with the following macro :

tex error =C2=A0 =C2=A0 =C2=A0 > mp error on line 23 in file /h= ome/viserion/macro.tex:

! Missing argument to suite.
<to be re= ad again>
{
<*> suite{
1,0}; suite(2,1); ;
That macro = has more parameters than you thought.
I'll continue by pretending th= at each missing argument
is either zero or null.

! Missing argume= nt to suite.
<to be read again>
{
<*> suite{
1,0}; = suite(2,1); ;
That macro has more parameters than you thought.
I'= ll continue by pretending that each missing argument
is either zero or n= ull.

! Extra tokens will be flushed.
<to be read again>
= {
<*> suite{
1,0}; suite(2,1); ;
I've just read as much = of that statement as I could fathom,
so a semicolon should have been nex= t. It's very puzzling...
but I'll try to get myself back togethe= r, by ignoring
everything up to the next `;'. Please insert a semico= lon
now in front of anything that you don't want me to delete.
(S= ee Chapter 27 of The METAFONTbook for an example.)

[1]

13 =C2= =A0 =C2=A0 =C2=A0 enddef;
14 =C2=A0 =C2=A0 \stopMPcode
15 =C2=A0 =C2= =A0 \starttext
16 =C2=A0 =C2=A0 =C2=A0On pr=C3=A9sente ci-dessous deux s= uites de dessins.
17 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \startlinecorrec= tion[blank]
18 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \startmidaligne= d
19 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \startcombination[= 2*1]
20 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {\startM= Pcode
21 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = suite{1,0};
22 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 suite(2,1);
23 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 \stopMPcode}{\tfxx \bf Suite 2}
24 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 \stopcombination
25 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \st= opmidaligned
26 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \stoplinecorrection27 =C2=A0 =C2=A0 \stoptext

mtx-context =C2=A0 =C2=A0 | fatal error= : return code: 256

TeX Output exited abnormally with code 1 at Tue F= eb 11 11:45:53

####= ##############################################
macro.tex
#######################################= ###########

\sta= rtMPcode
=C2=A0 def suite (expr n, t) =3D
=C2=A0 begingroup
=C2=A0= =C2=A0numeric u;
=C2=A0 =C2=A0u :=3D 5mm;
=C2=A0 =C2=A0pickup pencir= cle scaled 4pt;
=C2=A0 =C2=A0for i=3D0 upto n:
=C2=A0 =C2=A0 =C2=A0fo= r j=3D0 upto n:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0drawdot (i*u,j*u) shif= ted(t*u,0) withcolor darkred;
=C2=A0 =C2=A0 =C2=A0endfor
=C2=A0 =C2= =A0endfor
=C2=A0 endgroup
=C2=A0 enddef;
\stopMPcode
\starttext=
=C2=A0On pr=C3=A9sente ci-dessous deux suites de dessins.
=C2=A0 =C2= =A0 =C2=A0 \startlinecorrection[blank]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \star= tmidaligned
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \startcombination[2*1]=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {\startMPcode
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 suite{1,0};
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 suite(2,1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0\stopMPcode}{\tfxx \bf Suite 2}
=C2=A0 =C2=A0 =C2=A0 \stopc= ombination
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \stopmidaligned
=C2=A0 =C2=A0 = =C2=A0 \stoplinecorrection
\stoptext


Thank you.
Fabrice
--000000000000374ce0059e4aabe7-- --===============5050730426888188062== 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== --===============5050730426888188062==--