Command/startctxfunctiondefinition

From Wiki
< Command
Revision as of 14:48, 27 August 2020 by Taco (talk | contribs)
Jump to navigation Jump to search

<cd:commandgroup name="ctxfunctiondefinition" type="environment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807"> <cd:shortdesc> The environment \startctxfunctiondefinition ... \stopctxfunctiondefinition defines a macro that is a lua function without arguments. </cd:shortdesc> <cd:variants> <cd:command category="lua" file="luat-ini.mkiv" interfacedate="2020-06-19T13:41" interfacefile="i-lua.xml" level="system" name="ctxfunctiondefinition" type="environment" variantnumber="1">

  <cd:arguments>
   <cd:keywords delimiters="none" ordinal="1">
    <cd:keywordsdoc></cd:keywordsdoc>
    <cd:constant type="cd:name"></cd:constant>
   </cd:keywords>
  </cd:arguments>
 </cd:command>

</cd:variants> <cd:description>This defines a TeX macro without arguments that when expanded runs a block of lua code instead of executing TeX commands. </cd:description>

<cd:examples><cd:example title="">

\startctxfunctiondefinition foo
  context('hello world')
\stopctxfunctiondefinition

\foo

</cd:example></cd:examples> <cd:notes></cd:notes> <cd:seealso> <cd:commandref name="_ctxfunctiondefinition"></cd:commandref> <cd:commandref name="startctxfunction"></cd:commandref> <cd:commandref name="_ctxfunction"></cd:commandref> <cd:source file="luat-ini.mkiv" originator="system"></cd:source> <cd:wikipage originator="system" page="Category:Lua"></cd:wikipage></cd:seealso> </cd:commandgroup>