Expand description
Embedded Lua 5.3 and the LuaTeX Lua API.
LuaTexHost implements the engine’s LuaHost trait. During a
\directlua call the engine is lent to Lua as scoped userdata kept in
the Lua state’s app data ([EngineSlot]). Library functions borrow it
from there, so no Lua object can outlive the borrow. Nested calls
(Lua → TeX → Lua) install a fresh scoped reference and restore the
previous one afterwards.
The libraries follow the LuaTeX reference manual (chapter 10, “The TeX
related libraries”) and are checked against the behaviour of the
reference luatex binary.
Modules§
- luaotfload
- A native replacement for luaotfload.
- nodelib
- The
nodelibrary (LuaTeX manual §10.5) andnode.direct.
Structs§
- LuaTex
Host - The Lua interpreter with LuaTeX’s libraries.
Functions§
- lua_
error_ message - Formats a Lua error the way LuaTeX reports it: the message without mlua’s decorations.
- luac
--luaconly: compiles Lua files to bytecode, withluac’s options-o name(defaulttexluac.out),-s(strip debug information),-p(parse only) and-v(version). Combining several files into one chunk and listings (-l) are not supported.