Changes

Jump to navigation Jump to search
5,886 bytes added ,  09:11, 30 August 2020
no edit summary
'''This page is about editing pages on this wiki in general. For Formatting help editing command reference pages, also see [http://www.mediawiki.org/wiki/[Help:Formatting www.mediawikiReference]].org/wiki/Help:Formatting]'''
== General ==
this is still better than not signing in at all while editing.
=== How What commands do I use to edit the first pagethis wiki? ===
First page is protected to avoid spammers. HoweverIn order of increasing generality, you can still edit it (lethave a look at: * Mediawiki's hope for stupid spammers)[http://www.mediawiki. Type org/wiki/Help:Formatting guide to formatting]* Mediawiki'''Templates [http://meta.wikimedia.org/wiki/Help:Editing guide to editing in general]* [http:Main Page''' after contextgarden//meta.wikimedia.netorg/wiki/ MediaWiki_User%27s_Guide Mediawiki User Guide]* There are some special commands and edit that templatetemplates available on this wiki; they are described on the rest of this page.
=== How do I sign when posting a comment? ===
* '''You type:''' <code><nowiki>--~~~</nowiki></code> will expand into <nowiki>(three tildes)* '''Looks like:''' --[[User:YourusernameEsteis|YournicknameEsteis]]</nowiki>, so basically your <b>nickname</b> will be shown* <code><nowiki>~~~~</nowiki></code> will also add a <b>timestamp</b> next to your nickname 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 === How do I edit the [http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide MediaWiki User Guide] (esp. http://meta.wikimedia.org/wiki/Help:Editing ).Main Page? ===
Most of 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 following markup on this help [[Talk:Main Page]] page is specific for contextgarden. So, read on!
== In-line elements ==
== Pretty printing = ConTeXt commands ===
Use the [[Template:cmd|cmd template]] for command names in running text: * <code><nowiki>'''Bold text'''{{cmd|mycommand}}</nowiki></code> -- '''Bold text''', * <code><nowiki>''Italic {{cmd|mycommand|parameters, text'', etc.}}</nowiki></code> -- ''Italic text''* <code><nowiki>----</nowiki></code> draws a horizonal ruleThat way, you get an automatic link to e.g. {{cmd|startnarrower}}, or {{cmd|startnarrower|[middle]}}.
{| class=wikitable! scope=col width=360 style= In"text-line elements align: left"| You type! 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>* <codett><nowiki>{{cmd|startcolumns|[n=4]}}</nowiki></tt>* <tt><codenowiki>{{cmd|section{First section}}}</nowiki></codett>'''| * {{cmd|startnarrower[middle]}}* {{cmd|startcolumns|[n=4]}}* {{cmd|section{First section}}}|}
For in-line markup of codegrouped instance command pages, commandsuse the [[Template:gen|gen template]] instead. These wiki page names start with an underscore, parameters, etc. in and the running text use backslash added by {{tl|cmd}} doesn't look very nice either(`<codenowiki>{{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"| * <codett> ... </codenowiki>{{gen|startsection}}</nowiki></codett>.| * {{gen|startsection}}|}
''wiki markup''=== Linking to parameter value description pages ===
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. === 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 <code>\the {{cmd|framed</code> }} 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}} 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 display=== * '''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 * <tt><nowiki>{{todo|}}</nowiki></tt> adds a page to the following examples we use [[:Category:ToDo|ToDo list]]. This is intended for wiki pages that need more work done.* <codett>\framed<nowiki>{{howto}}}</codenowiki> command with </tt> adds a page to the parameters [[: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.* <codett>background=color</codenowiki> and {{bug|}}}<code/nowiki>offset=1cm</codett>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= Block elements 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"'''| * <codett><nowiki>{{howto}}<pre/nowiki></tt>| * {{howto}}|- style="vertical-align: top"| * <tt><nowiki>{{bug|this feature does not work on the wiki}}</codenowiki>'''</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><pre>This is an announcement from wiki allows you to type ConTeXt code to obtain a PNG of the mailing list resultant output, with some codeextraneous whitespace cropped. This is very useful for including in-page examples. Below are two simple ones; for more, see [[Help:Context]].
{| 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><context>The wiki is using ConTeXt LMTX: \crlf\contextversionnumber (lmtx mode: \the\contextlmtxmode)</context></pre>| <context>The wiki is using ConTeXt LMTX: \crlf\contextversionnumber (lmtx mode: \the\unprotectcontextlmtxmode)</context>|- style="vertical-align: top"| <pre><context mode="mkiv" source="yes" text="This produces:">The wiki also contains ConTeXt Mark IV: \defcrlf\!test{alfa} contextversionnumber (lmtx mode: \the\protect contextlmtxmode)</context>
</pre>
| <context mode="mkiv" source="yes" text="This produces:">The wiki also contains ConTeXt Mark IV: \crlf\contextversionnumber (lmtx mode: \the\contextlmtxmode)</xmlcodecontext>|}
''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>.
The <prenowiki><syntax></nowiki>tag accepts two attributes:This is an announcement from * To get the mailing list 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 some 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>
\unprotect|-\def\!test{alfa} | <pre>\protect <syntax>cite</syntax>
</pre>
| <syntax>cite</syntax>
----'''<code><nowiki><texcode></nowiki></code>'''|}
For displaying === Displaying TeX an or ConTeXt source use <code><nowiki><texcode> ... </texcode></nowiki></code>.alone ===
''wiki markup''For displaying TeX and ConTeXt code use <code><nowiki><texcode> ... </texcode></nowiki></code>.
{| 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"| <xmlcodepre>
<texcode>
\def\person#1#2{{\em #1 (#2)}}
offset=1cm ]{hello world!}
</texcode>
</xmlcodepre''wiki display'' | <texcode>
\def\person#1#2{{\em #1 (#2)}}
offset=1cm ]{hello world!}
</texcode>
----|}
'''<code><nowiki><xmlcode></nowiki></code>'''=== Displaying XML ===
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! scope=col width=360 style="text-align: left"| You see|- style="vertical-align: top"| <xmlcodepre>
&lt;xmlcode>
<?xml version="1.0"?>
</TeXML>
&lt;/xmlcode>
</xmlcodepre''wiki display'' | <xmlcode>
<?xml version="1.0"?>
<TeXML>
</TeXML>
</xmlcode>
|}
----=== Displaying other verbatim text ===
'''To dispay other verbatim text use <code><nowiki><contextpre> ... </pre></nowiki></code>'''.
Nice local feature of contextgarden allows you to run ConTeXt on the fly {| 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 the wiki page will include the result of the eneterd some code in the page. See also http://live.contextgarden.net/ for an online ConTeXt.
''wiki markup'' <xmlcode><context>\unprotect\setupcolors [state=start]def\framed [background=color, backgroundcolor=green, offset=1cm ]!test{hello world!alfa}<\protect &lt;/contextpre></xmlcodepre>
''wiki display''| <pre>This is some text and some code.
<context>\unprotect\setupcolors [state=start]def\framed [background=color, backgroundcolor=green, 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 ]test{hello world!alfa}</context></xmlcode> ''wiki display'' <context source="yes" text="produces">\setupcolors [state=start]\framed [background=color, backgroundcolor=green, offset=1cm ]{hello world!}protect </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:* [[source:type-akb.tex| type-akb.tex]] -- source files of ConTeXt* [[modules:t-bnf| bnf module]] -- [http://modules.contextgarden.net third party modules]* {{cmd|gotoAbout this wiki navbox}} -- links to the definition of the command

Navigation menu