Difference between revisions of "Wiki:Editing"

From Wiki
Jump to navigation Jump to search
(MkII/MkIV differed only in mode=, so they had identical MD5 hashes and identical images. Made them different.)
m (Edit the first part a bit.)
Line 1: Line 1:
'''For Formatting help see [http://www.mediawiki.org/wiki/Help:Formatting www.mediawiki.org/wiki/Help:Formatting]'''
 
 
 
== General ==
 
== General ==
  
Line 9: Line 7:
 
this is still better than not signing in at all while editing.
 
this is still better than not signing in at all while editing.
  
=== How do I edit the first page? ===
+
=== What commands do I use to edit this wiki? ===
  
First 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 order of increasing generality, have a look at:
 +
* Mediawiki's [http://www.mediawiki.org/wiki/Help:Formatting guide to formatting]
 +
* Mediawiki's [http://meta.wikimedia.org/wiki/Help:Editing guide to editing in general]
 +
* [http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide Mediawiki User Guide]
 +
* There are some special commands and templates available on this wiki; they are described on the rest of this page.
  
 
=== How do I sign when posting a comment? ===
 
=== How do I sign when posting a comment? ===
  
* <code><nowiki>~~~</nowiki></code> will expand into <nowiki>[[User:Yourusername|Yournickname]]</nowiki>, so basically your <b>nickname</b> will be shown
+
* '''You type:''' <code><nowiki>--~~~</nowiki></code> (three tildes)
* <code><nowiki>~~~~</nowiki></code> will also add a <b>timestamp</b> next to your nickname
+
* '''Looks like:''' --[[User:Esteis|Esteis]]
 
 
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 the [http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide MediaWiki User Guide]  (esp. http://meta.wikimedia.org/wiki/Help:Editing ).
+
=== How do I edit the Main Page? ===
  
Most of the following markup on this help page is specific for contextgarden. So, read on!
+
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 ==
 
== In-line elements ==
 
You can use references to other garden projects. Use the following syntax to create links to the other contextgarden projects:
 
  
 
=== ConTeXt commands ===
 
=== ConTeXt commands ===
Line 120: Line 119:
 
</pre>
 
</pre>
 
| <context>
 
| <context>
The wiki default is ConTeXt Mark II: \crlf
+
The wiki's default is ConTeXt Mark II: \crlf
 
\contextversionnumber
 
\contextversionnumber
 
</context>
 
</context>
Line 138: Line 137:
 
=== Displaying TeX or ConTeXt code alone ===
 
=== Displaying TeX or ConTeXt code alone ===
  
For displaying TeX and ConTeXt source use <code><nowiki><texcode> ... </texcode></nowiki></code>.
+
For displaying TeX and ConTeXt code use <code><nowiki><texcode> ... </texcode></nowiki></code>.
  
 
{| class=wikitable
 
{| class=wikitable

Revision as of 14:39, 14 June 2012

General

May I edit pages without signing in?

Yes, but you are highly encouraged to sign in before contributing if possible. Even if your account has a username/nickname with no resemblance to your real name, this is still better than not signing in at all while editing.

What commands do I use to edit this wiki?

In order of increasing generality, have a look at:

How do I sign when posting a comment?

  • You type: --~~~ (three tildes)
  • Looks like: --Esteis
  • You type: --~~~~ (four tildes)
  • Looks like: --Esteis 16:37, 14 June 2012 (CEST)

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

ConTeXt commands

Use the following markup for command names in running text:

  • {{cmd|mycommand}},
  • {{cmd|mycommand|parameters, text, etc.}}

That way, you get an automatic link to e.g. \startnarrower, or \startnarrower[middle].

You type You see
  • {{cmd|startitemize}}
  • {{cmd|startnarrower|[middle]}}
  • {{cmd|section|{First section}}}
Forgetting the pipe leads to this:
  • {{cmd|startnarrower[middle]}}
  • {{cmd|section{First section}}}
  • [[Command/startnarrower[middle]|\startnarrower[middle]]]
  • [[Command/section{First section|\section{First section]]}

The <cmd> tag is deprecated.

Sometimes, when editing an older page, you will see <cmd>\somecommand</cmd> on this wiki. This is an older, deprecated form, and should be turned into {{cmd|somecommand}} wherever you see it.

Other inline code

For in-line markup of code, commands, parameters, etc. in running text use <code> ... </code>.

You type You see
In the following examples we use the 
{{cmd|framed}} command with the 
parameters <code>background=color</code> 
and <code>offset=1cm</code>.

In the following examples we use the \framed command with the parameters background=color and offset=1cm.

Linking to source files

Practically all of ConTeXt's source files are stored in the directory /tex/context/base. There are two templates to link to online versions of the source file.

Link to the most recent version (recommended):

Link to the version stored on contextgarden.net:

Linking to other sections of the wiki

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.

You type You see
<context>
The wiki's default is ConTeXt Mark II: \crlf
\contextversionnumber
</context>
<context source=yes mode=mkiv text="This produces:">
The wiki also uses ConTeXt Mark IV: \crlf
\contextversionnumber
</context>
The wiki also uses ConTeXt Mark IV: \crlf
\contextversionnumber

This produces:

Displaying TeX or ConTeXt code alone

For displaying TeX and ConTeXt code use <texcode> ... </texcode>.

You type You see
<texcode>
\def\person#1#2{{\em #1 (#2)}}

\setupcolors [state=start]
\framed [background=color,
         backgroundcolor=green,
         offset=1cm ]{hello world!}
</texcode>
\def\person#1#2{{\em #1 (#2)}}

\setupcolors [state=start]
\framed [background=color,
         backgroundcolor=green,
         offset=1cm ]{hello world!}

Displaying XML

For presenting XML source use <xmlcode> ... </xmlcode>.

You type You see
<xmlcode>
<?xml version="1.0"?>
<TeXML>
  <env name="text">
    Hello World
  </env>
</TeXML>
</xmlcode>
<?xml version="1.0"?>
<TeXML>
  <env name="text">
    Hello World
  </env>
</TeXML>

Displaying other verbatim text

To dispay other verbatim text use <pre> ... </pre>.

You type You see
<pre>
This is some text and some code.

\unprotect
\def\!test{alfa} 
\protect 
</pre>
This is some text and some code.

\unprotect
\def\!test{alfa} 
\protect