From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85128 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: conditional argument and \doifemptyelse Date: Wed, 6 Nov 2013 22:33:33 +0100 Message-ID: <0D0FACCC-B06A-433A-B9C0-F73122A23F4B@gmail.com> References: <527A97E2.1080003@gmx.es> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1816\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383773621 4438 80.91.229.3 (6 Nov 2013 21:33:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Nov 2013 21:33:41 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 06 22:33:43 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VeAjN-0002ZZ-Ij for gctc-ntg-context-518@m.gmane.org; Wed, 06 Nov 2013 22:33:41 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A1618101E9; Wed, 6 Nov 2013 22:33:40 +0100 (CET) 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 rr+Mn3HTeStk; Wed, 6 Nov 2013 22:33:39 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id F26E3101EB; Wed, 6 Nov 2013 22:33:38 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 520EC101EB for ; Wed, 6 Nov 2013 22:33:37 +0100 (CET) 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 krpZN2Id57uR for ; Wed, 6 Nov 2013 22:33:36 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 7FFFA101E9 for ; Wed, 6 Nov 2013 22:33:36 +0100 (CET) Original-Received: from mail-bk0-x232.google.com (mail-bk0-x232.google.com [IPv6:2a00:1450:4008:c01::232]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rA6LXZi9009522 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 6 Nov 2013 22:33:35 +0100 Original-Received: by mail-bk0-f50.google.com with SMTP id v15so33350bkz.37 for ; Wed, 06 Nov 2013 13:33:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=3eoZACR1zKKAVFzcDvLH7YpUOMQf6EpZLmplr/Du6uM=; b=as2Zd9mv3tFEJpiGnj3Ec9FoeXoKJGNu/mbZj+okXh7WTz6afh3jnWM/v7jvkuNWTX Ub3bO94AB/1shdUO01cP3Ho1uVPaBaYdv4pS0d4DB62w51KlIlsK9KIoCcJ+3iFkwDlk 8kNtF9ZA6q137t6GOV3XLYU1oxGShpl43uMZcfOdafNeRbeVdE6iVGgpnbMEiuNvirMV LToJRcwuKyoJMQZjnOdkY+dDyrUdpKnKd2Y3UOmza8kI7x9vznUBKtrFWMYDrkYg8MbS eTsrdSRVV0L8S+HkAB4HnPwaR2bVXxhG8l/BqtFLJnuZTb+6pVoJyY7U4SAdxuFJ6E7o rBNg== X-Received: by 10.204.230.17 with SMTP id jk17mr3879341bkb.6.1383773615043; Wed, 06 Nov 2013 13:33:35 -0800 (PST) Original-Received: from keima.localdomain (x2f23f07.dyn.telefonica.de. [2.242.63.7]) by mx.google.com with ESMTPSA id t2sm137617bkh.3.2013.11.06.13.33.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 13:33:33 -0800 (PST) In-Reply-To: <527A97E2.1080003@gmx.es> X-Mailer: Apple Mail (2.1816) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4008:c01::232; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VKKlxzCj - d79d98fbefde - 20131106 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85128 Archived-At: Am 06.11.2013 um 20:26 schrieb Pablo Rodriguez : > Dear list, > = > I=92m trying to define a command that has a conditional argument: > = > \def\MyCommand#1#2#3{#1, #2, \doifemptyelse{#3}{#1}{#3}} > \starttext > \MyCommand{first}{second} > \stoptext > = > The problem is that \doifemtpyelse only works if there the third > argument is there as {}. And the third argument is actually an exception > to workaround an unwanted behavior of the command in very few > exceptional cases. > = > Is there no way to make \MyCommand above work with \doifemptyelse even > if its third argument is not defined? \def\MyCommand {\dotriplegroupempty\doMyCommand} = \def\doMyCommand#1#2#3% {#1, #2, \ifthirdargument #3\else #1\fi} \starttext \MyCommand{first}{second}{third} \MyCommand{first}{second} \stoptext Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________