Aditya Mahajan wrote:
On Mon, 11 Sep 2006, Peter M�nster wrote:
On Mon, 11 Sep 2006, Aditya Mahajan wrote:
\doifoneelse{1}{a}{b} gives a \doifoneelse{1.5}{a}{b} gives b \doifonelese{string}{a}{b} gives b
Can someone suggest how to define this?
\def\doifoneelse#1#2#3{\doifelse{1}{#1}{#2}{#3}}
Thanks Peter,
I ended up using
\def\doifoneelse#1{\doifelse{#1}{1}}
which saves a few keystrokes :)
\def\doifoneelse{\doifelse{1}} or \def\doifoneelse{\doifelse1} saves you even more keystrokes and also a bit of runtime (measured in nanoseconds) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------