From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Learning LuaTeX : Invoice
Date: Sun, 20 Feb 2011 14:29:42 +0100 [thread overview]
Message-ID: <3E26C964-8267-4838-B5AF-DB05CB3BC299@gmail.com> (raw)
In-Reply-To: <130608E6-A8C0-4B47-943F-C63C926D58E9@fiee.net>
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 doubled!
> In my letter setup, it’s 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
“p” 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 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
___________________________________________________________________________________
next prev parent reply other threads:[~2011-02-20 13:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-20 11:55 Henning Hraban Ramm
2011-02-20 12:07 ` Henning Hraban Ramm
2011-02-20 12:08 ` Wolfgang Schuster
2011-02-20 12:58 ` Henning Hraban Ramm
2011-02-20 13:29 ` Wolfgang Schuster [this message]
2011-02-20 13:29 ` Henning Hraban Ramm
2011-02-20 13:41 ` Wolfgang Schuster
2011-02-20 14:49 ` Henning Hraban Ramm
2011-02-20 15:12 ` Hans Hagen
2011-02-20 15:09 ` Hans Hagen
2011-02-20 19:16 ` Henning Hraban Ramm
2011-02-20 20:20 ` Philipp Gesang
2011-02-20 20:28 ` Wolfgang Schuster
2011-02-20 23:28 ` Hans Hagen
2011-02-22 9:47 ` Henning Hraban Ramm
2011-02-22 9:51 ` luigi scarso
2011-02-22 10:01 ` Wolfgang Schuster
2011-02-22 10:14 ` luigi scarso
2011-02-22 10:55 ` Henning Hraban Ramm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E26C964-8267-4838-B5AF-DB05CB3BC299@gmail.com \
--to=schuster.wolfgang@googlemail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).