From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/106242 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: macro that does not work (Metapost) Date: Tue, 11 Feb 2020 13:19:16 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5151702119866068420==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="15271"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 11 13:22:42 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 1j1UYs-0003t3-Ik for gctc-ntg-context-518@m.gmane-mx.org; Tue, 11 Feb 2020 13:22:42 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3CE07181AE3; Tue, 11 Feb 2020 13:22:11 +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 rrQ5RaD602Qq; Tue, 11 Feb 2020 13:22:09 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 46804181ADF; Tue, 11 Feb 2020 13:22:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5176F181ADF for ; Tue, 11 Feb 2020 13:22:08 +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 dX8e282yHuTg for ; Tue, 11 Feb 2020 13:22:03 +0100 (CET) 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 5D9F4181AA5 for ; Tue, 11 Feb 2020 13:22:03 +0100 (CET) Original-Received: by mail-wm1-f47.google.com with SMTP id s144so2145910wme.1 for ; Tue, 11 Feb 2020 04:22:03 -0800 (PST) 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=SPhVsN3fLVeQ+iTgYI5e9wYkk93JDuXYT2Rb6Zk1r3g=; b=K0bsDIHX+t3Hzo8gwYCdnFxOMwJZlAiS9Ic8jObC0JeABm5JKfQpzVzrvVHwqZV5x9 TaIx1lRNeYAeUVp/v4guza1sui8tWGW4wM4WMPteGAhL7NmlLadW7sDpFn9pnZe0GiZx qdUBp4RulkpMptJbhHQ9/e9yOnvCrL303xajq+knDTzAjoEivZsDWXBUcSP9aluVlBWr F+5hK2VdOCMMY/SJaI/z72T7dZqCAbBin3E53mpfxT8oT40AuYIFMF7ig1NYGKKmmf4q PbrLtnNboNTyAF9xTYQt3RCoVYhApPkG6b+MuMCL/aJNcutgyUsTlSDH3S8rm5mbrYjb cfWA== 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=SPhVsN3fLVeQ+iTgYI5e9wYkk93JDuXYT2Rb6Zk1r3g=; b=aJjY+9A/I+aROJG6d2j6PqCTz9arc7XKbgf+wM1VlO1OHTBSUOyWitRtz7ibAngBLu 3C23zkg/sArm4Q0l+IU9mTppC1mOiMG7kZd7lM6crRsDodcu+t/mYO8QHFVgYF0YxJ03 IrAv4k9UEtSvJdiJnhnfc5y/VV6wKS3uhYprVF2HK9NcktgsFp1ZMtN7khH4MfhRcL3c safW8lfJVBxKSpWCPZY/a4FW9WDMKDI1hCtlWmuQnt+QXQMKIdn77oOMjqdl92yK7B6X FQUObMKcXFofKN8r712g0ya+WRFfEeMZXkwcBl20o+NAdx8XhYOUlz/wZmXEGAwRLl/v QD1w== X-Gm-Message-State: APjAAAVHyJnaUY6YN00dyy1crWnuDvTl+HJkhrhrSHiBFgfo2E8bpVIH 3UFj8ieiTRj4kilRoKxVndxNcLdaG1hUBJbgblC5+Ixq X-Google-Smtp-Source: APXvYqxXy1ZgDGCUcvMys9Q73TPuBpQxmwdtahNQBIfI8PS4Hng1IoXDa3pMp1XaDiD6JjLer4gwO8pjGd12UTvMqds= X-Received: by 2002:a1c:1d8d:: with SMTP id d135mr5417966wmd.92.1581423722107; Tue, 11 Feb 2020 04:22:02 -0800 (PST) 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:106242 Archived-At: --===============5151702119866068420== Content-Type: multipart/alternative; boundary="000000000000321b01059e4be721" --000000000000321b01059e4be721 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Hans, I tried this but without success : \startMPcode suite{1,0}; suite{2,1}; \stopMPcode Fabrice Le mar. 11 f=C3=A9vr. 2020 =C3=A0 13:08, Hans Hagen a = =C3=A9crit : > On 2/11/2020 11:50 AM, Fabrice Couvreur wrote: > > 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. > > > {} instead of () > > > ! 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 > > > > > _________________________________________________________________________= __________ > > 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 > > > _________________________________________________________________________= __________ > > > > > -- > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > > _________________________________________________________________________= __________ > 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 > > _________________________________________________________________________= __________ > --000000000000321b01059e4be721 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hans,
I tried this but without success :

<= /span>
=C2=A0\startMPcode
=C2=A0 =C2=A0=C2=A0 suite{1,0};
=
=C2=A0=C2=A0=C2=A0=C2=A0 suite{2,1};
= =C2=A0\stopMPcode

=
Fabrice

Le=C2=A0mar. 11 f=C3=A9vr= . 2020 =C3=A0=C2=A013:08, Hans Hagen <j.hagen@xs4all.nl> a =C3=A9crit=C2=A0:
On 2/11/2020 11:50 AM, Fabrice Couvreur wr= ote:
> Hi,
> I have some problems with the following macro :
>
> tex error =C2=A0 =C2=A0 =C2=A0 > mp error on line 23 in file /home/= viserion/macro.tex:
>
> ! Missing argument 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 null.
>
> ! Missing argument 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 null.


{} instead of ()

> ! 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 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 =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 suites de dess= ins.
> 17 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \startlinecorrection[blank]
> 18 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \startmidaligned
> 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 {\startMPco= de
> 21 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 suit= e{1,0};
> 22 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 suit= e(2,1);
> 23 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \stopMPco= de}{\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 \stopmidaligned
> 26 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \stoplinecorrection
> 27 =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 Feb 11 11:45:53
>
> ##################################################
> macro.tex
> ##################################################
>
> \startMPcode
>=C2=A0 =C2=A0 def suite (expr n, t) =3D
>=C2=A0 =C2=A0 begingroup
>=C2=A0 =C2=A0 =C2=A0numeric u;
>=C2=A0 =C2=A0 =C2=A0u :=3D 5mm;
>=C2=A0 =C2=A0 =C2=A0pickup pencircle scaled 4pt;
>=C2=A0 =C2=A0 =C2=A0for i=3D0 upto n:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0for j=3D0 upto n:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0drawdot (i*u,j*u) shifted(t*u,= 0) withcolor darkred;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0endfor
>=C2=A0 =C2=A0 =C2=A0endfor
>=C2=A0 =C2=A0 endgroup
>=C2=A0 =C2=A0 enddef;
> \stopMPcode
> \starttext
>=C2=A0 =C2=A0On pr=C3=A9sente ci-dessous deux suites de dessins.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 \startlinecorrection[blank]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \startmidaligned
>=C2=A0 =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 =C2=A0 {\startMPcode
>=C2=A0 =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 =C2=A0 suite(2,1);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\stopMPcode}{\tf= xx \bf Suite 2}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 \stopcombination
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \stopmidaligned
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 \stoplinecorrection
> \stoptext
>
>
> Thank you.
> 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
> ______________________________________________________________________= _____________
>


--

-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tel: 038 477 53 69 | www.pragma-ade.nl | www.= pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________= ________
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
___________________________________________________________________________= ________
--000000000000321b01059e4be721-- --===============5151702119866068420== 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== --===============5151702119866068420==--