A package to simplify inclusion of lua code in a LaTeX document

With the package luacode one can insert luacode from within a (La)TeX document as an environment or a macro. The luacode can define Lua functions or whatever is allowed with Lua. TeX code can be exported by the macros tex.print and tex.sprint.

This tag is for questions specifically about this method. Other questions about lua in LaTeX should tagged with .