Difference between revisions of "Wiki:Editing"

From Wiki
Jump to navigation Jump to search
m (Text replace - "\[\[cmd:(.*)\|(.*)\]\]" to "{{cmd|$1}}")
(→‎Displaying a ConTeXt command syntax: better explanation of syntax tag)
 
(37 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''For Formatting help see [http://www.mediawiki.org/wiki/Help:Formatting www.mediawiki.org/wiki/Help:Formatting]'''
+
''This page is about editing pages on this wiki in general. For editing command reference pages, also see [[Help:Reference]].''
  
 
== General ==
 
== General ==
Line 9: Line 9:
 
this is still better than not signing in at all while editing.
 
this is still better than not signing in at all while editing.
  
=== How do I edit the first page? ===
+
=== What commands do I use to edit this wiki? ===
  
First page is protected to avoid spammers. However, you can still edit it (let's hope for stupid spammers). Type '''Template:Main Page''' after contextgarden.net/ and edit that template.
+
In order of increasing generality, have a look at:
 +
* Mediawiki's [http://www.mediawiki.org/wiki/Help:Formatting guide to formatting]
 +
* Mediawiki's [http://meta.wikimedia.org/wiki/Help:Editing guide to editing in general]
 +
* [http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide Mediawiki User Guide]
 +
* There are some special commands and templates available on this wiki; they are described on the rest of this page.
  
 
=== How do I sign when posting a comment? ===
 
=== How do I sign when posting a comment? ===
  
* <code><nowiki>~~~</nowiki></code> will expand into <nowiki>[[User:Yourusername|Yournickname]]</nowiki>, so basically your <b>nickname</b> will be shown
+
* '''You type:''' <code><nowiki>--~~~</nowiki></code> (three tildes)
* <code><nowiki>~~~~</nowiki></code> will also add a <b>timestamp</b> next to your nickname
+
* '''Looks like:''' --[[User:Esteis|Esteis]]
 
 
So you will usually write <code><nowiki>--~~~</nowiki></code> or <code><nowiki>--~~~~</nowiki></code>
 
  
=== What are the other commands to edit this wiki? ===
+
* '''You type:''' <code><nowiki>--~~~~</nowiki></code> (four tildes)
 +
* '''Looks like:''' --[[User:Esteis|Esteis]] 16:37, 14 June 2012 (CEST)
  
The markup used in this wiki is a general MediaWiki markup and is described in the [http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide MediaWiki User Guide]  (esp. http://meta.wikimedia.org/wiki/Help:Editing ).
+
=== How do I edit the Main Page? ===
  
Most of the following markup on this help page is specific for contextgarden. So, read on!
+
The Main Page is protected to avoid spammers. Only wiki administrators are allowed to edit that page.  You can leave your change request in the [[Talk:Main Page]] page.
  
 +
== In-line elements ==
  
== Pretty printing ==
+
=== ConTeXt commands ===
  
* <code><nowiki>'''Bold text'''</nowiki></code> -- '''Bold text'''
+
Use the [[Template:cmd|cmd template]] for command names in running text:
* <code><nowiki>''Italic text''</nowiki></code> -- ''Italic text''
+
* <nowiki>{{cmd|mycommand}}</nowiki>,
* <code><nowiki>----</nowiki></code> draws a horizonal rule
+
* <nowiki>{{cmd|mycommand|parameters, text, etc.}}</nowiki>
 +
That way, you get an automatic link to e.g. {{cmd|startnarrower}}, or {{cmd|startnarrower|[middle]}}.
  
=== In-line elements ===
+
{| class=wikitable
----
+
! scope=col width=360 style="text-align: left"| You type
'''<code><nowiki><code></nowiki></code>'''
+
! scope=col width=360 style="text-align: left"| You see
 +
|- style="vertical-align: top"
 +
|
 +
* <tt><nowiki>{{cmd|startitemize}}</nowiki></tt>
 +
* <tt><nowiki>{{cmd|startnarrower|[middle]}}</nowiki></tt>
 +
* <tt><nowiki>{{cmd|startcolumns|2=[n=4]}}</nowiki></tt>
 +
* <tt><nowiki>{{cmd|section|{First section}}}</nowiki></tt>
 +
|
 +
* {{cmd|startitemize}}
 +
* {{cmd|startnarrower|[middle]}}
 +
* {{cmd|startcolumns|2=[n=4]}}
 +
* {{cmd|section|{First section}}}
 +
|-
 +
| Forgetting the pipe or the '2=' leads to this:
 +
* <tt><nowiki>{{cmd|startnarrower[middle]}}</nowiki></tt>
 +
* <tt><nowiki>{{cmd|startcolumns|[n=4]}}</nowiki></tt>
 +
* <tt><nowiki>{{cmd|section{First section}}}</nowiki></tt>
 +
|
 +
* {{cmd|startnarrower[middle]}}
 +
* {{cmd|startcolumns|[n=4]}}
 +
* {{cmd|section{First section}}}
 +
|}
  
For in-line markup of code, commands, parameters, etc. in the running text use <code><nowiki><code> ... </code></nowiki></code>.
+
For grouped instance command pages, use the [[Template:gen|gen template]] instead. These wiki page names start with an underscore, and the backslash added by {{tl|cmd}} doesn't look very nice either
 +
(`<nowiki>{{cmd|_startsection}}</nowiki>` produces {{cmd|_startsection}}), which is why there is a separate template.
 +
{| class=wikitable
 +
! scope=col width=360 style="text-align: left"| You type
 +
! scope=col width=360 style="text-align: left"| You see
 +
|- style="vertical-align: top"
 +
|
 +
* <tt><nowiki>{{gen|startsection}}</nowiki></tt>
 +
|
 +
* {{gen|startsection}}
 +
|}
  
''wiki markup''
+
=== Linking to parameter value description pages ===
  
<xmlcode>
+
In ConTeXt many of the {{code|1=key=value}} parameters have predefined value types, so this wiki intends to have separate description pages for those parameters. Those are not linked from the text, in general, but they are linked from the syntax tables on command description pages. ([[Command/setupframed|Example]].)  Nearly all the target pages do not exist yet, but don't let that stop you from linking to them. We'll get around to filling them in.
In the following examples we use <code>\framed</code> command with the parameters <code>background=color</code> and <code>offset=1cm</code>.
+
 
 +
=== Other inline code ===
 +
 
 +
For in-line markup of code, commands, parameters, etc. in running text use <nowiki>{{code|some code}}</nowiki>. If there are equality signs in the code, use e.g. <nowiki>{{code|1=some=code}}</nowiki>, because the wiki templating software interprets all text up to the first equality sign as a template parameter name. Please do use the {{code|code}} template instead of the {{code|&lt;code>}} tags, as templates are much easier to change.
 +
 
 +
''Note:'' except in [[Command]] documentation pages, where the fluidity of templates is actually a disadvantage.
 +
In [[Command]] pages {{code|&lt;code>}} is required.
 +
 
 +
{| class=wikitable
 +
! scope=col width=360 style="text-align: left"| You type
 +
! scope=col width=360 style="text-align: left"| You see
 +
|- style="vertical-align: top"
 +
| <xmlcode>
 +
In the following examples we use the
 +
{{cmd|framed}} command with the  
 +
parameters {{code|1=background=color}}
 +
and {{code|1=offset=1cm}}.
 
</xmlcode>
 
</xmlcode>
  
''wiki display''
+
| style="background-color: white" |
 +
In the following examples we use the {{cmd|framed}} command
 +
with the parameters {{code|1=background=color}} and
 +
{{code|1=offset=1cm}}.
 +
|}
 +
 
 +
=== Linking to source files ===
 +
There are two templates to link to online copies of the files contained in the <code>texmf-context</code> tree of the ConTeXt distribution.
 +
 
 +
Practically all of ConTeXt's actual source files are stored in the directory {{code|tex/context/base/mkiv}}
 +
 
 +
Link to the file in {{code|tex/context/base/mkiv}} directly:
 +
* '''You type:''' <nowiki>{{src|type-akb.tex}}</nowiki>
 +
* '''Links to:''' https://source.contextgarden.net/tex/context/base/mkiv/type-akb.tex
 +
* '''Looks like:''' {{src|type-akb.tex}}
 +
 
 +
But the ConTeXt distribution also contains various other files, like documentation and scripts.
 +
 
 +
Link to any file in the ConTeXt distribution:
 +
* '''You type:''' <nowiki>[[source:mtxrun.lua|mtxrun.lua]]</nowiki>
 +
* '''Links to:''' http://source.contextgarden.net/mtxrun.lua
 +
* '''Looks like:''' [[source:mtxrun.lua|mtxrun.lua]]
 +
 
 +
The software at http://source.contextgarden.net/ will find the actual file location for you.
 +
 
 +
Please use the <code><nowiki>{{src|}}</nowiki></code> format for pointing to actual ConTeXt source files.
 +
 
 +
=== Linking to other sections of the wiki ===
 +
 
 +
* '''You type:''' <nowiki>[[modules:t-lettrine|Lettrine module]]</nowiki>
 +
* '''Links to:''' http://modules.contextgarden.net/t-lettrine
 +
* '''Looks like:''' [[modules:t-bnf|Lettrine module]]
 +
 
 +
=== Some other templates ===
 +
 
 +
There are a few other templates that may be useful:
  
In the following examples we use <code>\framed</code> command with the parameters <code>background=color</code> and <code>offset=1cm</code>.
+
* <tt><nowiki>{{todo|}}</nowiki></tt> adds a page to the [[:Category:ToDo|ToDo list]]. This is intended for wiki pages that need more work done.
----
+
* <tt><nowiki>{{howto}}}</nowiki></tt> adds a page to the [[:Category:How to|How to list]]. This is for wiki pages that you would like to be on the [[:Category:ToDo|ToDo list]], but where you are not sure whether the current page is the right place to add the documentation.
 +
* <tt><nowiki>{{bug|}}}</nowiki></tt> adds a page to the [[:Category:Bugreports|Bug reports list]]. This is for problems you find in ConTeXt and/or the ConTeXt installation on the server. ''Not for wiki page problems!'' (you should fix those yourself, or add one of the two previous templates.)
  
=== Block elements ===
+
{| class=wikitable
----
+
! scope=col width=360 style="text-align: left"| You type
'''<code><nowiki><pre></nowiki></code>'''
+
! scope=col width=360 style="text-align: left"| You see
 +
|- style="vertical-align: top"
 +
|
 +
* <tt><nowiki>{{todo|this page needs more work}}</nowiki></tt>
 +
|
 +
* {{todo|this page needs more work}}
 +
|- style="vertical-align: top"
 +
|
 +
* <tt><nowiki>{{howto}}</nowiki></tt>
 +
|
 +
* {{howto}}
 +
|- style="vertical-align: top"
 +
|
 +
* <tt><nowiki>{{bug|this feature does not work on the wiki}}</nowiki></tt>
 +
|
 +
* {{bug|this feature does not work on the wiki}}
 +
|}
  
To dispay verabtim text use <code><nowiki><pre> ... </pre></nowiki></code>.
+
== Block elements ==
  
''wiki markup''
+
=== Displaying ConTeXt output (and source) ===
  
<xmlcode>
+
This wiki allows you to type ConTeXt code to obtain a PNG of the resultant output, with extraneous whitespace cropped. This is very useful for including in-page examples. Below are two simple ones; for more, see [[Help:Context]].
<pre>
 
This is an announcement from the mailing list with some code.
 
  
\unprotect
+
{| class=wikitable
\def\!test{alfa}
+
! scope=col width=300 style="text-align: left"| You type
\protect
+
! scope=col width=300 style="text-align: left"| You see
 +
|- style="vertical-align: top"
 +
| <pre>
 +
<context>
 +
The wiki is using ConTeXt LMTX: \crlf
 +
\contextversionnumber\
 +
(lmtx mode: \the\contextlmtxmode)
 +
</context>
 +
</pre>
 +
| <context force="yes">
 +
The wiki is using ConTeXt LMTX: \crlf
 +
\contextversionnumber\ (lmtx mode: \the\contextlmtxmode)
 +
</context>
 +
|- style="vertical-align: top"
 +
| <pre>
 +
<context mode="mkiv" source="yes" text="This produces:">
 +
The wiki also contains ConTeXt Mark IV: \crlf
 +
\contextversionnumber\  
 +
(lmtx mode: \the\contextlmtxmode)
 +
</context>
 
</pre>
 
</pre>
</xmlcode>
+
| <context mode="mkiv" source="yes" text="This produces:">
 +
The wiki also contains ConTeXt Mark IV: \crlf
 +
\contextversionnumber\
 +
(lmtx mode: \the\contextlmtxmode)
 +
</context>
 +
|}
  
''wiki display''
+
=== Displaying a ConTeXt command syntax ===
 +
If you want to show the calling convention(s) of a ConTeXt command, you can use <code><nowiki><syntax> ... </syntax></nowiki></code>.
  
<pre>
+
The <nowiki><syntax></nowiki> tag works like this:
This is an announcement from the mailing list with some code.
+
* To get the syntax for a ConTeXt command like <code>\page</code>, use its name without the leading backslash
 +
* To get the syntax for a ConTeXt environment like <code>itemize</code>, use the name of the command that starts the environment.
 +
* Some ConTeXt commands and environments have multiple variants with different arguments. If you want only a specific variant of such a command or environment, you can add <code>variant=</code>. The possible variants are listed in the relevant command page (for an example, see the {{cmd|cite}} page)
 +
{| class=wikitable
 +
! scope=col width=300 style="text-align: left"| You type
 +
! scope=col width=500 style="text-align: left"| You see
 +
|- style="vertical-align: top"
 +
| <pre>
 +
<syntax>page</syntax>
 +
</pre>
 +
| <syntax>page</syntax>
 +
|-
 +
| <pre>
 +
<syntax>startitemize</syntax>
 +
</pre>
 +
| <syntax>startitemize</syntax>
 +
|-
 +
| <pre>
 +
<syntax variant='direct'>cite</syntax>
 +
</pre>
 +
| <syntax variant='direct'>cite</syntax>
  
\unprotect
+
|-
\def\!test{alfa}
+
| <pre>
\protect
+
<syntax>cite</syntax>
 
</pre>
 
</pre>
 +
| <syntax>cite</syntax>
  
----
+
|}
'''<code><nowiki><texcode></nowiki></code>'''
 
  
For displaying TeX an ConTeXt source use <code><nowiki><texcode> ... </texcode></nowiki></code>.
+
=== Displaying TeX or ConTeXt code alone ===
  
''wiki markup''
+
For displaying TeX and ConTeXt code use <code><nowiki><texcode> ... </texcode></nowiki></code>.
  
<xmlcode>
+
{| class=wikitable
 +
! scope=col width=360 style="text-align: left"| You type
 +
! scope=col width=360 style="text-align: left"| You see
 +
|- style="vertical-align: top"
 +
| <pre>
 
<texcode>
 
<texcode>
 
\def\person#1#2{{\em #1 (#2)}}
 
\def\person#1#2{{\em #1 (#2)}}
Line 94: Line 245:
 
         offset=1cm ]{hello world!}
 
         offset=1cm ]{hello world!}
 
</texcode>
 
</texcode>
</xmlcode>
+
</pre>
 
+
| <texcode>
''wiki display''
 
 
 
<texcode>
 
 
\def\person#1#2{{\em #1 (#2)}}
 
\def\person#1#2{{\em #1 (#2)}}
  
Line 106: Line 254:
 
         offset=1cm ]{hello world!}
 
         offset=1cm ]{hello world!}
 
</texcode>
 
</texcode>
----
+
|}
  
'''<code><nowiki><xmlcode></nowiki></code>'''
+
=== Displaying XML ===
  
 
For presenting XML source use <code><nowiki><xmlcode> ... </xmlcode></nowiki></code>.
 
For presenting XML source use <code><nowiki><xmlcode> ... </xmlcode></nowiki></code>.
  
''wiki markup''
+
{| class=wikitable
 
+
! scope=col width=360 style="text-align: left"| You type
<xmlcode>
+
! scope=col width=360 style="text-align: left"| You see
 +
|- style="vertical-align: top"
 +
| <pre>
 
&lt;xmlcode>
 
&lt;xmlcode>
 
<?xml version="1.0"?>
 
<?xml version="1.0"?>
Line 123: Line 273:
 
</TeXML>
 
</TeXML>
 
&lt;/xmlcode>
 
&lt;/xmlcode>
</xmlcode>
+
</pre>
 
+
| <xmlcode>
''wiki display''
 
 
 
<xmlcode>
 
 
<?xml version="1.0"?>
 
<?xml version="1.0"?>
 
<TeXML>
 
<TeXML>
Line 135: Line 282:
 
</TeXML>
 
</TeXML>
 
</xmlcode>
 
</xmlcode>
 +
|}
  
----
+
=== Displaying other verbatim text ===
  
'''<code><nowiki><context></nowiki></code>'''
+
To dispay other verbatim text use <code><nowiki><pre> ... </pre></nowiki></code>.
  
Nice local feature of contextgarden allows you to run ConTeXt on the fly and the wiki page will include the result of the eneterd code in the page. See also http://live.contextgarden.net/ for an online ConTeXt.
+
{| class=wikitable
 +
! scope=col width=360 style="text-align: left"| You type
 +
! scope=col width=360 style="text-align: left"| You see
 +
|- style="vertical-align: top"
 +
| <pre>
 +
<pre>
 +
This is some text and some code.
  
''wiki markup''
+
\unprotect
 
+
\def\!test{alfa}  
<xmlcode>
+
\protect
<context>
+
&lt;/pre>
\setupcolors [state=start]
+
</pre>
\framed [background=color,
 
        backgroundcolor=green,
 
        offset=1cm ]{hello world!}
 
</context>
 
</xmlcode>
 
  
''wiki display''
+
| <pre>
 +
This is some text and some code.
  
<context>
+
\unprotect
\setupcolors [state=start]
+
\def\!test{alfa}  
\framed [background=color,
+
\protect
        backgroundcolor=green,
+
</pre>
        offset=1cm ]{hello world!}
+
|}
</context>
 
----
 
 
 
'''<code>source="yes"</code>'''
 
 
 
If you add <code>source="yes"</code> to the <code><nowiki><context></nowiki></code> tag, you have the source and the result displayed. The contents of the attribute <code>text</code> will be inserted between the text and the result.
 
 
 
''wiki markup''
 
 
 
<xmlcode>
 
<context source="yes" text="produces">
 
\setupcolors [state=start]
 
\framed [background=color,
 
        backgroundcolor=green,
 
        offset=1cm ]{hello world!}
 
</context>
 
</xmlcode>
 
 
 
''wiki display''
 
 
 
<context source="yes" text="produces">
 
\setupcolors [state=start]
 
\framed [background=color,
 
        backgroundcolor=green,
 
        offset=1cm ]{hello world!}
 
</context>
 
----
 
 
 
== Links ==
 
 
 
You can use references to other garden projects. Use the following syntax to create links to the other contextgarden projects:
 
 
 
<pre><nowiki>
 
[[source:type-akb.tex| type-akb.tex]]
 
[[modules:t-bnf| bnf module]]
 
{{cmd|goto}}
 
</nowiki></pre>
 
  
Looks like:
+
{{About this wiki navbox}}
* [[source:type-akb.tex| type-akb.tex]] -- source files of ConTeXt
 
* [[modules:t-bnf| bnf module]] -- [http://modules.contextgarden.net third party modules]
 
* {{cmd|goto}} -- links to the definition of the command
 

Latest revision as of 09:52, 29 October 2021

This page is about editing pages on this wiki in general. For editing command reference pages, also see Help:Reference.

General

May I edit pages without signing in?

Yes, but you are highly encouraged to sign in before contributing if possible. Even if your account has a username/nickname with no resemblance to your real name, this is still better than not signing in at all while editing.

What commands do I use to edit this wiki?

In order of increasing generality, have a look at:

How do I sign when posting a comment?

  • You type: --~~~ (three tildes)
  • Looks like: --Esteis
  • You type: --~~~~ (four tildes)
  • Looks like: --Esteis 16:37, 14 June 2012 (CEST)

How do I edit the Main Page?

The Main Page is protected to avoid spammers. Only wiki administrators are allowed to edit that page. You can leave your change request in the Talk:Main Page page.

In-line elements

ConTeXt commands

Use the cmd template for command names in running text:

  • {{cmd|mycommand}},
  • {{cmd|mycommand|parameters, text, etc.}}

That way, you get an automatic link to e.g. \startnarrower, or \startnarrower[middle].

You type You see
  • {{cmd|startitemize}}
  • {{cmd|startnarrower|[middle]}}
  • {{cmd|startcolumns|2=[n=4]}}
  • {{cmd|section|{First section}}}
Forgetting the pipe or the '2=' leads to this:
  • {{cmd|startnarrower[middle]}}
  • {{cmd|startcolumns|[n=4]}}
  • {{cmd|section{First section}}}
  • [[Command/startnarrower[middle]|\startnarrower[middle]]]
  • \startcolumns
  • [[Command/section{First section|\section{First section]]}

For grouped instance command pages, use the gen template instead. These wiki page names start with an underscore, and the backslash added by {{cmd}} doesn't look very nice either ({{cmd|_startsection}} produces \_startsection), which is why there is a separate template.

You type You see
  • {{gen|startsection}}

Linking to parameter value description pages

In ConTeXt many of the key=value parameters have predefined value types, so this wiki intends to have separate description pages for those parameters. Those are not linked from the text, in general, but they are linked from the syntax tables on command description pages. (Example.) Nearly all the target pages do not exist yet, but don't let that stop you from linking to them. We'll get around to filling them in.

Other inline code

For in-line markup of code, commands, parameters, etc. in running text use {{code|some code}}. If there are equality signs in the code, use e.g. {{code|1=some=code}}, because the wiki templating software interprets all text up to the first equality sign as a template parameter name. Please do use the code template instead of the <code> tags, as templates are much easier to change.

Note: except in Command documentation pages, where the fluidity of templates is actually a disadvantage. In Command pages <code> is required.

You type You see
In the following examples we use the 
{{cmd|framed}} command with the 
parameters {{code|1=background=color}} 
and {{code|1=offset=1cm}}.

In the following examples we use the \framed command with the parameters background=color and offset=1cm.

Linking to source files

There are two templates to link to online copies of the files contained in the texmf-context tree of the ConTeXt distribution.

Practically all of ConTeXt's actual source files are stored in the directory tex/context/base/mkiv

Link to the file in tex/context/base/mkiv directly:

But the ConTeXt distribution also contains various other files, like documentation and scripts.

Link to any file in the ConTeXt distribution:

The software at http://source.contextgarden.net/ will find the actual file location for you.

Please use the {{src|}} format for pointing to actual ConTeXt source files.

Linking to other sections of the wiki

Some other templates

There are a few other templates that may be useful:

  • {{todo|}} adds a page to the ToDo list. This is intended for wiki pages that need more work done.
  • {{howto}}} adds a page to the How to list. This is for wiki pages that you would like to be on the ToDo list, but where you are not sure whether the current page is the right place to add the documentation.
  • {{bug|}}} adds a page to the Bug reports list. This is for problems you find in ConTeXt and/or the ConTeXt installation on the server. Not for wiki page problems! (you should fix those yourself, or add one of the two previous templates.)
You type You see
  • {{todo|this page needs more work}}

TODO: this page needs more work (See: To-Do List)


  • {{howto}}

The author of this entry is looking for a solution for the described problem. (See: How to?)
  • {{bug|this feature does not work on the wiki}}

Bug report: this feature does not work on the wiki (See: Bug List)


Block elements

Displaying ConTeXt output (and source)

This wiki allows you to type ConTeXt code to obtain a PNG of the resultant output, with extraneous whitespace cropped. This is very useful for including in-page examples. Below are two simple ones; for more, see Help:Context.

You type You see
<context>
The wiki is using ConTeXt LMTX: \crlf
\contextversionnumber\
 (lmtx mode: \the\contextlmtxmode)
</context>
<context mode="mkiv" source="yes" text="This produces:">
The wiki also contains ConTeXt Mark IV: \crlf
\contextversionnumber\ 
 (lmtx mode: \the\contextlmtxmode)
</context>
The wiki also contains ConTeXt Mark IV: \crlf
\contextversionnumber\ 
 (lmtx mode: \the\contextlmtxmode)

This produces:

Displaying a ConTeXt command syntax

If you want to show the calling convention(s) of a ConTeXt command, you can use <syntax> ... </syntax>.

The <syntax> tag works like this:

  • To get the syntax for a ConTeXt command like \page, use its name without the leading backslash
  • To get the syntax for a ConTeXt environment like itemize, use the name of the command that starts the environment.
  • Some ConTeXt commands and environments have multiple variants with different arguments. If you want only a specific variant of such a command or environment, you can add variant=. The possible variants are listed in the relevant command page (for an example, see the \cite page)
You type You see
<syntax>page</syntax>
\page[...,...]
[...,...]inherits from \pagebreak

<syntax>startitemize</syntax>
\startitemize[...,...][...=...,...] ... \stopitemize
[...,...]inherits from \setupitemgroup
...=...,...inherits from \setupitemgroup
instance of startitemgroup, generated by \defineitemgroup

<syntax variant='direct'>cite</syntax> 
\cite{...}
{...}reference

<syntax>cite</syntax> 
\cite[...=...,...][...]
referencereference
alternativedefault category entry short page num textnum year index tag keywords author authoryears authornum authoryear
beforecommand
aftercommand
leftcommand
rightcommand
...=...,...inherits from \setupbtx
[...]reference

\cite[...=...,...][...=...,...]
referencereference
alternativedefault category entry short page num textnum year index tag keywords author authoryears authornum authoryear
beforecommand
aftercommand
leftcommand
rightcommand
...=...,...inherits from \setupbtx
keyvalue

\cite[...][...]
[...]default category entry short page num textnum year index tag keywords author authoryears authornum authoryear
[...]reference

\cite{...}
{...}reference

Displaying TeX or ConTeXt code alone

For displaying TeX and ConTeXt code use <texcode> ... </texcode>.

You type You see
<texcode>
\def\person#1#2{{\em #1 (#2)}}

\setupcolors [state=start]
\framed [background=color,
         backgroundcolor=green,
         offset=1cm ]{hello world!}
</texcode>
\def\person#1#2{{\em #1 (#2)}}

\setupcolors [state=start]
\framed [background=color,
         backgroundcolor=green,
         offset=1cm ]{hello world!}

Displaying XML

For presenting XML source use <xmlcode> ... </xmlcode>.

You type You see
<xmlcode>
<?xml version="1.0"?>
<TeXML>
  <env name="text">
    Hello World
  </env>
</TeXML>
</xmlcode>
<?xml version="1.0"?>
<TeXML>
  <env name="text">
    Hello World
  </env>
</TeXML>

Displaying other verbatim text

To dispay other verbatim text use <pre> ... </pre>.

You type You see
<pre>
This is some text and some code.

\unprotect
\def\!test{alfa} 
\protect 
</pre>
This is some text and some code.

\unprotect
\def\!test{alfa} 
\protect