Skip to content

Instantly share code, notes, and snippets.

@hmenke
Last active April 23, 2018 11:06
Show Gist options
  • Save hmenke/5a78f123644b42c6e83d5137c8263d75 to your computer and use it in GitHub Desktop.
Save hmenke/5a78f123644b42c6e83d5137c8263d75 to your computer and use it in GitHub Desktop.
Absolutely minimal boilerplate for a luacode environment
\protected\def\startluacode
{\begingroup
\catcode`\^^M=12
\catcode`\%=12
\catcode`\#=12
\startluacodeindeed}
\def\startluacodeindeed#1\stopluacode
{\expanded{\noexpand\endgroup\directlua{#1}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment