From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/13014 Path: main.gmane.org!not-for-mail From: Simon Pepping Newsgroups: gmane.comp.tex.context Subject: Re: Re: parameter mechanism Date: Wed, 27 Aug 2003 21:18:35 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <20030827191835.GB1725@scaprea> References: <3F4CB2F0.2020705@arcor.de> 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 1062012325 2882 80.91.224.253 (27 Aug 2003 19:25:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2003 19:25:25 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Wed Aug 27 21:25:24 2003 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 19s5v2-0005A2-00 for ; Wed, 27 Aug 2003 21:25:24 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 3A08B10B9E; Wed, 27 Aug 2003 21:25:22 +0200 (MEST) Original-Received: from hgatenl.hobby.nl (ns.hobby.nl [212.72.224.8]) by ref.ntg.nl (Postfix) with ESMTP id 23A1C10ACB for ; Wed, 27 Aug 2003 21:19:25 +0200 (MEST) Original-Received: from hgatenl.hobby.nl (localhost [127.0.0.1]) by hgatenl.hobby.nl (8.12.9/8.12.9) with ESMTP id h7RJJMCI080308 for ; Wed, 27 Aug 2003 21:19:22 +0200 (CEST) (envelope-from spepping@scaprea.hobby.nl) Original-Received: (from uucp@localhost) by hgatenl.hobby.nl (8.12.9/8.12.9/Submit) with UUCP id h7RJJMVZ080307 for ntg-context@ntg.nl; Wed, 27 Aug 2003 21:19:22 +0200 (CEST) Original-Received: from simon by scaprea.salix.nl with local (Exim 3.35 #1 (Debian)) id 19s5oR-0000cr-00; Wed, 27 Aug 2003 21:18:35 +0200 Original-To: ntg-context@ntg.nl Mail-Followup-To: ntg-context@ntg.nl Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new 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:13014 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:13014 On Wed, Aug 27, 2003 at 06:55:05PM +0200, Patrick Gundlach wrote: > Hello Peter, > > I am not so sure if I can help you, but I'll give it a try. > > The examples are taken from my t-layout module. > > I wanted to have > > \ShowLayout[a=b,c=d] > > but with the possibility to say \ShowLayout without [ ]. So I define > \ShowLayout as > > \def\ShowLayout{\dosingleempty\doShowLayout} > > and \doShowLayout as > > \def\doShowLayout[#1]{% > \getparameters[ShowLayout][#1] > > (some not important stuff) > > } > > to access a value, just use \getvalue{ShowLayout....} where ... is > your keyword. > > I hope I did not forget anything. There is a translation step for the keywords. For example, if a user would say \ShowLayout[command=\xxx], you would have to retrieve it as \getvalue{ShowLayoutcommando} (note the Dutch translation commando). Translation is done for all keywords that are used in Context's core; language variants are mapped to a canonical value, often but not always the Dutch form of the keyword. I do not remember where to look this up; usually I just look into the trace log to find out. Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl home page: scaprea.hobby.nl