Changes

Jump to navigation Jump to search
1,852 bytes added ,  13:05, 2 July 2020
''This page is about editing pages on this wiki in general. For editing command reference pages, also see [[Help:Reference]].''
 
{{todo|Warning: explain here the use of ToDo category.}}
 
== 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>mkiv}}. There are two templates to link to online versions copies of the source filefiles.
Link to the most recent version (recommended):
* '''You type:''' <nowiki>{{src|type-akb.tex}}</nowiki>
* '''Links to:''' httphttps://reposource.orcontextgarden.cz/w/context.git/blob/HEAD:net/tex/context/base/mkiv/type-akb.tex
* '''Looks like:''' {{src|type-akb.tex}}
* '''Links to:''' http://modules.contextgarden.net/t-lettrine
* '''Looks like:''' [[modules:t-bnf|Lettrine module]]
 
== Block elements ==
----
=== Displaying ConTeXt output (and source) ===
| <pre>
<context>
The wiki's default is using ConTeXt Mark IIIV: \crlf
\contextversionnumber
</context>
</pre>
| <context>
The wiki's default is using ConTeXt Mark IIIV: \crlf
\contextversionnumber
</context>
|- style="vertical-align: top"
| <pre>
<context source=yes mode=mkiv text="This produces:">The wiki also still uses ConTeXt Mark IV: \crlf
\contextversionnumber
</context>
</pre>
| <context source=yes mode=mkiv text="This produces:">The wiki also still uses ConTeXt Mark IV: \crlf
\contextversionnumber
</context>
|}
 
 
=== 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>. This is particularly useful in a "Command" page.
 
{| class=wikitable
! scope=col width=300 style="text-align: left"| You type
! scope=col width=300 style="text-align: left"| You see
|- style="vertical-align: top"
| <pre>
<syntax>page</syntax>
</pre>
| <syntax>page</syntax>
|}
 
=== Displaying TeX or ConTeXt code alone ===
</pre>
|}
 
{{About this wiki navbox}}

Navigation menu