[luatex] normaldeviate requires a number?

David Carlisle d.p.carlisle at gmail.com
Sun Nov 13 17:32:59 CET 2016

This document with pdftex


\pdfsetrandomseed 999

\immediate\write20{A: \pdfnormaldeviate}
\immediate\write20{B: \pdfnormaldeviate}
\immediate\write20{C: \pdfuniformdeviate 100}
\immediate\write20{D: \pdfuniformdeviate 100}


produces terminal output of

A: -65925
B: 114111
C: 5
D: 74

I'd have expected from the luatex manual that luatex would be the same
but it gives

This is LuaTeX, Version 1.0.1 (TeX Live 2017/dev)
 restricted system commands enabled.
! Missing number, treated as zero.

You get the expected output from

\immediate\write20{A: \pdfnormaldeviate 0}
\immediate\write20{B: \pdfnormaldeviate 0}

but then of course pdftex gives

A: -659250
B: 1141110

It appears that any number will work and \normaldeviate just gobbles a
following <number> without using it.

Would it be possible to have a pdftex compatible behaviour here, or if
the number is doing something, document in the manual what it does.



More information about the luatex mailing list