From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91803 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?5Zyf5Y2c55q/?= Newsgroups: gmane.comp.tex.context Subject: Re: conTeXt Mkiv: the number of parameters can not be more than 9? Date: Sun, 5 Jul 2015 12:06:29 +0800 Message-ID: References: <5598A73F.2030504@sinap.ac.cn> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0249962046==" X-Trace: ger.gmane.org 1436069243 27052 80.91.229.3 (5 Jul 2015 04:07:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Jul 2015 04:07:23 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jul 05 06:07:12 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZBbCy-0002Mr-7W for gctc-ntg-context-518@m.gmane.org; Sun, 05 Jul 2015 06:07:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 651E01025D for ; Sun, 5 Jul 2015 06:07:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id UsT8k9t8OTaR for ; Sun, 5 Jul 2015 06:07:10 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id B4A811025F for ; Sun, 5 Jul 2015 06:06:41 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BA7C010217 for ; Sun, 5 Jul 2015 06:06:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Dkdc3cppA8OO for ; Sun, 5 Jul 2015 06:06:36 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 999E810212 for ; Sun, 5 Jul 2015 06:06:32 +0200 (CEST) Original-Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) by filter4-ams.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t6546T4F017908 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 5 Jul 2015 06:06:30 +0200 Original-Received: by igh16 with SMTP id 16so2420048igh.0 for ; Sat, 04 Jul 2015 21:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/xmdswZbAnPfsavbrcSMxvt28TcIcLyoH9IBWOxbgK8=; b=MSePlgsFvpZP9Rz5OYPSspc7ZmbzSNDPUoeJ79vB9q1C16XckBInwyy9XlUkTt9Ir5 qwnx57RmrXOC9WlNUypJo/lMK87TOvBk1TlJlo5Sd2J8ZxslDObU/0aKT6fuI65KZc5o aYrex1yaVoivtBp8AJkT0Wj1kKQJ7aTiZArKRm/AJDjBwQeR/WbJ6we8tPXHOGxnEBjw kXMErnIRJiA6ZzxfPpRBJKNZQHCIDZDOHrQt++qqqkS4uYLvx8FCXY+Vz18wAVprlSzc hO2xO0qY4RQf4B8Nv18B8q0rQlt6PDl/NEgPup3jhkbF5e35R6Bayc/9N5WCeCwKiwk6 ueNg== X-Received: by 10.42.203.4 with SMTP id fg4mr26363023icb.52.1436069189333; Sat, 04 Jul 2015 21:06:29 -0700 (PDT) Original-Received: by 10.64.245.103 with HTTP; Sat, 4 Jul 2015 21:06:29 -0700 (PDT) In-Reply-To: <5598A73F.2030504@sinap.ac.cn> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c05::22f; country=US; region=Iowa; city=Council Bluffs; latitude=41.2619; longitude=-95.8608; http://maps.google.com/maps?q=41.2619,-95.8608&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01OMs6utO - 9568368a35af - 20150705 (trained as not-spam) Received-SPF: pass (filter4-ams.mf.surf.net: domain of pengcz.nwpu@gmail.com designates 2607:f8b0:4001:c05::22f as permitted sender) receiver=filter4-ams.mf.surf.net; client-ip=2607:f8b0:4001:c05::22f; envelope-from=; helo=mail-ig0-x22f.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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:91803 Archived-At: --===============0249962046== Content-Type: multipart/alternative; boundary=20cf303f6406e73a39051a18e937 --20cf303f6406e73a39051a18e937 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable hi=EF=BC=8C=E2=84=A4h=F0=9D=95=9Achu =E2=84=82h=F0=9D=95=96n Thanks=EF=BC=81 I will check it later! Best Regards Dillon 2015-07-05 11:40 GMT+08:00 Zhichu Chen : > Hi Dillon, > > First of all, I'm against defining such a complex macro, since that can b= e > very > confusing when you use it. I personal prefer the key-value definition: > \def\DEFINETEST[#1]{% > \getXXXparameters > [paraA=3DdefaultValueForParameterA% > ,paraB=3D% or just empty > ,#1]% > \doSomethingWith[\XXXparameter\paraA]% > \doSomethingElse... > } > You might want to refer to the following link and other valuable material= s > on the > wiki for more information: > http://wiki.contextgarden.net/System_Macros/Key_Value_Assignments > > If you insist on that, I guess you can define a temporary macro inside > your macro. > That's very dirty, but can be a little more efficient? I'm not sure. > > I was given to understand that the ConTeXt MKVI now accepts parameters > such as > #position#color rather than meaningless #1#2. I GUESS that's lua-based, s= o > maybe > it'll break the TeX limitation. > > > On 07/05/2015 09:55 AM, =E5=9C=9F=E5=8D=9C=E7=9A=BF wrote: > > hi, all > > For testing, I have a definition: > > \define[9]\DEFINETEST{#1,#2,#3,#4,#5,#6,#7,#8,#9} > > context test can work fine, when I modify the above into: > > \define[10]\DEFINETEST{#1,#2,#3,#4,#5,#6,#7,#8,#9,#10} > > I got a error: > > test.tex: ! Illegal parameter number in definition of \DEFINETEST > > From StackExchange, I got a answer: > > Since ConTeXt is based on TeX, the maximum number of 9 parameters is > inherited > > So, in Context mkiv, what should I do for more than 9 parameters? > > Thanks! > > Best Regards > > Dillon > > > _________________________________________________________________________= __________ > 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-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ > > > > -- > Best regards, > =E2=84=A4h=F0=9D=95=9Achu =E2=84=82h=F0=9D=95=96n > > > > _________________________________________________________________________= __________ > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --20cf303f6406e73a39051a18e937 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
hi=EF=BC=8C=E2=84=A4h=F0=9D=95=9Achu =E2=84=82h=F0=9D=95=96n
<= span style=3D"color:rgb(136,136,136);white-space:pre-wrap"> Thanks=EF=BC= =81 I will check it later!

