Changes

Jump to navigation Jump to search
1,379 bytes added ,  20:52, 19 September 2012
{{About this wiki navbox}}
''This page is about editing pages on this wiki in general. For editing command reference pages, also see [[Help:Command reference]].''
 
== General ==
The Main 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-line elements ==
----
=== ConTeXt commands ===
Use the following markup [[Template:cmd|cmd template]] for command names in running text:
* <nowiki>{{cmd|mycommand}}</nowiki>,
* <nowiki>{{cmd|mycommand|parameters, text, etc.}}</nowiki>
|- 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}}}
|}
=== The &lt;cmd&gt; tag is deprecated. ===
Sometimes, when editing an older page, you will see &lt;cmd&gt;\somecommand&lt;/cmd&gt; on this wiki. This is an older, deprecated form, and you should be turned it into <nowiki>{{cmd|somecommand}}</nowiki> wherever you see it. === Linking to parameter description pages === In ConTeXt many {{code|1=key=value}} parameters are common across commands, 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]].) The linking is achieved with <nowiki>{{key|alternative}}</nowiki>, which expands to [[Command/keyword:alternative|<nowiki>[[Command/keyword:alternative]]</nowiki>]]. 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 <ttnowiki>&lt;{{code|some code}}</nowiki>. If there are equality signs in the code&gt; , 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&gt;</tt>}} tags, as templates are much easier to change.
{| class=wikitable
In the following examples we use the
{{cmd|framed}} command with the
parameters <{{code>|1=background=color</code> }} and <{{code>|1=offset=1cm</code>}}.
</xmlcode>
| style="background-color: white" |
In the following examples we use the {{cmd|framed}} command
with the parameters <{{code>|1=background=color</code> }} and <{{code>|1=offset=1cm</code>}}.
|}
=== Linking to source files ===
Practically all of ConTeXt's source files are stored in the directory <{{code>|.../tex/context/base</code>}}. There are two templates to link to online versions copies of the source filefiles.
Link to the most recent version (recommended):
* '''Links to:''' http://modules.contextgarden.net/t-lettrine
* '''Looks like:''' [[modules:t-bnf|Lettrine module]]
 
== 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]]. When using MkIV, it is good practice to include a comment '{{code|1=% mode=mkiv'}}: otherwise, the reader will have no indication that the example is compiled with MkIV instead of the usual MkII.
{| class=wikitable
</pre>
|}
 
{{About this wiki navbox}}

Navigation menu