Changes

Jump to navigation Jump to search
2,353 bytes added ,  13:05, 2 July 2020
If you are uncertain how a special markup looks like or if you want to try out things''This page is about editing pages on this wiki in general. For editing command reference pages, go to the also see [[httpHelp://sandboxReference]].contextgarden.net/ sandbox]'' {{todo|Warning: explain here the use of ToDo category. }}
== General ==
=== May I edit pages without signing in? ===
Yes, you may (mainly because we are still glad if the users who hate signing in can nevertheless contribute), but you are highly <b>discouragedhighly encouraged</b> to do so. Please, sign in before contributing if possible. Even if you use your account has a username/nickname with no resemblance to your real name, this is still better than not signing in at allwhile 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 * '''You type:''' <code><nowiki>--~~~~</nowiki></code> will also add a <b>timestamp</b> next to your nickname(four tildes)* '''Looks like:''' --[[User:Esteis|Esteis]] 16:37, 14 June 2012 (CEST) === How do I edit the Main Page? === So The Main Page is protected to avoid spammers. However, you will usually write <code><nowiki>--~~~</nowiki></code> or <code><nowiki>--~~~~<can still edit it (let's hope for stupid spammers). Type '''Template:Main Page''' after contextgarden.net/nowiki></code>and edit that template.
=== What are the other commands to edit this wiki? =In-line elements ==
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 ).=== ConTeXt commands ===
Most of Use the following markup on this help page is specific [[Template:cmd|cmd template]] for contextgardencommand names in running text: * <nowiki>{{cmd|mycommand}}</nowiki>, * <nowiki>{{cmd|mycommand|parameters, text, etc. So}}</nowiki>That way, read on!you get an automatic link to e.g. {{cmd|startnarrower}}, or {{cmd|startnarrower|[middle]}}.
{| 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>{{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}}}
|}
== Pretty printing = The &lt;cmd&gt; tag is deprecated. ===
* <code><nowiki>'''Bold text'''</nowiki></code> -- '''Bold text'''* <code><nowiki>''Italic text''</nowiki><Sometimes, when editing an older page, you will see &lt;cmd&gt;\somecommand&lt;/code> -- ''Italic text''* <code>cmd&gt; on this wiki. This is an older, deprecated form, and you should turned it into <nowiki>----{{cmd|somecommand}}</nowiki></code> draws a horizonal rulewherever you see it.
=== In-line elements Linking to parameter description pages ===----'''<code><nowiki><code></nowiki></code>'''
For in-line markup of 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, etc. in general, but they are linked from the running text use syntax tables on command description pages. ([[Command/setupframed|Example]].) The linking is achieved with <codenowiki>{{key|alternative}}</nowiki>, which expands to [[Command/keyword:alternative|<codenowiki> ... <[[Command/code>keyword:alternative]]</nowiki></code>]]. 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.
''wiki markup''=== 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. {| 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>
''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}}.|}
In the following examples we use <code>\framed</code> command with the parameters <code>background=color</code> and <code>offset=1cm</code>.----= Linking to source files ===
=== Block elements ===----Practically all of ConTeXt'''<s source files are stored in the directory {{code><nowiki><pre><|.../tex/context/nowiki><base/code>'''mkiv}}. There are two templates to link to online copies of the source files.
To dispay verabtim text use Link to the most recent version (recommended):* '''You type:''' <codenowiki>{{src|type-akb.tex}}</nowiki><pre> * '''Links to:''' https://source.contextgarden.. <net/tex/context/pre><base/nowiki><mkiv/code>type-akb.tex* '''Looks like:''' {{src|type-akb.tex}}
Link to the version stored on contextgarden.net:* ''wiki markup'You type:''' <nowiki>[[source:type-akb.tex| type-akb.tex]]</nowiki>* '''Links to:''' http://source.contextgarden.net/type-akb.tex* '''Looks like:''' [[source:type-akb.tex|type-akb.tex]]
=== Linking to other sections of the wiki === * '''You type:''' <xmlcodenowiki>[[modules:t-lettrine|Lettrine module]]<pre/nowiki>* '''Links to:''' http://modules.contextgarden.net/t-lettrine* '''Looks like:''' [[modules:t-bnf|Lettrine module]] == Block elements == === Displaying ConTeXt output (and source) === 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 Mark IV: \crlf\contextversionnumber</context></pre>| <context>The wiki is using ConTeXt Mark IV: \unprotectcrlf\defcontextversionnumber</context>|- style="vertical-align: top"| <pre><context source=yes text="This produces:">The wiki still uses ConTeXt Mark IV: \!test{alfa} crlf\protect contextversionnumber</context>
</pre>
| <context source=yes text="This produces:">The wiki still uses ConTeXt Mark IV: \crlf\contextversionnumber</xmlcodecontext>|}
''wiki display''
=== Displaying a ConTeXt command syntax ===If you want to show the calling convention(s) of a ConTeXt command, you can use <precode><nowiki><syntax> ... </syntax></nowiki></code>. This is an announcement from the mailing list with some codeparticularly useful in a "Command" page.
\unprotect{| class=wikitable! scope=col width=300 style="text-align: left"| You type\def\!test{alfa} scope=col width=300 style="text-align: left"| You see|- style="vertical-align: top"| <pre>\protect <syntax>page</syntax>
</pre>
| <syntax>page</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'' | <context>\setupcolors [state=start]\framed [background=color, backgroundcolor=green, offset=1cm ]{hello world!}</contextpre>---- '''<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 This is some 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]] [[manual:cont-eni.pdf| ConTeXt, the manual]] or [[magazine:0008|Magazine 8]] [[modules:t-bnf| bnf module]] [[cmd:goto|\goto]] [[gardenbugs:5| bug nr. 5]] [[article:80|A Few Dangerous Features]] [[publication:1|MAPS]]</nowiki></pre> Looks like:* [[source:type-akb.tex| type-akb.tex]] -- source files of ConTeXt* [[manual:cont-eni.pdf| ConTeXt, the manual]] or [[magazine:0008|Magazine 8]] -- manuals on http://www.pragma-ade.com* [[modules:t-bnf| bnf module]] -- [http://texshow.contextgarden.net third party modules]* [[cmd:goto|\goto]] -- links to the definition of the command in [http://texshow.contextgarden.net texshow-web] command reference (deprecated way: <some code><nowiki><cmd>about</cmd></nowiki></code> gives <cmd>about</cmd>)* [[gardenbugs:5| bug nr. 5]] -- bugs* [[article:80|A Few Dangerous Features]] * [[publication:1|MAPS]] -- MAPS articles  == Tables == == Categories & Templates == === How to add a category? === === How to add a template? ===
\unprotect
\def\!test{alfa}
\protect
</pre>
|}
{{todo|This page still needs quite some workAbout this wiki navbox}}

Navigation menu