From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/66196 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Learning LuaTeX : Invoice Date: Sun, 20 Feb 2011 14:29:42 +0100 Message-ID: <3E26C964-8267-4838-B5AF-DB05CB3BC299@gmail.com> References: <13F84CC8-EB65-4D8E-B2F8-54D8CBE1B32A@fiee.net> <130608E6-A8C0-4B47-943F-C63C926D58E9@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1298208629 6368 80.91.229.12 (20 Feb 2011 13:30:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2011 13:30:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 20 14:30:24 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pr9Ml-0000g1-Fa for gctc-ntg-context-518@m.gmane.org; Sun, 20 Feb 2011 14:30:23 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E5C0ECAA16; Sun, 20 Feb 2011 14:30:20 +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 nlxU3njcbH96; Sun, 20 Feb 2011 14:30:20 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D409BCAA21; Sun, 20 Feb 2011 14:30:07 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8A883CAA21 for ; Sun, 20 Feb 2011 14:30:06 +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 1kG3RF+5TcjL for ; Sun, 20 Feb 2011 14:29:46 +0100 (CET) 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 37A82C9A7C for ; Sun, 20 Feb 2011 14:29:46 +0100 (CET) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter3-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p1KDTjVE026375 for ; Sun, 20 Feb 2011 14:29:45 +0100 Original-Received: by fxm5 with SMTP id 5so318829fxm.14 for ; Sun, 20 Feb 2011 05:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=SfFHgValM7PnrjTIKct3quBqUzbtxaPuZFnudcgY0Vs=; b=JfNA75yqOauxxurXIMONAWrW1A6WKqiW16piHxeLH60FKyuIZYDK/8na8ZiXCfpFLG Zk2NCdKJ9g9bOq5V2Pj4b48xL6uQCXUz9sQIa6Ksun146RW4PPTslTCZFgCE81Q8sOpd 9M2SjLfo31YB3ykB4z0Obj+hlO0K381DwjIjU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=feU54q/HPZU7ytLDlfz2rUFbVcoqMdfb8K5gE4klN/KOEirZonSyARanRrlptYA2F6 WMpKurvnGhSHG+UTF3WXRA+1uZIEjgae5Xo144FKtRxDV1kL6yZ8/vkkdLttydNwgnWq ulFYcX63J0ezAwSQ2Je86oayJTzkfR5MfuJXI= Original-Received: by 10.223.104.145 with SMTP id p17mr439558fao.105.1298208585120; Sun, 20 Feb 2011 05:29:45 -0800 (PST) Original-Received: from [192.168.2.23] (p5B297020.dip.t-dialin.net [91.41.112.32]) by mx.google.com with ESMTPS id y1sm1955859fak.15.2011.02.20.05.29.43 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Feb 2011 05:29:44 -0800 (PST) In-Reply-To: <130608E6-A8C0-4B47-943F-C63C926D58E9@fiee.net> X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.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: 0dEadtJ4Q - 00ead081cef9 - 20110220 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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:66196 Archived-At: Am 20.02.2011 um 13:58 schrieb Henning Hraban Ramm: > \starttabulate[|lw(8cm)|rg(,)w(2cm)|rg(,)w(2cm)|rg(,)w(3cm)|] > %\ctxlua{userdata.InvoiceLine("Play with \\LUATEX", 2.5)} > \ctxlua{userdata.InvoiceLine("Do some \\CONTEXT", 0.5)} > \ctxlua{userdata.InvoiceSumLine("Sum")} > \stoptabulate \startluacode context.starttabulate({"|lw(8cm)|rg(,)w(2cm)|rg(,)w(2cm)|rg(,)w(3cm)|"}) userdata.InvoiceLine("Do some \\CONTEXT", 0.5) userdata.InvoiceSumLine("Sum") context.stoptabulate() \stopluacode > That seems to work so far, but invoice.hours and invoice.sum are always d= oubled! > In my letter setup, it=92s even quadrupled! > I guess my functions gets called several times, but how can I avoid that? The content of tabulate is processed twice to get the information for =93p=94 columns and you get therefore the wrong values in the last row. 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 ___________________________________________________________________________= ________