From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77958 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: test for (negative) number Date: Tue, 21 Aug 2012 08:56:19 +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 (Mac OS X Mail 6.0 \(1485\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1345532193 19931 80.91.229.3 (21 Aug 2012 06:56:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Aug 2012 06:56:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 21 08:56:33 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 1T3iO8-00040O-NE for gctc-ntg-context-518@m.gmane.org; Tue, 21 Aug 2012 08:56:32 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D15F3101F8; Tue, 21 Aug 2012 08:56:30 +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 CRXT-kbW3bX9; Tue, 21 Aug 2012 08:56:28 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 5EBEC101E7; Tue, 21 Aug 2012 08:56:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 33A5D101E7 for ; Tue, 21 Aug 2012 08:56:27 +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 XRBAGSB52Jqy for ; Tue, 21 Aug 2012 08:56:25 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 756CF101E0 for ; Tue, 21 Aug 2012 08:56:25 +0200 (CEST) Original-Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q7L6uNLg021023 for ; Tue, 21 Aug 2012 08:56:23 +0200 Original-Received: by bkcjc3 with SMTP id jc3so2609900bkc.14 for ; Mon, 20 Aug 2012 23:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=MbpEwYAut5O2IiItLNaJjba3UKRu08gmgKX+zFHfvLQ=; b=LJ9Yx8boZa8rYHjhromvazAFFr8F5S92yTu22zO6CmaMFrYzoB7lvZnBuWdpjdu9lU Btx0MBNZKoaBTKqPnxNgYXx9ISOrgE3OqjP5w7M4mmGnYCtYlkhz58W5fogPi+JiGSBa iOapDazPQV/RPHS86rDp2rhNypqki4VtJrMPUjzRk7mkQ2tI+JUa1LUJFHe2e4g0DUXZ 8dtL7rj34qvBJxTCfEMPKCE11AGCAA0ePpwpklCejURssna2haEvewwkHo1pHZVhAtqB V06GByf1vIp04dYZhFtInGzeERr7C72efR2pcUlITQD0X3o00XsDlF3ozEhxOweY2AYS Gpww== Original-Received: by 10.204.129.208 with SMTP id p16mr4900995bks.129.1345532180669; Mon, 20 Aug 2012 23:56:20 -0700 (PDT) Original-Received: from [192.168.2.36] (p54BAF69C.dip.t-dialin.net. [84.186.246.156]) by mx.google.com with ESMTPS id n5sm216507bkv.14.2012.08.20.23.56.19 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Aug 2012 23:56:19 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1485) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; 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: 07HNiUnbw - bf0efc6a0b6b - 20120821 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) 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:77958 Archived-At: Am 21.08.2012 um 08:32 schrieb Proch=E1zka Luk=E1=9A : > = > On Mon, 20 Aug 2012 20:11:32 +0200, Sietse Brouwer = wrote: > = >> 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 > = > ... Has been wikified - > = > "http://wiki.contextgarden.net/Command/doif=85" For functions in the commands namespace you can write e.g. \ctxcommand{doif= else(=85)}{=85}{=85} instead of \ctxlua{commands.doifelse(=85)}{=85}{=85}. Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________