From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91002 Path: news.gmane.org!not-for-mail From: Norbert Melzer Newsgroups: gmane.comp.tex.context Subject: Re: Evaluating a Lua expression at the end Date: Mon, 13 Apr 2015 14:05:37 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1983444800==" X-Trace: ger.gmane.org 1428927110 12378 80.91.229.3 (13 Apr 2015 12:11:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Apr 2015 12:11:50 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 13 14:11:37 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YhdCo-0001lg-9U for gctc-ntg-context-518@m.gmane.org; Mon, 13 Apr 2015 14:11:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9D904105CF for ; Mon, 13 Apr 2015 14:11:09 +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 LI9dmvbR6-MK for ; Mon, 13 Apr 2015 14:11:08 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 7D5471024F for ; Mon, 13 Apr 2015 14:10:32 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7313F101FA for ; Mon, 13 Apr 2015 14:10: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 q7oUhT0uvPMx for ; Mon, 13 Apr 2015 14:10:26 +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 628F7101FB for ; Mon, 13 Apr 2015 14:05:39 +0200 (CEST) Original-Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t3DC5cMo009069 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 13 Apr 2015 14:05:38 +0200 Original-Received: by wgin8 with SMTP id n8so78119043wgi.0 for ; Mon, 13 Apr 2015 05:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=t0jlp6nx4GvCwbC0Uk5oZ5XOwUobFe6tlo01YHFz9yA=; b=vwTVVxRDe7YyS0fcwQNi9XS2lXsdo0E6R47BUpNYH+oeSrPeXewQpvIhVIMumL+Wcv 7A8mtStK7Owu/WgCAEWQu7V3uACFMY+mDv1ZMwVmqdOm6FHNGtpgKaxLUJQL2yGQDhBT YyDZIzZpR5PiawWSsWAQiSbVxgRwvSXMyo2K0o71jTZNFmTEK1HQrHUWS/Y5ZgmCk0Am wpdZGvMm/aNoaFt4iEAp4DR8OUtrYftk5u4dHUdCXWE9y0nm1C7t/9Sr3h8otBaI65I9 VEPcaE4RNA9ap1S6XU3c8R54r/jyL3BsIoATjhcRG7WYE6gw3Xhaibq6WsF06cqI8eo+ Mj6g== X-Received: by 10.180.96.65 with SMTP id dq1mr20883053wib.46.1428926738167; Mon, 13 Apr 2015 05:05:38 -0700 (PDT) Original-Received: by 10.28.88.72 with HTTP; Mon, 13 Apr 2015 05:05:37 -0700 (PDT) Original-Received: by 10.28.88.72 with HTTP; Mon, 13 Apr 2015 05:05:37 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c00::22b; country=IE; latitude=53.3478; longitude=-6.2597; http://maps.google.com/maps?q=53.3478,-6.2597&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07Ofo5CSM - ce9312965e9e - 20150413 (trained as not-spam) Received-SPF: pass (filter1-utr.mf.surf.net: domain of timmelzer@gmail.com designates 2a00:1450:400c:c00::22b as permitted sender) receiver=filter1-utr.mf.surf.net; client-ip=2a00:1450:400c:c00::22b; envelope-from=; helo=mail-wg0-x22b.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:91002 Archived-At: --===============1983444800== Content-Type: multipart/alternative; boundary=f46d04343dd0a37da1051399ee16 --f46d04343dd0a37da1051399ee16 Content-Type: text/plain; charset=UTF-8 If it is possible I'd like to wait for the idris book and get that one. If that's not possible I'm interested in http://www.manning.com/blackheath/ Am 13.04.2015 13:54 schrieb "Kumar Appaiah" : > Hi. > > I am trying to set up a system where I can use Lua to find a total > that I can display at the end. For example, if I set a question paper, > after each question, I do a \directlua{total = total + 4}, assuming > this question has 4 points. At the top of my document, I now want to > say "Total points:" and display the value of total. > > Now, naturally, using \directlua gives me 0, since total is 0 at the > beginning. But \latelua didn't seem to be what I am looking for. Could > someone please guide me in the right direction? > > Thanks. > > Kumar > > ___________________________________________________________________________________ > 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 > > ___________________________________________________________________________________ --f46d04343dd0a37da1051399ee16 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

If it is possible I'd like to wait for the idris book an= d get that one. If that's not possible I'm interested in http://www.manning.com/blackheath/=

Am 13.04.2015 13:54 schrieb "Kumar Appaiah&= quot; <a.kumar@alumni.iitm.= ac.in>:
Hi.
I am trying to set up a system where I can use Lua to find a total
that I can display at the end. For example, if I set a question paper,
after each question, I do a \directlua{total =3D total + 4}, assuming
this question has 4 points. At the top of my document, I now want to
say "Total points:" and display the value of total.

Now, naturally, using \directlua gives me 0, since total is 0 at the
beginning. But \latelua didn't seem to be what I am looking for. Could<= br> someone please guide me in the right direction?

Thanks.

Kumar
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" target=3D"_blank"= >http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http= ://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/contextrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--f46d04343dd0a37da1051399ee16-- --===============1983444800== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1983444800==--