Help:Command reference

From ConTeXt wiki

This page is about editing command reference pages. For editing this wiki in general, see ConTeXt_wiki:Editing.

The command reference pages under Commands have a common structure: a rather typical syntax usage table at the top, followed by a description, some examples, and suggestions for other pages to look at. These sections are described below.

If you want to create a new command page, skip ahead to the Command page template section below.

The structure of a command reference page


A table, implemented in HTML for now, that is set up along the following lines.

[...] text
key value
key default variant other
[...] text

Let us examine the following example:

[...]left right here top bottom inleft inright inmargin margin leftmargin rightmargin leftedge rightedge innermargin outermargin inneredge outeredge inner outer regel high low fit page opposite always force tall reset line height depth

You would not type \placefloat in your TeX-text, but rather a previously defined kind of float, figure for example. So the command would be \\placefigure. The first two arguments of \placefloat are optional (red color), the second two are mandatory. The first argument takes one of the mentioned keywords. If not given, it uses the one in bold: here. ref stands for a reference label; just insert a name that you want to refer to later. In the third and fourth argument text is in italics; so it is not a keyword, but a (terse) description of what you can enter. In this case, you can enter any kind of text.


This is for describing what the command does. How does it affect the layout? Does it create other commands, like \defineparagraphs[MyPars] creates \startMyPars and \setupMyPars? Does it need specific circumstances, like \setuparranging[XY] requires \setuppaper[nx=..., ny=...] to be set first?


Preferably a compiled example created with <context source=yes>...</context>, but if the example won't compile, or the result does not display well, then <texcode>...</texcode> is also acceptable.

See also

You want a bulleted list here, practically always. Link to commands with the {{cmd}} template, to the relevant source files with the {{src}} template, and to pages with ordinary [[wikilinks]].


All commands should have at least one category link of the form [[Category:Command/Subcategory|somecommand]]. You can visit Category:Commands to see the ones that are not yet categorized. Putting a page in multiple categories is encouraged.


See {{Columns navbox}} for an example, and Wikiproject Navboxes for navboxes in general. The eventual intention is to have a navbox on every page, with three (or four groups) in it:

  • Topic articles
  • Commands
  • Example snippets
  • (PDF manuals)

This would neatly bind together the various kinds of documentation this wiki provides, and equally bind together related commands and pages, and look neat on every page.

Command page template

To create a new command page, navigate to the page you want to create, (e.g. Command/thecommandinquestion,) and copy the template below. The {{subst:SUBPAGENAME}} template means the insertion of the proper command name is taken care of.


== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
    <td colspan="2" class="cmd">\{{subst:SUBPAGENAME}}<!--
      --><span class="first">[...]</span><!--
      --><span class="second">[...]</span><!--
      --><span class="third">[...]</span><!--
  <tr valign="top" class="first">
    <td class="cmd">[...]</td>
  <tr valign="top" class="second">
    <td class="cmd">[...]</td>
  <tr valign="top" class="third">
    <td class="cmd">[...]</td>

== Description == 

== Example ==
<!-- something like this:
<context source=yes>
Or use <texcode> tags if the example doesn't compile on this wiki

== See also ==
<!-- something like this:
* {{cmd|setuphead}}
* {{src|strc-sec.mkiv#l299}}

== Help from ConTeXt-Mailinglist/Forum ==
All issues with: