From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/76793 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: feature request for \getspr{} Date: Fri, 08 Jun 2012 10:02:11 +0200 Message-ID: <4FD1B183.8040102@wxs.nl> References: <87ipf2tfrm.fsf@micropit.couberia.bzh> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1339142548 1472 80.91.229.3 (8 Jun 2012 08:02:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jun 2012 08:02:28 +0000 (UTC) To: ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jun 08 10:02:27 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 1Scu9I-0005pk-Tk for gctc-ntg-context-518@m.gmane.org; Fri, 08 Jun 2012 10:02:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2B129101EB; Fri, 8 Jun 2012 10:02:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id H-pf4dLvDen6; Fri, 8 Jun 2012 10:02:22 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7721D101E0; Fri, 8 Jun 2012 10:02:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7FA17101E0 for ; Fri, 8 Jun 2012 10:02:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Re0muZ-yV33B for ; Fri, 8 Jun 2012 10:02:20 +0200 (CEST) Original-Received: from filter3-nij.mf.surf.net (filter3-nij.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 43F1B101DD for ; Fri, 8 Jun 2012 10:02:20 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter3-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q5882Ja5025626 for ; Fri, 8 Jun 2012 10:02:19 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 5.3h2) with ESMTP (TLS) id 5491-1713362 for ; Fri, 08 Jun 2012 10:02:17 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20120604 Thunderbird/13.0 In-Reply-To: <87ipf2tfrm.fsf@micropit.couberia.bzh> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=03; city=Hattem; latitude=52.4724; longitude=6.0696; http://maps.google.com/maps?q=52.4724,6.0696&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0dHjI2jTP - e30a1350da08 - 20120608 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.13 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 Xref: news.gmane.org gmane.comp.tex.context:76793 Archived-At: On 8-6-2012 09:38, Peter M=FCnster wrote: > Hi, > > It would be nice, if \getspr{} of the m-spreadsheet module could print a > comma instead of a dot as decimal-point. > > For now, I use this workaround: > > --8<---------------cut here---------------start------------->8--- > function spreadsheets.get(name,r,c,str) > if name =3D=3D "" then name =3D current if name =3D=3D "" then name = =3D "default" end end > if not str or str =3D=3D "" then > context(data[name][c][r] or 0) > else > local result =3D execute(name,r,c,str) > if result then > if type(result) =3D=3D "number" then > data[name][c][r] =3D result > end > if userdata and userdata.spreadsheet_use_comma then > result =3D tostring(result) > result =3D result:gsub("%.", ",") > end > context(result) > end > end > end > --8<---------------cut here---------------end--------------->8--- I've added moduledata.spreadsheets.settings.numberseparator but you have = to test it after the next upload. (Typpically oen of those modules that I'd forgotten about.) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________