From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17776 Path: main.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: optional arguments, if(nth)argument Date: Fri, 07 Jan 2005 10:23:48 +0100 Message-ID: <41DE5524.2010003@elvenkind.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1105089841 15028 80.91.229.6 (7 Jan 2005 09:24:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Jan 2005 09:24:01 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 07 10:23:55 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CmqLb-0007LQ-00 for ; Fri, 07 Jan 2005 10:23:55 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DA97D127A6; Fri, 7 Jan 2005 10:23:54 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05763-05; Fri, 7 Jan 2005 10:23:52 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C63BE127A0; Fri, 7 Jan 2005 10:23:52 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EDD68127A0 for ; Fri, 7 Jan 2005 10:23:51 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05766-03 for ; Fri, 7 Jan 2005 10:23:51 +0100 (CET) Original-Received: from glenfiddich.elvenkind.com (unknown [213.84.171.68]) by ronja.ntg.nl (Postfix) with ESMTP id 404591279E for ; Fri, 7 Jan 2005 10:23:51 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id E9F9C392C3 for ; Fri, 7 Jan 2005 10:20:23 +0100 (CET) Original-Received: from glenfiddich.elvenkind.com ([127.0.0.1]) by localhost (glenfiddich.elvenkind.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27093-04 for ; Fri, 7 Jan 2005 10:20:21 +0100 (CET) Original-Received: from [10.10.0.6] (glenlivet.elvenkind.com [10.10.0.6]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 9C2D618603 for ; Fri, 7 Jan 2005 10:20:21 +0100 (CET) User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) 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: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17776 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17776 Hi, There is interference with the \bTR macro. It works fine with all TABLE commands removed. The table macros like \bTR and \bTD themselves use \dodoubleempty. Greetings, Taco Henning Hraban Ramm wrote: > Hello again! >=20 > Today I'm trying a lot of new (to me) things... > This time, a macro with optional arguments and \if...argument : >=20 > \def\SkillField{\dodoubleempty\doSkillField} >=20 > \def\doSkillField[#1][#2]#3{\bTR\bTD #3 > \iffirstargument\hfill (#1)\fi % don't print when no optional=20 > argument > \eTD \bTD > \ifsecondargument % if second optional arg is prov= ided > \definefield[#2][line][Skill][#1]\field[#2] > \else % if no second optional arg > \definefield[#3][line][Skill][#3]\field[#3] > \fi > \eTD\eTR} >=20 > e.g. > \SkillField[+8][Aergern]{=C4rgern} % works > \SkillField[+1]{Labern} % does nothing instead of "else" > \SkillField{Testen} % does "\hfill (#1)", but should do nothing >=20 > Apparently, the \if...argument ... \else don't work as they should. > Where's my mistake? >=20 >=20 > Gr=FC=DFlis vom Hraban! > --- > http://www.fiee.net/texnique/ > http://contextgarden.net > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context