From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81788 Path: news.gmane.org!not-for-mail From: Alan BRASLAU Newsgroups: gmane.comp.tex.context Subject: Re: the difference between \def and \define Date: Tue, 16 Apr 2013 13:14:11 +0200 Organization: CEA DSM-IRAMIS-SPEC Message-ID: <20130416131411.026762a9@iram-hb-003386.extra.cea.fr> References: <20130415140703.GA5709@homerow> <516C0AC9.6000805@wxs.nl> <516D0EE6.2040004@wxs.nl> <20130416090552.GH5709@homerow> <516D1586.5070705@uni-bonn.de> <516D2948.1040404@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1366110857 20861 80.91.229.3 (16 Apr 2013 11:14:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Apr 2013 11:14:17 +0000 (UTC) Cc: pragma@wxs.nl, "Thomas A. Schmitz" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 16 13:14:20 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 1US3q8-0001dv-Io for gctc-ntg-context-518@m.gmane.org; Tue, 16 Apr 2013 13:14:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E389810210; Tue, 16 Apr 2013 13:14:19 +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 NsOKfe+ehjLh; Tue, 16 Apr 2013 13:14:17 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 73FF2101EB; Tue, 16 Apr 2013 13:14:17 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7F747101EB for ; Tue, 16 Apr 2013 13:14:16 +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 rA6RpkPfwlgV for ; Tue, 16 Apr 2013 13:14:15 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 0F5AC101E3 for ; Tue, 16 Apr 2013 13:14:14 +0200 (CEST) Original-Received: from oxalide-out.extra.cea.fr (oxalide-out.extra.cea.fr [132.168.224.8]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r3GBEEOS006388 for ; Tue, 16 Apr 2013 13:14:14 +0200 Original-Received: from epeire2.extra.cea.fr (epeire2.extra.cea.fr [132.167.198.32]) by oxalide.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.3) with ESMTP id r3GBEDkN005377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 16 Apr 2013 13:14:13 +0200 Original-Received: from orpin2.extra.cea.fr (orpin2.extra.cea.fr [132.167.198.5]) by epeire2.extra.cea.fr (8.14.4/8.14.4) with ESMTP id r3GBEDDD015944; Tue, 16 Apr 2013 13:14:13 +0200 (envelope-from alan.braslau@cea.fr) Original-Received: from iram-hb-003386.extra.cea.fr (charybde.extra.cea.fr [132.166.43.102]) by orpin2.extra.cea.fr (8.13.8/8.13.8/CEAnet-Intranet-out-1.2) with ESMTP id r3GBEC9Y010518; Tue, 16 Apr 2013 13:14:12 +0200 In-Reply-To: <516D2948.1040404@wxs.nl> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; amd64-portbld-freebsd9.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=132.168.224.8; country=FR; region=A3; city=Gif-sur-yvette; latitude=48.6833; longitude=2.1333; http://maps.google.com/maps?q=48.6833,2.1333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QJozeerm - 97f2e758438e - 20130416 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:81788 Archived-At: 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! In fact, I do not understand well the handling of arguments, especially optional variants. For example, \define[1]\Index{\index{#1}#1} can be handy. But let's say that I want to be able to use a variant: \Index[alpha]{$\alpha$} (\index[alpha]{$\alpha$}$\alpha$) 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}? Alan P.S. I indeed like the idea of the suggestion: \define[one,two,three]\whatever{first: #one second: #two third: #three} 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? ___________________________________________________________________________________ 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 ___________________________________________________________________________________