11 Sep
2006
11 Sep
'06
5:57 a.m.
On Mon, 11 Sep 2006, Aditya Mahajan wrote:
Hi,
I want to define a macro, \doifoneelse, that checks if the first argument is 1 or not. It should work for decimals and strings also. So,
\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?
Ah, it is already defined in context. I was so fixated upon using \ifnum and \ifcase that I did not see \doifelse. Sorry about the noise. Aditya