Changes

Jump to navigation Jump to search
6,529 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 ==
=== 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.
=== Most important wiki markup commands How do I sign when posting a comment? ===
{{todo| this page duplicates the * '''You type:''' <code><nowiki>--~~~</nowiki></code> (three tildes)* '''Looks like:''' --[[HelpUser:EditingEsteis|Esteis]]; perhaps they should be merged}}
* <code><nowiki>'''Bold text'''</nowiki></code> - '''Bold textYou type:'''* <code><nowiki>''Italic text''--~~~~</nowiki></code> - (four tildes)* '''Looks like:'Italic text''* <code><nowiki><context></nowiki></code>Rendered by \ConTeXt<code><nowiki></context></nowiki></code> - <context>Rendered by \ConTeXt</context>* <code><nowiki><texcode></nowiki></code>Highlighted text (used for \TeX)<code><nowiki></texcode></nowiki></code> - <texcode>Highlighted text [[User:Esteis|Esteis]] 16:37, 14 June 2012 (used for \TeXCEST)</texcode>
{{todo|Add more commands}}=== How do I edit the Main Page? ===
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 = How = === ConTeXt commands === Use the [[Template:cmd|cmd template]] for command names in running text: * <nowiki>{{cmd|mycommand}}</nowiki>, * <nowiki>{{cmd|mycommand|parameters, text, etc.}}</nowiki>That way, 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}}}|} === 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 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 I 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 when posting 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 the {{cmd|framed}} command with the parameters {{code|1=background=color}} and {{code|1=offset=1cm}}.</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 === Practically all of ConTeXt's source files are stored in the directory {{code|.../tex/context/base}}. There are two templates to link to online copies of the source files. Link to the most recent version (recommended):* '''You type:''' <nowiki>{{src|type-akb.tex}}</nowiki>* '''Links to:''' http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/type-akb.tex* '''Looks like:''' {{src|type-akb.tex}} Link to the version stored on contextgarden.net:* '''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:''' <nowiki>[[modules:t-lettrine|Lettrine module]]</nowiki>* '''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! 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's default is ConTeXt Mark II: \crlf\contextversionnumber</context></pre>| <context>The wiki's default is ConTeXt Mark II: \crlf\contextversionnumber</context>|- style="vertical-align: top"| <pre><context source=yes mode=mkiv text="This produces:">% mode=mkivThe wiki also uses ConTeXt Mark IV: \crlf\contextversionnumber</context></pre>| <context source=yes mode=mkiv text="This produces:">% mode=mkivThe wiki also uses ConTeXt Mark IV: \crlf\contextversionnumber</context>|} === Displaying TeX or ConTeXt code alone === 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"| <pre><texcode>\def\person#1#2{{\em #1 (#2)}} \setupcolors [state=start]\framed [background=color, backgroundcolor=green, offset=1cm ]{hello world!}</texcode></pre>| <texcode>\def\person#1#2{{\em #1 (#2)}} \setupcolors [state=start]\framed [background=color, backgroundcolor=green, offset=1cm ]{hello world!}</texcode>|} === Displaying XML === For presenting XML source use <code><nowiki><xmlcode> ... </xmlcode></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"| <pre>&lt;xmlcode><? xml version="1.0"?><TeXML> <env name="text"> Hello World </env></TeXML>&lt;/xmlcode></pre>| <xmlcode><?xml version="1.0"?><TeXML> <env name="text"> Hello World </env></TeXML></xmlcode>|}
* <code><nowiki>~~~</nowiki></code> will expand into <nowiki>[[User:Yourusername|Yournickname]]</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=== Displaying other verbatim text ===
So you will usually write To dispay other verbatim text use <code><nowiki>--~~~</nowikipre>... </code> or <code><nowikipre>--~~~~</nowiki></code>.
{| class=wikitable! scope= Tables 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 some code.
== Categories \unprotect\def\!test{alfa} \protect & Templates ==lt;/pre></pre>
=== How to add a category? ===| <pre>This is some text and some code.
=== How to add a template? ===\unprotect\def\!test{alfa} \protect </pre>|}
{{todo|This page still needs quite some workAbout this wiki navbox}}

Navigation menu