From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77948 Path: news.gmane.org!not-for-mail From: Sietse Brouwer Newsgroups: gmane.comp.tex.context Subject: Re: test for (negative) number Date: Mon, 20 Aug 2012 20:11:32 +0200 Message-ID: References: <50325F28.6060102@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345486321 19154 80.91.229.3 (20 Aug 2012 18:12:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Aug 2012 18:12:01 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 20 20:12:00 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T3WSF-0002Pd-UZ for gctc-ntg-context-518@m.gmane.org; Mon, 20 Aug 2012 20:12:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 11492101E8; Mon, 20 Aug 2012 20:11:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1F-h56Cjm2db; Mon, 20 Aug 2012 20:11:56 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id ECC92101DF; Mon, 20 Aug 2012 20:11:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4D104101DF for ; Mon, 20 Aug 2012 20:11:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 75r89QNVk1w8 for ; Mon, 20 Aug 2012 20:11:54 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 9ABA2101DD for ; Mon, 20 Aug 2012 20:11:54 +0200 (CEST) Original-Received: from mail-gh0-f169.google.com (mail-gh0-f169.google.com [209.85.160.169]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q7KIBrtS014968 for ; Mon, 20 Aug 2012 20:11:53 +0200 Original-Received: by ghrr18 with SMTP id r18so6434393ghr.14 for ; Mon, 20 Aug 2012 11:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=rvsYV/7rRFVn2JBpzJ6K6Lri243TowOFN8ttpN5OhJo=; b=dl0o5FylkCNoMM24DTQOM4hR84dS9KZbQVFU9Eac4DqLGDUavaDWpU5YY6jrzhzOE2 6idwLVJsaU7vgFa4F2PhGlRHx86G8Anj0Kt6mAMeL2DXf9792J4/lWgwEneunaAhGLvA LC82Ieh/yQ5+X2pvTS3vUKfLhrCT1P1HsbDvq9FXpFpO8tad8BVrEoWUkdqhYY5T5Zk8 3uIQmYhr33U3E0lV093Ou81wlNrGQKN5fRNs9ut1fP8MoS/Ry5Y119rwBVvc7wixkMUF k410mw2vBZ3dpLoxv2/0YxgROzyU3/DeEtZINTQzWIAuNMTNJUr5RigytcAOlmMgA/lr Kx7w== Original-Received: by 10.50.188.129 with SMTP id ga1mr10863331igc.6.1345486312245; Mon, 20 Aug 2012 11:11:52 -0700 (PDT) Original-Received: by 10.64.46.232 with HTTP; Mon, 20 Aug 2012 11:11:32 -0700 (PDT) In-Reply-To: <50325F28.6060102@gmx.net> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.160.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QHN6bRt8 - bc1c88376f71 - 20120820 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:77948 Archived-At: Hi Peter, I recommend using the following handy little idiom: \ctxlua{commands.doifelse(-45 > 0)}{big}{small} % small It lets you do all sorts of things that are tricky in TeX: \ctxlua{ commands.doifelse( string.len( "-45" ) > 5 ) }{long}{short} Cheers, Sietse ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________