Best Regards
Dillon
=


20= 15-07-05 11:40 GMT+08:00 Zhichu Chen <chenzhichu@sinap.ac.cn><= /span>:
=20 =20 =20
Hi Dillon,

First of all, I'm against defining such a complex macro, since that can be very
confusing when you use it. I personal prefer the key-value definition:
\def\DEFINETEST[#1]{%
=C2=A0 \getXXXparameters
=C2=A0=C2=A0=C2=A0 [paraA=3DdefaultValueForParameterA%
=C2=A0=C2=A0=C2=A0 ,paraB=3D% or just empty
=C2=A0=C2=A0=C2=A0 ,#1]%
=C2=A0 \doSomethingWith[\XXXparameter\paraA]%
=C2=A0 \doSomethingElse...
}
You might want to refer to the following link and other valuable materials on the
wiki for more information:
http://wiki.contextgarden.net/System_Macros/Key_= Value_Assignments

If you insist on that, I guess you can define a temporary macro inside your macro.
That's very dirty, but can be a little more efficient? I'm no= t sure.

I was given to understand that the ConTeXt MKVI now accepts parameters such as
#position#color rather than meaningless #1#2. I GUESS that's lua-based, so maybe
it'll break the TeX limitation.


On 07/05/2015 09:55 AM, =E5=9C=9F=E5=8D=9C=E7=9A=BF wrote:
=20

hi, all

For testing, I have a definition:

\define[9]\DE=
FINETEST{#1,#2,#3,#4,#5,#6,#7,#8,#9}

context test=C2=A0can work fine, when I modify the above into:

\define[10]\D=
EFINETEST{#1,#2,#3,#4,#5,#6,#7,#8,#9,#10}

I got a error:

test.tex: ! Illegal param=
eter number in definition of \DEFINETEST

From StackExchange, I got a answer:

Since ConTeXt = is based on TeX, the maximum number of 9 parameters is inherited

So, in Context mkiv, what should I do for more than 9 parameters?

Thanks!

Best Regards

Dillon



____________________________________________________=
_______________________________
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/ntg-context
webpage  : http://ww=
w.pragma-ade.nl / h=
ttp://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://co=
ntextgarden.net
___________________________________________________________________________=
________


--=20
Best regards,
=E2=84=A4h=F0=9D=95=9Achu =E2=84=82h=F0=9D=95=96n

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

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________

--20cf303f6406e73a39051a18e937-- --===============0249962046== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0249962046==--