Difference between revisions of "Command/startctxfunctiondefinition"

From Wiki
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 used for ...
+
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>
<!-- the long description of the command goes here -->
+
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>
<!--  command example(s)
 
 
<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


\startctxfunctiondefinition ... \stopctxfunctiondefinition

Summary

The environment \startctxfunctiondefinition ... \stopctxfunctiondefinition defines a macro that is a lua function without arguments.

Settings

\startctxfunctiondefinition ... ... \stopctxfunctiondefinition
... name

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

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: