Difference between revisions of "Command/startctxfunctiondefinition"
< Command
Jump to navigation
Jump to search
(Created page with "Documentation for \startctxfunctiondefinition ... \stopctxfunctiondefinition") |
|||
Line 4: | Line 4: | ||
<cd:shortdesc> | <cd:shortdesc> | ||
<!-- a short command summary goes here --> | <!-- a short command summary goes here --> | ||
− | The environment <tt>\startctxfunctiondefinition ... \stopctxfunctiondefinition</tt> is | + | The environment <tt>\startctxfunctiondefinition ... \stopctxfunctiondefinition</tt> defines a macro that is a lua function without arguments. |
</cd:shortdesc> | </cd:shortdesc> | ||
<cd:variants> | <cd:variants> | ||
Line 17: | Line 17: | ||
</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=""> | <cd:example title=""> | ||
+ | <texcode> | ||
+ | \startctxfunctiondefinition foo | ||
+ | context('hello world') | ||
+ | \stopctxfunctiondefinition | ||
+ | |||
+ | \foo | ||
+ | </texcode> | ||
</cd:example> | </cd:example> | ||
− | + | ||
</cd:examples> | </cd:examples> | ||
<cd:notes> | <cd:notes> |
Revision as of 14:46, 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