Difference between revisions of "Command/installcommandhandler"

From Wiki
Jump to navigation Jump to search
m (moved Command/installautocommandhandler to Command/installcommandhandler: installautocommandhandler is too rare, I'm not bothering to give it its own page)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{Reference
 
{{Reference
|name=installautocommandhandler
+
|name=installcommandhandler
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>installcommandhandler</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
   <tr>
 
   <tr>
     <td colspan="2" class="cmd">\installautocommandhandler<!--
+
     <td colspan="2" class="cmd">\installcommandhandler<!--
       --><span class="first">{...}</span><!--
+
       --><span class="first">''\??self''</span> <!--
       --><span class="second">{...}</span><!--
+
       --><span class="second">''name''</span> <!--
 +
      --><span class="third">''\??parent''</span><!--
 
  --></td>
 
  --></td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">{...}</td>
+
     <td class="cmd">''\??self''</td>
 
     <td><i>text</i> </td>
 
     <td><i>text</i> </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="second">
 
   <tr valign="top" class="second">
     <td class="cmd">{...}</td>
+
     <td class="cmd">''name''</td>
     <td><i>text</i> </td>
+
     <td><i>''text''</i> </td>
 +
  </tr>
 +
  <tr valign="top" class="third">
 +
    <td class="cmd">''\??parent''</td>
 +
    <td><i>''in practice, always equal to \??self''</i></td>
 
   </tr>
 
   </tr>
 +
  
 
</table>
 
</table>
  
 
== 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}}
  
  
Line 36: Line 58:
 
{{Forum|{{SUBPAGENAME}}}}
 
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Command/Internals|installautocommandhandler]]
+
[[Category:Command/Internals|installcommandhandler]]

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: