From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71007 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: How to properly handle synonyms in \getparameters? Date: Sat, 3 Sep 2011 02:46:03 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1315010790 12730 80.91.229.12 (3 Sep 2011 00:46:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 3 Sep 2011 00:46:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 03 02:46:25 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QzeNM-00010s-9s for gctc-ntg-context-518@m.gmane.org; Sat, 03 Sep 2011 02:46:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 96552CAF4E; Sat, 3 Sep 2011 02:46:22 +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 L0tGOh0QEjpg; Sat, 3 Sep 2011 02:46:19 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 57FEDCAF4B; Sat, 3 Sep 2011 02:46:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 12C5DCAF4B for ; Sat, 3 Sep 2011 02:46:17 +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 eiVsEiMMahhE for ; Sat, 3 Sep 2011 02:46:05 +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 328BECAF3D for ; Sat, 3 Sep 2011 02:46:05 +0200 (CEST) Original-Received: from mail-qw0-f45.google.com (mail-qw0-f45.google.com [209.85.216.45]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p830k3Kl023765 for ; Sat, 3 Sep 2011 02:46:04 +0200 Original-Received: by qwj8 with SMTP id 8so2590081qwj.18 for ; Fri, 02 Sep 2011 17:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=hVjdNKJO+LvWQqLjTuiHToAMfFbecfzV5M9z6wjQ21s=; b=xUVtdlf94CotjS+vg0o+N0cVI5iXcNpX3WlsNpwaiyvkTgNsZyBgQxJIsTmnVfjgdi lRLYEljR8UHg5IQ/ZAYcy0w28zi3PwzFS2V7rWqtutTWwTM1HYiJ3cqSMC40a2Y3OGog lyfQhwvsFeEtTXwL7BANc2sewymchO9QT8vvI= Original-Received: by 10.229.22.83 with SMTP id m19mr1235709qcb.236.1315010763408; Fri, 02 Sep 2011 17:46:03 -0700 (PDT) Original-Received: by 10.229.228.17 with HTTP; Fri, 2 Sep 2011 17:46:03 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.216.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rFs0K4sF - 2d73683990a9 - 20110903 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:71007 Archived-At: Dear gurus, This question concerns both MKII and MKIV (I need the functionality in both, even though I will try to rewrite the MKIV part as soon as I have time). I have a command: \mycommand[a][newparam=value] with more or less the following definition: \def\mycommand[#1][#2]{% \getparameters[@@mycommand@#1@][#2] % ... some extra code ... } However I used to use \mycommand[a][oldparam=value] and now I would like to switch the syntax to \mycommand[a][newparam=value] but I would like the oldparam to keep working normally. I will read the value with \@@mycommand@a@newparam. My question: what is the most elegant value to do that? I can imagine something like \def\mycommand[#1][#2]{% \undefinecommand\@@mycommand@a@oldparam % pseudocode \getparameters[@@mycommand@#1@][#2] \doifdefined{\@@mycommand@a@oldparam} \let\@@mycommand@a@newparam\@@mycommand@a@oldparam % ... some extra code ... } but there is most probably some more elegant solution to that? Thank you, Mojca ___________________________________________________________________________________ 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 ___________________________________________________________________________________