From: Taco Hoekwater <taco@elvenkind.com>
Subject: Re: optional arguments, if(nth)argument
Date: Fri, 07 Jan 2005 10:23:48 +0100 [thread overview]
Message-ID: <41DE5524.2010003@elvenkind.com> (raw)
In-Reply-To: <A08CC25C-6018-11D9-AD4B-0030659899AA@fiee.net>
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!
>
> Today I'm trying a lot of new (to me) things...
> This time, a macro with optional arguments and \if...argument :
>
> \def\SkillField{\dodoubleempty\doSkillField}
>
> \def\doSkillField[#1][#2]#3{\bTR\bTD #3
> \iffirstargument\hfill (#1)\fi % don't print when no optional
> argument
> \eTD \bTD
> \ifsecondargument % if second optional arg is provided
> \definefield[#2][line][Skill][#1]\field[#2]
> \else % if no second optional arg
> \definefield[#3][line][Skill][#3]\field[#3]
> \fi
> \eTD\eTR}
>
> e.g.
> \SkillField[+8][Aergern]{Ärgern} % works
> \SkillField[+1]{Labern} % does nothing instead of "else"
> \SkillField{Testen} % does "\hfill (#1)", but should do nothing
>
> Apparently, the \if...argument ... \else don't work as they should.
> Where's my mistake?
>
>
> Grüßlis 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
prev parent reply other threads:[~2005-01-07 9:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-06 19:24 Henning Hraban Ramm
2005-01-07 9:23 ` Taco Hoekwater [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41DE5524.2010003@elvenkind.com \
--to=taco@elvenkind.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).