From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63741 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: \definenamespace Date: Fri, 19 Nov 2010 13:05:36 -0500 (EST) Message-ID: References: <20101117191032.GD20635@aides> <8B256D52-298A-462A-9BDD-BBC4A5BF3B67@gmail.com> <12CE99E6-0C02-4194-B352-4D42485AF13C@gmail.com> <4CE6BA63.1060303@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1290189923 23289 80.91.229.12 (19 Nov 2010 18:05:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 19 Nov 2010 18:05:23 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 19 19:05:19 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PJVKo-0000TW-QO for gctc-ntg-context-518@m.gmane.org; Fri, 19 Nov 2010 19:05:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 45F2ECA872; Fri, 19 Nov 2010 19:05:18 +0100 (CET) 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 TGjs-9bxW75e; Fri, 19 Nov 2010 19:05:14 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 328CFCA860; Fri, 19 Nov 2010 19:05:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5D276CA860 for ; Fri, 19 Nov 2010 19:05:13 +0100 (CET) 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 L4io5ctDiiYA for ; Fri, 19 Nov 2010 19:05:10 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 7B977CA82B for ; Fri, 19 Nov 2010 19:05:10 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oAJI58m4012120 for ; Fri, 19 Nov 2010 19:05:09 +0100 Original-Received: FROM adi-laptop (bas3-montreal02-1096683304.dsl.bell.ca [65.94.15.40]) By tombraider.mr.itd.umich.edu ID 4CE6BC50.B45C9.9020 ; Authuser adityam; 19 Nov 2010 13:05:04 EST In-Reply-To: <4CE6BA63.1060303@wxs.nl> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08Dx658xp - 3f8f46411173 - 20101119 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:63741 Archived-At: On Fri, 19 Nov 2010, Hans Hagen wrote: > On 19-11-2010 6:35, Wolfgang Schuster wrote: >> >> Am 19.11.2010 um 02:05 schrieb Aditya Mahajan: >> >>> I am not sure how this is supposed to work. Consider this example: >>> >>> [...] >> >> There is a bug in the code for the \define... commands, you need this >> definition for \doinstalldefinehandler: >> >> \unexpanded\def\doinstalldefinehandler#1#2#3#4#5#6#7% >> {\unexpanded\def#2{\dodoubleempty#5}% >> \newtoks#6% >> \newtoks#7% >> \def#5[##1][##2]% >> {\edef#4{##1}% >> \the#6% predefine >> \ifsecondargument >> \doifassignmentelse{##2} >> {\getparameters[#1#4][\s!parent=#3,##2]} >> {\getparameters[#1#4][\s!parent=#1##2]}% >> \fi >> \the#7}} >> >> To have three arguments for the \define... commands like \defineenumeration >> change the above command to: >> >> \unprotected\unexpanded\def\doinstalldefinehandler#1#2#3#4#5#6#7% >> {\unexpanded\def#2{\dotripleempty#5}% >> \newtoks#6% >> \newtoks#7% >> \def#5[##1][##2][##3]% >> {\edef#4{##1}% >> \the#6% predefine >> \ifsecondargument >> \doifassignmentelse{##2} >> {\getparameters[#1#4][\s!parent=#3,##2]} >> {\getparameters[#1#4][\s!parent=#1##2,##3]}% >> \fi >> \the#7}} > > or maybe: > > \unprotected\unexpanded\def\doinstalldefinehandler#1#2#3#4#5#6#7% > {\unexpanded\def#2{\dotripleempty#5}% > \newtoks#6% > \newtoks#7% > \def#5[##1][##2][##3]% > {\edef#4{##1}% > \the#6% predefine > \ifthirdargument > \getparameters[#1#4][\s!parent=#1##2,##3]% > \else\ifsecondargument > \getparameters[#1#4][\s!parent=#3,##2] > \fi\fi > \the#7}} That one will be slightly faster, I think. Aditya ___________________________________________________________________________________ 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 ___________________________________________________________________________________