From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85127 Path: news.gmane.org!not-for-mail From: Pablo Rodriguez Newsgroups: gmane.comp.tex.context Subject: conditional argument and \doifemptyelse Date: Wed, 06 Nov 2013 20:26:26 +0100 Message-ID: <527A97E2.1080003@gmx.es> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383766006 12302 80.91.229.3 (6 Nov 2013 19:26:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Nov 2013 19:26:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 06 20:26:51 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 1Ve8kY-0006g5-7W for gctc-ntg-context-518@m.gmane.org; Wed, 06 Nov 2013 20:26:46 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 110EE101E8; Wed, 6 Nov 2013 20:26:45 +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 mIr30mgVkKBQ; Wed, 6 Nov 2013 20:26:42 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9BF1F101E9; Wed, 6 Nov 2013 20:26:42 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 420FD101E9 for ; Wed, 6 Nov 2013 20:26:41 +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 9QHMDmJSB-5V for ; Wed, 6 Nov 2013 20:26:31 +0100 (CET) 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 8D3F3101E8 for ; Wed, 6 Nov 2013 20:26:31 +0100 (CET) Original-Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rA6JQULd027537 for ; Wed, 6 Nov 2013 20:26:30 +0100 Original-Received: from localhost.localdomain ([81.44.211.218]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MRkhB-1VBvXr1ID3-00Swwh for ; Wed, 06 Nov 2013 20:26:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 X-Provags-ID: V03:K0:iq8VBw/12i3tgqy5CWODgB6HM8C1JUGIgwwzycTdBlyoECUG3UN 3WyghEABOGyrSw1hrpO/P+3WMJdQQ9E/D8xMyDdQOF+9UwdZqOZa/JehAapCM6GkR4uuXuH /v4CJ4dtCVoYLnZMOIhVJBKeKL4kVtBbxTspJCr2odjdSgmIN2g+xWf/yzbkXCG/COpCGtz v5PzevQ0hSUEvwk/+QiwQ== X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=212.227.17.20; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QKKjqusz - 88b1a27297c2 - 20131106 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:85127 Archived-At: 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? Many thanks for your help, Pablo -- = http://www.ousia.tk ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________