From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15606 Path: main.gmane.org!not-for-mail From: "Patrick Gundlach" Newsgroups: gmane.comp.tex.context Subject: Re: High level user macro (howto?) Date: 28 Jun 2004 11:49:18 +0200 Organization: chaos Sender: ntg-context-admin@ntg.nl Message-ID: References: <"m2hdtw92rn.fs f"@levana.de> <6.1.1.1.2.20040601200608.01eb9640@server-1> <"m2n032tvs8.fs f"@levana.de> <20040622161300.GA5608@swordfish> <34371.80.58.5.46.1087924408.squirrel@bitmail.bitmailer.com> <0D45B077-C4DA-11D8-972E-000A9595B57C@ensta.fr> <40D944A4.5030402@gmx.de> <43DEE2EE-C510-11D8-972E-000A9595B57C@ensta.fr> <72D4BC80-C612-11D8-9706-0030659899AA@fiee.net> <40DC4CDF.2090904@wxs.nl> <5CAF4C26-C756-11D8-AE54-000A95C38698@chello.fr> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088416370 12026 80.91.224.253 (28 Jun 2004 09:52:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Jun 2004 09:52:50 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Mon Jun 28 11:52:40 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BesoZ-0007DT-00 for ; Mon, 28 Jun 2004 11:52:39 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 479E910B52; Mon, 28 Jun 2004 11:52:36 +0200 (MEST) Original-Received: from lilly.ping.de (lilly.ping.de [83.97.42.2]) by ref.ntg.nl (Postfix) with SMTP id CCBE010B46 for ; Mon, 28 Jun 2004 11:49:09 +0200 (MEST) Original-Received: (qmail 8296 invoked from network); 28 Jun 2004 09:49:09 -0000 Original-Received: (ofmipd 83.97.40.247); 28 Jun 2004 09:48:47 -0000 Original-Received: from schnee.local (localhost [127.0.0.1]) by schnee.local (8.12.9/8.12.9) with ESMTP id i5S9nJeu006747 for ; Mon, 28 Jun 2004 11:49:19 +0200 (CEST) Original-Received: (from pg@localhost) by schnee.local (8.12.9/8.12.2/Submit) id i5S9nJsF006746; Mon, 28 Jun 2004 11:49:19 +0200 (CEST) Original-To: ntg-context@ntg.nl X-Authentication-Warning: schnee.local: pg set sender to patrick@gundla.ch using -f X-Lieblings-Musik: the_capricorns In-Reply-To: <5CAF4C26-C756-11D8-AE54-000A95C38698@chello.fr> (Maurice Diamantini dom's message of "Sat, 26 Jun 2004 11:51:14 +0200") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (darwin) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:15606 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15606 Bonjour Maurice, > One thing is missing in context (or not documented in reference manual?) > is a standard and easy way to build arbitrary parametrised high level > macros. what about: \def\myCommand{\dosingleempty\doMyCommand} \def\doMyCommand[#1]{% \getparameters[XYZ][#1]% define your own ``namespace'' \getvalue{XYZtexti} } \starttext \startlines Hello \myCommand \setvalue{XYZtexti}{World} Hello \myCommand Hello \myCommand[texti=Maurice] \stoplines \stoptext Patrick -- texshow-web: http://members.ping.de:8061 ConTeXt wiki: http://members.ping.de:8062