![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Use tonumber. %%%%%% \starttext \cldcontext{\lastpage + 1} \cldcontext{"\lastpage" + 1} \cldcontext{tonumber("\lastpage") + 1} \stoptext %%%%%% Wolfgang Pablo Rodriguez schrieb am 09.08.18 um 20:02:
Dear list,
I have the following sample
\starttext \startTEXpage[offset=1em] Pages: \ctxlua{context([[\lastpage]])}.
Next page: \ctxlua{context([[\lastpage]] + 1)}.
(Lua \luaversion) \stopTEXpage \stoptext
With Lua-5.2 (ConTeXt with JIT), I get the expected results. But with Lua-5.3 (standard ConTeXt), I get 2.0 as the value for the next page.
I’m afraid that there is a bug here. I was told that the integer type has been introduced in Lua-5.3.
I had experienced the same issue with the handlecsv module. In my very limited understanding of the issue, integers are displayed as .0 floats. I wonder which would be the way to fix it.
Is this a real bug or am I missing something?
Many thanks for your help,
Pablo