Hello, while experimenting with \directlua, I noticed that Lua comments ('--') do not work as one would expect, i.e.: \directlua{ function hello() -- Just say hello tex.print("Hello world) end } This results in the error message "end expected at <eof>". Why? Because TeX (most of the time) converts line endings into spaces, to above code is a single line as far as Lua is concerned: \directlua{function hello() -- Just say hello tex.print("Hello world) end} So Lua comment should not be used inside \directlua. TeX comments of course do work. This behaviour is puzzling at first, but then just as expected. Still, I think a note describing this should be in the manual. Jonathan
Jonathan Sauer wrote:
So Lua comment should not be used inside \directlua. TeX comments of course do work.
This behaviour is puzzling at first, but then just as expected. Still, I think a note describing this should be in the manual.
You are right, I will add a note. Thanks, Taco
participants (2)
-
Jonathan Sauer
-
Taco Hoekwater