3 ms·
The linked LWN article mentions that it’s difficult to put comments in inline LuaTeX macros because those macros remove newlines. To add a comment to the middl
by strenholme 5y ago
The linked LWN article mentions that it’s difficult to put comments in inline LuaTeX macros because those macros remove newlines.
To add a comment to the middle of a line in Lua, use the --[[ comment ]] form:
a = 1 --[[ Set a to 1 ]] print(a)
If we have a comment that has ]] in it, we can do this instead:
a = 1 --[=[ We love [[brackets]] a lot ]=] print(a)
The --[[ (or --[=[ ) form also works for multi-line comments
a = 1 --[[ Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Dictum fusce ut placerat
orci nulla pellentesque dignissim. Quam viverra orci
sagittis eu volutpat odio facilisis mauris. ]] print (a)