From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/29776 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: definesynonyms Date: Fri, 28 Jul 2006 16:34:03 +0200 Message-ID: <44CA205B.8030503@elvenkind.com> References: <44C48EC9.4030803@elvenkind.com> <1117DD70-36BA-47AE-89B3-98DBC1DAF07D@militzer.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1154097279 21548 80.91.229.2 (28 Jul 2006 14:34:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Jul 2006 14:34:39 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 28 16:34:37 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1G6TPw-0008H6-M8 for gctc-ntg-context-518@m.gmane.org; Fri, 28 Jul 2006 16:34:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D03471FF03; Fri, 28 Jul 2006 16:34:19 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03737-06-5; Fri, 28 Jul 2006 16:34:14 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 78E391FEFB; Fri, 28 Jul 2006 16:34:14 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7C53E1FEFB for ; Fri, 28 Jul 2006 16:34:10 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03737-06-4 for ; Fri, 28 Jul 2006 16:34:05 +0200 (CEST) Original-Received: from lochside.elvenkind.com (elvenknd.xs4all.nl [213.84.171.68]) by ronja.ntg.nl (Postfix) with SMTP id 88F831FEF7 for ; Fri, 28 Jul 2006 16:34:05 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by lochside.elvenkind.com (Postfix) with ESMTP id 2CBEC1BE30 for ; Fri, 28 Jul 2006 16:34:05 +0200 (CEST) Original-Received: from lochside.elvenkind.com ([127.0.0.1]) by localhost (glenfiddich.elvenkind.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12738-02 for ; Fri, 28 Jul 2006 16:34:04 +0200 (CEST) Original-Received: from [10.10.0.6] (glenlivet.elvenkind.com [10.10.0.6]) by lochside.elvenkind.com (Postfix) with ESMTP id D87F21BE26 for ; Fri, 28 Jul 2006 16:34:04 +0200 (CEST) User-Agent: Mozilla Thunderbird 1.0.6-7.1.20060mdk (X11/20050322) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: X-Virus-Scanned: by amavisd-new at elvenkind.net X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:29776 Archived-At: Bernd Militzer wrote: > Am 27.07.2006 um 07:54 schrieb Aditya Mahajan: > > >>You can also do >> >>\def\PID[#1]#2[#3]{\getparameters[PID#1][#3]} >>% #2 is to gobble spaces > > > thanks for that hint Aditya! There is also this (more formal) solution: \def\PID{\dodoubleempty\doPID} \def\doPID[#1][#2]{\getparameters[PID#1][#2]} The core internal macro \dodoubleempty creates empty [] groups if they are not provided in the input. There is also \dosingleempty etc, upto \doseventupleempty Cheers, Taco