From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79979 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: Numerical Calculations Date: Wed, 19 Dec 2012 19:16:32 +0100 Message-ID: <50D20480.6050607@uni-bonn.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355940999 4085 80.91.229.3 (19 Dec 2012 18:16:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2012 18:16:39 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 19 19:16:54 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 1TlOCL-0001mV-Tf for gctc-ntg-context-518@m.gmane.org; Wed, 19 Dec 2012 19:16:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 883AF10200; Wed, 19 Dec 2012 19:16:39 +0100 (CET) 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 Ckf0m-Tob8ds; Wed, 19 Dec 2012 19:16:37 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 74DDC101F7; Wed, 19 Dec 2012 19:16:37 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1CBDA101F7 for ; Wed, 19 Dec 2012 19:16:36 +0100 (CET) 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 5zXdjtxYbwYG for ; Wed, 19 Dec 2012 19:16:35 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 15CF1101E2 for ; Wed, 19 Dec 2012 19:16:35 +0100 (CET) Original-Received: from uni-bonn.de (x23.rhrz.uni-bonn.de [131.220.15.155]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qBJIGWtj027174 for ; Wed, 19 Dec 2012 19:16:33 +0100 Original-Received: from [87.178.23.240] (account tschmit1@uni-bonn.de HELO [192.168.0.37]) by fe2.uni-bonn.de (CommuniGate Pro SMTP 5.4.4) with ESMTPSA id 33024175 for ntg-context@ntg.nl; Wed, 19 Dec 2012 19:16:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=131.220.15.155; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06IBugw32 - 2642f450e580 - 20121219 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:79979 Archived-At: On 12/19/2012 07:09 PM, Troy Henderson wrote: > Is there a way to for ConTeXt to do basic arithmetic operations? For > example, > > \calc{1+2} and have it return 3 or > > \calc{1/3.8} and have it return 0.263157894736842 (or rounded) > > Troy http://wiki.contextgarden.net/Programming_in_LuaTeX#Examples ___________________________________________________________________________________ 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 ___________________________________________________________________________________