951 bytes added
, 08:19, 21 August 2012
{{Reference
|name=ctxcommand
|attributes=
}}
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
<tr>
<td colspan="2" class="cmd">\ctxcommand<!--
--><span class="first">{...}</span><!--
--></td>
</tr>
<tr valign="top" class="first">
<td class="cmd">{...}</td>
<td>''lua command from in the'' command ''table''</td>
</tr>
</table>
== Description ==
To quickly access Lua commands in the {{code|command}} table, you can write e.g.
<texcode>
\ctxcommand{doifelse(\userpage < 10)}{early page}{later page}
</texcode>
instead of
<texcode>
\ctxlua{command.doifelse(\userpage < 10)}{early page}{later page}
</texcode>
.
== Example ==
<context source=yes mode=mkiv>
\ctxcommand{doifelse(\userpage < 10)}{early page}{later page}
</context>
== See also ==
* {{cmd|ctxlua}}
== Help from ConTeXt-Mailinglist/Forum ==
All issues with:
{{Forum|{{SUBPAGENAME}}}}
[[Category:Command/LuaTeX|ctxcommand]]