[luatex] Problem with callback // LaTeX

Patrick Gundlach patrick at gundla.ch
Tue Oct 22 14:23:43 CEST 2019

Hello all,

this is probably more a LuaLaTeX question. I experience problems with the page_objnum_provider callback (PDF won't open in Adobe Acrobat) and to make a minimal example, I tried this LuaLaTeX snippet:


  function shuffle(objnum) return objnum end
  luatexbase.add_to_callback("page_objnum_provider",shuffle,"my shuffle")

text text
text text
text text

Now I get the following messages from the command line:

callback should return a number, not: nil

But I do return a number (the original object number).

Is there something I did wrong?


The terminal output:

$ lualatex test
This is LuaTeX, Version 1.10.0 (TeX Live 2019) 
 restricted system commands enabled.
LaTeX2e <2019-10-01> patch level 1

luaotfload | main : initialization completed in 0.155 seconds
Document Class: article 2019/08/27 v1.4j Standard LaTeX document class
(./test.aux) [1{/opt/texlive2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
 [2] [3] (./test.aux))
 377 words of node memory still in use:
   2 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 44 glue_spec
, 4 attribute_list, 1 write nodes
   avail lists: 2:15,3:2,4:1,5:21,6:1,7:22,9:7
</opt/texlive2019/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf>callback should return a number, not: nil
callback should return a number, not: nil
callback should return a number, not: nil

Output written on test.pdf (3 pages, 3577 bytes).
Transcript written on test.log.

More information about the luatex mailing list