ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Define doifoneelse
@ 2006-09-11  4:45 Aditya Mahajan
  2006-09-11  5:57 ` Aditya Mahajan
  2006-09-11  9:57 ` Peter Münster
  0 siblings, 2 replies; 5+ messages in thread
From: Aditya Mahajan @ 2006-09-11  4:45 UTC (permalink / raw)


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?

Thanks,
Aditya

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-09-11 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-11  4:45 Define doifoneelse Aditya Mahajan
2006-09-11  5:57 ` Aditya Mahajan
2006-09-11  9:57 ` Peter Münster
2006-09-11 16:14   ` Aditya Mahajan
2006-09-11 19:11     ` Hans Hagen

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).