From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15607 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: High level user macro (howto?) Date: Mon, 28 Jun 2004 13:58:22 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <40E007DE.9050806@wxs.nl> 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> <1929849379.20040628111817@iol.it> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1088424242 31499 80.91.224.253 (28 Jun 2004 12:04:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Jun 2004 12:04:02 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Mon Jun 28 14:03:53 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 1BeurZ-0006At-00 for ; Mon, 28 Jun 2004 14:03:53 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id A625F10B61; Mon, 28 Jun 2004 14:03:41 +0200 (MEST) Original-Received: from mailrelay02.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ref.ntg.nl (Postfix) with ESMTP id 875C610B48 for ; Mon, 28 Jun 2004 13:58:24 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id i5SBwLmS007281 for ; Mon, 28 Jun 2004 13:58:21 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id C196D30DD5; Mon, 28 Jun 2004 13:58:23 +0200 (CEST) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id CA5FF30BD3 for ; Mon, 28 Jun 2004 11:58:22 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en Original-To: ntg-context@ntg.nl In-Reply-To: <1929849379.20040628111817@iol.it> X-Virus-Scanned: clamd / ClamAV version 0.73, clamav-milter version 0.73a on mailrelay02.solcon.nl X-Virus-Status: Clean 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:15607 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15607 Giuseppe Bilotta wrote: > >It is true, we need a "programming in ConTeXt" manual. It is >still possible to 'know' how to do things by looking at the way >things are done in ConTeXt itself. For example, in your case >you want something like this: > >\def\myCommand[#1]#2{% > \rawgetparameters[myCommand][param1=defaultvalue1,param2=defaultvalue2,#1]% > do something with \csname myCommandparam1\endcsname and #2} > > There is \setvariables [yournamespace] [yourvar=yourval] which operates independent of the language interface \getvariable{yournamespace}{yourvar} can be used to pick up a var The most important issue here is that you need to use some unique prefix, preferable something MyPrefix (capital and verbose). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------