Difference between revisions of "Command/installcommandhandler"

From Wiki
Jump to navigation Jump to search
m (minus auto)
 
(3 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>installcommandhandler</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
Line 8: Line 11:
 
   <tr>
 
   <tr>
 
     <td colspan="2" class="cmd">\installcommandhandler<!--
 
     <td colspan="2" class="cmd">\installcommandhandler<!--
       --><span class="first">''\??self</span><!--
+
       --><span class="first">''\??self''</span> <!--
       --><span class="second">''name''</span><!--
+
       --><span class="second">''name''</span> <!--
 
       --><span class="third">''\??parent''</span><!--
 
       --><span class="third">''\??parent''</span><!--
 
  --></td>
 
  --></td>
Line 23: Line 26:
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
 
     <td class="cmd">''\??parent''</td>
 
     <td class="cmd">''\??parent''</td>
     <td><i>''can be \??self''</i></td>
+
     <td><i>''in practice, always equal to \??self''</i></td>
 
   </tr>
 
   </tr>
  
Line 30: Line 33:
  
 
== Description ==  
 
== Description ==  
 +
The generalized way to install a new command, and the accompanying <code>\setup...</code> command, and handlers, etc.
  
 +
Defines the following commands:
 +
* <code>\setup''name''</code>
 +
* <code>\current''name''</code>
 +
* <code>\install''name''method</code>
 +
* ...
  
 
== Example ==
 
== Example ==
  
 +
Setting default values:
 +
<texcode>
 +
\setupitemgroup
 +
  [\c!margin=\zeropoint,  % \c!key=\command
 +
  \c!indentnext=\v!yes    % \c!key=\v!keyword
 +
</texcode>
  
 
== See also ==
 
== See also ==
 +
* {{cmd|installcorenamespace}}
  
  

Latest revision as of 16:26, 11 November 2019

\installcommandhandler

Syntax (autogenerated)

\installcommandhandler\command{...}\command
\commandcsname
{...}name
\commandcsname


Syntax

\installcommandhandler\??self name \??parent
\??self text
name text
\??parent in practice, always equal to \??self

Description

The generalized way to install a new command, and the accompanying \setup... command, and handlers, etc.

Defines the following commands:

  • \setupname
  • \currentname
  • \installnamemethod
  • ...

Example

Setting default values:

\setupitemgroup
  [\c!margin=\zeropoint,   % \c!key=\command
   \c!indentnext=\v!yes    % \c!key=\v!keyword

See also


Help from ConTeXt-Mailinglist/Forum

All issues with: