Contents
Summary
The command \ctxcommand is used to quickly access Lua commands in the command table.
Settings
Description
Defined as:
\def\ctxcommand #1{\directlua{commands.#1}} % saves tokens
You can write e.g.
\ctxcommand{doifelse(\userpage < 10)}{early page}{later page}
instead of
\ctxlua{commands.doifelse(\userpage < 10)}{early page}{later page}
.
Examples
Example 1
-
\ctxcommand{doifelse(\userpage < 10)}{early page}{later page}
-
\ctxcommand vs. \cldcommand
-
A \ctxlua{commands.doif(true)}{one} B \cldcommand{doif("a","a","two")} C \ctxcommand{doif(true)}{three} D
-