![](https://secure.gravatar.com/avatar/ff7bdfe8c3e98152ad014a3095356150.jpg?s=120&d=mm&r=g)
13 Apr
2015
13 Apr
'15
5:53 a.m.
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