From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81789 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: the difference between \def and \define Date: Tue, 16 Apr 2013 14:01:08 +0200 Message-ID: <516D3D84.1020709@wxs.nl> References: <20130415140703.GA5709@homerow> <516C0AC9.6000805@wxs.nl> <516D0EE6.2040004@wxs.nl> <20130416090552.GH5709@homerow> <516D1586.5070705@uni-bonn.de> <516D2948.1040404@wxs.nl> <20130416131411.026762a9@iram-hb-003386.extra.cea.fr> Reply-To: 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 1366113672 19219 80.91.229.3 (16 Apr 2013 12:01:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Apr 2013 12:01:12 +0000 (UTC) Cc: mailing list for ConTeXt users , "Thomas A. Schmitz" To: Alan BRASLAU Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 16 14:01:15 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 1US4ZX-0002z3-6Q for gctc-ntg-context-518@m.gmane.org; Tue, 16 Apr 2013 14:01:15 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8E3EF101FE; Tue, 16 Apr 2013 14:01:14 +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 l8AjvFOVzgv5; Tue, 16 Apr 2013 14:01:12 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 7C17B101EB; Tue, 16 Apr 2013 14:01:12 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8BD98101EB for ; Tue, 16 Apr 2013 14:01: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 vG8KLFcJT7LK for ; Tue, 16 Apr 2013 14:01:10 +0200 (CEST) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 639AE101E3 for ; Tue, 16 Apr 2013 14:01:10 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r3GC18ic016149 for ; Tue, 16 Apr 2013 14:01:09 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 16410-1713362 for multiple; Tue, 16 Apr 2013 14:01:06 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: <20130416131411.026762a9@iram-hb-003386.extra.cea.fr> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=15; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04JoA18TP - 4374a0d38c07 - 20130416 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 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:81789 Archived-At: On 4/16/2013 1:14 PM, Alan BRASLAU wrote: > Since the question has been raised about understanding \define, etc. > indeed some use remains a bit unclear (to me). > > On Tue, 16 Apr 2013 12:34:48 +0200 > Hans Hagen wrote: > >> there is a commented blob that implements thinsg like this >> >> \starttext >> \define[2]\whatevera{#1+#2} >> \whatevera{A}{B} >> \define[me][too][2]\whateverb{#1+#2+#3+#4} >> \whateverb[A]{B}{C} >> \whateverb[A][B]{C}{D} >> \define[alpha][beta][gamma][delta]\whateverc{#1+#2+#3+#4} >> \whateverc[P][Q] >> \stoptext >> >> but it's just an old idea. > > I am perhaps a bit bewildered today... but I do not understand the > above. It gets too tricky for me! that's why it's commented code -) \define [optional-arg-1-default][optional-arg-2-default]...[number of {} args] but .. not likely to become enabled anyway (was an experiment) > Or, maybe, I might like to handle authors: > \define[2]\Author{\index{#2, #1}#1 #2} > \Author{Thomas A.}{Schmitz} > But what if I were to type \Author{Aristotle}? the [] are optional with an optional default > \define[one,two,three]\whatever{first: #one second: #two third: #three} that's not too complex to implement (as mkvi) if there's enough votes for it > On 4/16/2013 11:10 AM, Thomas A. Schmitz wrote: >> It certainly isn't an urgent need, but having >> >> \define[one,two,three] >> >> wouldn't be absurd, now would it? -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________