From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82792 Path: news.gmane.org!not-for-mail From: Jaroslav Hajtmar Newsgroups: gmane.comp.tex.context Subject: \define with more than 9 parameters?? Date: Thu, 06 Jun 2013 09:56:32 +0200 Message-ID: <51B040B0.70905@gyza.cz> Reply-To: hajtmar@gyza.cz, mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1370505477 18991 80.91.229.3 (6 Jun 2013 07:57:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Jun 2013 07:57:57 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 06 09:57:57 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UkV53-000856-KG for gctc-ntg-context-518@m.gmane.org; Thu, 06 Jun 2013 09:57:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3E7E6101E8; Thu, 6 Jun 2013 09:57:57 +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 MdVkPpvkaUVU; Thu, 6 Jun 2013 09:57:55 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 50B33101E5; Thu, 6 Jun 2013 09:57:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3EE2B101E5 for ; Thu, 6 Jun 2013 09:57:54 +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 xdk92MEuyv2c for ; Thu, 6 Jun 2013 09:57:53 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 573C6101E0 for ; Thu, 6 Jun 2013 09:57:43 +0200 (CEST) Original-Received: from h1.cmg1.smtp.forpsi.com (h1.cmg1.smtp.forpsi.com [81.2.195.162]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r567vgBD017474 for ; Thu, 6 Jun 2013 09:57:42 +0200 Original-Received: from [192.168.0.105] ([188.116.90.238]) by cmg1.smtp.forpsi.com with bizsmtp id kvxg1l00358ZT5Y01vxh5b; Thu, 06 Jun 2013 09:57:41 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 X-Bayes-Prob: 0.9253 (Score 4.2, tokens from: @@RPTN) X-CanIt-Geo: ip=81.2.195.162; country=CZ; latitude=49.7500; longitude=15.5000; http://maps.google.com/maps?q=49.7500,15.5000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03JITVGWk - 281a8313d742 - 20130606 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:82792 Archived-At: Hello ConTeXist. Is there in ConTeXt any dirty trick, which can put more than 9 parameters into macro? I mean for example \define[25]\macrowithtwentyfiveparams{ .... } I use rarely any trick from Peter Olsak (see below) and I'd like something like that used in ConTeXt. Thanx Jaroslav Hajtmar Here is minimal example of trick of Petr Olsak: \newcount\tempnum \def\terminator{*} \newcount\tempnum \def\readparameters{\tempnum=0\let\next=\readone \next} \def\readone #1,{\advance\tempnum by 1 \def\param{#1}% %\the\tempnum - \param\par% \ifx\param\terminator \let\next=\relax \else\expandafter\gdef\csname param\the\tempnum\endcsname{#1}% \fi\next} \def\moreparameters#1{% \readparameters #1 % \csname param1\endcsname, % write first parameter \csname param3\endcsname, % write third parameter \csname param5\endcsname, % write fifth parameter } \starttext %\readparameters a,b,c,d,e,f,g,h,i,j,k,m,n,o,*, % %\def\parameters{aaa,bbbb,cccc,dddd,eeeee,fffff,ggggg,*,} %\expandafter\readparameters\parameters \moreparameters{a,b,c,d,e,f,g,h,i,j,k,m,n,o,*,} \stoptext ___________________________________________________________________________________ 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 ___________________________________________________________________________________