Closed FOCCOF closed 4 years ago
Thanks for the report, the test file was Ok as recently as texlive 2018. I assume this is Lua 5.3 introducing the integer type that has broken it, we'll fix.
@davidcarlisle I added the math.floor and will upload to ctan.
Funny, we already had this in l3luatex
!
fix has been sent to ctan.
Problem : \pdf@elapsedtime defined for LuaTeX (in pdftexcmds.lua) says at the end :+1:
tex.write(string.format("%d", val))
while it should probably say :+1:
tex.write(string.format("%d", math.floor(val)))
Because `val' is not an integer but a float, which has to be truncated before printing.
------- MINIMAL EXAMPLE FOR lualatex ----------------------------------- \documentclass {minimal} \usepackage {pdftexcmds}
\begin{document}\makeatletter
\showthe\pdf@elapsedtime
\end{document}
-------------- ERROR -------------------------------------------------------------------- \showthe\pdf@elapsedtime
\pdf@elapsedtime ->\numexpr \pdftexcmds@directlua {oberdiek.pdftexcmds.elapsedtime()}\relax {\directlua} C:/texmf/scripts/pdftexcmds/pdftexcmds.lua:291: bad argument #2 to 'format' (number has no integer representation) stack traceback: [C]: in function 'string.format' C:/texmf/scripts/pdftexcmds/pdftexcmds.lua:291: in field 'elapsedtime' [\directlua]:1: in main chunk. \pdf@elapsedtime ...diek.pdftexcmds.elapsedtime()} \relax