Command/ctxcommand

From ConTeXt wiki
< Command
Revision as of 13:01, 29 November 2012 by LuP (talk | contribs)
Jump to navigationJump to search

\ctxcommand

Syntax

\ctxcommand{...}
{...} lua command from in the command table

Description

To quickly access Lua commands in the command table, you can write e.g.

\ctxcommand{doifelse(\userpage < 10)}{early page}{later page}

instead of

\ctxlua{command.doifelse(\userpage < 10)}{early page}{later page}

.

Example

\ctxcommand{doifelse(\userpage < 10)}{early page}{later page}

\ctxcommand vs. \cldcommand vs. \cldcommand

  A
  \ctxlua{commands.doif(true)}{one}
  B
  \cldcommand{doif("a","a","two")}
  C
  \ctxcommand{doif(true)}{three}
  D

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: