Changes

Jump to navigation Jump to search
4,521 bytes added ,  09:11, 30 August 2020
no edit summary
''This page is about editing pages on this wiki in general. For editing command reference pages, also see [[Help:Reference]].''
 
== General ==
=== How do I edit the Main Page? ===
The Main Page is protected to avoid spammers. However, you can still Only wiki administrators are allowed to edit it (let's hope for stupid spammers)that page. Type '''Template You can leave your change request in the [[Talk:Main Page''' after contextgarden.net/ and edit that template]] page
== 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}}}
|}
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= The &lt;cmd&gt; tag is deprecated. 360 style="text-align: left"| You see|- style="vertical-align: top"| * <tt><nowiki>{{gen|startsection}}</nowiki></tt>| * {{gen|startsection}}|} === Linking to parameter value description pages ===
Sometimes, when editing an older pageIn ConTeXt many of the {{code|1=key=value}} parameters have predefined value types, you will see &lt;cmd&gt;\somecommand&lt;/cmd&gt; on so this wikiintends to have separate description pages for those parameters. This is an olderThose are not linked from the text, deprecated formin general, and should be turned into <nowiki>{{cmdbut they are linked from the syntax tables on command description pages. ([[Command/setupframed|somecommand}}</nowiki> wherever Example]].) Nearly all the target pages do not exist yet, but don't let that stop you see itfrom 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>{{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&gt; .>}} 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&gt;</tt>}} is required.
{| 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 ===
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</code>. There are two templates to link to online versions of the source file.mkiv}}
Link to the most recent version (recommended)file in {{code|tex/context/base/mkiv}} directly:
* '''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}}
But the ConTeXt distribution also contains various other files, like documentation and scripts. Link to any file in the version stored on contextgarden.netConTeXt distribution:* '''You type:''' <nowiki>[[source:type-akbmtxrun.texlua| type-akbmtxrun.texlua]]</nowiki>* '''Links to:''' http://source.contextgarden.net/type-akbmtxrun.texlua* '''Looks like:''' [[source:type-akbmtxrun.texlua|type-akbmtxrun.texlua]] 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 ===
* '''Looks like:''' [[modules:t-bnf|Lettrine module]]
=== Some other templates ===
 
There are a few other templates that may be useful:
 
* <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.)
 
{| 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>{{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}}
|}
== Block elements ==
----
=== Displaying ConTeXt output (and source) ===
| <pre>
<context>
The wiki's default is using ConTeXt Mark IILMTX: \crlf
\contextversionnumber
(lmtx mode: \the\contextlmtxmode)
</context>
</pre>
| <context>
The wiki's default is using ConTeXt Mark IILMTX: \crlf\contextversionnumber(lmtx mode: \the\contextlmtxmode)
</context>
|- style="vertical-align: top"
| <pre>
<context mode="mkiv" source="yes mode=mkiv " text="This produces:">The wiki also uses contains ConTeXt Mark IV: \crlf
\contextversionnumber
(lmtx mode: \the\contextlmtxmode)
</context>
</pre>
| <context mode="mkiv" source="yes mode=mkiv " text="This produces:">The wiki also uses contains ConTeXt Mark IV: \crlf
\contextversionnumber
(lmtx mode: \the\contextlmtxmode)
</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>.
 
The <nowiki><syntax></nowiki> tag accepts two attributes:
* 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>.
{| 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>
|-
| <pre>
<syntax>startitemize</syntax>
</pre>
| <syntax>startitemize</syntax>
|-
| <pre>
<syntax variant='direct'>cite</syntax>
</pre>
| <syntax variant='direct'>cite</syntax>
 
|-
| <pre>
<syntax>cite</syntax>
</pre>
| <syntax>cite</syntax>
 
|}
</pre>
|}
 
{{About this wiki navbox}}

Navigation menu