Difference between revisions of "Command Syntax"
Jump to navigation
Jump to search
m |
m (still far from finished) |
||
Line 1: | Line 1: | ||
'''WARNING: this page has to be finished first, than reviewed! Don't rely on actual information.''' | '''WARNING: this page has to be finished first, than reviewed! Don't rely on actual information.''' | ||
− | + | == Command == | |
− | + | Command consists of: | |
+ | <!-- table --> | ||
+ | {| | ||
+ | |- | ||
+ | | <code>\</code> || leading backslash | ||
+ | |- | ||
+ | | <code>name</code> || command name | ||
+ | |- | ||
+ | | <code>{ }</code> || scope or range of the command (if applicable) | ||
+ | |- | ||
+ | | <code>[ ]</code> || setups (if applicable) | ||
+ | |- | ||
+ | | <code>$$ $$</code> || math input (if applicable) | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | <pre>\placeformula[...]{...}$$...$$</pre> | ||
+ | |||
+ | |||
+ | == Find definition == | ||
− | + | There are several places where you can search for command definitions: | |
− | + | * [http://www.pragma-ade.com/general/qrcs/setup-en.pdf| setup-en.pdf] (and appropriate language variants) most up-to-date ConTeXt command reference (is this generated from [[source:cont-en.xml| cont-en.xml]]?) | |
+ | * [[manual:cont-eni.pdf|ConTeXt manual]] | ||
+ | * [http://texshow.contextgarden.net/ texshow-web] on-line command reference (is this generated from [[source:cont-en.xml| cont-en.xml]]?) | ||
+ | * [http://levana.de/emacs| etexshow] emacs browser for ConTeXt commands (is this generated from [http://texshow.contextgarden.net/ texshow-web]?) | ||
+ | * xml description in [[source:cont-en.xml| cont-en.xml]] (and appropriate language variants) (typed manually or generated from sources?) | ||
− | + | In these sources there is different '''referencing of arguments''' to thier possible values and fifferent '''typographic conventions'''. | |
− | |||
− | |||
− | |||
− | |||
− | == | + | == Referencing of arguments == |
− | |||
− | + | Example: [[cmd:setupheadertexts|\setupheadertexts]] | |
*in the manual: | *in the manual: | ||
Line 36: | Line 54: | ||
<span style='color: #6495ED'>.3. <text> <section> date <mark> pagenumber</span> | <span style='color: #6495ED'>.3. <text> <section> date <mark> pagenumber</span> | ||
− | == | + | == Typographic conventions == |
− | + | As you can see in in previous examples, command references have different typographic conventions. | |
− | |||
− | |||
− | |||
− | |||
− | Following table shows their notation. | + | Following table explains the meaning of values and shows their notation in different sources. |
{| border="1" | {| border="1" | ||
|- | |- | ||
− | | || | + | | || meaning || [http://www.pragma-ade.com/general/qrcs/setup-en.pdf | setup-en.pdf] || [[manual:cont-eni.pdf|ConTeXt manual]] || [http://texshow.contextgarden.net/ texshow-web] || [http://levana.de/emacs| etexshow] || [[source:cont-en.xml | cont-en.xml]] |
|- | |- | ||
− | | | + | | default || x || x || x || x || x || x |
|- | |- | ||
− | | | + | | predefined || x || x || x || x || x || x |
|- | |- | ||
− | | | + | | user input || x || x || x || x || x || x |
|- | |- | ||
− | | | + | | text || x || x || x || x || x || x |
|- | |- | ||
− | | | + | | number || x || x || x || x || x || x |
|- | |- | ||
− | |||
|- | |- | ||
− | | | + | | reference || x || x || x || x || x || x |
|- | |- | ||
− | | | + | | identifier|| x || x || x || x || x || x |
|- | |- | ||
− | | | + | | key=value pair || x || x || x || x || x || x |
+ | |- | ||
+ | | triplet || x || x || x || x || x || x | ||
+ | |- | ||
+ | | list of || x || x || x || x || x || x | ||
+ | |- | ||
+ | | command || x || x || x || x || x || x | ||
+ | |- | ||
+ | |- | ||
+ | | ...,...,... || x || x || x || x || x || x | ||
+ | |- | ||
+ | | || x || x || x || x || x || x | ||
+ | |- | ||
+ | |- | ||
+ | | || x || x || x || x || x || x | ||
+ | |- | ||
+ | | || x || x || x || x || x || x | ||
|- | |- | ||
|} | |} | ||
+ | |||
+ | == Other notes == | ||
+ | |||
+ | * In LaTeX optional arguments come before mandatory arguments. This is not true in ConTeXt. Optional argument can be at any position. | ||
+ | \definetextvariable | ||
+ | * If <code>key=value</code> pair is missing the value, than the key is assigned the default value. | ||
+ | <code>location=</code> | ||
+ | |||
+ | |||
== Contexgarden wiki == | == Contexgarden wiki == |
Revision as of 10:28, 31 July 2006
WARNING: this page has to be finished first, than reviewed! Don't rely on actual information.
Contents
Command
Command consists of:
\ |
leading backslash |
name |
command name |
{ } |
scope or range of the command (if applicable) |
[ ] |
setups (if applicable) |
$$ $$ |
math input (if applicable) |
\placeformula[...]{...}$$...$$
Find definition
There are several places where you can search for command definitions:
- setup-en.pdf (and appropriate language variants) most up-to-date ConTeXt command reference (is this generated from cont-en.xml?)
- ConTeXt manual
- texshow-web on-line command reference (is this generated from cont-en.xml?)
- etexshow emacs browser for ConTeXt commands (is this generated from texshow-web?)
- xml description in cont-en.xml (and appropriate language variants) (typed manually or generated from sources?)
In these sources there is different referencing of arguments to thier possible values and fifferent typographic conventions.
Referencing of arguments
Example: \setupheadertexts
- in the manual:
\setupheadertexts[.1.][.2.][.3.] .1. text margin edge .2. text section date mark pagenumber .3. text section date mark pagenumber
- in the texshow
\setupheadertexts[.1.][.2.][.3.] .1. text margin edge .2. text section date mark pagenumber .3. text section date mark pagenumber
- in the emacs help
\setupheadertexts[.1.][.2.][.3.] .1. <text> margin edge .2. <text> <section> date pagenumber .3. <text> <section> date pagenumber
Typographic conventions
As you can see in in previous examples, command references have different typographic conventions.
Following table explains the meaning of values and shows their notation in different sources.
meaning | setup-en.pdf] | ConTeXt manual | texshow-web | etexshow] | cont-en.xml | |
default | x | x | x | x | x | x |
predefined | x | x | x | x | x | x |
user input | x | x | x | x | x | x |
text | x | x | x | x | x | x |
number | x | x | x | x | x | x |
reference | x | x | x | x | x | x |
identifier | x | x | x | x | x | x |
key=value pair | x | x | x | x | x | x |
triplet | x | x | x | x | x | x |
list of | x | x | x | x | x | x |
command | x | x | x | x | x | x |
...,...,... | x | x | x | x | x | x |
x | x | x | x | x | x | |
x | x | x | x | x | x | |
x | x | x | x | x | x |
Other notes
- In LaTeX optional arguments come before mandatory arguments. This is not true in ConTeXt. Optional argument can be at any position.
\definetextvariable
- If
key=value
pair is missing the value, than the key is assigned the default value.
location=
Contexgarden wiki
While writing to this wiki you can refer to the user commands with
[[cmd:goto|\goto]]
which displays as \goto and the link brings you to the command definition in texshow-web.
Missing commands, descriptions and examples
add Category