Difference between revisions of "Command/startctxfunctiondefinition"
< Command
Jump to navigation
Jump to search
(Created page with "Documentation for \startctxfunctiondefinition ... \stopctxfunctiondefinition") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
<cd:commandgroup name="ctxfunctiondefinition" type="environment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807"> | <cd:commandgroup name="ctxfunctiondefinition" type="environment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807"> | ||
− | <cd:shortdesc> | + | <cd:shortdesc><!-- a short command summary goes here --> |
− | <!-- a short command summary goes here --> | + | The environment <tt>\startctxfunctiondefinition ... \stopctxfunctiondefinition</tt> defines a macro that is a lua function without arguments. |
− | The environment <tt>\startctxfunctiondefinition ... \stopctxfunctiondefinition</tt> is | ||
</cd:shortdesc> | </cd:shortdesc> | ||
<cd:variants> | <cd:variants> | ||
Line 16: | Line 13: | ||
</cd:command> | </cd:command> | ||
</cd:variants> | </cd:variants> | ||
− | <cd:description> | + | <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:description> | ||
− | <cd:examples> | + | <cd:examples><cd:example title=""><texcode> |
− | + | \startctxfunctiondefinition foo | |
− | <cd:example title=""> | + | context('hello world') |
− | < | + | \stopctxfunctiondefinition |
− | + | ||
− | </ | + | \foo |
− | <cd: | + | </texcode> |
− | + | </cd:example></cd:examples> | |
− | <cd: | + | <cd:notes></cd:notes> |
− | < | ||
− | |||
− | </cd:notes> | ||
<cd:seealso> | <cd:seealso> | ||
− | + | <cd:commandref name="_ctxfunctiondefinition"></cd:commandref> | |
− | <cd:commandref name=" | + | <cd:commandref name="startctxfunction"></cd:commandref> |
− | <cd: | + | <cd:commandref name="_ctxfunction"></cd:commandref> |
− | <cd: | + | <cd:source file="luat-ini.mkiv" originator="system"></cd:source> |
− | + | <cd:wikipage originator="system" page="Category:Lua"></cd:wikipage></cd:seealso> | |
− | |||
− | |||
− | <cd:source file="luat-ini.mkiv" originator="system"></cd:source> | ||
− | <cd:wikipage originator="system" page="Category:Lua"></cd:wikipage> | ||
− | </cd:seealso> | ||
</cd:commandgroup> | </cd:commandgroup> |
Latest revision as of 16:42, 27 August 2020
Contents
\startctxfunctiondefinition ... \stopctxfunctiondefinition
Summary
The environment \startctxfunctiondefinition ... \stopctxfunctiondefinition defines a macro that is a lua function without arguments.
Settings
Description
This defines a TeX macro without arguments that when expanded runs a block of lua code instead of executing TeX commands.
Examples
Example 1
\startctxfunctiondefinition foo context('hello world') \stopctxfunctiondefinition \foo