From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30729 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Define doifoneelse Date: Mon, 11 Sep 2006 00:45:43 -0400 (EDT) Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1157949960 19837 80.91.229.2 (11 Sep 2006 04:46:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2006 04:46:00 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 11 06:45:58 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1GMdgC-0007xA-Pv for gctc-ntg-context-518@m.gmane.org; Mon, 11 Sep 2006 06:45:56 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A3DC31FCE8; Mon, 11 Sep 2006 06:45:55 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06593-07; Mon, 11 Sep 2006 06:45:52 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8E2C41FCDF; Mon, 11 Sep 2006 06:45:52 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5F8251FCDF for ; Mon, 11 Sep 2006 06:45:50 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07021-03 for ; Mon, 11 Sep 2006 06:45:47 +0200 (CEST) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by ronja.ntg.nl (Postfix) with SMTP id 5AFC01FCBD for ; Mon, 11 Sep 2006 06:45:46 +0200 (CEST) Original-Received: FROM aditya.annarb01.mi.comcast.net (c-68-40-50-205.hsd1.mi.comcast.net [68.40.50.205]) BY hackers.mr.itd.umich.edu ID 4504E9F8.6311.3018 ; 11 Sep 2006 00:45:45 -0400 Original-To: mailing list for ConTeXt users X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:30729 Archived-At: 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