Difference between revisions of "Command/installcommandhandler"

From ConTeXt wiki
Jump to navigationJump to search
m
(Description. Ish.)
Line 23: Line 23:
 
   <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 30:
  
 
== 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
 +
* ...
  
 
== 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}}
  
  

Revision as of 00:46, 5 June 2012

\installcommandhandler

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: