I'm working on a LuaLaTeX-Document project using my laptop and a desktop PC. The document contains a LuaLaTeX script to enable C-Style comments (link). However, while compilation works fine on my laptop, on the desktop PC the error

! LuaTeX error ./cStyleComments.lua:30: attempt to index global 'luatexbase' (a 
nil value)
stack traceback:
    ./cStyleComments.lua:30: in main chunk
    [C]: in function 'require'
    [\directlua]:1: in main chunk.
l.24 \directlua{require("cStyleComments.lua")}


cStyleComments.lua contains the definition of comments method and line 30, which reads:

luatexbase.add_to_callback('process_input_buffer', comment, 'comment')

LuaLaTeX version on laptop: beta-0.80.0
LuaLaTeX version on PC: beta-0.79.1 (I have no sudo, so I cannot upgrade).

1 Answer 1


The solution was to use the luatexbase package:


However I don't know why it works without on the laptop system.

  • I may be wrong, but perhaps this is caused by one of your systems not to have the latest packages versions?
    – Moriambar
    Apr 10, 2017 at 12:36
  • 2
    the code from luatexbase has been added to the kernel in a newer latex. Apr 10, 2017 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.