Difference between revisions of "Command/startctxfunctiondefinition"

From Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
<?xml version='1.0'?>
 
<!-- this file was generated on 2020-08-20T09:05 -->
 
 
<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> defines a macro that is a lua function without arguments.
 
</cd:shortdesc>
 
</cd:shortdesc>
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.
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>
<cd:example title="">
+
\startctxfunctiondefinition foo
<texcode>
+
   context('hello world')
\startctxfunctiondefinition foo  
+
\stopctxfunctiondefinition
   context('hello world')  
 
\stopctxfunctiondefinition  
 
  
 
\foo
 
\foo
 
</texcode>
 
</texcode>
</cd:example>
+
</cd:example></cd:examples>
 
+
<cd:notes></cd:notes>
</cd:examples>
 
<cd:notes>
 
<!--  this is for special remarks that do not fit elsewhere, like discovered bugs in specific context versions
 
<cd:note author="..." date="...">
 
</cd:note>
 
-->
 
</cd:notes>
 
 
<cd:seealso>
 
<cd:seealso>
<!-- one or more of these:
 
<cd:commandref name="xx"></cd:commandref>
 
<cd:wikipage  page="xx"></cd:wikipage>
 
<cd:url        url="https://xx"></cd:url>
 
<cd:manual    pdf="xx"></cd:manual>
 
<cd:source    file="xx"></cd:source>
 
-->
 
 
<cd:commandref name="_ctxfunctiondefinition"></cd:commandref>
 
<cd:commandref name="_ctxfunctiondefinition"></cd:commandref>
 
<cd:commandref name="startctxfunction"></cd:commandref>
 
<cd:commandref name="startctxfunction"></cd:commandref>
 
<cd:commandref name="_ctxfunction"></cd:commandref>
 
<cd:commandref name="_ctxfunction"></cd:commandref>
<cd:source file="luat-ini.mkiv" originator="system"></cd:source>  
+
<cd:source file="luat-ini.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Lua"></cd:wikipage>  
+
<cd:wikipage originator="system" page="Category:Lua"></cd:wikipage></cd:seealso>
</cd:seealso>
 
 
</cd:commandgroup>
 
</cd:commandgroup>

Latest revision as of 16:42, 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: