Difference between revisions of "User:Marcus/MediaWiki Quick Reference"

From Nottinghack Wiki
Jump to navigation Jump to search
m (→‎Interwiki links: linked to new interwiki page)
(Started documenting Magic Words & made other small additions.)
Line 1: Line 1:
This is a terse single-page reference for {{SITENAME}}.  For a gentler introduction, see the main guide to [[Using the Wiki]].
+
This is a single-page reference guide for {{SITENAME}}.  If you are not familiar with wikitext and markup languages, see the tutorial on [[Using the Wiki]].
  
== System configuration ==
+
== About this Wiki ==
  
{{SITENAME}} is powered by MediaWiki version {{CURRENTVERSION}}See [[Special:Version|more version information and the list of extensions]], [[Special:Statistics|usage statistics]] and other [[Special:SpecialPages|SpecialPages]].
+
{{SITENAME}} is powered by MediaWiki, the software used by WikipediaThe main sources of documentation are:
 +
* [[wikipedia:Help:Contents|Wikipedia's help pages]]
 +
* [[metawikipedia:Help:Contents|WikiMedia's meta wiki]]
 +
* [[mw:Manual|The MediaWiki administrator's manual]]
 +
This reference guide was based on the public domain [http://www.mediawiki.org/wiki/Project:PD_help Project:PD help].
  
== Other sources of documentation ==
+
== Formatting ==
  
MediaWiki is the same software used by Wikipedia.  The main documentation can be found in:
+
=== Basic Markup ===
* [[metawikipedia:Help:Contents|WikiMedia's Meta Wiki]]
 
* [[wikipedia:Help:Contents|Wikipedia Help]]
 
The content of this page has been compiled from the public domain materials in [http://www.mediawiki.org/wiki/Project:PD_help Project:PD help].
 
  
== Basic text formatting ==
 
 
This markup can be used anywhere ''within'' a line of text, but you cannot start italics or bold on one line and close it on the next.
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! Description
 
! Description
Line 43: Line 41:
 
| Escape wiki markup
 
| Escape wiki markup
 
| <pre>
 
| <pre>
&lt;nowiki>no ''markup''</nowiki&gt;
+
&lt;nowiki>no '''''markup'''''</nowiki&gt;
 
</pre>
 
</pre>
 
|
 
|
<nowiki>no ''markup''</nowiki>
+
<nowiki>no '''''markup'''''</nowiki>
 
|}
 
|}
  
== Section formatting ==
+
Some HTML tags are allowed by MediaWiki ([http://en.wikipedia.org/wiki/Help:HTML_in_wikitext#Permitted_HTML full list]).
 
 
Section formatting can only be used at the beginning of a line.  {{note|Blank spaces at the start of a line are significant.}}
 
 
 
=== Headings ===
 
 
 
Headings of different levels are created by surrounding the line with equal signs (=).
 
<pre>
 
== Level 2 ==
 
=== Level 3 ===
 
==== Level 4 ====
 
===== Level 5 =====
 
====== Level 6 ======
 
</pre>
 
 
 
{{note|Level 1 is automatically generated for the page title and is not appropriate within the body of articles.}}
 
{{note|An article with 4 or more headings automatically shows a table of contents.}}
 
 
 
For each heading in the wiki article an HTML anchor is automatically created.  That makes it possible to create [[#Links to section headings]].
 
 
 
=== Paragraphs ===
 
 
 
MediaWiki generally ignores single line breaks and joins consecutive lines of text together.  To start a new paragraph, leave an empty line.  To create a wide paragraph break, leave two empty lines.  You can force a line break inside a paragraph with the HTML tag <code>&lt;br /></code>.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 78: Line 54:
 
! width=40% | You get
 
! width=40% | You get
 
|-
 
|-
| Single line breaks are ignored
+
| Underline
 
| <pre>
 
| <pre>
This text is joined
+
<u>Underline</u>
together as if it
 
were a single line.
 
 
</pre>
 
</pre>
 
|
 
|
This text is joined
+
<u>Underline</u>
together as if it
+
|-
were a single line.
+
| Strikethrough
|-
 
| Empty lines define paragraphs
 
{{note|Two empty lines give a larger paragraph break.}}
 
 
| <pre>
 
| <pre>
First paragraph.
+
<del>Strikethrough</del>
  
Second paragraph.
+
or
  
 
+
<s>Strikethrough</s>
The third paragraph will <br /> break in the middle.
 
 
</pre>
 
</pre>
 
|
 
|
First paragraph.
+
<del>Strikethrough</del>
  
Second paragraph.
+
or
  
 +
<s>Strikethrough</s>
 +
|-
 +
| Monospaced text
 +
| <pre>
 +
<code>Source code</code>
  
The third paragraph will <br /> break in the middle.
+
or
|}
 
  
=== Other sections ===
+
<tt>Teletype text</tt>
 +
</pre>
 +
|
 +
<code>Source code</code>
  
{| class="wikitable"
+
or
! Description
+
 
! width=40% | You type
+
<tt>Teletype text</tt>
! width=40% | You get
 
 
|-
 
|-
| Horizontal rule
+
| Superscript
 
| <pre>
 
| <pre>
Text above
+
C<sup>2</sup>
----
 
Text below
 
 
</pre>
 
</pre>
 
|
 
|
Text above
+
C<sup>2</sup>
----
 
Text below
 
 
|-
 
|-
| Bullet list
+
| Subscript
|
+
| <pre>
<pre>
+
C<sub>2</sub>
* Start each line
 
* with an [[Wikipedia:asterisk|asterisk]] (*).
 
** More asterisks gives deeper
 
*** and deeper levels.
 
* Line breaks<br />don't break levels.
 
*** But jumping levels creates empty space.
 
Any other start ends the list.
 
 
</pre>
 
</pre>
 
|
 
|
* Start each line
+
C<sub>2</sub>
* with an [[Wikipedia:asterisk|asterisk]] (*).
 
** More asterisks gives deeper
 
*** and deeper levels.
 
* Line breaks<br />don't break levels.
 
*** But jumping levels creates empty space.
 
Any other start ends the list.
 
 
|-
 
|-
| Numbered list
+
| Size adjustments
|
+
| <pre>
<pre>
+
<big>Larger text</big>
# Start each line
+
 
# with a [[Wikipedia:Number_sign|number sign]] (#).
+
<small>Smaller text</small>
## More number signs gives deeper
+
 
### and deeper
+
<small>Small text with <big>larger text</big> inside</small>
### levels.
 
# Line breaks<br />don't break levels.
 
### But jumping levels creates empty space.
 
# Blank lines
 
  
# end the list and start another.
+
<small><small>Really small text</small></small>
Any other start also
 
ends the list.
 
 
</pre>
 
</pre>
 
|
 
|
# Start each line
+
<big>Larger text</big>
# with a [[Wikipedia:Number_sign|number sign]] (#).
+
 
## More number signs gives deeper
+
<small>Smaller text</small>
### and deeper
+
 
### levels.
+
<small>Small text with <big>larger text</big> inside</small>
# Line breaks<br />don't break levels.
 
### But jumping levels creates empty space.
 
# Blank lines
 
  
# end the list and start another.
+
<small><small>Really small text</small></small>
Any other start also
 
ends the list.
 
 
|-
 
|-
| Definition list
+
| Code
 
| <pre>
 
| <pre>
;item 1
+
<code>code sample</code>
: definition 1
 
;item 2
 
: definition 2-1
 
: definition 2-2
 
 
</pre>
 
</pre>
 
|
 
|
;item 1
+
<code>code sample</code>
: definition 1
 
;item 2
 
: definition 2-1
 
: definition 2-2
 
 
|-
 
|-
| Mixture of different types of list
+
| Old-school font styling
 +
{{note|This is deprecated, so use CSS styling instead.}}
 +
| <pre>
 +
<font color="green" size="4" face="serif">Big Green Serifs</font>
 +
</pre>
 
|
 
|
<pre>
+
<font color="green" size="4" face="serif">Big Green Serifs</font>
# one
+
|-
# two
+
| CSS styling
#* two point one
+
| <pre>
#* two point two
+
<span style="color:green; font-size:large;
# three
+
font-family:serif">Big Green Serifs</span>
## three sub 1
 
### three sub 1 sub 1
 
## three sub 2
 
 
</pre>
 
</pre>
 
|
 
|
# one
+
<span style="color:green; font-size:large;
# two
+
font-family:serif">Big Green Serifs</span>
#* two point one
 
#* two point two
 
# three
 
## three sub 1
 
### three sub 1 sub 1
 
## three sub 2
 
 
|-
 
|-
| Preformatted text
+
| Abbreviation
{{note|This way of preformatting only applies to section formatting. Character formatting markups are still effective.}}
 
 
| <pre>
 
| <pre>
Start each line with a space.
+
<abbr title="World Taekwondo Federation">WTF</abbr>
Text is '''preformatted''' and
 
character formatting is effective.
 
 
</pre>
 
</pre>
 
|
 
|
Start each line with a space.
+
<abbr title="World Taekwondo Federation">WTF</abbr>
Text is '''preformatted''' and
+
|-
character formatting is effective.
+
| Cite an author
 +
{{note|This is often used with a blockquote, shown in [[#Other section formatting]].}}
 +
| <pre>
 +
<cite>John Doe</cite>
 +
</pre>
 
|
 
|
 +
<cite>John Doe</cite>
 
|-
 
|-
| Syntax Highlighting for code
+
| Highlight text that has been inserted into a document.
 
| <pre>
 
| <pre>
<syntaxhighlight lang="cpp">#include <iostream>
+
This text <ins>has</ins> been corrected.
using namespace std;
+
</pre>
int main (int argc, char** argv) {
+
|
    cout << "Hello World!";
+
This text <ins>has</ins> been corrected.
    return 0;
 
}</syntaxhighlight>
 
</pre>
 
|
 
<syntaxhighlight lang="cpp">#include <iostream>
 
using namespace std;
 
int main (int argc, char** argv) {
 
    cout << "Hello World!";
 
    return 0;
 
}</syntaxhighlight>
 
 
|-
 
|-
| Poetry
+
| Refer to a variable in a computer program
 
| <pre>
 
| <pre>
<poem>
+
The variable <var>foo</var> has not been initialised.
A programmer started to cuss,
 
Because getting to sleep was a fuss.
 
As he lay there in bed,
 
Looping ’round in his head,
 
Was: while(!asleep()) sheep++;
 
&mdash; Author unknown
 
</poem>
 
 
</pre>
 
</pre>
 
|
 
|
<poem>
+
The variable <var>foo</var> has not been initialised.
A programmer started to cuss,
 
Because getting to sleep was a fuss.
 
As he lay there in bed,
 
Looping ’round in his head,
 
Was: while(!asleep()) sheep++;
 
&mdash; Author unknown
 
</poem>
 
 
|}
 
|}
  
== HTML tags ==
+
=== Formatting Pitfalls ===
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <code>&lt;code></code>, <code>&lt;div></code>, <code><nowiki><span></nowiki></code> and <code><nowiki><font></nowiki></code>. These apply anywhere you insert them.
+
Beware the unexpected results shown below.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 273: Line 186:
 
! width=40% | You get
 
! width=40% | You get
 
|-
 
|-
| Underline
+
| Overlapping HTML is invalid
 +
{{note|Results will vary between browsers.}}
 
| <pre>
 
| <pre>
<u>Underline</u>
+
Avoid <b>overlapping <i>html</b> tags</i>.
 
</pre>
 
</pre>
 
|
 
|
<u>Underline</u>
+
<nowiki>[invalid HTML output]</nowiki>
|-
+
|-  
| Strikethrough
+
| Multiline HTML formatting
 
| <pre>
 
| <pre>
<del>Strikethrough</del>
+
Avoid <b>multiline
 
 
or
 
  
<s>Strikethrough</s>
+
html</b> formatting tags.
 
</pre>
 
</pre>
 
|
 
|
<del>Strikethrough</del>
+
<nowiki>[invalid HTML output]</nowiki>
 
 
or
 
 
 
<s>Strikethrough</s>
 
 
|-
 
|-
| Monospaced text
+
| Wiki markup spanning paragraphs
 
| <pre>
 
| <pre>
<code>Source code</code>
+
Avoid '''''multiline
 
 
or
 
  
<tt>Teletype text</tt>
+
wiki''''' markup.
 
</pre>
 
</pre>
 
|
 
|
<code>Source code</code>
+
Avoid '''''multiline
 
 
or
 
  
<tt>Teletype text</tt>
+
wiki''''' markup.
 
|-
 
|-
| Superscript
+
| Multiline wiki markup
 
| <pre>
 
| <pre>
C<sup>2</sup>
+
Avoid '''''multiline
 +
wiki''''' markup.
 
</pre>
 
</pre>
 
|
 
|
C<sup>2</sup>
+
Avoid '''''multiline
|
+
wiki''''' markup.
 
|-
 
|-
| Subscript
+
| Overlapping wiki markup
 +
{{note|This is valid, but can be confusing.}}
 
| <pre>
 
| <pre>
C<sub>2</sub>
+
Basic '''overlapping ''wiki''' markup'' works OK.
 
</pre>
 
</pre>
 
|
 
|
C<sub>2</sub>
+
Basic '''overlapping ''wiki''' markup'' works OK.
|
+
|}
|-
 
| Size adjustments
 
| <pre>
 
<big>Larger text</big>
 
  
<small>Smaller text</small>
+
=== Symbols ===
 +
An HTML symbol entity is a sequence of characters that produces one particular character. For example, <code>&amp;euro;</code> produces the Euro symbol "<code>&euro;</code>" and <code>&amp;trade;</code> produces trademark symbol "<code>&trade;</code>".  HTML symbol entities are allowed in MediaWiki and are sometimes used in advanced editing for two main reasons: to insert characters not normally available on keyboards and to prevent the parser from interpreting and displaying HTML tags and symbols:
  
<small>Small text with <big>larger</big> text inside</small>
+
:<tt>&amp;amp;euro;</tt>&nbsp;&rarr; '''<tt>&amp;euro;</tt>'''
 +
:<tt>&amp;lt;span style="color:green;">Green&amp;lt;/span></tt>&nbsp;&rarr; '''<tt>&lt;span style="color:green;">Green&lt;/span></tt>'''
  
<small><small>Really small text</small></small>
+
The following is a list of characters that can be produced using HTML symbols. Hover any character to find out the symbol that produces it. Some symbols not available in the current font will appear as empty squares.
</pre>
 
|
 
<big>Larger text</big>
 
  
<small>Smaller text</small>
+
{| class="wikitable" align=center width=100%
 
+
! colspan=32 | HTML Symbol Entities
<small>Small text with <big>larger</big> text inside</small>
+
|- align=center
 
+
| <span title="&amp;Aacute;">&Aacute;</span>
<small><small>Really small text</small></small>
+
| <span title="&amp;aacute;">&aacute;</span>
|-
+
| <span title="&amp;Acirc;">&Acirc;</span>
| Blockquotes
+
| <span title="&amp;acirc;">&acirc;</span>
| <pre>
+
| <span title="&amp;acute;">&acute;</span>
text above
+
| <span title="&amp;AElig;">&AElig;</span>
text above
+
| <span title="&amp;aelig;">&aelig;</span>
<blockquote>blockquote</blockquote>
+
| <span title="&amp;Agrave;">&Agrave;</span>
text below
+
| <span title="&amp;agrave;">&agrave;</span>
text below
+
| <span title="&amp;alefsym;">&alefsym;</span>
</pre>
+
| <span title="&amp;Alpha;">&Alpha;</span>
|
+
| <span title="&amp;alpha;">&alpha;</span>
text above
+
| <span title="&amp;amp;">&amp;</span>
text above
+
| <span title="&amp;and;">&and;</span>
<blockquote>blockquote</blockquote>
+
| <span title="&amp;ang;">&ang;</span>
text below
+
| <span title="&amp;Aring;">&Aring;</span>
text below
+
| <span title="&amp;aring;">&aring;</span>
|-
+
| <span title="&amp;asymp;">&asymp;</span>
| Comment
+
| <span title="&amp;Atilde;">&Atilde;</span>
| <pre>
+
| <span title="&amp;atilde;">&atilde;</span>
<!-- This is a comment -->
+
| <span title="&amp;Auml;">&Auml;</span>
Comments are only visible
+
| <span title="&amp;auml;">&auml;</span>
in the edit window.
+
| <span title="&amp;bdquo;">&bdquo;</span>
</pre>
+
| <span title="&amp;Beta;">&Beta;</span>
|
+
| <span title="&amp;beta;">&beta;</span>
<!-- This is a comment -->
+
| <span title="&amp;brvbar;">&brvbar;</span>
Comments are only visible
+
| <span title="&amp;bull;">&bull;</span>
in the edit window.
+
| <span title="&amp;cap;">&cap;</span>
|-
+
| <span title="&amp;Ccedil;">&Ccedil;</span>
| Completely preformatted text
+
| <span title="&amp;ccedil;">&ccedil;</span>
{{note|For marking up of preformatted text, check the "Preformatted text" entry at the bottom of the previous table.}}
+
| <span title="&amp;cedil;">&cedil;</span>
| <pre>
+
| <span title="&amp;cent;">&cent;</span>
<pre> Text is '''preformatted''' and
+
|- align=center
''markups'' '''''are''''' not effective.&lt;/pre>
+
| <span title="&amp;Chi;">&Chi;</span>
</pre>
+
| <span title="&amp;chi;">&chi;</span>
|
+
| <span title="&amp;circ;">&circ;</span>
<pre> Text is '''preformatted''' and
+
| <span title="&amp;clubs;">&clubs;</span>
''markups'' '''''are''''' not effective.
+
| <span title="&amp;cong;">&cong;</span>
</pre>
+
| <span title="&amp;copy;">&copy;</span>
|}
+
| <span title="&amp;crarr;">&crarr;</span>
 
+
| <span title="&amp;cup;">&cup;</span>
A full list of permitted HTML tags can be found in [[wikipedia:Help:HTML_in_wikitext]].
+
| <span title="&amp;curren;">&curren;</span>
 
+
| <span title="&amp;dagger;">&dagger;</span>
== HTML symbols ==
+
| <span title="&amp;Dagger;">&Dagger;</span>
An HTML symbol entity is a sequence of characters that produces one particular character. For example, <code>&amp;euro;</code> produces the Euro symbol "<code>&euro;</code>" and <code>&amp;trade;</code> produces trademark symbol "<code>&trade;</code>".  HTML symbol entities are allowed in MediaWiki and are sometimes used in advanced editing for two main reasons: to insert characters not normally available on keyboards and to prevent the parser from interpreting and displaying HTML tags and symbols:
+
| <span title="&amp;darr;">&darr;</span>
 
+
| <span title="&amp;dArr;">&dArr;</span>
:<tt>&amp;amp;euro;</tt>&nbsp;&rarr; '''<tt>&amp;euro;</tt>'''
+
| <span title="&amp;deg;">&deg;</span>
:<tt>&amp;lt;span style="color:green;">Green&amp;lt;/span></tt>&nbsp;&rarr; '''<tt>&lt;span style="color:green;">Green&lt;/span></tt>'''
+
| <span title="&amp;Delta;">&Delta;</span>
 
+
| <span title="&amp;delta;">&delta;</span>
The following is a list of characters that can be produced using HTML symbols. Hover any character to find out the symbol that produces it. Some symbols not available in the current font will appear as empty squares.
+
| <span title="&amp;diams;">&diams;</span>
 
+
| <span title="&amp;divide;">&divide;</span>
{| class="wikitable" align=center width=100%
+
| <span title="&amp;Eacute;">&Eacute;</span>
! colspan=32 | HTML Symbol Entities
+
| <span title="&amp;eacute;">&eacute;</span>
 +
| <span title="&amp;Ecirc;">&Ecirc;</span>
 +
| <span title="&amp;ecirc;">&ecirc;</span>
 +
| <span title="&amp;Egrave;">&Egrave;</span>
 +
| <span title="&amp;egrave;">&egrave;</span>
 +
| <span title="&amp;empty;">&empty;</span>
 +
| <span title="&amp;emsp;">&emsp;</span>
 +
| <span title="&amp;ensp;">&ensp;</span>
 +
| <span title="&amp;Epsilon;">&Epsilon;</span>
 +
| <span title="&amp;epsilon;">&epsilon;</span>
 +
| <span title="&amp;equiv;">&equiv;</span>
 +
| <span title="&amp;Eta;">&Eta;</span>
 +
| <span title="&amp;eta;">&eta;</span>
 
|- align=center
 
|- align=center
| <span title="&amp;Aacute;">&Aacute;</span>
+
| <span title="&amp;ETH;">&ETH;</span>
| <span title="&amp;aacute;">&aacute;</span>
+
| <span title="&amp;eth;">&eth;</span>
| <span title="&amp;Acirc;">&Acirc;</span>
+
| <span title="&amp;Euml;">&Euml;</span>
| <span title="&amp;acirc;">&acirc;</span>
+
| <span title="&amp;euml;">&euml;</span>
| <span title="&amp;acute;">&acute;</span>
+
| <span title="&amp;euro;">&euro;</span>
| <span title="&amp;AElig;">&AElig;</span>
+
| <span title="&amp;exist;">&exist;</span>
| <span title="&amp;aelig;">&aelig;</span>
+
| <span title="&amp;fnof;">&fnof;</span>
| <span title="&amp;Agrave;">&Agrave;</span>
+
| <span title="&amp;forall;">&forall;</span>
| <span title="&amp;agrave;">&agrave;</span>
+
| <span title="&amp;frac12;">&frac12;</span>
| <span title="&amp;alefsym;">&alefsym;</span>
+
| <span title="&amp;frac14;">&frac14;</span>
| <span title="&amp;Alpha;">&Alpha;</span>
+
| <span title="&amp;frac34;">&frac34;</span>
| <span title="&amp;alpha;">&alpha;</span>
+
| <span title="&amp;frasl;">&frasl;</span>
| <span title="&amp;amp;">&amp;</span>
+
| <span title="&amp;Gamma;">&Gamma;</span>
| <span title="&amp;and;">&and;</span>
+
| <span title="&amp;gamma;">&gamma;</span>
| <span title="&amp;ang;">&ang;</span>
+
| <span title="&amp;ge;">&ge;</span>
| <span title="&amp;Aring;">&Aring;</span>
+
| <span title="&amp;gt;">&gt;</span>
| <span title="&amp;aring;">&aring;</span>
+
| <span title="&amp;harr;">&harr;</span>
| <span title="&amp;asymp;">&asymp;</span>
+
| <span title="&amp;hArr;">&hArr;</span>
| <span title="&amp;Atilde;">&Atilde;</span>
+
| <span title="&amp;hearts;">&hearts;</span>
| <span title="&amp;atilde;">&atilde;</span>
+
| <span title="&amp;hellip;">&hellip;</span>
| <span title="&amp;Auml;">&Auml;</span>
+
| <span title="&amp;Iacute;">&Iacute;</span>
| <span title="&amp;auml;">&auml;</span>
+
| <span title="&amp;iacute;">&iacute;</span>
| <span title="&amp;bdquo;">&bdquo;</span>
+
| <span title="&amp;Icirc;">&Icirc;</span>
| <span title="&amp;Beta;">&Beta;</span>
+
| <span title="&amp;icirc;">&icirc;</span>
| <span title="&amp;beta;">&beta;</span>
+
| <span title="&amp;iexcl;">&iexcl;</span>
| <span title="&amp;brvbar;">&brvbar;</span>
+
| <span title="&amp;Igrave;">&Igrave;</span>
| <span title="&amp;bull;">&bull;</span>
+
| <span title="&amp;igrave;">&igrave;</span>
| <span title="&amp;cap;">&cap;</span>
+
| <span title="&amp;image;">&image;</span>
| <span title="&amp;Ccedil;">&Ccedil;</span>
+
| <span title="&amp;infin;">&infin;</span>
| <span title="&amp;ccedil;">&ccedil;</span>
+
| <span title="&amp;int;">&int;</span>
| <span title="&amp;cedil;">&cedil;</span>
+
| <span title="&amp;Iota;">&Iota;</span>
| <span title="&amp;cent;">&cent;</span>
+
| <span title="&amp;iota;">&iota;</span>
 
|- align=center
 
|- align=center
| <span title="&amp;Chi;">&Chi;</span>
+
| <span title="&amp;iquest;">&iquest;</span>
| <span title="&amp;chi;">&chi;</span>
+
| <span title="&amp;isin;">&isin;</span>
| <span title="&amp;circ;">&circ;</span>
+
| <span title="&amp;Iuml;">&Iuml;</span>
| <span title="&amp;clubs;">&clubs;</span>
+
| <span title="&amp;iuml;">&iuml;</span>
| <span title="&amp;cong;">&cong;</span>
+
| <span title="&amp;Kappa;">&Kappa;</span>
| <span title="&amp;copy;">&copy;</span>
+
| <span title="&amp;kappa;">&kappa;</span>
| <span title="&amp;crarr;">&crarr;</span>
+
| <span title="&amp;Lambda;">&Lambda;</span>
| <span title="&amp;cup;">&cup;</span>
+
| <span title="&amp;lambda;">&lambda;</span>
| <span title="&amp;curren;">&curren;</span>
+
| <span title="&amp;lang;">&lang;</span>
| <span title="&amp;dagger;">&dagger;</span>
+
| <span title="&amp;laquo;">&laquo;</span>
| <span title="&amp;Dagger;">&Dagger;</span>
+
| <span title="&amp;larr;">&larr;</span>
| <span title="&amp;darr;">&darr;</span>
+
| <span title="&amp;lArr;">&lArr;</span>
| <span title="&amp;dArr;">&dArr;</span>
+
| <span title="&amp;lceil;">&lceil;</span>
| <span title="&amp;deg;">&deg;</span>
+
| <span title="&amp;ldquo;">&ldquo;</span>
| <span title="&amp;Delta;">&Delta;</span>
+
| <span title="&amp;le;">&le;</span>
| <span title="&amp;delta;">&delta;</span>
+
| <span title="&amp;lfloor;">&lfloor;</span>
| <span title="&amp;diams;">&diams;</span>
+
| <span title="&amp;lowast;">&lowast;</span>
| <span title="&amp;divide;">&divide;</span>
+
| <span title="&amp;loz;">&loz;</span>
| <span title="&amp;Eacute;">&Eacute;</span>
+
| <span title="&amp;lrm;">&lrm;</span>
| <span title="&amp;eacute;">&eacute;</span>
+
| <span title="&amp;lsaquo;">&lsaquo;</span>
| <span title="&amp;Ecirc;">&Ecirc;</span>
+
| <span title="&amp;lsquo;">&lsquo;</span>
| <span title="&amp;ecirc;">&ecirc;</span>
+
| <span title="&amp;lt;">&lt;</span>
| <span title="&amp;Egrave;">&Egrave;</span>
+
| <span title="&amp;macr;">&macr;</span>
| <span title="&amp;egrave;">&egrave;</span>
+
| <span title="&amp;mdash;">&mdash;</span>
| <span title="&amp;empty;">&empty;</span>
+
| <span title="&amp;micro;">&micro;</span>
| <span title="&amp;emsp;">&emsp;</span>
+
| <span title="&amp;middot;">&middot;</span>
| <span title="&amp;ensp;">&ensp;</span>
+
| <span title="&amp;minus;">&minus;</span>
| <span title="&amp;Epsilon;">&Epsilon;</span>
+
| <span title="&amp;Mu;">&Mu;</span>
| <span title="&amp;epsilon;">&epsilon;</span>
+
| <span title="&amp;mu;">&mu;</span>
| <span title="&amp;equiv;">&equiv;</span>
+
| <span title="&amp;nabla;">&nabla;</span>
| <span title="&amp;Eta;">&Eta;</span>
+
| <span title="&amp;nbsp;">&nbsp;</span>
| <span title="&amp;eta;">&eta;</span>
+
| <span title="&amp;ndash;">&ndash;</span>
|- align=center
+
|- align=center
| <span title="&amp;ETH;">&ETH;</span>
+
| <span title="&amp;ne;">&ne;</span>
| <span title="&amp;eth;">&eth;</span>
+
| <span title="&amp;ni;">&ni;</span>
| <span title="&amp;Euml;">&Euml;</span>
+
| <span title="&amp;not;">&not;</span>
| <span title="&amp;euml;">&euml;</span>
+
| <span title="&amp;notin;">&notin;</span>
| <span title="&amp;euro;">&euro;</span>
+
| <span title="&amp;nsub;">&nsub;</span>
| <span title="&amp;exist;">&exist;</span>
+
| <span title="&amp;Ntilde;">&Ntilde;</span>
| <span title="&amp;fnof;">&fnof;</span>
+
| <span title="&amp;ntilde;">&ntilde;</span>
| <span title="&amp;forall;">&forall;</span>
+
| <span title="&amp;Nu;">&Nu;</span>
| <span title="&amp;frac12;">&frac12;</span>
+
| <span title="&amp;nu;">&nu;</span>
| <span title="&amp;frac14;">&frac14;</span>
+
| <span title="&amp;Oacute;">&Oacute;</span>
| <span title="&amp;frac34;">&frac34;</span>
+
| <span title="&amp;oacute;">&oacute;</span>
| <span title="&amp;frasl;">&frasl;</span>
+
| <span title="&amp;Ocirc;">&Ocirc;</span>
| <span title="&amp;Gamma;">&Gamma;</span>
+
| <span title="&amp;ocirc;">&ocirc;</span>
| <span title="&amp;gamma;">&gamma;</span>
+
| <span title="&amp;OElig;">&OElig;</span>
| <span title="&amp;ge;">&ge;</span>
+
| <span title="&amp;oelig;">&oelig;</span>
| <span title="&amp;gt;">&gt;</span>
+
| <span title="&amp;Ograve;">&Ograve;</span>
| <span title="&amp;harr;">&harr;</span>
+
| <span title="&amp;ograve;">&ograve;</span>
| <span title="&amp;hArr;">&hArr;</span>
+
| <span title="&amp;oline;">&oline;</span>
| <span title="&amp;hearts;">&hearts;</span>
+
| <span title="&amp;Omega;">&Omega;</span>
| <span title="&amp;hellip;">&hellip;</span>
+
| <span title="&amp;omega;">&omega;</span>
| <span title="&amp;Iacute;">&Iacute;</span>
+
| <span title="&amp;Omicron;">&Omicron;</span>
| <span title="&amp;iacute;">&iacute;</span>
+
| <span title="&amp;omicron;">&omicron;</span>
| <span title="&amp;Icirc;">&Icirc;</span>
+
| <span title="&amp;oplus;">&oplus;</span>
| <span title="&amp;icirc;">&icirc;</span>
+
| <span title="&amp;or;">&or;</span>
| <span title="&amp;iexcl;">&iexcl;</span>
+
| <span title="&amp;ordf;">&ordf;</span>
| <span title="&amp;Igrave;">&Igrave;</span>
+
| <span title="&amp;ordm;">&ordm;</span>
| <span title="&amp;igrave;">&igrave;</span>
+
| <span title="&amp;Oslash;">&Oslash;</span>
| <span title="&amp;image;">&image;</span>
+
| <span title="&amp;oslash;">&oslash;</span>
| <span title="&amp;infin;">&infin;</span>
+
| <span title="&amp;Otilde;">&Otilde;</span>
| <span title="&amp;int;">&int;</span>
+
| <span title="&amp;otilde;">&otilde;</span>
| <span title="&amp;Iota;">&Iota;</span>
+
| <span title="&amp;otimes;">&otimes;</span>
| <span title="&amp;iota;">&iota;</span>
+
| <span title="&amp;Ouml;">&Ouml;</span>
 
|- align=center
 
|- align=center
| <span title="&amp;iquest;">&iquest;</span>
+
| <span title="&amp;ouml;">&ouml;</span>
| <span title="&amp;isin;">&isin;</span>
+
| <span title="&amp;para;">&para;</span>
| <span title="&amp;Iuml;">&Iuml;</span>
+
| <span title="&amp;part;">&part;</span>
| <span title="&amp;iuml;">&iuml;</span>
+
| <span title="&amp;permil;">&permil;</span>
| <span title="&amp;Kappa;">&Kappa;</span>
+
| <span title="&amp;perp;">&perp;</span>
| <span title="&amp;kappa;">&kappa;</span>
+
| <span title="&amp;Phi;">&Phi;</span>
| <span title="&amp;Lambda;">&Lambda;</span>
+
| <span title="&amp;phi;">&phi;</span>
| <span title="&amp;lambda;">&lambda;</span>
+
| <span title="&amp;Pi;">&Pi;</span>
| <span title="&amp;lang;">&lang;</span>
+
| <span title="&amp;pi;">&pi;</span>
| <span title="&amp;laquo;">&laquo;</span>
+
| <span title="&amp;piv;">&piv;</span>
| <span title="&amp;larr;">&larr;</span>
+
| <span title="&amp;plusmn;">&plusmn;</span>
| <span title="&amp;lArr;">&lArr;</span>
+
| <span title="&amp;pound;">&pound;</span>
| <span title="&amp;lceil;">&lceil;</span>
+
| <span title="&amp;prime;">&prime;</span>
| <span title="&amp;ldquo;">&ldquo;</span>
+
| <span title="&amp;Prime;">&Prime;</span>
| <span title="&amp;le;">&le;</span>
+
| <span title="&amp;prod;">&prod;</span>
| <span title="&amp;lfloor;">&lfloor;</span>
+
| <span title="&amp;prop;">&prop;</span>
| <span title="&amp;lowast;">&lowast;</span>
+
| <span title="&amp;Psi;">&Psi;</span>
| <span title="&amp;loz;">&loz;</span>
+
| <span title="&amp;psi;">&psi;</span>
| <span title="&amp;lrm;">&lrm;</span>
+
| <span title="&amp;quot;">&quot;</span>
| <span title="&amp;lsaquo;">&lsaquo;</span>
+
| <span title="&amp;radic;">&radic;</span>
| <span title="&amp;lsquo;">&lsquo;</span>
+
| <span title="&amp;rang;">&rang;</span>
| <span title="&amp;lt;">&lt;</span>
+
| <span title="&amp;raquo;">&raquo;</span>
| <span title="&amp;macr;">&macr;</span>
+
| <span title="&amp;rarr;">&rarr;</span>
| <span title="&amp;mdash;">&mdash;</span>
+
| <span title="&amp;rArr;">&rArr;</span>
| <span title="&amp;micro;">&micro;</span>
+
| <span title="&amp;rceil;">&rceil;</span>
| <span title="&amp;middot;">&middot;</span>
+
| <span title="&amp;rdquo;">&rdquo;</span>
| <span title="&amp;minus;">&minus;</span>
+
| <span title="&amp;real;">&real;</span>
| <span title="&amp;Mu;">&Mu;</span>
+
| <span title="&amp;reg;">&reg;</span>
| <span title="&amp;mu;">&mu;</span>
+
| <span title="&amp;rfloor;">&rfloor;</span>
| <span title="&amp;nabla;">&nabla;</span>
+
| <span title="&amp;Rho;">&Rho;</span>
| <span title="&amp;nbsp;">&nbsp;</span>
+
| <span title="&amp;rho;">&rho;</span>
| <span title="&amp;ndash;">&ndash;</span>
+
| <span title="&amp;rlm;">&rlm;</span>
 
|- align=center
 
|- align=center
| <span title="&amp;ne;">&ne;</span>
+
| <span title="&amp;rsaquo;">&rsaquo;</span>
| <span title="&amp;ni;">&ni;</span>
+
| <span title="&amp;rsquo;">&rsquo;</span>
| <span title="&amp;not;">&not;</span>
+
| <span title="&amp;sbquo;">&sbquo;</span>
| <span title="&amp;notin;">&notin;</span>
+
| <span title="&amp;Scaron;">&Scaron;</span>
| <span title="&amp;nsub;">&nsub;</span>
+
| <span title="&amp;scaron;">&scaron;</span>
| <span title="&amp;Ntilde;">&Ntilde;</span>
+
| <span title="&amp;sdot;">&sdot;</span>
| <span title="&amp;ntilde;">&ntilde;</span>
+
| <span title="&amp;sect;">&sect;</span>
| <span title="&amp;Nu;">&Nu;</span>
+
| <span title="&amp;shy;">&shy;</span>
| <span title="&amp;nu;">&nu;</span>
+
| <span title="&amp;Sigma;">&Sigma;</span>
| <span title="&amp;Oacute;">&Oacute;</span>
+
| <span title="&amp;sigma;">&sigma;</span>
| <span title="&amp;oacute;">&oacute;</span>
+
| <span title="&amp;sigmaf;">&sigmaf;</span>
| <span title="&amp;Ocirc;">&Ocirc;</span>
+
| <span title="&amp;sim;">&sim;</span>
| <span title="&amp;ocirc;">&ocirc;</span>
+
| <span title="&amp;spades;">&spades;</span>
| <span title="&amp;OElig;">&OElig;</span>
+
| <span title="&amp;sub;">&sub;</span>
| <span title="&amp;oelig;">&oelig;</span>
+
| <span title="&amp;sube;">&sube;</span>
| <span title="&amp;Ograve;">&Ograve;</span>
+
| <span title="&amp;sum;">&sum;</span>
| <span title="&amp;ograve;">&ograve;</span>
+
| <span title="&amp;sup;">&sup;</span>
| <span title="&amp;oline;">&oline;</span>
+
| <span title="&amp;sup1;">&sup1;</span>
| <span title="&amp;Omega;">&Omega;</span>
+
| <span title="&amp;sup2;">&sup2;</span>
| <span title="&amp;omega;">&omega;</span>
+
| <span title="&amp;sup3;">&sup3;</span>
| <span title="&amp;Omicron;">&Omicron;</span>
+
| <span title="&amp;supe;">&supe;</span>
| <span title="&amp;omicron;">&omicron;</span>
+
| <span title="&amp;szlig;">&szlig;</span>
| <span title="&amp;oplus;">&oplus;</span>
+
| <span title="&amp;Tau;">&Tau;</span>
| <span title="&amp;or;">&or;</span>
+
| <span title="&amp;tau;">&tau;</span>
| <span title="&amp;ordf;">&ordf;</span>
+
| <span title="&amp;there4;">&there4;</span>
| <span title="&amp;ordm;">&ordm;</span>
+
| <span title="&amp;Theta;">&Theta;</span>
| <span title="&amp;Oslash;">&Oslash;</span>
+
| <span title="&amp;theta;">&theta;</span>
| <span title="&amp;oslash;">&oslash;</span>
+
| <span title="&amp;thetasym;">&thetasym;</span>
| <span title="&amp;Otilde;">&Otilde;</span>
+
| <span title="&amp;thinsp;">&thinsp;</span>
| <span title="&amp;otilde;">&otilde;</span>
+
| <span title="&amp;THORN;">&THORN;</span>
| <span title="&amp;otimes;">&otimes;</span>
+
| <span title="&amp;thorn;">&thorn;</span>
| <span title="&amp;Ouml;">&Ouml;</span>
+
| <span title="&amp;tilde;">&tilde;</span>
 
|- align=center
 
|- align=center
| <span title="&amp;ouml;">&ouml;</span>
+
| <span title="&amp;times;">&times;</span>
| <span title="&amp;para;">&para;</span>
+
| <span title="&amp;trade;">&trade;</span>
| <span title="&amp;part;">&part;</span>
+
| <span title="&amp;Uacute;">&Uacute;</span>
| <span title="&amp;permil;">&permil;</span>
+
| <span title="&amp;uacute;">&uacute;</span>
| <span title="&amp;perp;">&perp;</span>
+
| <span title="&amp;uarr;">&uarr;</span>
| <span title="&amp;Phi;">&Phi;</span>
+
| <span title="&amp;uArr;">&uArr;</span>
| <span title="&amp;phi;">&phi;</span>
+
| <span title="&amp;Ucirc;">&Ucirc;</span>
| <span title="&amp;Pi;">&Pi;</span>
+
| <span title="&amp;ucirc;">&ucirc;</span>
| <span title="&amp;pi;">&pi;</span>
+
| <span title="&amp;Ugrave;">&Ugrave;</span>
| <span title="&amp;piv;">&piv;</span>
+
| <span title="&amp;ugrave;">&ugrave;</span>
| <span title="&amp;plusmn;">&plusmn;</span>
+
| <span title="&amp;uml;">&uml;</span>
| <span title="&amp;pound;">&pound;</span>
+
| <span title="&amp;upsih;">&upsih;</span>
| <span title="&amp;prime;">&prime;</span>
+
| <span title="&amp;Upsilon;">&Upsilon;</span>
| <span title="&amp;Prime;">&Prime;</span>
+
| <span title="&amp;upsilon;">&upsilon;</span>
| <span title="&amp;prod;">&prod;</span>
+
| <span title="&amp;Uuml;">&Uuml;</span>
| <span title="&amp;prop;">&prop;</span>
+
| <span title="&amp;uuml;">&uuml;</span>
| <span title="&amp;Psi;">&Psi;</span>
+
| <span title="&amp;weierp;">&weierp;</span>
| <span title="&amp;psi;">&psi;</span>
+
| <span title="&amp;Xi;">&Xi;</span>
| <span title="&amp;quot;">&quot;</span>
+
| <span title="&amp;xi;">&xi;</span>
| <span title="&amp;radic;">&radic;</span>
+
| <span title="&amp;Yacute;">&Yacute;</span>
| <span title="&amp;rang;">&rang;</span>
+
| <span title="&amp;yacute;">&yacute;</span>
| <span title="&amp;raquo;">&raquo;</span>
+
| <span title="&amp;yen;">&yen;</span>
| <span title="&amp;rarr;">&rarr;</span>
+
| <span title="&amp;yuml;">&yuml;</span>
| <span title="&amp;rArr;">&rArr;</span>
+
| <span title="&amp;Yuml;">&Yuml;</span>
| <span title="&amp;rceil;">&rceil;</span>
+
| <span title="&amp;Zeta;">&Zeta;</span>
| <span title="&amp;rdquo;">&rdquo;</span>
+
| <span title="&amp;zeta;">&zeta;</span>
| <span title="&amp;real;">&real;</span>
+
| <span title="&amp;zwj;">&zwj;</span>
| <span title="&amp;reg;">&reg;</span>
+
| <span title="&amp;zwnj;">&zwnj;</span>
| <span title="&amp;rfloor;">&rfloor;</span>
+
|}
| <span title="&amp;Rho;">&Rho;</span>
+
 
| <span title="&amp;rho;">&rho;</span>
+
=== Mathematical formulae ===
| <span title="&amp;rlm;">&rlm;</span>
+
 
|- align=center
+
Formulae can be written in TeX using <code>&lt;math></code> tags.  See [[wikipedia:Help:Displaying a formula]] for details.
| <span title="&amp;rsaquo;">&rsaquo;</span>
+
 
| <span title="&amp;rsquo;">&rsquo;</span>
+
{| class="wikitable"
| <span title="&amp;sbquo;">&sbquo;</span>
+
! Description
| <span title="&amp;Scaron;">&Scaron;</span>
+
! width=40% | You type
| <span title="&amp;scaron;">&scaron;</span>
+
! width=40% | You get
| <span title="&amp;sdot;">&sdot;</span>
+
|-
| <span title="&amp;sect;">&sect;</span>
+
| The equation of mass-energy equivalence
| <span title="&amp;shy;">&shy;</span>
+
| <pre>
| <span title="&amp;Sigma;">&Sigma;</span>
+
<math>E = mc^2 \,\!</math>
| <span title="&amp;sigma;">&sigma;</span>
+
</pre>
| <span title="&amp;sigmaf;">&sigmaf;</span>
+
|
| <span title="&amp;sim;">&sim;</span>
+
<math>E = mc^2 \,\!</math>
| <span title="&amp;spades;">&spades;</span>
+
|-
| <span title="&amp;sub;">&sub;</span>
+
| The convolution theorem states that...
| <span title="&amp;sube;">&sube;</span>
+
| <pre>
| <span title="&amp;sum;">&sum;</span>
+
<math> \mathcal{F}\{f * g\} = k\cdot \mathcal{F}\{f\}\cdot \mathcal{F}\{g\}</math>
| <span title="&amp;sup;">&sup;</span>
+
</pre>
| <span title="&amp;sup1;">&sup1;</span>
+
|
| <span title="&amp;sup2;">&sup2;</span>
+
<math> \mathcal{F}\{f * g\} = k\cdot \mathcal{F}\{f\}\cdot \mathcal{F}\{g\}</math>
| <span title="&amp;sup3;">&sup3;</span>
+
|}
| <span title="&amp;supe;">&supe;</span>
+
 
| <span title="&amp;szlig;">&szlig;</span>
+
== Layout ==
| <span title="&amp;Tau;">&Tau;</span>
+
 
| <span title="&amp;tau;">&tau;</span>
+
Section formatting can only be used at the beginning of a line.  {{note}} Spaces at the start of a line are significant.
| <span title="&amp;there4;">&there4;</span>
+
 
| <span title="&amp;Theta;">&Theta;</span>
+
=== Headings ===
| <span title="&amp;theta;">&theta;</span>
+
 
| <span title="&amp;thetasym;">&thetasym;</span>
+
Headings of different levels are created by surrounding the line with equal signs (=).
| <span title="&amp;thinsp;">&thinsp;</span>
+
<pre>
| <span title="&amp;THORN;">&THORN;</span>
+
== Level 2 ==
| <span title="&amp;thorn;">&thorn;</span>
+
=== Level 3 ===
| <span title="&amp;tilde;">&tilde;</span>
+
==== Level 4 ====
|- align=center
+
===== Level 5 =====
| <span title="&amp;times;">&times;</span>
+
====== Level 6 ======
| <span title="&amp;trade;">&trade;</span>
+
</pre>
| <span title="&amp;Uacute;">&Uacute;</span>
+
 
| <span title="&amp;uacute;">&uacute;</span>
+
{{note|Level 1 is automatically generated for the page title and is not appropriate within the body of articles.}}
| <span title="&amp;uarr;">&uarr;</span>
+
For each heading in the wiki article an HTML anchor is automatically created.  That makes it possible to create [[#Links to section headings]].  An article with 4 or more headings automatically shows a table of contents.
| <span title="&amp;uArr;">&uArr;</span>
+
 
| <span title="&amp;Ucirc;">&Ucirc;</span>
+
=== Paragraphs ===
| <span title="&amp;ucirc;">&ucirc;</span>
+
 
| <span title="&amp;Ugrave;">&Ugrave;</span>
+
MediaWiki generally ignores single line breaks and joins consecutive lines of text together.  To start a new paragraph, leave an empty line.  To create a wide paragraph break, leave two empty lines.  You can force a line break inside a paragraph with the HTML tag <code>&lt;br /></code>.
| <span title="&amp;ugrave;">&ugrave;</span>
+
 
| <span title="&amp;uml;">&uml;</span>
+
{| class="wikitable"
| <span title="&amp;upsih;">&upsih;</span>
+
! Description
| <span title="&amp;Upsilon;">&Upsilon;</span>
+
! width=40% | You type
| <span title="&amp;upsilon;">&upsilon;</span>
+
! width=40% | You get
| <span title="&amp;Uuml;">&Uuml;</span>
+
|-
| <span title="&amp;uuml;">&uuml;</span>
+
| Single line breaks are ignored
| <span title="&amp;weierp;">&weierp;</span>
+
| <pre>
| <span title="&amp;Xi;">&Xi;</span>
+
This text is joined
| <span title="&amp;xi;">&xi;</span>
+
together as if it
| <span title="&amp;Yacute;">&Yacute;</span>
+
were a single line.
| <span title="&amp;yacute;">&yacute;</span>
+
</pre>
| <span title="&amp;yen;">&yen;</span>
+
|
| <span title="&amp;yuml;">&yuml;</span>
+
This text is joined
| <span title="&amp;Yuml;">&Yuml;</span>
+
together as if it
| <span title="&amp;Zeta;">&Zeta;</span>
+
were a single line.
| <span title="&amp;zeta;">&zeta;</span>
+
|-
| <span title="&amp;zwj;">&zwj;</span>
+
| Empty lines define paragraphs
| <span title="&amp;zwnj;">&zwnj;</span>
+
{{note|Two empty lines give a larger paragraph break.}}
 +
| <pre>
 +
First paragraph.
 +
 
 +
Second paragraph.
 +
 
 +
 
 +
The third paragraph will <br /> break in the middle.
 +
</pre>
 +
|
 +
First paragraph.
 +
 
 +
Second paragraph.
 +
 
 +
 
 +
The third paragraph will <br /> break in the middle.
 
|}
 
|}
  
== Mathematical formulae ==
+
=== Other section formatting ===
 
 
Formulae can be written in TeX using <code>&lt;math></code> tags.  See [[wikipedia:Help:Displaying_a_formula]] for details.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 666: Line 592:
 
! width=40% | You get
 
! width=40% | You get
 
|-
 
|-
| The equation of mass-energy equivalence
+
| Bullet list
| <pre>
+
|
<math>E = mc^2 \,\!</math>
+
<pre>
 +
* Start each line
 +
* with an [[Wikipedia:asterisk|asterisk]] (*).
 +
** More asterisks gives deeper
 +
*** and deeper levels.
 +
* Line breaks<br />don't break levels.
 +
*** But jumping levels creates empty space.
 +
Any other new line ends the list.
 
</pre>
 
</pre>
 
|
 
|
<math>E = mc^2 \,\!</math>
+
* Start each line
 +
* with an [[Wikipedia:asterisk|asterisk]] (*).
 +
** More asterisks gives deeper
 +
*** and deeper levels.
 +
* Line breaks<br />don't break levels.
 +
*** But jumping levels creates empty space.
 +
Any other new line ends the list.
 
|-
 
|-
| The convolution theorem states that...
+
| Numbered list
| <pre>
+
|
<math> \mathcal{F}\{f * g\} = k\cdot \mathcal{F}\{f\}\cdot \mathcal{F}\{g\}</math>
+
<pre>
 +
# Start each line
 +
# with a [[Wikipedia:Number_sign|number sign]] (#).
 +
## More number signs gives deeper
 +
### and deeper
 +
### levels.
 +
# Line breaks<br />don't break levels.
 +
### But jumping levels creates empty space.
 +
# Blank lines
 +
 
 +
# end the list and start another.
 +
Any other new line also
 +
ends the list.
 
</pre>
 
</pre>
 
|
 
|
<math> \mathcal{F}\{f * g\} = k\cdot \mathcal{F}\{f\}\cdot \mathcal{F}\{g\}</math>
+
# Start each line
|}
+
# with a [[Wikipedia:Number_sign|number sign]] (#).
 
+
## More number signs gives deeper
== Links ==
+
### and deeper
 +
### levels.
 +
# Line breaks<br />don't break levels.
 +
### But jumping levels creates empty space.
 +
# Blank lines
  
There are three sorts of links:
+
# end the list and start another.
# '''[[#Internal links|Internal links]]''' to other pages in the wiki.
+
Any other new line also
# '''[[#External links|External links]]''' to other websites.
+
ends the list.
# '''[[#Interwiki links|Interwiki links]]''' to other websites registered to the wiki in advance.
 
 
 
=== Internal links ===
 
To add an internal link, enclose the name of the page you want to link to in double square brackets. When you save the page, you'll see the new link pointing to your page. If the page exists already it is displayed in blue, if it does not, in red.
 
 
 
The first letter of the target page is automatically capitalized, unless otherwise set by the admins, and spaces are represented as underscores (typing an underscore in the link will have a similar effect as typing a space, but is not recommended, since the underscore will also be shown in the text).
 
 
 
{| border="1" class="wikitable"
 
!Description
 
!You type
 
!You get
 
 
|-
 
|-
|Internal link
+
| Definition list
|<pre>[[NottingHack]]</pre>
+
| <pre>
|[[NottingHack]]
+
;item 1
|-
+
: definition 1
|A piped link
+
;item 2
{{note|See [[metawikipedia:Help:Piped link]].}}
+
: definition 2-1
|<pre>[[NottingHack|different text]]</pre>
+
: definition 2-2
|[[NottingHack|different text]]
 
|-
 
|Hide namespace shortcut
 
|<pre>[[Help:Contents|]]</pre>
 
|[[Help:Contents|Contents]]
 
|-
 
|word-ending links
 
|<pre>
 
[[Help]]s
 
 
 
[[Help]]ing
 
 
 
[[Help]]ers
 
 
 
[[Help]]anylettersyoulikehere
 
 
</pre>
 
</pre>
 
|
 
|
[[Help]]s
+
;item 1
 
+
: definition 1
[[Help]]ing
+
;item 2
 
+
: definition 2-1
[[Help]]ers
+
: definition 2-2
 
 
[[Help]]anylettersyoulikehere
 
 
|-
 
|-
|Redirect
+
| Mixture of different types of list
{{note|See also [[#Redirects]]}}
+
|
|<pre>#REDIRECT [[Main Page]]</pre>
+
<pre>
| &rarr; [[Main Page]]
+
# one
 +
# two
 +
#* two point one
 +
#* two point two
 +
# three
 +
## three sub 1
 +
### three sub 1 sub 1
 +
## three sub 2
 +
</pre>
 +
|
 +
# one
 +
# two
 +
#* two point one
 +
#* two point two
 +
# three
 +
## three sub 1
 +
### three sub 1 sub 1
 +
## three sub 2
 
|-
 
|-
|Internal link to an anchor on the current page
+
| Poetry
|<pre>[[#See also]]</pre>
+
| <pre>
|[[#See also]]
+
<poem>
|-
+
A programmer started to cuss,
|Internal link to the current page's table of contents
+
Because getting to sleep was a fuss.
|<pre>[[#toc|Contents]]</pre>
+
As he lay there in bed,
|[[#toc|Contents]]
+
Looping ’round in his head,
 +
Was: while(!asleep()) sheep++;
 +
-- <cite>Author unknown</cite>
 +
</poem>
 +
</pre>
 +
|
 +
<poem>
 +
A programmer started to cuss,
 +
Because getting to sleep was a fuss.
 +
As he lay there in bed,
 +
Looping ’round in his head,
 +
Was: while(!asleep()) sheep++;
 +
-- <cite>Author unknown</cite>
 +
</poem>
 
|-
 
|-
|Internal link to the top of the current page
+
| Blockquotes
|<pre>[[#top|top]]</pre>
+
| <pre>
|[[#top|top]]
+
text above
|-
+
text above
|Internal link to an anchor from different text
+
<blockquote>blockquote</blockquote>
|<pre>[[#See also|different text]]</pre>
+
text below
|[[#See also|different text]]
+
text below
|-
+
</pre>
|Setting an internal link anchor
+
|
{{note|Omit the "optional text" for invisible anchor.}}
+
text above
{{note|See also [[#Links to section headings]].}}
+
text above
|<pre><div id="NameOfAnchorHere">optional text</div></pre>
+
<blockquote>blockquote</blockquote>
|<div id="NameOfAnchorHere">optional text</div>
+
text below
 +
text below
 
|-
 
|-
|Internal link to an anchor at another page
+
| Preformatted text
|<pre>[[Help:Images#See also]]</pre>
+
{{note|This way of preformatting only applies to section formatting. Text formatting markup is still effective.}}
|[[Help:Images#See also]]
+
| <pre>
 +
Start each line with a space.
 +
* Text is '''preformatted''' and
 +
character formatting is effective.
 +
</pre>
 +
|
 +
Start each line with a space.
 +
* Text is '''preformatted''' and
 +
character formatting is effective.
 
|-
 
|-
|Internal link to the current page's talk page
+
| Completely preformatted text
|<pre>[[{{TALKPAGENAME}}|Discussion]]</pre>
+
| <pre>
|[[{{TALKPAGENAME}}|Discussion]]
+
<pre> Text is '''preformatted''' and
 +
''markup'' '''''is''''' not effective.&lt;/pre>
 +
</pre>
 +
|
 +
<pre> Text is '''preformatted''' and
 +
''markup'' '''''is''''' not effective.
 +
</pre>
 
|-
 
|-
|Internal link to the current page's edit page
+
| Syntax Highlighting for code
|<pre>[{{fullurl:{{PAGENAME}}|action=edit}} Edit]</pre>
+
| <pre>
|[{{fullurl:{{PAGENAME}}|action=edit}} Edit]
+
<syntaxhighlight lang="cpp">#include <iostream>
 +
using namespace std;
 +
int main (int argc, char** argv) {
 +
    cout << "Hello World!";
 +
    return 0;
 +
}</syntaxhighlight>
 +
</pre>
 +
|
 +
<syntaxhighlight lang="cpp">#include <iostream>
 +
using namespace std;
 +
int main (int argc, char** argv) {
 +
    cout << "Hello World!";
 +
    return 0;
 +
}</syntaxhighlight>
 
|-
 
|-
|Internal link to a subpage
+
| A useful error message for syntax higlighting
See also [[#Subpages]].
+
{{note|When an invalid 'lang' is used, the error message lists the available languages.  Also see [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages].}}
|<pre>[[/example]]</pre>
+
| <pre>
|[[/example]]
+
<syntaxhighlight lang="-"></syntaxhighlight>
 +
</pre>
 +
|
 +
<syntaxhighlight lang="-"></syntaxhighlight>
 
|-
 
|-
|Internal link to a subpage without the leading slash
+
| Horizontal rule
|<pre>[[/example/]]</pre>
+
| <pre>
|[[/example/]]
+
Text above
|-
+
----
|Internal link to a category page
+
Text below
{{note|See also [[#Categories]]}}
+
</pre>
|<pre>[[:Category:Help]]</pre>
+
|
|[[:Category:Help]]
+
Text above
 +
----
 +
Text below
 
|-
 
|-
|Internal link to an image or a file of other types
+
| Old-school centered text
{{note|See also [[#Images]]}}
+
{{note|This is deprecated, so use the css method instead.}}
|<pre>[[media:example.jpg]]
+
| <pre>
 
+
text above<center>centered</center>text below
[[media:example.pdf]]</pre>
+
</pre>
|[[media:example.jpg]]
+
|
 
+
text above<center>centered</center>text below
[[media:example.pdf]]
 
 
|-
 
|-
|Internal link to the user's user page
+
| CSS method to center text
|<pre>[[Special:MyPage]]</pre>
+
| <pre>
|[[Special:MyPage]]
+
text above<div class="center" style="width:auto;
 +
margin-left:auto; margin-right:auto;">centered</div>
 +
text below
 +
</pre>
 +
|
 +
text above<div class="center" style="width:auto;
 +
margin-left:auto; margin-right:auto;">centered</div>
 +
text below
 
|-
 
|-
|Additional wiki markup is permitted in link titles
+
| Comment
|<pre>[[#top|'''<del>rich</del>''' ''link text'' here.]]</pre>
+
| <pre>
|[[#top|'''<del>rich</del>''' ''link text'' here.]]
+
<!-- This is a comment -->
|}
+
Comments are only visible
 +
in the edit window.
 +
</pre>
 +
|
 +
<!-- This is a comment -->
 +
Comments are only visible
 +
in the edit window.
 +
|}
  
==== Links to section headings ====
+
== Links ==
 +
 
 +
There are three sorts of links:
 +
# '''[[#Internal links|Internal links]]''' to other pages in the wiki.
 +
# '''[[#External links|External links]]''' to other websites.
 +
# '''[[#Interwiki links|Interwiki links]]''' to other websites registered to the wiki in advance.
 +
 
 +
=== Internal links ===
 +
To add an internal link, enclose the name of the page you want to link to in double square brackets.  The first letter of the link is automatically capitalized and spaces are replaced with underscores.
  
You can link directly to headings within a wiki page. MediaWiki automatically creates an HTML anchor with the same name as the heading.
+
{{note|A red link indicates that the target page does not exist yet.}}
  
 
{| border="1" class="wikitable"
 
{| border="1" class="wikitable"
Line 810: Line 821:
 
!You get
 
!You get
 
|-
 
|-
|Links to section headings
+
|An internal link
 +
|<pre>[[NottingHack]]</pre>
 +
|[[NottingHack]]
 +
|-
 +
|A [[metawikipedia:Help:Piped link|piped link]]
 +
|<pre>[[NottingHack|different text]]</pre>
 +
|[[NottingHack|different text]]
 +
|-
 +
|Word-endings are 'blended'
 
|<pre>
 
|<pre>
[[#External links]]
+
[[Help]]s
 +
 
 +
[[Help]]ing
  
[[#Pitfalls!]]
+
[[Help]]ers
</pre>
+
 
 +
[[Help]]anylettersyoulikehere
 +
 
 +
[[Help]]&lt;nowiki></nowiki>anylettersyoulikehere
 +
</pre>
 
|
 
|
[[#External links]]
+
[[Help]]s
 +
 
 +
[[Help]]ing
  
[[#Pitfalls!]]
+
[[Help]]ers
|}
 
  
{{note| If a heading is renamed then any links to that heading will be broken.}}
+
[[Help]]anylettersyoulikehere
  
=== External links ===
+
[[Help]]<nowiki></nowiki>anylettersyoulikehere
{| class="wikitable"
 
!style="width:15%"|Description
 
!style="width:45%"|You type
 
!style="width:40%"|You get
 
 
|-
 
|-
|External link
+
|Link to an anchor on the current page
|<tt><nowiki>http://mediawiki.org</nowiki></tt>
+
{{note|See [[#Links to section headings]].}}
|http://mediawiki.org
+
|<pre>[[#See also]]</pre>
 +
|[[#See also]]
 
|-
 
|-
|External link with different label
+
|Link to the current page's table of contents
|<tt><nowiki>[http://mediawiki.org MediaWiki]</nowiki></tt>
+
|<pre>[[#toc|Contents]]</pre>
|[http://mediawiki.org MediaWiki]
+
|[[#toc|Contents]]
 
|-
 
|-
|Numbered external link
+
|Link to the top of the current page
|<tt><nowiki>[http://mediawiki.org]</nowiki></tt>
+
|<pre>[[#top|top]]</pre>
|[http://mediawiki.org]
+
|[[#top|top]]
 
|-
 
|-
|External links with file icons
+
|Link to an anchor from different text
{{note|See [[#External links icons|currently supported icons]].}}
+
|<pre>[[#See also|different text]]</pre>
|<tt><nowiki>
+
|[[#See also|different text]]
[http://en.wikipedia.org/wiki/.avi video]
 
[http://en.wikipedia.org/wiki/.ogg sound]
 
[http://en.wikipedia.org/wiki/.pdf document]
 
</nowiki></tt>
 
|
 
[http://en.wikipedia.org/wiki/.avi video]<br/>
 
[http://en.wikipedia.org/wiki/.ogg sound]<br/>
 
[http://en.wikipedia.org/wiki/.pdf document]<br/>
 
 
|-
 
|-
|External link to the same host
+
|Setting an internal link anchor
|<tt><nowiki>http://{{SERVERNAME}}/pagename</nowiki></tt>
+
{{note|Omit the "optional text" for invisible anchor.}}
|http://{{SERVERNAME}}/pagename
+
|<pre><div id="NameOfAnchorHere">optional text</div></pre>
 +
|<div id="NameOfAnchorHere">optional text</div>
 
|-
 
|-
|External link to other host passing the pagename
+
|Link to an anchor at another page
|<tt><nowiki>http://google.com/search?q={{PAGENAMEE}}</nowiki></tt>
+
|<pre>[[Help:Images#See also]]</pre>
|http://google.com/search?q={{PAGENAMEE}}
+
|[[Help:Images#See also]]
 
|-
 
|-
|Mailto link
+
|Shortcut to hide a [[#Namespaces|namespace]]
|<tt><nowiki>[mailto:info@example.org email me]</nowiki></tt>
+
 
|[mailto:info@example.org email me]
+
See [[#The pipe trick]].
|-
+
|<pre>
|Mailto named with subject line and body
+
[[Help:Contents|]]
|<tt><nowiki>[mailto:info@example.org?Subject=URL%20Encoded%20Subject&amp;body=Body%20Text info]</nowiki></tt>
+
 
|[mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info]
+
[[Help:Contents]]
|-
+
</pre>
|Additional wiki markup is permitted in link titles
+
|
|<pre>[http://www.example.com/some/image.png Example '''<del>rich</del>''' ''link text'' here.]</pre>
+
[[Help:Contents|Contents]]
|[http://www.example.com/some/image.png Example '''<del>rich</del>''' ''link text'' here.]
 
|}
 
  
=== External link icons ===
+
[[Help:Contents]]
{| class="wikitable"
 
! Test link !! Icon !! Trigger
 
 
|-
 
|-
| [http://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/external-link-ltr-icon.png external-link-ltr-icon.png] || <code>.external</code>, <code>http://</code>, <code>gopher://</code>
+
| [[#Redirects|Redirect]]
 +
|<pre>#REDIRECT [[Main Page]]</pre>
 +
| &rarr; [[Main Page]]
 
|-
 
|-
| [https://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/lock-icon.png lock-icon.png] || <code>https://</code>
+
|Link to the current page's talk page
 +
|<pre>[[{{TALKPAGENAME}}|Discussion]]</pre>
 +
|[[{{TALKPAGENAME}}|Discussion]]
 
|-
 
|-
| [mailto:.] || [http://bits.wikimedia.org/skins-1.17/vector/images/mail-icon.png mail-icon.png] || <code>mailto:</code>
+
|Link to the current page's edit page
 +
|<pre>[{{fullurl:{{PAGENAME}}|action=edit}} Edit]</pre>
 +
|[{{fullurl:{{PAGENAME}}|action=edit}} Edit]
 
|-
 
|-
| [news://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/news-icon.png news-icon.png] || <code>news<nowiki/>://</code>
+
|Link to a subpage.
 +
 
 +
See [[#Subpages]]
 +
|<pre>[[/example]]</pre>
 +
|[[/example]]
 
|-
 
|-
| [ftp://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/file-icon.png file-icon.png] || <code>ftp://</code>
+
|Link to a subpage without the leading slash
 +
|<pre>[[/example/]]</pre>
 +
|[[/example/]]
 
|-
 
|-
| [irc://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/talk-icon.png talk-icon.png] || <code>irc://</code>
+
|Link to a category page
 +
 
 +
See [[#Categories]]
 +
|<pre>[[:Category:Help]]</pre>
 +
|[[:Category:Help]]
 
|-
 
|-
| [http://.ogg] || [http://bits.wikimedia.org/skins-1.17/vector/images/audio-icon.png audio-icon.png] || <code>.ogg</code>, <code>.mid</code>, <code>.midi</code>, <code>.mp3</code>, <code>.wav</code>, <code>.wma</code>
+
|Link to an image or a file of other types
 +
 
 +
See [[#Images]]
 +
|<pre>[[media:example.jpg]]</pre>
 +
|[[media:example.jpg]]
 
|-
 
|-
| [http://.ogm] || [http://bits.wikimedia.org/skins-1.17/vector/images/video-icon.png video-icon.png] || <code>.ogm</code>, <code>.avi</code>, <code>.mpeg</code>, <code>.mpg</code>
+
|Link to the user's user page
 +
|<pre>[[Special:MyPage]]</pre>
 +
|[[Special:MyPage]]
 
|-
 
|-
| [http://.pdf] || [http://bits.wikimedia.org/skins-1.17/vector/images/document-icon.png document-icon.png] || <code>.pdf</code>, <code>.pdf#</code>, <code>.pdf?</code>
+
|Additional wiki markup is permitted in link titles
 +
|<pre>[[#top|'''<del>rich</del>''' ''link text'' here.]]</pre>
 +
|[[#top|'''<del>rich</del>''' ''link text'' here.]]
 
|}
 
|}
  
==== How to avoid auto-links ====
+
==== Links to section headings ====
By default, when you write a URL as is, it will be transformed to an external link.
 
  
To avoid that effect, put the URL between <code>&lt;nowiki&gt;</code> tags as in:
+
You can link directly to headings within a wiki page.  MediaWiki automatically creates an HTML anchor with the same name as the heading.
<nowiki><nowiki>http://mediawiki.org</nowiki></nowiki>
 
  
=== Interwiki links ===
+
{| border="1" class="wikitable"
Interwiki links are abbreviations for longer URLs.  They allow you to link to an external wiki almost as if you are linking to a page on your own wiki.  The external website must be registered in advance by an administrator.  The websites registered on {{SITENAME}} are listed on the [[{{ns:Special}}:Interwiki]] page.
+
!Description
 +
!You type
 +
!You get
 +
|-
 +
|Links to section headings
 +
|<pre>
 +
[[#External links]]
  
For example, you can link to the Sunflower article on http://en.wikipedia.org by typing <code><nowiki>[[wikipedia:Sunflower]]</nowiki></code>, which will result in a link [[wikipedia:Sunflower]]. This is because <code><nowiki>http://en.wikipedia.org/wiki/</nowiki></code> is registered to {{SITENAME}} by default with the prefix of <code>wikipedia</code>.  A similar link could be created as a normal external link by typing <code><nowiki>[http://en.wikipedia.org/wiki/Sunflower big yellow flower]</nowiki></code>.
+
[[#Table pitfalls!]]
 +
</pre>
 +
|
 +
[[#External links]]
 +
 
 +
[[#Table pitfalls!]]
 +
|}
  
== Tables ==
+
{{note| If a heading is renamed then any links to that heading will be broken.}}
'''Tables''' may be authored in wiki pages using either XHTML table elements directly, or using wikicode formatting to define the table. XHTML table elements and their use are well described on various web pages and will not be discussed here. The benefit of wikicode is that the table is constructed of character symbols which tend to make it easier to perceive the table structure in the article editing view compared to XHTML table elements.
 
 
As a general rule, it is best to avoid using a table unless you need one. Table markup often complicates page editing.
 
  
=== Wiki table markup summary ===
+
=== External links ===
{|cellpadding="5" cellspacing="0" border="1" width="60%"
+
{| class="wikitable"
|
+
!style="width:15%"|Description
<nowiki>{|</nowiki>
+
!style="width:45%"|You type
| '''table start'''
+
!style="width:40%"|You get
 
|-
 
|-
|
+
|External link
<nowiki>|+</nowiki>
+
|<tt><nowiki>http://mediawiki.org</nowiki></tt>
| table '''caption,''' ''optional;'' only between '''table start''' and first '''table row'''
+
|http://mediawiki.org
 
|-
 
|-
|
+
|External link with different label
<nowiki>|-</nowiki>
+
|<tt><nowiki>[http://mediawiki.org MediaWiki]</nowiki></tt>
| '''table row,''' ''optional on first row'' -- wiki engine assumes the first row
+
|[http://mediawiki.org MediaWiki]
 
|-
 
|-
|
+
|Numbered external link
<nowiki>!</nowiki>  
+
|<tt><nowiki>[http://mediawiki.org]</nowiki></tt>
| '''table header''' cell, ''optional.'' Consecutive '''table header''' cells may be added on same line separated by double marks (<code>!!</code>) or start on new lines, each with its own single mark (<code>!</code>).
+
|[http://mediawiki.org]
|-
 
|
 
<nowiki>|</nowiki>
 
| '''table data''' cell, ''required!'' Consecutive '''table data''' cells may be added on same line separated by double marks (<code><nowiki>||</nowiki></code>) or start on new lines, each with its own single mark (<code><nowiki>|</nowiki></code>).
 
 
|-
 
|-
 +
|External links with file icons
 +
{{note|See [[#External links icons|currently supported icons]].}}
 +
|<tt><nowiki>
 +
[http://en.wikipedia.org/wiki/.avi video]
 +
[http://en.wikipedia.org/wiki/.ogg sound]
 +
[http://en.wikipedia.org/wiki/.pdf document]
 +
</nowiki></tt>
 
|
 
|
<nowiki>|}</nowiki>
+
[http://en.wikipedia.org/wiki/.avi video]<br/>
| '''table end'''
+
[http://en.wikipedia.org/wiki/.ogg sound]<br/>
|}
+
[http://en.wikipedia.org/wiki/.pdf document]<br/>
*The above marks must '''start on a new line''' except the double <code>||</code> and <code>!!</code> for optionally adding consecutive cells to a line. However, blank spaces at the beginning of a line are ignored.
 
*'''XHTML attributes.''' Each mark, except table end, optionally accepts one or more XHTML attributes. Attributes must be on the same line as the mark. Separate attributes from each other with a single space.  
 
**Cells and caption (<code>|</code> or <code>||</code>, <code>!</code> or <code>!!</code>, and <code>|+</code>) hold content. So separate any attributes from content with a single pipe (<code>|</code>). Cell content may follow on same line or on following lines.
 
**Table and row marks (<code>{|</code> and <code>|-</code>) do not directly hold content. Do ''not'' add pipe (<code>|</code>) after their optional attributes. If you erroneously add a pipe after attributes for the table mark or row mark the parser will delete it ''and'' your final attribute if it was touching the erroneous pipe!
 
*'''Content''' may (a) follow its cell mark on the same line after any optional XHTML attributes or (b) on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as lists, headings, or nested tables, must be on its own new line.
 
**'''Pipe character as content.''' To insert a pipe (<code>|</code>) character into a table use the &lt;nowiki&gt;<code>|</code>&lt;/nowiki&gt; escaping markup
 
 
 
=== Basics ===
 
The following table lacks borders and good spacing but shows the simplest wiki markup table structure.
 
 
 
{| cellspacing="0" border="1"
 
!style="width:50%"|You type
 
!style="width:50%"|You get
 
 
|-
 
|-
|
+
|External link to the same host
<pre>
+
|<tt><nowiki>http://{{SERVERNAME}}/pagename</nowiki></tt>
{|
+
|http://{{SERVERNAME}}/pagename
|Orange
 
|Apple
 
 
|-
 
|-
|Bread
+
|External link to other host passing the pagename
|Pie
+
|<tt><nowiki>http://google.com/search?q={{PAGENAMEE}}</nowiki></tt>
 +
|http://google.com/search?q={{PAGENAMEE}}
 
|-
 
|-
|Butter
+
|Mailto link
|Ice cream
+
|<tt><nowiki>[mailto:info@example.org email me]</nowiki></tt>
|}
+
|[mailto:info@example.org email me]
</pre>
 
|
 
{|
 
|Orange
 
|Apple
 
 
|-
 
|-
|Bread
+
|Mailto named with subject line and body
|Pie
+
|<tt><nowiki>[mailto:info@example.org?Subject=URL%20Encoded%20Subject&amp;body=Body%20Text info]</nowiki></tt>
 +
|[mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info]
 
|-
 
|-
|Butter
+
|Additional wiki markup is permitted in link titles
|Ice cream
+
|<pre>[http://www.example.com/some/image.png Example '''<del>rich</del>''' ''link text'' here.]</pre>
|}
+
|[http://www.example.com/some/image.png Example '''<del>rich</del>''' ''link text'' here.]
 
|}
 
|}
  
The cells in the same row can be listed on one line separated by <code>||</code> (two pipe symbols). If the text in the cell contains a line break, use <code><nowiki><br /></nowiki></code> instead.
+
=== External link icons ===
 
+
{| class="wikitable"
{| cellspacing="0" border="1"
+
! Test link !! Icon !! Trigger
!style="width:50%"|You type
+
|-
!style="width:50%"|You get
+
| [http://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/external-link-ltr-icon.png external-link-ltr-icon.png] || <code>.external</code>, <code>http://</code>, <code>gopher://</code>
 +
|-
 +
| [https://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/lock-icon.png lock-icon.png] || <code>https://</code>
 +
|-
 +
| [mailto:.] || [http://bits.wikimedia.org/skins-1.17/vector/images/mail-icon.png mail-icon.png] || <code>mailto:</code>
 +
|-
 +
| [news://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/news-icon.png news-icon.png] || <code>news<nowiki/>://</code>
 
|-
 
|-
|
+
| [ftp://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/file-icon.png file-icon.png] || <code>ftp://</code>
<pre>
 
{|
 
|Orange||Apple||more
 
 
|-
 
|-
|Bread||Pie||more
+
| [irc://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/talk-icon.png talk-icon.png] || <code>irc://</code>
 
|-
 
|-
|Butter||Ice<br />cream||and<br />more
+
| [http://.ogg] || [http://bits.wikimedia.org/skins-1.17/vector/images/audio-icon.png audio-icon.png] || <code>.ogg</code>, <code>.mid</code>, <code>.midi</code>, <code>.mp3</code>, <code>.wav</code>, <code>.wma</code>
|}
 
</pre>
 
|
 
{|
 
|Orange||Apple||more
 
 
|-
 
|-
|Bread||Pie||more
+
| [http://.ogm] || [http://bits.wikimedia.org/skins-1.17/vector/images/video-icon.png video-icon.png] || <code>.ogm</code>, <code>.avi</code>, <code>.mpeg</code>, <code>.mpg</code>
 
|-
 
|-
|Butter||Ice<br />cream||and<br />more
+
| [http://.pdf] || [http://bits.wikimedia.org/skins-1.17/vector/images/document-icon.png document-icon.png] || <code>.pdf</code>, <code>.pdf#</code>, <code>.pdf?</code>
|}
 
 
|}
 
|}
  
Extra spaces within cells in the wiki markup, as in the wiki markup below, do not affect the actual table rendering.
+
==== How to avoid auto-links ====
 +
By default, when you write a URL as is, it will be transformed to an external link.  To avoid that effect, put the URL between <code>&lt;nowiki&gt;</code> tags as in:
 +
<nowiki><nowiki>http://mediawiki.org</nowiki></nowiki>
 +
 
 +
=== Interwiki links ===
 +
Interwiki links are abbreviations for longer URLs.  They allow you to link to an external wiki almost as if you are linking to a page on your own wiki.  The external website must be registered in advance by an administrator.  The websites registered on {{SITENAME}} are listed on the [[{{ns:Special}}:Interwiki]] page.
 +
 
 +
For example, you can link to the Sunflower article on http://en.wikipedia.org by typing <code><nowiki>[[wikipedia:Sunflower]]</nowiki></code>, which will result in a link [[wikipedia:Sunflower]]. This is because <code><nowiki>http://en.wikipedia.org/wiki/</nowiki></code> is registered to {{SITENAME}} by default with the prefix of <code>wikipedia</code>.  A similar link could be created as a normal external link by typing <code><nowiki>[http://en.wikipedia.org/wiki/Sunflower big yellow flower]</nowiki></code>.
 +
 
 +
=== The pipe trick ===
 +
See [[wikipedia:Help:Pipe_trick]].
 +
 
 +
== Tables ==
 +
'''Tables''' may be authored in wiki pages using either XHTML table elements directly, or using wikicode formatting to define the table. XHTML table elements and their use are well described on various web pages and will not be discussed here. The benefit of wikicode is that the table is constructed of character symbols which tend to make it easier to perceive the table structure in the article editing view compared to XHTML table elements.
 +
 +
As a general rule, it is best to avoid using a table unless you need one. Table markup often complicates page editing.
  
{| cellspacing="0" border="1"
+
=== Wiki table markup summary ===
!style="width:50%"|You type
+
{|cellpadding="5" cellspacing="0" border="1" width="60%"
!style="width:50%"|You get
+
|
 +
<nowiki>{|</nowiki>
 +
| '''table start'''
 
|-
 
|-
 
|
 
|
<pre>
+
<nowiki>|+</nowiki>
{|
+
| table '''caption,''' ''optional;'' only between '''table start''' and first '''table row'''
| Orange    ||  Apple  ||  more
 
 
|-
 
|-
|   Bread    ||   Pie    ||  more
+
|
 +
<nowiki>|-</nowiki>
 +
| '''table row,''' ''optional on first row'' -- wiki engine assumes the first row
 
|-
 
|-
|  Butter  || Ice cream ||  and more
 
|}
 
</pre>
 
 
|
 
|
{|
+
<nowiki>!</nowiki>
Orange    ||   Apple  ||   more
+
| '''table header''' cell, ''optional.'' Consecutive '''table header''' cells may be added on same line separated by double marks (<code>!!</code>) or start on new lines, each with its own single mark (<code>!</code>).
 +
|-
 +
|
 +
  <nowiki>|</nowiki>
 +
| '''table data''' cell, ''required!'' Consecutive '''table data''' cells may be added on same line separated by double marks (<code><nowiki>||</nowiki></code>) or start on new lines, each with its own single mark (<code><nowiki>|</nowiki></code>).
 
|-
 
|-
|   Bread    ||  Pie    ||  more
+
|
|-
+
<nowiki>|}</nowiki>
|  Butter  || Ice cream ||  and more
+
| '''table end'''
|}
 
 
|}
 
|}
 +
*The above marks must '''start on a new line''' except the double <code>||</code> and <code>!!</code> for optionally adding consecutive cells to a line. However, blank spaces at the beginning of a line are ignored.
 +
*'''XHTML attributes.''' Each mark, except table end, optionally accepts one or more XHTML attributes. Attributes must be on the same line as the mark. Separate attributes from each other with a single space.
 +
**Cells and caption (<code>|</code> or <code>||</code>, <code>!</code> or <code>!!</code>, and <code>|+</code>) hold content. So separate any attributes from content with a single pipe (<code>|</code>). Cell content may follow on same line or on following lines.
 +
**Table and row marks (<code>{|</code> and <code>|-</code>) do not directly hold content. Do ''not'' add pipe (<code>|</code>) after their optional attributes. If you erroneously add a pipe after attributes for the table mark or row mark the parser will delete it ''and'' your final attribute if it was touching the erroneous pipe!
 +
*'''Content''' may (a) follow its cell mark on the same line after any optional XHTML attributes or (b) on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as lists, headings, or nested tables, must be on its own new line.
 +
**'''Pipe character as content.''' To insert a pipe (<code>|</code>) character into a table use the &lt;nowiki&gt;<code>|</code>&lt;/nowiki&gt; escaping markup
  
You can have longer text or more complex wiki syntax inside table cells, too:
+
=== Basics ===
 +
The following table lacks borders and good spacing but shows the simplest wiki markup table structure.
  
 
{| cellspacing="0" border="1"
 
{| cellspacing="0" border="1"
Line 1,041: Line 1,091:
 
<pre>
 
<pre>
 
{|
 
{|
|Lorem ipsum dolor sit amet,
+
|Orange
consetetur sadipscing elitr,
+
|Apple
sed diam nonumy eirmod tempor invidunt
+
|-
ut labore et dolore magna aliquyam erat,
+
|Bread
sed diam voluptua.
+
|Pie
 
+
|-
At vero eos et accusam et justo duo dolores
+
|Butter
et ea rebum. Stet clita kasd gubergren,
+
|Ice cream
no sea takimata sanctus est Lorem ipsum
 
dolor sit amet.
 
|
 
* Lorem ipsum dolor sit amet
 
* consetetur sadipscing elitr
 
* sed diam nonumy eirmod tempor invidunt
 
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
 
{|
 
{|
|Lorem ipsum dolor sit amet,
+
|Orange
consetetur sadipscing elitr,
+
|Apple
sed diam nonumy eirmod tempor invidunt
+
|-
ut labore et dolore magna aliquyam erat,
+
|Bread
sed diam voluptua.
+
|Pie
 
+
|-
At vero eos et accusam et justo duo dolores
+
|Butter
et ea rebum. Stet clita kasd gubergren,
+
|Ice cream
no sea takimata sanctus est Lorem ipsum
 
dolor sit amet.
 
|
 
* Lorem ipsum dolor sit amet
 
* consetetur sadipscing elitr
 
* sed diam nonumy eirmod tempor invidunt
 
 
|}
 
|}
 
|}
 
|}
  
==== Table headers ====
+
The cells in the same row can be listed on one line separated by <code>||</code> (two pipe symbols). If the text in the cell contains a line break, use <code><nowiki><br /></nowiki></code> instead.
Table headers can be created by using "<code>!</code>" (exclamation mark) instead of "<code>|</code>" (pipe symbol). Headers usually show up bold and centered by default.
 
  
 
{| cellspacing="0" border="1"
 
{| cellspacing="0" border="1"
Line 1,086: Line 1,123:
 
<pre>
 
<pre>
 
{|
 
{|
! Item
+
|Orange||Apple||more
! Amount
 
! Cost
 
 
|-
 
|-
|Orange
+
|Bread||Pie||more
|10
 
|7.00
 
 
|-
 
|-
|Bread
+
|Butter||Ice<br />cream||and<br />more
|4
+
|}
|3.00
+
</pre>
 +
|
 +
{|
 +
|Orange||Apple||more
 +
|-
 +
|Bread||Pie||more
 
|-
 
|-
|Butter
+
|Butter||Ice<br />cream||and<br />more
|1
+
|}
|5.00
+
|}
 +
 
 +
Extra spaces within cells in the wiki markup, as in the wiki markup below, do not affect the actual table rendering.
 +
 
 +
{| cellspacing="0" border="1"
 +
!style="width:50%"|You type
 +
!style="width:50%"|You get
 
|-
 
|-
!Total
 
 
|
 
|
|15.00
+
<pre>
 +
{|
 +
|  Orange    ||  Apple  ||  more
 +
|-
 +
|  Bread    ||  Pie    ||  more
 +
|-
 +
|  Butter  || Ice cream ||  and more
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
 
{|
 
{|
! Item
+
|  Orange    ||  Apple  ||  more
! Amount
 
! Cost
 
 
|-
 
|-
|Orange
+
|   Bread    ||   Pie    ||  more
|10
 
|7.00
 
 
|-
 
|-
|Bread
+
|   Butter   || Ice cream || and more
|4
 
|3.00
 
|-
 
|Butter
 
|1
 
|5.00
 
|-
 
!Total
 
|
 
|15.00
 
 
|}
 
|}
 
|}
 
|}
  
==== Caption ====
+
You can have longer text or more complex wiki syntax inside table cells, too:
A '''table caption''' can be added to the top of any table as follows.
 
  
 
{| cellspacing="0" border="1"
 
{| cellspacing="0" border="1"
Line 1,141: Line 1,175:
 
<pre>
 
<pre>
 
{|
 
{|
|+Food complements
+
|Lorem ipsum dolor sit amet,
|-
+
consetetur sadipscing elitr,
|Orange
+
sed diam nonumy eirmod tempor invidunt
|Apple
+
ut labore et dolore magna aliquyam erat,
|-
+
sed diam voluptua.
|Bread
+
 
|Pie
+
At vero eos et accusam et justo duo dolores
|-
+
et ea rebum. Stet clita kasd gubergren,
|Butter
+
no sea takimata sanctus est Lorem ipsum
|Ice cream
+
dolor sit amet.
 +
|
 +
* Lorem ipsum dolor sit amet
 +
* consetetur sadipscing elitr
 +
* sed diam nonumy eirmod tempor invidunt
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
 
{|
 
{|
|+ Food complements
+
|Lorem ipsum dolor sit amet,
|-
+
consetetur sadipscing elitr,
|Orange
+
sed diam nonumy eirmod tempor invidunt
|Apple
+
ut labore et dolore magna aliquyam erat,
|-
+
sed diam voluptua.
|Bread
+
 
|Pie
+
At vero eos et accusam et justo duo dolores
|-
+
et ea rebum. Stet clita kasd gubergren,
|Butter
+
no sea takimata sanctus est Lorem ipsum
|Ice cream
+
dolor sit amet.
 +
|
 +
* Lorem ipsum dolor sit amet
 +
* consetetur sadipscing elitr
 +
* sed diam nonumy eirmod tempor invidunt
 
|}
 
|}
 
|}
 
|}
  
=== XHTML attributes ===
+
==== Table headers ====
You can add XHTML attributes to tables. For the authoritative source on these, see [http://www.w3.org/TR/REC-html40/struct/tables.html the W3C's HTML 4.01 Specification page on tables].
+
Table headers can be created by using "<code>!</code>" (exclamation mark) instead of "<code>|</code>" (pipe symbol). Headers usually show up bold and centered by default.
 
 
==== Attributes on tables ====
 
Placing attributes after the table start tag (<code>{|</code>) applies attributes to the entire table.
 
  
 
{| cellspacing="0" border="1"
 
{| cellspacing="0" border="1"
Line 1,180: Line 1,219:
 
|
 
|
 
<pre>
 
<pre>
{| border="1" align="center" style="text-align:center;"
+
{|
 +
! Item
 +
! Amount
 +
! Cost
 +
|-
 
|Orange
 
|Orange
|Apple
+
|10
|12,333.00
+
|7.00
 
|-
 
|-
 
|Bread
 
|Bread
|Pie
+
|4
|500.00
+
|3.00
 
|-
 
|-
 
|Butter
 
|Butter
|Ice cream
+
|1
|1.00
+
|5.00
 +
|-
 +
!Total
 +
|
 +
|15.00
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
{| border="1" align="center" style="text-align:center;"
+
{|
 +
! Item
 +
! Amount
 +
! Cost
 +
|-
 
|Orange
 
|Orange
|Apple
+
|10
|12,333.00
+
|7.00
 
|-
 
|-
 
|Bread
 
|Bread
|Pie
+
|4
|500.00
+
|3.00
 
|-
 
|-
 
|Butter
 
|Butter
|Ice cream
+
|1
|1.00
+
|5.00
 +
|-
 +
!Total
 +
|
 +
|15.00
 
|}
 
|}
 
|}
 
|}
  
==== Attributes on cells ====
+
==== Caption ====
You can put attributes on individual '''cells'''. For example, numbers may look better aligned right.
+
A '''table caption''' can be added to the top of any table as follows.
  
 
{| cellspacing="0" border="1"
 
{| cellspacing="0" border="1"
Line 1,219: Line 1,274:
 
|
 
|
 
<pre>
 
<pre>
{| border="1"
+
{|
 +
|+Food complements
 +
|-
 
|Orange
 
|Orange
 
|Apple
 
|Apple
|align="right" | 12,333.00
 
 
|-
 
|-
 
|Bread
 
|Bread
 
|Pie
 
|Pie
|align="right" | 500.00
 
 
|-
 
|-
 
|Butter
 
|Butter
|Ice cream
+
|Ice cream  
|align="right" | 1.00
 
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
{| border="1"
+
{|
 +
|+ Food complements
 +
|-
 
|Orange
 
|Orange
 
|Apple
 
|Apple
|align="right"|12,333.00
 
 
|-
 
|-
 
|Bread
 
|Bread
 
|Pie
 
|Pie
|align="right"|500.00
 
 
|-
 
|-
 
|Butter
 
|Butter
|Ice cream
+
|Ice cream  
|align="right"|1.00
 
 
|}
 
|}
 
|}
 
|}
  
You can also use '''cell''' attributes when you are listing multiple '''cells''' on a single line. Note that the '''cells''' are separated by <code>||</code>, and within each '''cell''' the attribute(s) and value are separated by <code>|</code>.
+
=== XHTML attributes ===
 +
You can add XHTML attributes to tables. For the authoritative source on these, see [http://www.w3.org/TR/REC-html40/struct/tables.html the W3C's HTML 4.01 Specification page on tables].
 +
 
 +
==== Attributes on tables ====
 +
Placing attributes after the table start tag (<code>{|</code>) applies attributes to the entire table.
  
 
{| cellspacing="0" border="1"
 
{| cellspacing="0" border="1"
Line 1,257: Line 1,314:
 
|
 
|
 
<pre>
 
<pre>
{| border="1"
+
{| border="1" align="center" style="text-align:center;"
| Orange || Apple     || align="right" | 12,333.00
+
|Orange
 +
|Apple
 +
|12,333.00
 
|-
 
|-
| Bread || Pie       || align="right" | 500.00
+
|Bread
 +
|Pie
 +
|500.00
 
|-
 
|-
| Butter || Ice cream || align="right" | 1.00
+
|Butter
 +
|Ice cream
 +
|1.00
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
{| border="1"
+
{| border="1" align="center" style="text-align:center;"
| Orange || Apple     || align="right" | 12,333.00
+
|Orange
 +
|Apple
 +
|12,333.00
 
|-
 
|-
| Bread || Pie       || align="right" | 500.00
+
|Bread
 +
|Pie
 +
|500.00
 
|-
 
|-
| Butter || Ice cream || align="right" | 1.00
+
|Butter
 +
|Ice cream
 +
|1.00
 
|}
 
|}
 
|}
 
|}
  
==== Attributes on rows ====
+
==== Attributes on cells ====
You can put attributes on individual '''rows''', too.
+
You can put attributes on individual '''cells'''. For example, numbers may look better aligned right.
  
 
{| cellspacing="0" border="1"
 
{| cellspacing="0" border="1"
Line 1,287: Line 1,356:
 
|Orange
 
|Orange
 
|Apple
 
|Apple
|align="right"|12,333.00
+
|align="right" | 12,333.00
 
|-
 
|-
 
|Bread
 
|Bread
 
|Pie
 
|Pie
|align="right"|500.00
+
|align="right" | 500.00
|- style="font-style:italic; color:green;"
+
|-
 
|Butter
 
|Butter
 
|Ice cream
 
|Ice cream
|align="right"|1.00
+
|align="right" | 1.00
 
|}
 
|}
 
</pre>
 
</pre>
Line 1,307: Line 1,376:
 
|Pie
 
|Pie
 
|align="right"|500.00
 
|align="right"|500.00
|- style="font-style:italic; color:green;"
+
|-
 
|Butter
 
|Butter
 
|Ice cream
 
|Ice cream
Line 1,314: Line 1,383:
 
|}
 
|}
  
===== Simple one-pixel table border =====
+
You can also use '''cell''' attributes when you are listing multiple '''cells''' on a single line. Note that the '''cells''' are separated by <code>||</code>, and within each '''cell''' the attribute(s) and value are separated by <code>|</code>.
The default table formatting uses the "border-collapse: separate" model, which adds table cell spacing (which also separates the table outer border from its content cells). Even with a zero cellspacing, the borders of consecutive cells (and of the overall table container) will add up, so to get a one-pixel separation between cells, you need to selectively remove one or more of the four borders of cells.
 
  
Such tables may be formatted more simply, using the "border-collapse: collapse" CSS property; in this table formatting model, the cellspacing attribute (or the CSS "border-spacing:" property) and the table's "padding:" CSS property is ignored and only the larger border of adjacent inner cells (or the table border for outer cells) will be used.
+
{| cellspacing="0" border="1"
 
+
!style="width:50%"|You type
An example of the above for one-pixel table border, using each model (without need for external extensions):
+
!style="width:50%"|You get
 
 
{|border="1" cellspacing="0" cellpadding="2"
 
|-
 
!|You type
 
!width="200"|You get
 
 
|-
 
|-
 
|
 
|
<pre style="font-size: 80%">
+
<pre>
{|style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000; padding: 0"
+
{| border="1"
 +
| Orange || Apple    || align="right" | 12,333.00
 
|-
 
|-
!style="border-style: solid; border-width: 0 1px 1px 0"| Orange
+
| Bread  || Pie      || align="right" | 500.00
!style="border-style: solid; border-width: 0 0 1px 0"| Apple
 
 
|-
 
|-
|style="border-style: solid; border-width: 0 1px 0 0"| Bread
+
| Butter || Ice cream || align="right" | 1.00
|style="border-style: solid; border-width: 0"| Pie
 
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
{|style="margin: 0; border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000; padding: 0"
+
{| border="1"
 +
| Orange || Apple    || align="right" | 12,333.00
 
|-
 
|-
!style="border-style: solid; border-width: 0 1px 1px 0"| Orange
+
| Bread  || Pie      || align="right" | 500.00
!style="border-style: solid; border-width: 0 0 1px 0"| Apple
 
 
|-
 
|-
|style="border-style: solid; border-width: 0 1px 0 0"| Bread
+
| Butter || Ice cream || align="right" | 1.00
|style="border-style: solid; border-width: 0"| Pie
+
|}
 
|}
 
|}
 +
 +
==== Attributes on rows ====
 +
You can put attributes on individual '''rows''', too.
 +
 +
{| cellspacing="0" border="1"
 +
!style="width:50%"|You type
 +
!style="width:50%"|You get
 
|-
 
|-
|
+
|
<pre style="font-size: 80%">
+
<pre>
{|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000"
+
{| border="1"
|-
+
|Orange
!style="border-style: solid; border-width: 1px"| Orange
+
|Apple
!style="border-style: solid; border-width: 1px"| Apple
+
|align="right"|12,333.00
 
|-
 
|-
|style="border-style: solid; border-width: 1px"| Bread
+
|Bread
|style="border-style: solid; border-width: 1px"| Pie
+
|Pie
 +
|align="right"|500.00
 +
|- style="font-style:italic; color:green;"
 +
|Butter
 +
|Ice cream
 +
|align="right"|1.00
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
{|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000"
+
{| border="1"
 +
|Orange
 +
|Apple
 +
|align="right"|12,333.00
 
|-
 
|-
!style="border-style: solid; border-width: 1px"| Orange
+
|Bread
!style="border-style: solid; border-width: 1px"| Apple
+
|Pie
|-
+
|align="right"|500.00
|style="border-style: solid; border-width: 1px"| Bread
+
|- style="font-style:italic; color:green;"
|style="border-style: solid; border-width: 1px"| Pie
+
|Butter
 +
|Ice cream
 +
|align="right"|1.00
 
|}
 
|}
 
|}
 
|}
  
Notes :
+
===== Simple one-pixel table border =====
* When using the "border-width:" CSS shortcut property, the order of the four space-separated specified values is: top, right, bottom, left. As an example from above:
+
The default table formatting uses the "border-collapse: separate" model, which adds table cell spacing (which also separates the table outer border from its content cells). Even with a zero cellspacing, the borders of consecutive cells (and of the overall table container) will add up, so to get a one-pixel separation between cells, you need to selectively remove one or more of the four borders of cells.
::"border-width: 0 1px 0 0"
 
:When there are fewer than 4 values, the value for left takes its default from the value for right, the value for bottom takes its default from the value for top, and the value for right takes its default from the value for top.
 
* The HTML attributes (such as "width=", "border=", "cellspacing=", "cellpadding=") do not need any length unit (the pixel unit is assumed). The CSS style properties (which override the HTML attributes) require an explicit length unit (if the value is not 0) such as "px" for the pixel.
 
  
==== HTML colspan and rowspan ====
+
Such tables may be formatted more simply, using the "border-collapse: collapse" CSS property; in this table formatting model, the cellspacing attribute (or the CSS "border-spacing:" property) and the table's "padding:" CSS property is ignored and only the larger border of adjacent inner cells (or the table border for outer cells) will be used.
  
You can use HTML '''colspan''' and '''rowspan''' attributes on cells for advanced layout.
+
An example of the above for one-pixel table border, using each model (without need for external extensions):
  
{| cellspacing="0" border="1"
+
{|border="1" cellspacing="0" cellpadding="2"
!style="width:50%"|You type
+
|-
!style="width:50%"|You get
+
!|You type
 +
!width="200"|You get
 
|-
 
|-
 
|
 
|
<pre>
+
<pre style="font-size: 80%">
{| border="1"
+
{|style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000; padding: 0"
!colspan="6"|Shopping List
 
 
|-
 
|-
|rowspan="2"|Bread & Butter
+
!style="border-style: solid; border-width: 0 1px 1px 0"| Orange
|Pie
+
!style="border-style: solid; border-width: 0 0 1px 0"| Apple
|Buns
 
|Danish
 
|colspan="2"|Croissant
 
 
|-
 
|-
|Cheese
+
|style="border-style: solid; border-width: 0 1px 0 0"| Bread
|colspan="2"|Ice cream
+
|style="border-style: solid; border-width: 0"| Pie
|Butter
 
|Yoghurt
 
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
{| border="1"
+
{|style="margin: 0; border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000; padding: 0"
!colspan="6"|Shopping List
 
 
|-
 
|-
|rowspan="2"|Bread & Butter
+
!style="border-style: solid; border-width: 0 1px 1px 0"| Orange
|Pie
+
!style="border-style: solid; border-width: 0 0 1px 0"| Apple
|Buns
 
|Danish
 
|colspan="2"|Croissant
 
 
|-
 
|-
|Cheese
+
|style="border-style: solid; border-width: 0 1px 0 0"| Bread
|colspan="2"|Ice cream
+
|style="border-style: solid; border-width: 0"| Pie
|Butter
 
|Yoghurt
 
|}
 
 
|}
 
|}
 
==== With HTML attributes and CSS styles ====
 
[[Manual:CSS|CSS]] style attributes can be added with or without other HTML attributes.
 
 
{| cellspacing="0" border="1"
 
!style="width:50%"|You type
 
!style="width:50%"|You get
 
 
|-
 
|-
 
|
 
|
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word; word-break:break-all;">
+
<pre style="font-size: 80%">
{| style="color:green; background-color:#ffffcc;" cellpadding="10" cellspacing="0" border="1"
+
{|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000"
|Orange
 
|Apple
 
 
|-
 
|-
|Bread
+
!style="border-style: solid; border-width: 1px"| Orange
|Pie
+
!style="border-style: solid; border-width: 1px"| Apple
 
|-
 
|-
|Butter
+
|style="border-style: solid; border-width: 1px"| Bread
|Ice cream
+
|style="border-style: solid; border-width: 1px"| Pie
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
{| style="color:green; background-color:#ffffcc;" cellpadding="10" cellspacing="0" border="1"
+
{|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000"
|Orange
 
|Apple
 
 
|-
 
|-
|Bread
+
!style="border-style: solid; border-width: 1px"| Orange
|Pie
+
!style="border-style: solid; border-width: 1px"| Apple
 
|-
 
|-
|Butter
+
|style="border-style: solid; border-width: 1px"| Bread
|Ice cream
+
|style="border-style: solid; border-width: 1px"| Pie
 
|}
 
|}
 
|}
 
|}
  
'''Attributes''' can be added to the caption and headers as follows.
+
Notes :
 +
* When using the "border-width:" CSS shortcut property, the order of the four space-separated specified values is: top, right, bottom, left. As an example from above:
 +
::"border-width: 0 1px 0 0"
 +
:When there are fewer than 4 values, the value for left takes its default from the value for right, the value for bottom takes its default from the value for top, and the value for right takes its default from the value for top.
 +
* The HTML attributes (such as "width=", "border=", "cellspacing=", "cellpadding=") do not need any length unit (the pixel unit is assumed). The CSS style properties (which override the HTML attributes) require an explicit length unit (if the value is not 0) such as "px" for the pixel.
 +
 
 +
==== HTML colspan and rowspan ====
 +
 
 +
You can use HTML '''colspan''' and '''rowspan''' attributes on cells for advanced layout.
  
 
{| cellspacing="0" border="1"
 
{| cellspacing="0" border="1"
Line 1,457: Line 1,518:
 
|-
 
|-
 
|
 
|
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word; word-break:break-all;">
+
<pre>
{| border="1" cellpadding="20" cellspacing="0"
+
{| border="1"
|+ align="bottom" style="color:#e76700;" |''Food complements''
+
!colspan="6"|Shopping List
 
|-
 
|-
|Orange
+
|rowspan="2"|Bread & Butter
|Apple
+
|Pie
|-
+
|Buns
|Bread
+
|Danish
|Pie
+
|colspan="2"|Croissant
 
|-
 
|-
 +
|Cheese
 +
|colspan="2"|Ice cream
 
|Butter
 
|Butter
|Ice cream
+
|Yoghurt
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
{| border="1" cellpadding="20" cellspacing="0"
+
{| border="1"
|+ align="bottom" style="color:#e76700;" |''Food complements''
+
!colspan="6"|Shopping List
 
|-
 
|-
|Orange
+
|rowspan="2"|Bread & Butter
|Apple
 
|-
 
|Bread
 
 
|Pie
 
|Pie
 +
|Buns
 +
|Danish
 +
|colspan="2"|Croissant
 
|-
 
|-
 +
|Cheese
 +
|colspan="2"|Ice cream
 
|Butter
 
|Butter
|Ice cream
+
|Yoghurt
 
|}
 
|}
 
|}
 
|}
  
==== Accessibility of table header cells ====
+
==== With HTML attributes and CSS styles ====
Table header cells do not explicitly specify which table data cells they apply to (those on their right on the same row, or those below them on the same column). When the table is rendered in a visual 2D environment, this is usually easy to infer.
+
[[Manual:CSS|CSS]] style attributes can be added with or without other HTML attributes.
 
 
However when tables are rendered on non-visual medias, you can help the browser to determine which table header cell applies to the description of any selected cell (in order to repeat its content in some accessibility helper) using a scope="row" or scope="col" attribute on table header cells. In most cases with simple tables, you'll use scope="col" on all header cells of the first row, and scope="row" on the first cell of the following rows:
 
  
 
{| cellspacing="0" border="1"
 
{| cellspacing="0" border="1"
Line 1,497: Line 1,560:
 
|
 
|
 
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word; word-break:break-all;">
 
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word; word-break:break-all;">
{| border="1" cellspacing="0" cellpadding="2"
+
{| style="color:green; background-color:#ffffcc;" cellpadding="10" cellspacing="0" border="1"
 +
|Orange
 +
|Apple
 
|-
 
|-
!scope="col"| Item
+
|Bread
!scope="col"| Quantity
+
|Pie
!scope="col"| Price
 
 
|-
 
|-
!scope="row"| Bread
+
|Butter
| 0.3 kg
+
|Ice cream
| $0.65
 
|-
 
!scope="row"| Butter
 
| 0.125 kg
 
| $1.25
 
|-
 
!scope="row" colspan="2"| Total
 
| $1.90
 
 
|}
 
|}
 
</pre>
 
</pre>
 
|
 
|
{| border="1" cellspacing="0" cellpadding="2"
+
{| style="color:green; background-color:#ffffcc;" cellpadding="10" cellspacing="0" border="1"
 +
|Orange
 +
|Apple
 
|-
 
|-
!scope="col"| Item
+
|Bread
!scope="col"| Quantity
+
|Pie
!scope="col"| Price
 
 
|-
 
|-
!scope="row"| Bread
+
|Butter
| 0.3 kg
+
|Ice cream
| $0.65
 
|-
 
!scope="row"| Butter
 
| 0.125 kg
 
| $1.25
 
|-
 
!scope="row" colspan="2"| Total
 
| $1.90
 
 
|}
 
|}
 
|}
 
|}
  
=== Pitfalls! ===
+
'''Attributes''' can be added to the caption and headers as follows.
  
==== Negative numbers ====
+
{| cellspacing="0" border="1"
If you start a cell on a new line with a negative number with a minus sign (or a parameter that evaluates to a negative number), your table can get broken, because the characters <code>|-</code> will be parsed as the wiki markup for table row, not table cell. To avoid this, insert a space before the value (<code>| -6</code>) or use in-line cell markup (<code>|| -6</code>).
+
!style="width:50%"|You type
 
+
!style="width:50%"|You get
== Images ==
+
|-
 
+
|
This section explains the '''image''' syntax used in the wiki. You or another user must usually [[Help:Managing files|upload an image]] before you can use it on a page.
+
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word; word-break:break-all;">
 
+
{| border="1" cellpadding="20" cellspacing="0"
=== Supported media types for images ===
+
|+ align="bottom" style="color:#e76700;" |''Food complements''
The following file formats are supported by Mediawiki by default:
+
|-
* '''.jpg''' or '''.jpeg''' : bitmap image compressed in the standard JPEG format (this lossy format is most suitable for photographs).
+
|Orange
* '''.png''' : bitmap image in the ''Portable Network Graphics'' format (specified by the ''W3 Consortium'').
+
|Apple
* '''.gif''' : bitmap image in the legacy ''Graphics Interchange Format''.
+
|-
 
+
|Bread
Another format commonly enabled on MediaWiki (but not yet supported on {{SITENAME}}) is:
+
|Pie
* '''.svg''' : scalable image in the ''Scalable Vector Graphics'' format (specified by the ''W3 Consortium'').
 
 
 
=== Rendering a single image ===
 
 
 
The full syntax for displaying an image is:
 
<nowiki>[[</nowiki>File:''filename.extension''|''options''|''caption'']]
 
 
 
The ''options'' can be given in any order separated by pipes ('''|'''):
 
* ''Format'' option: <code>frame</code>, <code>frameless</code> or <code>thumb</code>;
 
*: Controls how the rendered image is formatted and embedded in the rest of the page. See below.
 
* ''[[#Size and Frame|Resizing]]'' option: one of
 
** ''{width}''<code>px</code> — Resizes the image to fit within the given maximum width in pixels, without restricting its height;
 
** <code>x</code>''{height}''<code>px</code> — Resizes the image to fit within the given maximum height in pixels, without restricting its width;
 
** ''{width}''<code>x</code>''{height}''<code>px</code> — Resizes the image to fit within the given width and height in pixels;
 
** <code>upright</code> — Resizes an image to fit within reasonable dimensions, according to user preferences (suitable for images in portrait orientation rather than landscape).
 
*: {{note|that the image will always retain its aspect ratio, and can only be reduced (not increased) in size unless it's in a scalable media type (bitmap images cannot be scaled up).  The default maximum size depends on the ''format'' and the internal image dimensions (according to its media type).}}
 
* ''[[#Horizontal alignment|Horizontal alignment]]'' option: one of <code>left</code>, <code>right</code>, <code>center</code>, <code>none</code>;
 
*: Controls the horizontal alignment (and inline/block or floating styles) of the image within a text (no default value).
 
* ''[[#Vertical alignment|Vertical alignment]] option'': one of <code>baseline</code>, <code>sub</code>, <code>super</code>, <code>top</code>, <code>text-top</code>, <code>middle</code>, <code>bottom</code>, '''text-bottom</code>;
 
*: Controls the vertical alignment of a non-floating inline image with the text before or after the image, and in the same block (the default vertical alignment is <code>middle</code>).
 
* ''[[#Altering the default link target|Link]] option'': one of
 
** <code>link=</code>''{target}'' — Allows to change the target (to an arbitrary page title, or URL) of the generated link associated with the image.  {{note|<code>link</code> does '''not''' work with <code>thumb</code>, <code>thumbnail</code> or <code>frame</code>.}}
 
* Other specific options:
 
**  <code>border</code> — adds a very thin border around the image.
 
** <code>alt=</code>''{alternative text}'' — Defines the alternative text (maps to the HTML attribute <code>alt="..."</code> of the generated <code>&lt;image /&gt;</code> element) of an image that will be rendered if either the referenced image cannot be downloaded and embedded, or if the support media must use the alternative description text (e.g. when using a Braille reader or with accessibility options set by the user in its browser).
 
** <code>page=</code>''{number}'' — Renders the specified page number (currently only applicable when showing a .djvu or .pdf file).
 
 
 
If a parameter does not match any of the other possibilities, it is assumed to be the caption text.  Caption text is shown below the image in '''thumb''' and '''frame''' formats, or as mouseover text in '''border''' and '''frameless''' formats or when the format is omitted.  Caption text displayed in the '''thumb''' and '''frame''' formats may contain wiki links and other formatting.  In the other options, wiki-formatting will not work.  If no caption text is supplied, a caption is automatically created showing the file name.  To completely remove the caption, set it to <code><nowiki><span title=""></span></nowiki></code>.
 
 
 
==== Size and Frame ====
 
Among different formats, the effect of the size parameter may be different, as shown below.
 
* When the format is not specified the size can be both reduced and enlarged to any specified size.
 
* In the examples below, the original size of the image is 400 × 267 pixels.
 
* An image with <code>frame</code> always ignores the size specification, the original image will be reduced if it exceeds the maximum size defined in user preferences.
 
* The size of an image with <code>thumb</code> can be reduced, but can not be enlarged beyond the original size of the image.
 
 
 
{|class="wikitable"
 
 
|-
 
|-
! Format !! Reduced !! Enlarged
+
|Butter
{{ImageExamples/size|frame=}}
+
|Ice cream
{{ImageExamples/size|frame=border}}
+
|}
{{ImageExamples/size|frame=frame}}
+
</pre>
{{ImageExamples/size|frame=thumb}}
+
|
{{ImageExamples/size|frame=frameless}}
+
{| border="1" cellpadding="20" cellspacing="0"
|}
+
|+ align="bottom" style="color:#e76700;" |''Food complements''
 +
|-
 +
|Orange
 +
|Apple
 +
|-
 +
|Bread
 +
|Pie
 +
|-
 +
|Butter
 +
|Ice cream
 +
|}
 +
|}
  
==== Horizontal alignment ====
+
==== Accessibility of table header cells ====
Note that when using the <code>frame</code> or <code>thumb[nail]</code> formats, the default horizontal alignment will be <code>right</code>.
+
Table header cells do not explicitly specify which table data cells they apply to (those on their right on the same row, or those below them on the same column). When the table is displayed in a visual 2D environment, this is usually easy to infer.
 +
 
 +
However when tables are rendered on non-visual medias, you can help the browser to determine which table header cell applies to the description of any selected cell (in order to repeat its content in some accessibility helper) using a scope="row" or scope="col" attribute on table header cells. In most cases with simple tables, you'll use scope="col" on all header cells of the first row, and scope="row" on the first cell of the following rows:
  
{|class="wikitable"
+
{| cellspacing="0" border="1"
 +
!style="width:50%"|You type
 +
!style="width:50%"|You get
 
|-
 
|-
!Description
+
|
!You type
+
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word; word-break:break-all;">
!You get
+
{| border="1" cellspacing="0" cellpadding="2"
<!-- The character sequence &#32; is used below to insert spaces that would otherwise be stripped off the template parameter -->
+
|-
{{ImageExamples/frame|2=100px|frame=|ex='''no horizontal alignment specified''', or default alignment|inline=yes|float=no|textbefore=text before&#32;|textafter=&#32;text after}}
+
!scope="col"| Item
{{ImageExamples/frame|2=100px|frame=none|ex=specify horizontal alignment as: '''none'''|inline=no|float=no|textbefore=text before&#32;|textafter=&#32;text after}}
+
!scope="col"| Quantity
{{ImageExamples/frame|2=100px|frame=center|ex=specify horizontal alignment as: '''center'''|inline=no|float=no|textbefore=text before&#32;|textafter=&#32;text after}}
+
!scope="col"| Price
{{ImageExamples/frame|2=100px|frame=left|ex=specify horizontal alignment as: '''left'''|inline=no|float=yes|textbefore=text before&#32;|textafter=&#32;text after}}
+
|-
{{ImageExamples/frame|2=100px|frame=right|ex=specify horizontal alignment as: '''right'''|inline=no|float=yes|textbefore=text before&#32;|textafter=&#32;text after}}
+
!scope="row"| Bread
 +
| 0.3 kg
 +
| $0.65
 +
|-
 +
!scope="row"| Butter
 +
| 0.125 kg
 +
| $1.25
 +
|-
 +
!scope="row" colspan="2"| Total
 +
| $1.90
 +
|}
 +
</pre>
 +
|
 +
{| border="1" cellspacing="0" cellpadding="2"
 +
|-
 +
!scope="col"| Item
 +
!scope="col"| Quantity
 +
!scope="col"| Price
 +
|-
 +
!scope="row"| Bread
 +
| 0.3 kg
 +
| $0.65
 +
|-
 +
!scope="row"| Butter
 +
| 0.125 kg
 +
| $1.25
 +
|-
 +
!scope="row" colspan="2"| Total
 +
| $1.90
 +
|}
 
|}
 
|}
  
==== Vertical alignment ====
+
=== Table pitfalls! <!--Note: the exclamation mark here demonstrates url encoding when creating links to headings. See the section called "Links to section headings". -->===
The vertical alignment options take effect only if the image '''is''' rendered as an inline element and '''is not''' floating. They alter the way the inlined image will be vertically aligned with the text present in the same block before and/or after this image on the same rendered row.  Note that the rendered line of text where inline images are inserted (and the lines of text rendered after the current one) may be moved down (this will increase the line-height conditionally by additional line spacing, just as it may occur with spans of text with variable font sizes, or with superscripts and subscripts) to allow the image height to be fully displayed with this alignment constraint.
 
 
 
To show the alignment result more clearly in this example, the text spans are overlined and underlined, the line-height is increased and emphasized with a yellow background and grey border:
 
  
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
If you start a cell on a new line with a negative number with a minus sign (or a parameter that evaluates to a negative number), your table can get broken, because the characters <code>|-</code> will be parsed as the wiki markup for table row, not table cell. To avoid this, insert a space before the value (<code>| -6</code>) or use in-line cell markup (<code>|| -6</code>).
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''top:''' [[File:Example.jpg|20px|top]] [[File:Example.jpg|40px|top]] [[File:Example.jpg|40px|border|top]]
 
<del>text</del></u></span></p>
 
  
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
== Images ==
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
+
{{note|Images must be uploaded to the wiki before they can be used.}}
'''text-top:''' [[File:Example.jpg|20px|text-top]] [[File:Example.jpg|40px|text-top]] [[File:Example.jpg|40px|border|text-top]]
 
<del>text</del></u></span></p>
 
  
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
=== Supported media types for images ===
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
+
The following file formats are supported on {{SITENAME}}:
<sup>'''super:'''</sup> [[File:Example.jpg|20px|super]] [[File:Example.jpg|40px|super]] [[File:Example.jpg|40px|border|super]]
+
* '''.jpg''' or '''.jpeg''' : bitmap image compressed in the standard JPEG format (this lossy format is most suitable for photographs).
<del>text</del></u></span></p>
+
* '''.png''' : bitmap image in the ''Portable Network Graphics'' format (specified by the ''W3 Consortium'').
 +
* '''.gif''' : bitmap image in the legacy ''Graphics Interchange Format''.
 +
* '''.svg''' : scalable image in the ''Scalable Vector Graphics'' format (specified by the ''W3 Consortium'').
  
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
=== Uploading an image ===
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
+
# In the sidebar, under “toolbox”, click “Upload file.”
'''baseline:''' [[File:Example.jpg|20px|baseline]] [[File:Example.jpg|40px|baseline]] [[File:Example.jpg|40px|border|baseline]]
+
# Select the “Source filename”
<del>text</del></u></span></p>
+
# You can fill in the optional “Summary” text. {{note|This is plain text and not wikitext}}
  
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
After you upload a file, you will be redirected to the “file description page”. You should edit this page to provide more information about the file. For example, you should explain where you got the file from, and what its copyright status is.
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<sub>'''sub:'''</sub> [[File:Example.jpg|20px|sub]] [[File:Example.jpg|40px|sub]] [[File:Example.jpg|40px|border|sub]]
 
<del>text</del></u></span></p>
 
  
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
=== Displaying an image ===
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
+
The wikitext to display an image is:
'''default:''' [[File:Example.jpg|20px]] [[File:Example.jpg|40px]] [[File:Example.jpg|40px|border]]
+
<nowiki>[[</nowiki>File:''filename.extension''|''options''|''caption'']]
<del>text</del></u></span></p>
 
  
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
The ''options'' can be given in any order separated by pipes ('''|'''):
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
+
; <code>border</code>
'''middle:''' [[File:Example.jpg|20px|middle]] [[File:Example.jpg|40px|middle]] [[File:Example.jpg|40px|border|middle]]
+
: Adds a very thin border around the image.
<del>text</del></u></span></p>
+
; <code>frame</code>, <code>frameless</code>, <code>thumb</code> or <code>thumbnail</code>
 +
: Controls how the image is formatted and embedded in the rest of the page. See the [[#Image dimensions and borders|examples of image formats]].
 +
; <code>''{width}''x''{height}''px</code>
 +
: Resizes the image to fit inside a maximum ''{width}'' and ''{height}'' in pixels. See the [[#Image dimensions and borders|examples of image resizing]]. {{note|The image will always retain its aspect ratio.}}
 +
; <code>''{width}''px</code>
 +
: Resizes the image using a maximum width in pixels.
 +
; <code>x''{height}''px</code>
 +
: Resizes the image using maximum height in pixels.
 +
; <code>upright</code>
 +
: Uses a resizing algorithm suitable for images in portrait orientation rather than landscape.
 +
; <code>left</code>, <code>right</code>, <code>center</code>, or <code>none</code>
 +
: Controls the [[#Horizontal alignment|horizontal alignment]] (and inline/block or floating styles) of the image within a text (no default value).
 +
; <code>baseline</code>, <code>sub</code>, <code>super</code>, <code>top</code>, <code>text-top</code>, <code>middle</code>, <code>bottom</code>, or <code>text-bottom</code>
 +
: Controls the [[#Vertical alignment|vertical alignment]] of a non-floating inline image with the text before or after the image, and in the same block (the default vertical alignment is <code>middle</code>).
 +
; <code>link=''{target}''</code>
 +
: Allows to change the target of the generated link associated with the image. See [[#Altering the default link target|Altering the default link target]]. {{note|<code>link</code> does '''not''' work with <code>thumb</code>, <code>thumbnail</code> or <code>frame</code>.}}
 +
; <code>alt=''{alternative text}''</code>
 +
: Defines the alternative text (maps to the [http://www.w3.org/TR/html401/struct/objects.html#h-13.8 HTML <code>alt="..."</code> attribute]).
 +
; <code>page=''{number}''</code>
 +
: Renders the specified page number (only applicable when showing a .djvu or .pdf file).
  
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
If a parameter does not match any of the other possibilities, it is assumed to be the caption text.  Caption text is shown below the image in '''thumb''' and '''frame''' formats, or as mouseover text in '''border''' and '''frameless''' formats or when the format is omitted. Caption text displayed in the '''thumb''' and '''frame''' formats may contain wiki links and other formatting.  In the other options, wiki-formatting will not work. If no caption text is supplied, a caption is automatically created showing the file name. To completely remove the caption, set it to <code><nowiki><span title=""></span></nowiki></code>.
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''text-bottom:''' [[File:Example.jpg|20px|text-bottom]] [[File:Example.jpg|40px|text-bottom]] [[File:Example.jpg|40px|border|text-bottom]]
 
<del>text</del></u></span></p>
 
  
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
==== Image dimensions and borders ====
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''bottom:''' [[File:Example.jpg|20px|bottom]] [[File:Example.jpg|40px|bottom]] [[File:Example.jpg|40px|border|bottom]]
 
<del>text</del></u></span></p>
 
  
 +
The effect of the size parameters depend on how the image is formatted, but images will always retain their aspect ratio.  When the format is not specified the image can be reduced or enlarged to any size.  An image with the <code>frame</code> format always ignores the size specification and the original image will be reduced if it exceeds a maximum size.  The size of an image with the <code>thumb</code> format can be reduced, but can not be enlarged beyond the original image size unless it is a scalable media type.
  
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle toccolours" style="float:none;text-align:center">'''Source code for the example above'''</div>
+
In the examples below, the original size of the image is 400 × 267 pixels.
<div class="mw-collapsible-content">
+
{|class="wikitable"
<source lang="html4strict" enclose="div">
+
|-
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
! Format !! Reduced Size !! Enlarged
 +
{{ImageExamples/size|frame=}}
 +
{{ImageExamples/size|frame=border}}
 +
{{ImageExamples/size|frame=frame}}
 +
{{ImageExamples/size|frame=thumb}}
 +
{{ImageExamples/size|frame=frameless}}
 +
|}
 +
 
 +
==== Horizontal alignment ====
 +
Note that when using the <code>frame</code> or <code>thumb[nail]</code> formats, the default horizontal alignment will be <code>right</code>.
 +
 
 +
{|class="wikitable"
 +
|-
 +
!Description
 +
!You type
 +
!You get
 +
<!-- The character sequence &#32; is used below to insert spaces that would otherwise be stripped off the template parameter -->
 +
{{ImageExamples/frame|2=100px|frame=|ex='''no horizontal alignment specified''', or default alignment|inline=yes|float=no|textbefore=text before&#32;|textafter=&#32;text after}}
 +
{{ImageExamples/frame|2=100px|frame=none|ex=specify horizontal alignment as: '''none'''|inline=no|float=no|textbefore=text before&#32;|textafter=&#32;text after}}
 +
{{ImageExamples/frame|2=100px|frame=center|ex=specify horizontal alignment as: '''center'''|inline=no|float=no|textbefore=text before&#32;|textafter=&#32;text after}}
 +
{{ImageExamples/frame|2=100px|frame=left|ex=specify horizontal alignment as: '''left'''|inline=no|float=yes|textbefore=text before&#32;|textafter=&#32;text after}}
 +
{{ImageExamples/frame|2=100px|frame=right|ex=specify horizontal alignment as: '''right'''|inline=no|float=yes|textbefore=text before&#32;|textafter=&#32;text after}}
 +
|}
 +
 
 +
==== Vertical alignment ====
 +
The vertical alignment options take effect only if the image '''is''' displayed as an inline element and '''is not''' floating. They alter the way the inlined image will be vertically aligned with the text present in the same block before and/or after this image on the same row.  Note that the displayed line of text where inline images are inserted (and the lines of text displayed after the current one) may be moved down.  The line spacing will increase, just as may occur with spans of text with variable font sizes to allow the image height to be fully displayed with this alignment constraint.
 +
 
 +
To show the alignment result more clearly in this example, the text spans are overlined and underlined, the line-height is increased and emphasized with a yellow background and grey border:
 +
 
 +
<blockquote>
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''top:''' [[File:Example.jpg|20px|top]] [[File:Example.jpg|40px|top]] [[File:Example.jpg|40px|border|top]]
 
'''top:''' [[File:Example.jpg|20px|top]] [[File:Example.jpg|40px|top]] [[File:Example.jpg|40px|border|top]]
 
<del>text</del></u></span></p>
 
<del>text</del></u></span></p>
+
 
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''text-top:''' [[File:Example.jpg|20px|text-top]] [[File:Example.jpg|40px|text-top]] [[File:Example.jpg|40px|border|text-top]]
 
'''text-top:''' [[File:Example.jpg|20px|text-top]] [[File:Example.jpg|40px|text-top]] [[File:Example.jpg|40px|border|text-top]]
 
<del>text</del></u></span></p>
 
<del>text</del></u></span></p>
+
 
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
<sup>super:</sup> [[File:Example.jpg|20px|super]] [[File:Example.jpg|40px|super]] [[File:Example.jpg|40px|border|super]]
+
<sup>'''super:'''</sup> [[File:Example.jpg|20px|super]] [[File:Example.jpg|40px|super]] [[File:Example.jpg|40px|border|super]]
 
<del>text</del></u></span></p>
 
<del>text</del></u></span></p>
+
 
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''baseline:''' [[File:Example.jpg|20px|baseline]] [[File:Example.jpg|40px|baseline]] [[File:Example.jpg|40px|border|baseline]]
 
'''baseline:''' [[File:Example.jpg|20px|baseline]] [[File:Example.jpg|40px|baseline]] [[File:Example.jpg|40px|border|baseline]]
 
<del>text</del></u></span></p>
 
<del>text</del></u></span></p>
+
 
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<sub>'''sub:'''</sub> [[File:Example.jpg|20px|sub]] [[File:Example.jpg|40px|sub]] [[File:Example.jpg|40px|border|sub]]
 
<sub>'''sub:'''</sub> [[File:Example.jpg|20px|sub]] [[File:Example.jpg|40px|sub]] [[File:Example.jpg|40px|border|sub]]
 
<del>text</del></u></span></p>
 
<del>text</del></u></span></p>
+
 
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
'''default:''' [[File:Example.jpg|20px]][[File:Example.jpg|40px]] [[File:Example.jpg|40px|border]]
+
'''default:''' [[File:Example.jpg|20px]] [[File:Example.jpg|40px]] [[File:Example.jpg|40px|border]]
 
<del>text</del></u></span></p>
 
<del>text</del></u></span></p>
+
 
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''middle:''' [[File:Example.jpg|20px|middle]] [[File:Example.jpg|40px|middle]] [[File:Example.jpg|40px|border|middle]]
 
'''middle:''' [[File:Example.jpg|20px|middle]] [[File:Example.jpg|40px|middle]] [[File:Example.jpg|40px|border|middle]]
 
<del>text</del></u></span></p>
 
<del>text</del></u></span></p>
+
 
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''text-bottom:''' [[File:Example.jpg|20px|text-bottom]] [[File:Example.jpg|40px|text-bottom]] [[File:Example.jpg|40px|border|text-bottom]]
 
'''text-bottom:''' [[File:Example.jpg|20px|text-bottom]] [[File:Example.jpg|40px|text-bottom]] [[File:Example.jpg|40px|border|text-bottom]]
 
<del>text</del></u></span></p>
 
<del>text</del></u></span></p>
+
 
<p style="border:1px solid #AAA;background:#FF9;padding:0;font-size:150%;line-height:2">
+
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
'''bottom:'' [[File:Example.jpg|20px|bottom]] [[File:Example.jpg|40px|bottom]] [[File:Example.jpg|40px|border|bottom]]
+
'''bottom:''' [[File:Example.jpg|20px|bottom]] [[File:Example.jpg|40px|bottom]] [[File:Example.jpg|40px|border|bottom]]
 
<del>text</del></u></span></p>
 
<del>text</del></u></span></p>
</source></div></div>
 
  
 +
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle toccolours" style="float:none;text-align:center">'''Source code for the example above'''</div>
 +
<div class="mw-collapsible-content" style="background:#fefefe;border:1px solid #AAA">
 +
<source lang="html4strict" enclose="div">
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 +
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 +
'''top:''' [[File:Example.jpg|20px|top]] [[File:Example.jpg|40px|top]] [[File:Example.jpg|40px|border|top]]
 +
<del>text</del></u></span></p>
 +
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 +
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 +
'''text-top:''' [[File:Example.jpg|20px|text-top]] [[File:Example.jpg|40px|text-top]] [[File:Example.jpg|40px|border|text-top]]
 +
<del>text</del></u></span></p>
 +
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 +
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 +
<sup>super:</sup> [[File:Example.jpg|20px|super]] [[File:Example.jpg|40px|super]] [[File:Example.jpg|40px|border|super]]
 +
<del>text</del></u></span></p>
 +
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 +
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 +
'''baseline:''' [[File:Example.jpg|20px|baseline]] [[File:Example.jpg|40px|baseline]] [[File:Example.jpg|40px|border|baseline]]
 +
<del>text</del></u></span></p>
 +
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 +
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 +
<sub>'''sub:'''</sub> [[File:Example.jpg|20px|sub]] [[File:Example.jpg|40px|sub]] [[File:Example.jpg|40px|border|sub]]
 +
<del>text</del></u></span></p>
 +
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 +
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 +
'''default:''' [[File:Example.jpg|20px]][[File:Example.jpg|40px]] [[File:Example.jpg|40px|border]]
 +
<del>text</del></u></span></p>
 +
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 +
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 +
'''middle:''' [[File:Example.jpg|20px|middle]] [[File:Example.jpg|40px|middle]] [[File:Example.jpg|40px|border|middle]]
 +
<del>text</del></u></span></p>
 +
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 +
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 +
'''text-bottom:''' [[File:Example.jpg|20px|text-bottom]] [[File:Example.jpg|40px|text-bottom]] [[File:Example.jpg|40px|border|text-bottom]]
 +
<del>text</del></u></span></p>
 +
 +
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
 +
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 +
'''bottom:'' [[File:Example.jpg|20px|bottom]] [[File:Example.jpg|40px|bottom]] [[File:Example.jpg|40px|border|bottom]]
 +
<del>text</del></u></span></p>
 +
</source></div></div>
 +
</blockquote>
 +
 +
==== Stopping the text flow ====
 +
On occasion it is desirable to stop text (or other inline non-floating images) from flowing around a floating image.  Depending on the web browser's screen resolution and such, text flow on the right side of an image may cause a section header (for instance, <nowiki>== My Header ==</nowiki>) to appear to the right of the image, instead of below it, as a user may expect.  The text flow can be stopped by placing '''<nowiki><br style="clear: both" /></nowiki>''' before the text that should start below the floating image.
  
==== Stopping the text flow ====
+
All images displayed as blocks (including non-floating '''center'''ed images, '''left'''- or '''right'''-floating images, as well as '''framed''' or '''thumbnail'''ed floating images) are implicitly breaking the surrounding lines of text (terminating the current block of text before the image, and creating a new paragraph for the text after them). They will then stack vertically along their left or right alignment margin (or along the center line between these margins for '''center'''ed images).
On occasion it is desirable to stop text (or other inline non-floating images) from flowing around a floating image.  Depending on the web browser's screen resolution and such, text flow on the right side of an image may cause a section header (for instance, <nowiki>== My Header ==</nowiki>) to appear to the right of the image, instead of below it, as a user may expect.  The text flow can be stopped by placing '''<nowiki><br style="clear: both" /></nowiki>''' before the text that should start below the floating image.
 
 
 
All images rendered as blocks (including non-floating '''center'''ed images, '''left'''- or '''right'''-floating images, as well as '''framed''' or '''thumbnail'''ed floating images) are implicitly breaking the surrounding lines of text (terminating the current block of text before the image, and creating a new paragraph for the text after them). They will then stack vertically along their left or right alignment margin (or along the center line between these margins for '''center'''ed images).
 
 
 
==== Altering the default link target ====
 
The following table shows how to alter the link target (whose default is the image description page) or how to remove it. Changing the link does not alter the format described in the previous sections.
 
 
 
{|class="wikitable plainlinks"
 
|-
 
!Description
 
!You type
 
!You get
 
{{ImageExamples/frame|2=link=Main Page|ex=internal link}}
 
{{ImageExamples/frame|2=link=http://wikipedia.org|ex=external link}}
 
{{ImageExamples/frame|2=link=|ex=no link (external or file page)}}
 
|}
 
 
 
=== Rendering a gallery of images ===
 
 
 
It's easy to make a gallery of '''thumbnails only''', not other images, with the <code><nowiki><gallery></nowiki></code> tag. The syntax is:
 
<nowiki><gallery></nowiki>
 
Image:file_name.ext|caption
 
Image:file_name.ext|caption
 
{...}
 
</gallery>
 
 
 
Note that the image code is not enclosed in brackets when enclosed in gallery tags.  
 
  
Captions are optional, and may contain wiki links or other formatting.
+
==== Altering the link target ====
 +
The table below shows how to alter or remove the link target associated with an image.  {{note}}The link attribute '''does not work with''' <code>thumb</code> '''or''' <code>frame</code> formats.
  
for example:
+
{|class="wikitable plainlinks"
  <nowiki><gallery></nowiki>
+
|-
 +
!Description
 +
!You type
 +
!You get
 +
{{ImageExamples/frame|2=link=Main Page|ex=internal link}}
 +
{{ImageExamples/frame|2=link=http://wikipedia.org|ex=external link}}
 +
{{ImageExamples/frame|2=link=|ex=no link (external or file page)}}
 +
|}
 +
 
 +
=== Displaying an image gallery ===
 +
 
 +
It's easy to make a gallery of thumbnails with the <code><nowiki><gallery></nowiki></code> tag:
 +
<nowiki><gallery></nowiki>
 +
Image:file_name.ext|caption
 +
Image:file_name.ext|caption
 +
{...}
 +
</gallery>
 +
 
 +
Note that the image code is not enclosed in quare brackets inside gallery tags. Captions are optional, and may contain wiki links or other formatting.  For example:
 +
  <nowiki><gallery></nowiki>
 
  File:Example.jpg|Item 1
 
  File:Example.jpg|Item 1
 
  File:Example.jpg|a link to <nowiki>[[</nowiki>Help:Contents]]
 
  File:Example.jpg|a link to <nowiki>[[</nowiki>Help:Contents]]
Line 1,754: Line 1,888:
 
  File:Example.jpg|on page "<nowiki>{{</nowiki>PAGENAME}}"
 
  File:Example.jpg|on page "<nowiki>{{</nowiki>PAGENAME}}"
 
  </gallery>
 
  </gallery>
is formatted as:
+
Is displayed as:
 
<gallery>
 
<gallery>
 
File:Example.jpg|Item 1
 
File:Example.jpg|Item 1
Line 1,771: Line 1,905:
 
</gallery></pre>
 
</gallery></pre>
  
* <code>caption={caption}</code>: sets a caption on the gallery.
+
* <code>caption={caption}</code>: A caption for the gallery.
* <code>widths={width}px</code>: sets the widths of the images, default 120px. ''Note the plural, width'''s'''''
+
* <code>widths={width}px</code>: The maximum width for the images. Note the plural (width'''''s''''')
* <code>heights={heights}px</code>: sets the (max) heights of the images.
+
* <code>heights={heights}px</code>: The maximum height for the images.
* <code>perrow={integer}</code>: sets the number of images per row.
+
* <code>perrow={integer}</code>: The number of images per row.
* <code>showfilename={anything}</code>: Show the filenames of the images in the individual captions for each image (1.17+)
+
* <code>showfilename={y or n}</code>: Show the filenames in the image captions.
  
Example:
+
Example wikitext:
 
 
Coding:
 
 
<pre>
 
<pre>
 
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
 
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
Line 1,791: Line 1,923:
 
File:Example.jpg
 
File:Example.jpg
 
File:Example.jpg
 
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
</gallery>
+
</gallery>
</pre>
+
</pre>
 
+
 
Result:
+
Result:
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
+
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
File:Example.jpg
+
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
File:Example.jpg
+
File:Example.jpg
</gallery>
+
</gallery>
 
+
 
=== Linking to an image without displaying it ===
+
=== Linking to an image without displaying it ===
 
+
 
==== Link to description page ====
+
==== Link to the description page ====
 
+
 
If you put a colon (<code>:</code>) before <code>{{ns:image}}:</code>, the image will not be embedded and the link will lead to the description page of the file.
+
If you put a colon (<code>:</code>) before <code>{{ns:image}}:</code>, the image will not be embedded and the link will lead to the description page of the file.
 
+
 
{| class="wikitable"
+
{| class="wikitable"
! Description
+
! Description
! width=40% | You type
+
! width=40% | You type
! width=40% | You get
+
! width=40% | You get
 +
|-
 +
| Link to the description page of the file
 +
| <pre>
 +
<nowiki>[[</nowiki>:{{ns:image}}:Example.jpg]]
 +
</pre>
 +
|
 +
[[:{{ns:image}}:Example.jpg]]
 +
|-
 +
| Link to the description page with a custom title.
 +
| <pre>
 +
<nowiki>[[</nowiki>:{{ns:image}}:Example.jpg|Sunflowers]]</pre>
 +
|
 +
[[:{{ns:image}}:Example.jpg|Sunflowers]]
 +
|}
 +
 
 +
==== Link directly to the media file ====
 +
You can use the pseudo-namespace “{{ns:media}}” to link directly to a file without displaying it, bypassing the description page.
 +
 
 +
{| class="wikitable"
 +
! Description
 +
! width=40% | You type
 +
! width=40% | You get
 +
|-
 +
| Link directly to a file.
 +
| <pre>
 +
<nowiki>[[</nowiki>{{ns:media}}:Example.jpg]]
 +
</pre>
 +
|
 +
[[{{ns:media}}:Example.jpg]]
 +
|-
 +
| Link directly to a file, with a custom title.
 +
| <pre>
 +
<nowiki>[[</nowiki>{{ns:media}}:Example.jpg|Sunflowers]]
 +
</pre>
 +
|
 +
[[{{ns:media}}:Example.jpg|Sunflowers]]
 +
|-
 +
| link to a potential file, even if it doesn't exist.
 +
| <pre>
 +
<nowiki>[[</nowiki>{{#special:Filepath}}/Example.jpg]]
 +
</pre>
 +
|
 +
[[{{#special:Filepath}}/Example.jpg]]
 +
|-
 +
| Generate an external URL to the file
 +
| <pre>
 +
<nowiki>{{</nowiki>FILEPATH:Example.jpg<nowiki>}}</nowiki>
 +
</pre>
 +
|
 +
{{FILEPATH:Example.jpg}}
 +
|}
 +
 
 +
=== Displaying images from other websites ===
 +
Currently it is not possible to embed images from other websites into {{SITENAME}}.  Links are displayed instead.  External image embedding could be enabled using [[mw:Manual:$wgAllowExternalImages]].
 +
 
 +
{| class="wikitable"
 +
! Description
 +
! width=40% | You type
 +
! width=40% | You get
 +
|-
 +
| Link or embed an image from another website
 +
| <pre>
 +
http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png
 +
</pre>
 +
|
 +
http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png
 +
|}
 +
 
 +
== Categories ==
 +
See [[wikipedia:Help:Categories]].
 +
 
 +
== Subpages ==
 +
See [[wikipedia:Help:Subpages]].
 +
 
 +
== Namespaces ==
 +
See [[wikipedia:Help:Namespaces]].
 +
 
 +
== Templates ==
 +
See [[wikipedia:Help:Templates]].
 +
 
 +
== Redirects ==
 +
See [[wikipedia:Help:Redirects]].
 +
 
 +
== Magic Words ==
 +
'''Magic words''' are strings of text that MediaWiki interprets as a value or function.  Page-dependent magic words will affect or return data about the ''current'' page (by default), even if the word is added through a transcluded template or included system message.
 +
 
 +
=== Behavior switches ===
 +
A behavior switch controls the layout or behaviour of the page and can often be used to specify desired omissions and inclusions.
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Word
 +
! Description
 +
|-
 +
| <code><nowiki>__NOTOC__</nowiki></code>
 +
| Hides the table of contents (TOC).
 +
|-
 +
| <code><nowiki>__FORCETOC__</nowiki></code>
 +
| Forces the table of contents to appear at its normal position (above the first header).
 +
|-
 +
| <code><nowiki>__TOC__</nowiki></code>
 +
| Places a table of contents at the word's current position (overriding <code><nowiki>__NOTOC__</nowiki></code>). If this is used multiple times, the table of contents will appear at the first word's position.
 +
|-
 +
| <code><nowiki>__NEWSECTIONLINK__</nowiki></code>
 +
| Adds a link ([[MediaWiki:Addsection|"+" by default]]) beside the "edit" tab for adding a new section on a non-talk page (see [[mw:Help:Section#Adding a section at the end|Adding a section to the end]]).
 +
|-
 +
| <code><nowiki>__NOINDEX__</nowiki></code>
 +
| Tell search engines not to index the page (ie, do not list in search engines' results).
 +
|}
 +
 
 +
=== Variables ===
 +
Variables return information about the current page, wiki, or date. Their syntax is similar to templates.
 +
 
 +
==== Technical metadata ====
 +
Revision variables return data about the latest edit to the current page, even if viewing an older version of the page.
 +
{| class="wikitable"
 +
|-
 +
! Variable
 +
! Output
 +
! Description
 +
|-
 +
! style="background:#e9e9e9; color:black;" colspan="3"| '''Site'''
 +
|-
 +
| <code><nowiki>{{SITENAME}}</nowiki></code>
 +
| {{SITENAME}}
 +
| The wiki's site name.
 +
|-
 +
| <code><nowiki>{{SERVER}}</nowiki></code>
 +
| {{SERVER}}
 +
| Domain URL.
 +
|-
 +
| <code><nowiki>{{SERVERNAME}}</nowiki></code>
 +
| {{SERVERNAME}}
 +
| Domain name.
 +
|-
 +
| <code><nowiki>{{SCRIPTPATH}}</nowiki></code>
 +
| {{SCRIPTPATH}}
 +
| Relative path to the wiki scripts on the server.
 +
|-
 +
| <code><nowiki>{{STYLEPATH}}</nowiki></code>
 +
| {{STYLEPATH}}
 +
| Relative path to the wiki style sheet on the server.
 +
|-
 +
| <code><nowiki>{{CURRENTVERSION}}</nowiki></code>
 +
| {{CURRENTVERSION}}
 +
| The wiki's MediaWiki version.
 +
|-
 +
! style="background:#e9e9e9; color:black;" colspan="3"| '''Latest revision to current page'''
 +
|-
 +
| <code><nowiki>{{REVISIONID}}</nowiki></code>
 +
| {{REVISIONID}}
 +
| Unique revision ID
 +
|-
 +
| <code><nowiki>{{REVISIONDAY}}</nowiki></code>
 +
| {{REVISIONDAY}}
 +
| Day the edit was made (unpadded number)
 +
|-
 +
| <code><nowiki>{{REVISIONMONTH}}</nowiki></code>
 +
| {{REVISIONMONTH}}
 +
| Month the edit was made (zero-padded number as of {{mediawiki|rev:66200|1.17+}}, unpadded number in prior versions)
 +
|-
 +
| <code><nowiki>{{REVISIONYEAR}}</nowiki></code>
 +
| {{REVISIONYEAR}}
 +
| Year the edit was made
 +
|-
 +
| <code><nowiki>{{REVISIONTIMESTAMP}}</nowiki></code>
 +
| {{REVISIONTIMESTAMP}}
 +
| Timestamp of the edit
 +
|-
 +
| <code><nowiki>{{REVISIONUSER}}</nowiki></code>
 +
| {{REVISIONUSER}}
 +
| The user who made the most recent edit to the page, or the current user when previewing an edit
 +
|-
 +
| <code><nowiki>{{PROTECTIONLEVEL:</nowiki>''action''<nowiki>}}</nowiki></code>
 +
| protection level
 +
| The protection level (e.g. 'autoconfirm', 'sysop') for a given action (e.g. 'edit', 'move') on the current page or an empty string if not protected.
 +
|-
 +
! style="background:#e9e9e9; color:black;" colspan="3"| '''Affects page content'''
 +
|-
 +
| <code><nowiki>{{DISPLAYTITLE:</nowiki>''title''<nowiki>}}</nowiki></code>
 +
|
 +
| Format the current page's title. The value must be equivalent to the default title: only capitalization changes and replacing spaces with underscores are allowed.
 +
|-
 +
| <code><nowiki>{{DEFAULTSORT:</nowiki>''sortkey''<nowiki>}}</nowiki></code><br /><code><nowiki>{{DEFAULTSORTKEY:</nowiki>''sortkey''<nowiki>}}</nowiki></code><br /><code><nowiki>{{DEFAULTCATEGORYSORT:</nowiki>''sortkey''<nowiki>}}</nowiki></code>
 +
|
 +
| Used for categorizing pages, sets a default [[#Categories|category sort key]]. For example if you put <code><nowiki>{{DEFAULTSORT:Smith, John}}</nowiki></code> at the end of [[John Smith]], the page would be sorted under "S" by default in categories.
 +
|}
 +
 
 +
==== Statistics ====
 +
Numbers returned by these variables normally contain separators (commas or spaces, depending on the local language), but can return raw numbers with the ":R" flag (for example, <code><nowiki>{{NUMBEROFPAGES}}</nowiki></code> &rarr; {{NUMBEROFPAGES}} and <code><nowiki>{{NUMBEROFPAGES:R}}</nowiki></code> &rarr; {{NUMBEROFPAGES:R}}). Use "|R" for magic words that require a parameter like PAGESINCATEGORY (for example <code><nowiki>{{PAGESINCATEGORY:Help}}</nowiki></code> and <code><nowiki>{{PAGESINCATEGORY:Help|R}}</nowiki></code>). Also applicable to <code><nowiki>{{PAGESIZE:</nowiki>''page name''<nowiki>}}</nowiki></code> above.
 +
{| class="wikitable"
 +
|-
 +
! Variable
 +
! Output
 +
! Description
 +
|-
 +
! style="background:#e9e9e9; color:black;" colspan="3"| '''Entire wiki'''
 +
|-
 +
| <code><nowiki>{{NUMBEROFPAGES}}</nowiki></code>
 +
| {{NUMBEROFPAGES}}
 +
| Number of wiki pages.
 +
|-
 +
| <code><nowiki>{{NUMBEROFARTICLES}}</nowiki></code>
 +
| {{NUMBEROFARTICLES}}
 +
| Number of pages in [[mw:Manual:Using custom namespaces#Content namespaces|content namespaces]].
 +
|-
 +
| <code><nowiki>{{NUMBEROFFILES}}</nowiki></code>
 +
| {{NUMBEROFFILES}}
 +
| Number of uploaded files.
 +
|-
 +
| <code><nowiki>{{NUMBEROFEDITS}}</nowiki></code>
 +
| {{NUMBEROFEDITS}}
 +
| Number of page edits.
 +
|-
 +
| <code><nowiki>{{NUMBEROFVIEWS}}</nowiki></code>
 +
| {{NUMBEROFVIEWS}}
 +
| Number of page views. Usually useless on a wiki using caching.
 +
|-
 +
| <code><nowiki>{{NUMBEROFUSERS}}</nowiki></code>
 +
| {{NUMBEROFUSERS}}
 +
| Number of registered users.
 +
|-
 +
| <code><nowiki>{{NUMBEROFADMINS}}</nowiki></code>
 +
| {{NUMBEROFADMINS}}
 +
| Number of users in the ''sysop'' admin group.
 +
|-
 +
| <code><nowiki>{{NUMBEROFACTIVEUSERS}}</nowiki></code>
 +
| {{NUMBEROFACTIVEUSERS}}
 +
| Number of active users, based on the criteria used in [[{{#special:Statistics}}]].
 +
|-
 +
| <code><nowiki>{{NUMBERINGROUP:</nowiki>''groupname''<nowiki>}}</nowiki></code><br /><code><nowiki>{{NUMINGROUP:</nowiki>''groupname''<nowiki>}}</nowiki></code>
 +
|
 +
| Number of users in a specific [[mw:Manual:User rights|group]].
 +
|}
 +
 
 +
==== Page name variables ====
 +
{| class="wikitable"
 +
|-
 +
! Variable
 +
! Output
 +
! Description
 +
|-
 +
| <code><nowiki>{{FULLPAGENAME}}</nowiki></code>
 +
| {{FULLPAGENAME}}
 +
| Namespace and page title.
 +
|-
 +
| <code><nowiki>{{PAGENAME}}</nowiki></code>
 +
| {{PAGENAME}}
 +
| Page title.
 +
|-
 +
| <code><nowiki>{{BASEPAGENAME}}</nowiki></code>
 +
| {{BASEPAGENAME}}
 +
| Page title excluding the current [[#Subpages|subpage]] and namespace. For more complex splitting, use <code><nowiki>{{</nowiki>[[mw:Help:Extension:ParserFunctions#.23titleparts|#titleparts:]]<nowiki>}}</nowiki></code>.
 +
|-
 +
| <code><nowiki>{{SUBPAGENAME}}</nowiki></code>
 +
| {{SUBPAGENAME}}
 +
| The [[#Subpages|subpage]] title.
 +
|-
 +
| <code><nowiki>{{SUBJECTPAGENAME}}</nowiki></code>
 +
| {{SUBJECTPAGENAME}}
 +
| The namespace and title of the associated content page.
 +
|-
 +
| <code><nowiki>{{TALKPAGENAME}}</nowiki></code>
 +
| {{TALKPAGENAME}}
 +
| The namespace and title of the associated talk page.
 +
|}
 +
 
 +
The following are equivalents encoded for use in MediaWiki URLs (i.e. spaces replaced with underscores and some characters percent-encoded):
 +
* <code><nowiki>{{FULLPAGENAMEE}}</nowiki></code>
 +
* <code><nowiki>{{PAGENAMEE}}</nowiki></code>
 +
* <code><nowiki>{{BASEPAGENAMEE}}</nowiki></code>
 +
* <code><nowiki>{{SUBPAGENAMEE}}</nowiki></code>
 +
* <code><nowiki>{{SUBJECTPAGENAMEE}}</nowiki></code>
 +
* <code><nowiki>{{TALKPAGENAMEE}}</nowiki></code>
 +
 
 +
These can all take a parameter allowing specification of the page to be operated on, instead of just the current page:
 +
* <code><nowiki>{{PAGENAME:Template:Main Page}}</nowiki></code> &rarr; '''{{PAGENAME:Template:Main Page}}'''
 +
 
 +
==== Namespace variables ====
 +
{| class="wikitable"
 +
|-
 +
! Variable
 +
! Output
 +
! Description
 +
|-
 +
| <code><nowiki>{{NAMESPACE}}</nowiki></code>
 +
| {{NAMESPACE}}
 +
| Name of the page's namespace
 +
|-
 +
| <code><nowiki>{{SUBJECTSPACE}}</nowiki></code><br /><code><nowiki>{{ARTICLESPACE}}</nowiki></code>
 +
| {{SUBJECTSPACE}}<br />{{ARTICLESPACE}}
 +
| Name of the associated content namespace
 +
|-
 +
| <code><nowiki>{{TALKSPACE}}</nowiki></code>
 +
| {{TALKSPACE}}
 +
| Name of the associated talk namespace
 +
|}
 +
 
 +
The following are equivalents encoded for use in MediaWiki URLs (spaces replaced with underscores and some characters percent-encoded):
 +
* <code><nowiki>{{NAMESPACEE}}</nowiki></code>
 +
* <code><nowiki>{{SUBJECTSPACEE}}</nowiki></code>
 +
* <code><nowiki>{{TALKSPACEE}}</nowiki></code>
 +
 
 +
These can take a page name instead of operating on the current page:
 +
* <code><nowiki>{{NAMESPACE:Template:Main Page}}</nowiki></code> &rarr; '''{{NAMESPACE:Template:Main Page}}'''
 +
* <code><nowiki>{{SUBJECTSPACE:Template:Main Page}}</nowiki></code> &rarr; '''{{SUBJECTSPACE:Template:Main Page}}'''
 +
* <code><nowiki>{{TALKSPACE:Template:Main Page}}</nowiki></code> &rarr; '''{{TALKSPACE:Template:Main Page}}'''
 +
 
 +
=== Parser functions ===
 +
Parser functions have the same syntax as templates.  The names are sometimes prefixed with a hash to distinguish them from template page names.
 +
 
 +
==== Conditional expressions ====
 +
 
 +
===== #if =====
 +
This function tests whether the first parameter is non-empty.  It evaluates to false if the test string is empty or contains only whitespace characters (spaces, newlines, etc).
 +
<tt><nowiki>{{#if:</nowiki> ''test string'' | ''value if true'' | ''value if false'' <nowiki>}}</nowiki></tt>
 +
 
 +
===== #ifeq =====
 +
This parser function compares two strings and determines whether they are identical. 
 +
 
 +
<tt><nowiki>{{#ifeq:</nowiki> ''string 1'' <nowiki>|</nowiki> ''string 2'' <nowiki>|</nowiki> ''value if identical'' <nowiki>|</nowiki> ''value if different'' <nowiki>}}</nowiki></tt>
 +
 
 +
===== #iferror =====
 +
This function evaluates to <tt>true</tt> if the input string contains an HTML object with <tt>class="error"</tt>, as generated by other parser functions such as <tt>[[##expr|#expr]]</tt>, <tt>[[##time|#time]]</tt> and <tt>[[##rel2abs|#rel2abs]]</tt>, [[mw:Help:Template|template]] and errors such as loops and recursions.
 +
 
 +
<tt><nowiki>{{#iferror:</nowiki> ''test string'' <nowiki>|</nowiki> ''value if error'' <nowiki>|</nowiki> ''value if correct'' <nowiki>}}</nowiki></tt>
 +
 
 +
===== #ifexpr =====
 +
This function evaluates a mathematical expression and returns one of two strings depending on the boolean value of the result:
 +
 
 +
<tt><nowiki>{{#ifexpr:</nowiki> ''expression'' <nowiki>|</nowiki> ''value if true'' <nowiki>|</nowiki> ''value if false'' <nowiki>}}</nowiki></tt>
 +
 
 +
===== #ifexist =====
 +
This function returns one of two values depending on whether a page exists on the local wiki.
 +
 
 +
<tt><nowiki>{{#ifexist:</nowiki> ''page title'' | ''value if the page exists'' | ''value if it doesn't exist'' <nowiki>}}</nowiki></tt>
 +
 
 +
===== #switch =====
 +
This function compares one input value against several test cases, returning an associated string if a match is found.
 +
 
 +
<nowiki>{{#switch:</nowiki> ''comparison string''
 +
  | ''case1'' = ''result1''
 +
  | ''case2'' = ''result2''
 +
  | ''...''
 +
  | ''caseN'' = ''resultN''
 +
  | ''default result0''
 +
<nowiki>}}</nowiki>
 +
 
 +
===== #expr =====
 +
This function evaluates a mathematical expression and returns the calculated value.  See [[metawiki:Help:Calculation]] for details of operators and constants.
 +
 
 +
<tt><nowiki>{{#expr:</nowiki> ''expression'' <nowiki>}}</nowiki></tt>
 +
 
 +
==== URL data ====
 +
{| class="wikitable"
 +
|-
 +
! Parser function
 +
! Input → Output
 +
! Description
 +
|-
 +
| <code><nowiki>{{localurl:</nowiki>''page name''<nowiki>}}</nowiki></code><br /><code><nowiki>{{localurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code>
 +
| <code><nowiki>{{localurl:MediaWiki}}</nowiki></code> → {{localurl:MediaWiki}}<br /><code><nowiki>{{localurl:MediaWiki|printable=yes}}</nowiki></code> → {{localurl:MediaWiki|printable=yes}}
 +
| The relative path to the title.
 +
|-
 +
| <code><nowiki>{{fullurl:</nowiki>''page name''<nowiki>}}</nowiki></code><br /><code><nowiki>{{fullurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code><br /><code><nowiki>{{fullurl:</nowiki>''interwiki:remote page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code>
 +
| <code><nowiki>{{fullurl:Category:Top level}}</nowiki></code> → {{fullurl:Category:Top level}}<br />
 +
<code><nowiki>{{fullurl:Category:Top level|action=edit}}</nowiki></code> → {{fullurl:Category:Top level|action=edit}}
 +
| The absolute path to the title. This will also resolve [[Manual:Interwiki|Interwiki]] prefixes.
 +
|-
 +
| <code><nowiki>{{filepath:</nowiki>''file name''<nowiki>}}</nowiki></code><br /><code><nowiki>{{filepath:</nowiki>''file name''<nowiki>|nowiki}}</nowiki></code>
 +
| <code><nowiki>{{filepath:Example.jpg}}</nowiki></code> → {{filepath:Example.jpg}}<br />
 +
| The absolute URL to the full size media file.
 +
|-
 +
| <code><nowiki>{{#rel2abs:</nowiki> ''path'' <nowiki>}}</nowiki></code><br /><code><nowiki>{{#rel2abs:</nowiki> ''path'' <nowiki>|</nowiki> ''base path'' <nowiki>}}</nowiki></code>
 +
| <code><nowiki>{{#rel2abs:</nowiki>.<nowiki>}}</nowiki></code> → {{#rel2abs:.}}<br /><code><nowiki>{{#rel2abs:</nowiki>.<nowiki>|</nowiki>Help:Contents<nowiki>}}</nowiki></code> → {{#rel2abs:.|Help:Contents}}
 +
| Converts a relative file path into an absolute filepath.  In <code>path</path> the following syntax is valid:
 +
*<code>.</code> → the current level
 +
*<code>..</code> → "go up one level"
 +
*<code>/foo</code> → "go into the subdirectory /foo"
 +
If <code>base path</code> is not specified, the full page name of the page will be used instead.
 +
|}
 +
 
 +
==== Date and time functions ====
 +
{| class="wikitable"
 +
|-
 +
! Variable
 +
! Output
 +
! Description
 +
|-
 +
| <code><nowiki>{{#timel: Y F d, h:i:s}}</nowiki></code>
 +
| {{#timel: Y F d, h:i:s}}
 +
| Displays the current time and date in the local timezone of the wiki.  Due to caching, these variables frequently show when the page was cached rather than the current time.
 +
|}
 +
 
 +
==== Namespace functions ====
 +
<code><nowiki>{{ns:}}</nowiki></code> returns the localized name for a [[#Namespaces|namespace]]. <code><nowiki>{{nse:}}</nowiki></code> is the equivalent encoded for MediaWiki URLs. It does the same, but it replaces spaces with underscores, making it usable in external links.
 +
{| class="wikitable"
 +
|-
 +
! style="background:#e9e9e9; color:black;" colspan="2" width="50%" | Content namespaces
 +
! rowspan="12" |
 +
! style="background:#e9e9e9; color:black;" colspan="2" width=%50%" | Talk namespaces
 +
|-
 +
! Usage
 +
! Output
 +
! Usage
 +
! Output
 +
|-
 +
| <code><nowiki>{{ns:-2}}</nowiki></code> or <code><nowiki>{{ns:Media}}</nowiki></code>
 +
| {{ns:-2}} || ||
 +
|-
 +
| <code><nowiki>{{ns:-1}}</nowiki></code> or <code><nowiki>{{ns:Special}}</nowiki></code>
 +
| {{ns:-1}} || ||
 +
|-
 +
| <code><nowiki>{{ns:0}}</nowiki></code> or <code><nowiki>{{ns:}}</nowiki></code>
 +
| {{ns:}}
 +
| <code><nowiki>{{ns:1}}</nowiki></code> or <code><nowiki>{{ns:Talk}}</nowiki></code>
 +
| {{ns:1}}
 +
|-
 +
| <code><nowiki>{{ns:2}}</nowiki></code> or <code><nowiki>{{ns:User}}</nowiki></code>
 +
| {{ns:2}}
 +
| <code><nowiki>{{ns:3}}</nowiki></code> or <code><nowiki>{{ns:User talk}}</nowiki></code>
 +
| {{ns:3}}
 +
|-
 +
| <code><nowiki>{{ns:4}}</nowiki></code> or <code><nowiki>{{ns:Project}}</nowiki></code>
 +
| {{ns:4}}
 +
| <code><nowiki>{{ns:5}}</nowiki></code> or <code><nowiki>{{ns:Project talk}}</nowiki></code>
 +
| {{ns:5}}
 +
|-
 +
| <code><nowiki>{{ns:6}}</nowiki></code> or <code><nowiki>{{ns:File}}</nowiki></code> or <code><nowiki>{{ns:Image}}</nowiki></code>
 +
| {{ns:6}}
 +
| <code><nowiki>{{ns:7}}</nowiki></code> or <code><nowiki>{{ns:File talk}}</nowiki></code> or <code><nowiki>{{ns:Image talk}}</nowiki></code>
 +
| {{ns:7}}
 +
|-
 +
| <code><nowiki>{{ns:8}}</nowiki></code> or <code><nowiki>{{ns:MediaWiki}}</nowiki></code>
 +
| {{ns:8}}
 +
| <code><nowiki>{{ns:9}}</nowiki></code> or <code><nowiki>{{ns:MediaWiki talk}}</nowiki></code>
 +
| {{ns:9}}
 +
|-
 +
| <code><nowiki>{{ns:10}}</nowiki></code> or <code><nowiki>{{ns:Template}}</nowiki></code>
 +
| {{ns:10}}
 +
| <code><nowiki>{{ns:11}}</nowiki></code> or <code><nowiki>{{ns:Template talk}}</nowiki></code>
 +
| {{ns:11}}
 +
|-
 +
| <code><nowiki>{{ns:12}}</nowiki></code> or <code><nowiki>{{ns:Help}}</nowiki></code>
 +
| {{ns:12}}
 +
| <code><nowiki>{{ns:13}}</nowiki></code> or <code><nowiki>{{ns:Help talk}}</nowiki></code>
 +
| {{ns:13}}
 +
|-
 +
| <code><nowiki>{{ns:14}}</nowiki></code> or <code><nowiki>{{ns:Category}}</nowiki></code>
 +
| {{ns:14}}
 +
| <code><nowiki>{{ns:15}}</nowiki></code> or <code><nowiki>{{ns:Category talk}}</nowiki></code>
 +
| {{ns:15}}
 +
|}
 +
 
 +
==== Formatting functions ====
 +
{| class="wikitable"
 +
! Usage
 +
! Input → Output
 +
! Description
 +
|-
 +
|-
 +
| <code><nowiki>{{lc:</nowiki>''string''<nowiki>}}</nowiki></code>
 +
| <code><nowiki>{{lc:DATA CENTER}}</nowiki></code> → {{lc:DATA CENTER}}
 +
| The lowercase input.
 +
|-
 +
| <code><nowiki>{{lcfirst:</nowiki>''string''<nowiki>}}</nowiki></code>
 +
| <code><nowiki>{{lcfirst:DATA center}}</nowiki></code> → {{lcfirst:DATA center}}
 +
| The input with the first character lowercase.
 +
|-
 +
| <code><nowiki>{{uc:</nowiki>''string''<nowiki>}}</nowiki></code>
 +
| <code><nowiki>{{uc:text transform}}</nowiki></code> → {{uc:text transform}}
 +
| The uppercase input.
 +
|-
 +
| <code><nowiki>{{ucfirst:</nowiki>''string''<nowiki>}}</nowiki></code>
 +
| <code><nowiki>{{ucfirst:text TRANSFORM}}</nowiki></code> → {{ucfirst:text TRANSFORM}}
 +
| The input with the first character uppercase.
 +
|-
 +
| <code><nowiki>{{padleft:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></code><br /><code><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></code><br /><code><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></code>
 +
| <code><nowiki>{{padleft:xyz|5}}</nowiki></code> → {{padleft:xyz|5}}<br /> <code><nowiki>{{padleft:xyz|5|_}}</nowiki></code> → {{padleft:xyz|5|_}} <code><nowiki>{{padleft:xyz|5|abc}}</nowiki></code> → {{padleft:xyz|5|abc}} <code><nowiki>{{padleft:xyz|2}}</nowiki></code> → {{padleft:xyz|2}}<br /> <code><nowiki>{{padleft:|1|xyz}}</nowiki></code> → {{padleft:|1|xyz}} (first character of the string)<br />
 +
| Inserts a string of padding characters (parameter 3) of a specified length (parameter 2) next to a chosen base character or variable (first parameter). The final digits or characters in the base replace the final characters in the padding. The padding string may be truncated if its length does not evenly divide the required number of characters.<br />
 
|-
 
|-
| Link to the description page of the file
+
| <code><nowiki>{{padright:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></code><br /><code><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></code><br /><code><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></code>
| <pre>
+
| <code><nowiki>{{padright:xyz|5}}</nowiki></code> → {{padright:xyz|5}}<br />
<nowiki>[[</nowiki>:{{ns:image}}:Example.jpg]]
+
<code><nowiki>{{padright:xyz|5|_}}</nowiki></code> → {{padright:xyz|5|_}}
</pre>
+
<code><nowiki>{{padright:xyz|5|abc}}</nowiki></code> → {{padright:xyz|5|abc}}
|
+
<code><nowiki>{{padright:xyz|2}}</nowiki></code> → {{padright:xyz|2}}<br />
[[:{{ns:image}}:Example.jpg]]
+
<code><nowiki>{{padright:|1|xyz}}</nowiki></code> → {{padright:|1|xyz}}<br />
 +
| Identical to padleft, but adds padding characters to the right side.
 
|-
 
|-
| Link to the description page with a custom title.
+
| <code><nowiki>{{plural:2|</nowiki>''is''<nowiki>|</nowiki>''are''<nowiki>}}</nowiki></code>
| <pre>
+
| <code><nowiki>{{plural:0|is|are}}</nowiki></code> → {{plural:0|is|are}}<br />  <code><nowiki>{{plural:1*1|is|are}}</nowiki></code> → {{plural:1*1|is|are}}<br /> <code><nowiki>{{plural:21 mod 10|is|are}}</nowiki></code> → {{plural:21 mod 10|is|are}}<br /> <code><nowiki>{{plural:{{#expr:21 mod 10}}|is|are}}</nowiki></code> → {{plural:{{#expr:21 mod 10}}|is|are}}<br />  <code><nowiki>{{plural:1|is|are}}</nowiki></code> → {{plural:1|is|are}}<br /> <code><nowiki>{{plural:2|is|are}}</nowiki></code> → {{plural:2|is|are}}
<nowiki>[[</nowiki>:{{ns:image}}:Example.jpg|Sunflowers]]</pre>
+
| Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Plural transformations are used for languages like Russian based on "count mod 10".
|
 
[[:{{ns:image}}:Example.jpg|Sunflowers]]
 
|}
 
 
 
 
 
==== Link to another page ====
 
 
 
{| class="wikitable"
 
! Description
 
! width=40% | You type
 
! width=40% | You get
 
 
|-
 
|-
| A 50px width picture with a link to the page [[MediaWiki]].
+
| <code><nowiki>{{#titleparts:</nowiki> ''pagename'' <nowiki>|</nowiki> ''number of segments to return'' <nowiki>|</nowiki> ''first segment to return'' <nowiki>}}</nowiki></code>
{{note|link '''does not work with''' thumb '''or''' frame.}}
 
| <pre>
 
<nowiki>[[</nowiki>Example.jpg|50px|link=MediaWiki]]
 
</pre>
 
 
|
 
|
[[File:Example.jpg|50px|link=MediaWiki]]
+
<code><nowiki>{{#titleparts:</nowiki> {{ns:1}}:Foo/bar/baz <nowiki>}}</nowiki></code> → '''{{#titleparts: {{ns:1}}:Foo/bar/baz }}'''<br />
 +
<code><nowiki>{{#titleparts:</nowiki> {{ns:1}}:Foo/bar/baz <nowiki>| 1 }}</nowiki></code> → '''{{#titleparts: {{ns:1}}:Foo/bar/baz | 1 }}'''<br />
 +
<code><nowiki>{{#titleparts:</nowiki> {{ns:1}}:Foo/bar/baz <nowiki>| 2 }}</nowiki></code> → '''{{#titleparts: {{ns:1}}:Foo/bar/baz | 2 }}'''<br />
 +
<code><nowiki>{{#titleparts:</nowiki> {{ns:1}}:Foo/bar/baz <nowiki>| 2 | 2 }}</nowiki></code> → '''{{#titleparts: {{ns:1}}:Foo/bar/baz | 2 | 2 }}'''
 +
| Separates a pagetitle into segments based on slashes, then returns some of those segments as output.  If the <code>number of segments</code> parameter is not specified, it defaults to "0", which returns ''all'' the segments.  If the <code>first segment</code> parameter is not specified or is "0", it defaults to "1":
 
|}
 
|}
  
 
+
==== Miscellaneous functions ====
==== Link directly to the media file ====
+
{| class="wikitable plainlinks"
You can use the pseudo-namespace “{{ns:media}}” to link directly to a file without rendering it, bypassing the description page.
+
! Usage
 
+
! Output
 
 
{| class="wikitable"
 
 
! Description
 
! Description
! width=40% | You type
 
! width=40% | You get
 
|-
 
| Link directly to a file.
 
| <pre>
 
<nowiki>[[</nowiki>{{ns:media}}:Example.jpg]]
 
</pre>
 
|
 
[[{{ns:media}}:Example.jpg]]
 
 
|-
 
|-
| Link directly to a file, with a custom title.
+
| <code><nowiki>{{#special:</nowiki>''special page name''<nowiki>}}</nowiki><br /><nowiki>{{#special:userlogin}}</nowiki></code>
| <pre>
+
| {{#special:special page name}}<br />{{#special:userlogin}}
<nowiki>[[</nowiki>{{ns:media}}:Example.jpg|Sunflowers]]
+
| The localized name for the given Special: page.
</pre>
 
|
 
[[{{ns:media}}:Example.jpg|Sunflowers]]
 
 
|-
 
|-
| link to a potential file, even if it doesn't exist.
+
| <code><nowiki>{{gender:</nowiki>''username''<br /><nowiki>|</nowiki>''return text if user is male''<br /><nowiki>|</nowiki>''return text if user is female''<br /><nowiki>|</nowiki>''return text if user hasn't defined their gender''<nowiki>}}</nowiki></code>
| <pre>
+
| ''(depends on the named user's gender)''
<nowiki>[[</nowiki>{{#special:Filepath}}/Example.jpg]]
+
| A switch for the gender set in [[{{#Special:Preferences}}]]<br/>
</pre>
+
Note:  If 3rd parameter is omitted and user hasn't defined his/her gender, then <code>''text if user is male''</code> is returned.
|
 
[[{{#special:Filepath}}/Example.jpg]]
 
|-
 
| Generate an external URL to the file
 
| <pre>
 
<nowiki>{{</nowiki>FILEPATH:Example.jpg<nowiki>}}</nowiki>
 
</pre>
 
|
 
{{FILEPATH:Example.jpg}}
 
 
|}
 
|}
  
=== Files at other websites ===
+
== Managing files and pages ==
Currently it is not possible to embed images from other websites into {{SITENAME}}.  This could be enabled using [[mw:Manual:$wgAllowExternalImages]].
 
 
 
== Categories ==
 
  
 +
=== Moving (renaming) a page ===
 +
See [[mw:Help:Moving_a_page]].
  
== Templates ==
+
=== Deleting a page ===
 
+
See [[mw:Help:Deleting_a_page]].
 
 
== Magic Words ==
 
  
 +
=== Importing files from another wiki ===
 +
See [[{{#special:Import}}]] and [[{{#special:Export}}]].
  
== Wishlist ==
+
== System Information ==
This is a list of extensions and changes that would improve Nottinghack's MediaWiki.  These extensions are very stable and widely used:
 
  
==== Critical ====
+
{{SITENAME}} is running MediaWiki <code>{{CURRENTVERSION}}</code>.  See:
* <s>Install [http://www.mediawiki.org/wiki/Extension:ParserFunctions ParserFunctions].  These are really useful, and without them you can only create very basic templates.  I would like to use them to get the templates to work on this page.</s>
+
* Detailed [[{{#Special:Version}}|version information and the list of extensions]]
 +
* The [[{{ns:Special}}:Interwiki|Interwiki Table]]
 +
* [[{{ns:Special}}:Statistics|Usage statistics]]
 +
* The [[{{ns:Special}}:NewFiles|gallery]] or [[{{ns:Special}}:ListFiles|list]] of recently uploaded files.
 +
* [[{{ns:Special}}:NewFiles|Unused files]] that might not be needed.
 +
* Other [[{{ns:Special}}:SpecialPages|SpecialPages]]
  
==== Essential ====
+
== See also ==
Every tech wiki needs these:
 
* <s>Enable the <code>&lt;math&gt;</code> features built into MediaWiki (See [http://www.mediawiki.org/wiki/Manual:Enable_TeX]), so we can display formulae.</s>
 
* <s>The [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi SyntaxHighlight GeSHi] extension for code samples.</s>
 
  
==== Desirables ====
+
* A [[wikipedia:Help:Wiki markup|shorter wiki markup reference]] on Wikipedia.
* <s>The &lt;poem&gt; extension makes it possible to write poem-like text without a mass of &lt;br /&gt; tags.</s>
 
* <s>Inline SVG support, so we can display diagrams.  Even better would be an inline SVG editor, so we can collaborate on them.</s> -- needs testing.
 
* <s>An extension to display the Interwiki map - at the moment we have to guess.  The [http://www.mediawiki.org/wiki/Extension:InterWiki Extension:SpecialInterwiki] does this, and also allows admins to edit the interwiki map.</s>
 
* <s>The [http://www.mediawiki.org/wiki/Extension:Widgets widgets extention] would let us embed maps, youtube videos, the flickr gallery, etc.</s>
 

Revision as of 07:21, 28 February 2011

This is a single-page reference guide for Nottinghack Wiki. If you are not familiar with wikitext and markup languages, see the tutorial on Using the Wiki.

About this Wiki

Nottinghack Wiki is powered by MediaWiki, the software used by Wikipedia. The main sources of documentation are:

This reference guide was based on the public domain Project:PD help.

Formatting

Basic Markup

Description You type You get
Italic text
two aprostrophes for ''italic'' text

two aprostrophes for italic text

Bold text
three aprostrophes for '''bold''' text

three aprostrophes for bold text

Bold and italic
five aprostrophes for '''''bold & italic''''' text

five aprostrophes for bold & italic text

Escape wiki markup
<nowiki>no '''''markup'''''</nowiki>

no '''''markup'''''

Some HTML tags are allowed by MediaWiki (full list).

Description You type You get
Underline
<u>Underline</u>

Underline

Strikethrough
<del>Strikethrough</del>

or

<s>Strikethrough</s>

Strikethrough

or

Strikethrough

Monospaced text
<code>Source code</code>

or

<tt>Teletype text</tt>

Source code

or

Teletype text

Superscript
C<sup>2</sup>

C2

Subscript
C<sub>2</sub>

C2

Size adjustments
<big>Larger text</big>

<small>Smaller text</small>

<small>Small text with <big>larger text</big> inside</small>

<small><small>Really small text</small></small>

Larger text

Smaller text

Small text with larger text inside

Really small text

Code
<code>code sample</code>

code sample

Old-school font styling
Note Note: This is deprecated, so use CSS styling instead.
<font color="green" size="4" face="serif">Big Green Serifs</font>

Big Green Serifs

CSS styling
<span style="color:green; font-size:large;
font-family:serif">Big Green Serifs</span>

Big Green Serifs

Abbreviation
<abbr title="World Taekwondo Federation">WTF</abbr>

WTF

Cite an author
Note Note: This is often used with a blockquote, shown in #Other section formatting.
<cite>John Doe</cite>

John Doe

Highlight text that has been inserted into a document.
This text <ins>has</ins> been corrected.

This text has been corrected.

Refer to a variable in a computer program
The variable <var>foo</var> has not been initialised.

The variable foo has not been initialised.

Formatting Pitfalls

Beware the unexpected results shown below.

Description You type You get
Overlapping HTML is invalid
Note Note: Results will vary between browsers.
Avoid <b>overlapping <i>html</b> tags</i>.

[invalid HTML output]

Multiline HTML formatting
Avoid <b>multiline

html</b> formatting tags.

[invalid HTML output]

Wiki markup spanning paragraphs
Avoid '''''multiline

wiki''''' markup.

Avoid multiline

wiki markup.

Multiline wiki markup
Avoid '''''multiline
wiki''''' markup.

Avoid multiline wiki markup.

Overlapping wiki markup
Note Note: This is valid, but can be confusing.
Basic '''overlapping ''wiki''' markup'' works OK.

Basic overlapping wiki markup works OK.

Symbols

An HTML symbol entity is a sequence of characters that produces one particular character. For example, &euro; produces the Euro symbol "" and &trade; produces trademark symbol "". HTML symbol entities are allowed in MediaWiki and are sometimes used in advanced editing for two main reasons: to insert characters not normally available on keyboards and to prevent the parser from interpreting and displaying HTML tags and symbols:

&amp;euro; → &euro;
&lt;span style="color:green;">Green&lt;/span> → <span style="color:green;">Green</span>

The following is a list of characters that can be produced using HTML symbols. Hover any character to find out the symbol that produces it. Some symbols not available in the current font will appear as empty squares.

HTML Symbol Entities
Á á Â â ´ Æ æ À à Α α & Å å Ã ã Ä ä Β β ¦ Ç ç ¸ ¢
Χ χ ˆ © ¤ ° Δ δ ÷ É é Ê ê È è Ε ε Η η
Ð ð Ë ë ƒ ½ ¼ ¾ Γ γ > Í í Î î ¡ Ì ì Ι ι
¿ Ï ï Κ κ Λ λ « < ¯ µ · Μ μ  
¬ Ñ ñ Ν ν Ó ó Ô ô Œ œ Ò ò Ω ω Ο ο ª º Ø ø Õ õ Ö
ö Φ φ Π π ϖ ± £ Ψ ψ " » ® Ρ ρ
Š š § ­ Σ σ ς ¹ ² ³ ß Τ τ Θ θ ϑ Þ þ ˜
× Ú ú Û û Ù ù ¨ ϒ Υ υ Ü ü Ξ ξ Ý ý ¥ ÿ Ÿ Ζ ζ

Mathematical formulae

Formulae can be written in TeX using <math> tags. See wikipedia:Help:Displaying a formula for details.

Description You type You get
The equation of mass-energy equivalence
<math>E = mc^2 \,\!</math>

<math>E = mc^2 \,\!</math>

The convolution theorem states that...
<math> \mathcal{F}\{f * g\} = k\cdot \mathcal{F}\{f\}\cdot \mathcal{F}\{g\}</math>

<math> \mathcal{F}\{f * g\} = k\cdot \mathcal{F}\{f\}\cdot \mathcal{F}\{g\}</math>

Layout

Section formatting can only be used at the beginning of a line. Note Note: Spaces at the start of a line are significant.

Headings

Headings of different levels are created by surrounding the line with equal signs (=).

== Level 2 ==
=== Level 3 ===
==== Level 4 ====
===== Level 5 =====
====== Level 6 ======
Note Note: Level 1 is automatically generated for the page title and is not appropriate within the body of articles.

For each heading in the wiki article an HTML anchor is automatically created. That makes it possible to create #Links to section headings. An article with 4 or more headings automatically shows a table of contents.

Paragraphs

MediaWiki generally ignores single line breaks and joins consecutive lines of text together. To start a new paragraph, leave an empty line. To create a wide paragraph break, leave two empty lines. You can force a line break inside a paragraph with the HTML tag <br />.

Description You type You get
Single line breaks are ignored
This text is joined
together as if it
were a single line.

This text is joined together as if it were a single line.

Empty lines define paragraphs
Note Note: Two empty lines give a larger paragraph break.
First paragraph.

Second paragraph.


The third paragraph will <br /> break in the middle.

First paragraph.

Second paragraph.


The third paragraph will
break in the middle.

Other section formatting

Description You type You get
Bullet list
* Start each line
* with an [[Wikipedia:asterisk|asterisk]] (*).
** More asterisks gives deeper
*** and deeper levels.
* Line breaks<br />don't break levels.
*** But jumping levels creates empty space.
Any other new line ends the list.
  • Start each line
  • with an asterisk (*).
    • More asterisks gives deeper
      • and deeper levels.
  • Line breaks
    don't break levels.
      • But jumping levels creates empty space.

Any other new line ends the list.

Numbered list
# Start each line
# with a [[Wikipedia:Number_sign|number sign]] (#).
## More number signs gives deeper
### and deeper
### levels.
# Line breaks<br />don't break levels.
### But jumping levels creates empty space.
# Blank lines

# end the list and start another.
Any other new line also
ends the list.
  1. Start each line
  2. with a number sign (#).
    1. More number signs gives deeper
      1. and deeper
      2. levels.
  3. Line breaks
    don't break levels.
      1. But jumping levels creates empty space.
  4. Blank lines
  1. end the list and start another.

Any other new line also ends the list.

Definition list
;item 1
: definition 1
;item 2
: definition 2-1
: definition 2-2
item 1
definition 1
item 2
definition 2-1
definition 2-2
Mixture of different types of list
# one
# two
#* two point one
#* two point two
# three
## three sub 1
### three sub 1 sub 1
## three sub 2
  1. one
  2. two
    • two point one
    • two point two
  3. three
    1. three sub 1
      1. three sub 1 sub 1
    2. three sub 2
Poetry
<poem>
A programmer started to cuss,
Because getting to sleep was a fuss.
As he lay there in bed,
Looping ’round in his head,
Was: while(!asleep()) sheep++;
-- <cite>Author unknown</cite>
</poem>

A programmer started to cuss,
Because getting to sleep was a fuss.
As he lay there in bed,
Looping ’round in his head,
Was: while(!asleep()) sheep++;
-- Author unknown

Blockquotes
text above
text above
<blockquote>blockquote</blockquote>
text below
text below

text above text above

blockquote

text below text below

Preformatted text
Note Note: This way of preformatting only applies to section formatting. Text formatting markup is still effective.
 Start each line with a space.
 * Text is '''preformatted''' and
 character formatting is effective.
Start each line with a space.
* Text is preformatted and
character formatting is effective.
Completely preformatted text
<pre> Text is '''preformatted''' and
''markup'' '''''is''''' not effective.</pre>
 Text is '''preformatted''' and
''markup'' '''''is''''' not effective.
Syntax Highlighting for code
<syntaxhighlight lang="cpp">#include <iostream>
using namespace std;
int main (int argc, char** argv) {
    cout << "Hello World!";
    return 0;
}</syntaxhighlight>
#include <iostream>
using namespace std;
int main (int argc, char** argv) {
    cout << "Hello World!";
    return 0;
}
A useful error message for syntax higlighting
Note Note: When an invalid 'lang' is used, the error message lists the available languages. Also see [1].
<syntaxhighlight lang="-"></syntaxhighlight>
Horizontal rule
Text above
----
Text below

Text above


Text below

Old-school centered text
Note Note: This is deprecated, so use the css method instead.
text above<center>centered</center>text below
text above
centered
text below
CSS method to center text
text above<div class="center" style="width:auto;
margin-left:auto; margin-right:auto;">centered</div>
text below
text above
centered

text below

Comment
<!-- This is a comment -->
Comments are only visible
in the edit window.

Comments are only visible in the edit window.

Links

There are three sorts of links:

  1. Internal links to other pages in the wiki.
  2. External links to other websites.
  3. Interwiki links to other websites registered to the wiki in advance.

Internal links

To add an internal link, enclose the name of the page you want to link to in double square brackets. The first letter of the link is automatically capitalized and spaces are replaced with underscores.

Note Note: A red link indicates that the target page does not exist yet.
Description You type You get
An internal link
[[NottingHack]]
NottingHack
A piped link
[[NottingHack|different text]]
different text
Word-endings are 'blended'
[[Help]]s

[[Help]]ing

[[Help]]ers

[[Help]]anylettersyoulikehere

[[Help]]<nowiki></nowiki>anylettersyoulikehere

Helps

Helping

Helpers

Helpanylettersyoulikehere

Helpanylettersyoulikehere

Link to an anchor on the current page
[[#See also]]
#See also
Link to the current page's table of contents
[[#toc|Contents]]
Contents
Link to the top of the current page
[[#top|top]]
top
Link to an anchor from different text
[[#See also|different text]]
different text
Setting an internal link anchor
Note Note: Omit the "optional text" for invisible anchor.
<div id="NameOfAnchorHere">optional text</div>
optional text
Link to an anchor at another page
[[Help:Images#See also]]
Help:Images#See also
Shortcut to hide a namespace

See #The pipe trick.

[[Help:Contents|]]

[[Help:Contents]]

Contents

Help:Contents

Redirect
#REDIRECT [[Main Page]]
Main Page
Link to the current page's talk page
[[{{TALKPAGENAME}}|Discussion]]
Discussion
Link to the current page's edit page
[{{fullurl:{{PAGENAME}}|action=edit}} Edit]
Edit
Link to a subpage.

See #Subpages

[[/example]]
/example
Link to a subpage without the leading slash
[[/example/]]
example
Link to a category page

See #Categories

[[:Category:Help]]
Category:Help
Link to an image or a file of other types

See #Images

[[media:example.jpg]]
media:example.jpg
Link to the user's user page
[[Special:MyPage]]
Special:MyPage
Additional wiki markup is permitted in link titles
[[#top|'''<del>rich</del>''' ''link text'' here.]]
rich link text here.

Links to section headings

You can link directly to headings within a wiki page. MediaWiki automatically creates an HTML anchor with the same name as the heading.

Description You type You get
Links to section headings
[[#External links]]

[[#Table pitfalls!]]

#External links

#Table pitfalls!

Note Note: If a heading is renamed then any links to that heading will be broken.

External links

Description You type You get
External link http://mediawiki.org http://mediawiki.org
External link with different label [http://mediawiki.org MediaWiki] MediaWiki
Numbered external link [http://mediawiki.org] [2]
External links with file icons [http://en.wikipedia.org/wiki/.avi video] [http://en.wikipedia.org/wiki/.ogg sound] [http://en.wikipedia.org/wiki/.pdf document]

video
sound
document

External link to the same host http://{{SERVERNAME}}/pagename http://wiki.nottinghack.org.uk/pagename
External link to other host passing the pagename http://google.com/search?q={{PAGENAMEE}} http://google.com/search?q=Marcus/MediaWiki_Quick_Reference
Mailto link [mailto:info@example.org email me] email me
Mailto named with subject line and body [mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info] info
Additional wiki markup is permitted in link titles
[http://www.example.com/some/image.png Example '''<del>rich</del>''' ''link text'' here.]
Example rich link text here.

External link icons

Test link Icon Trigger
[3] external-link-ltr-icon.png .external, http://, gopher://
[4] lock-icon.png https://
[5] mail-icon.png mailto:
[6] news-icon.png news://
[7] file-icon.png ftp://
[8] talk-icon.png irc://
[9] audio-icon.png .ogg, .mid, .midi, .mp3, .wav, .wma
[10] video-icon.png .ogm, .avi, .mpeg, .mpg
[11] document-icon.png .pdf, .pdf#, .pdf?

How to avoid auto-links

By default, when you write a URL as is, it will be transformed to an external link. To avoid that effect, put the URL between <nowiki> tags as in:

<nowiki>http://mediawiki.org</nowiki>

Interwiki links

Interwiki links are abbreviations for longer URLs. They allow you to link to an external wiki almost as if you are linking to a page on your own wiki. The external website must be registered in advance by an administrator. The websites registered on Nottinghack Wiki are listed on the Special:Interwiki page.

For example, you can link to the Sunflower article on http://en.wikipedia.org by typing [[wikipedia:Sunflower]], which will result in a link wikipedia:Sunflower. This is because http://en.wikipedia.org/wiki/ is registered to Nottinghack Wiki by default with the prefix of wikipedia. A similar link could be created as a normal external link by typing [http://en.wikipedia.org/wiki/Sunflower big yellow flower].

The pipe trick

See wikipedia:Help:Pipe_trick.

Tables

Tables may be authored in wiki pages using either XHTML table elements directly, or using wikicode formatting to define the table. XHTML table elements and their use are well described on various web pages and will not be discussed here. The benefit of wikicode is that the table is constructed of character symbols which tend to make it easier to perceive the table structure in the article editing view compared to XHTML table elements.

As a general rule, it is best to avoid using a table unless you need one. Table markup often complicates page editing.

Wiki table markup summary

{|
table start
|+
table caption, optional; only between table start and first table row
|-
table row, optional on first row -- wiki engine assumes the first row
! 
table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!!) or start on new lines, each with its own single mark (!).
|
table data cell, required! Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|).
|}
table end
  • The above marks must start on a new line except the double || and !! for optionally adding consecutive cells to a line. However, blank spaces at the beginning of a line are ignored.
  • XHTML attributes. Each mark, except table end, optionally accepts one or more XHTML attributes. Attributes must be on the same line as the mark. Separate attributes from each other with a single space.
    • Cells and caption (| or ||, ! or !!, and |+) hold content. So separate any attributes from content with a single pipe (|). Cell content may follow on same line or on following lines.
    • Table and row marks ({| and |-) do not directly hold content. Do not add pipe (|) after their optional attributes. If you erroneously add a pipe after attributes for the table mark or row mark the parser will delete it and your final attribute if it was touching the erroneous pipe!
  • Content may (a) follow its cell mark on the same line after any optional XHTML attributes or (b) on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as lists, headings, or nested tables, must be on its own new line.
    • Pipe character as content. To insert a pipe (|) character into a table use the <nowiki>|</nowiki> escaping markup

Basics

The following table lacks borders and good spacing but shows the simplest wiki markup table structure.

You type You get
{|
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}
Orange Apple
Bread Pie
Butter Ice cream

The cells in the same row can be listed on one line separated by || (two pipe symbols). If the text in the cell contains a line break, use <br /> instead.

You type You get
{|
|Orange||Apple||more
|-
|Bread||Pie||more
|-
|Butter||Ice<br />cream||and<br />more
|}
Orange Apple more
Bread Pie more
Butter Ice
cream
and
more

Extra spaces within cells in the wiki markup, as in the wiki markup below, do not affect the actual table rendering.

You type You get
{|
|  Orange    ||   Apple   ||   more
|-
|   Bread    ||   Pie     ||   more
|-
|   Butter   || Ice cream ||  and more
|}
Orange Apple more
Bread Pie more
Butter Ice cream and more

You can have longer text or more complex wiki syntax inside table cells, too:

You type You get
{|
|Lorem ipsum dolor sit amet, 
consetetur sadipscing elitr, 
sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, 
sed diam voluptua. 

At vero eos et accusam et justo duo dolores
et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum
dolor sit amet. 
|
* Lorem ipsum dolor sit amet
* consetetur sadipscing elitr
* sed diam nonumy eirmod tempor invidunt
|}
Lorem ipsum dolor sit amet,

consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

  • Lorem ipsum dolor sit amet
  • consetetur sadipscing elitr
  • sed diam nonumy eirmod tempor invidunt

Table headers

Table headers can be created by using "!" (exclamation mark) instead of "|" (pipe symbol). Headers usually show up bold and centered by default.

You type You get
{|
! Item
! Amount
! Cost
|-
|Orange
|10
|7.00
|-
|Bread
|4
|3.00
|-
|Butter
|1
|5.00
|-
!Total
|
|15.00
|}
Item Amount Cost
Orange 10 7.00
Bread 4 3.00
Butter 1 5.00
Total 15.00

Caption

A table caption can be added to the top of any table as follows.

You type You get
{|
|+Food complements
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}
Food complements
Orange Apple
Bread Pie
Butter Ice cream

XHTML attributes

You can add XHTML attributes to tables. For the authoritative source on these, see the W3C's HTML 4.01 Specification page on tables.

Attributes on tables

Placing attributes after the table start tag ({|) applies attributes to the entire table.

You type You get
{| border="1" align="center" style="text-align:center;"
|Orange
|Apple
|12,333.00
|-
|Bread
|Pie
|500.00
|-
|Butter
|Ice cream
|1.00
|}
Orange Apple 12,333.00
Bread Pie 500.00
Butter Ice cream 1.00

Attributes on cells

You can put attributes on individual cells. For example, numbers may look better aligned right.

You type You get
{| border="1"
|Orange
|Apple
|align="right" | 12,333.00
|-
|Bread
|Pie
|align="right" | 500.00
|-
|Butter
|Ice cream
|align="right" | 1.00
|}
Orange Apple 12,333.00
Bread Pie 500.00
Butter Ice cream 1.00

You can also use cell attributes when you are listing multiple cells on a single line. Note that the cells are separated by ||, and within each cell the attribute(s) and value are separated by |.

You type You get
{| border="1"
| Orange || Apple     || align="right" | 12,333.00
|-
| Bread  || Pie       || align="right" | 500.00
|-
| Butter || Ice cream || align="right" | 1.00
|}
Orange Apple 12,333.00
Bread Pie 500.00
Butter Ice cream 1.00

Attributes on rows

You can put attributes on individual rows, too.

You type You get
{| border="1"
|Orange
|Apple
|align="right"|12,333.00
|-
|Bread
|Pie
|align="right"|500.00
|- style="font-style:italic; color:green;"
|Butter
|Ice cream
|align="right"|1.00
|}
Orange Apple 12,333.00
Bread Pie 500.00
Butter Ice cream 1.00
Simple one-pixel table border

The default table formatting uses the "border-collapse: separate" model, which adds table cell spacing (which also separates the table outer border from its content cells). Even with a zero cellspacing, the borders of consecutive cells (and of the overall table container) will add up, so to get a one-pixel separation between cells, you need to selectively remove one or more of the four borders of cells.

Such tables may be formatted more simply, using the "border-collapse: collapse" CSS property; in this table formatting model, the cellspacing attribute (or the CSS "border-spacing:" property) and the table's "padding:" CSS property is ignored and only the larger border of adjacent inner cells (or the table border for outer cells) will be used.

An example of the above for one-pixel table border, using each model (without need for external extensions):

You type You get
{|style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000; padding: 0"
|-
!style="border-style: solid; border-width: 0 1px 1px 0"| Orange
!style="border-style: solid; border-width: 0 0 1px 0"| Apple
|-
|style="border-style: solid; border-width: 0 1px 0 0"| Bread
|style="border-style: solid; border-width: 0"| Pie
|}
Orange Apple
Bread Pie
{|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000"
|-
!style="border-style: solid; border-width: 1px"| Orange
!style="border-style: solid; border-width: 1px"| Apple
|-
|style="border-style: solid; border-width: 1px"| Bread
|style="border-style: solid; border-width: 1px"| Pie
|}
Orange Apple
Bread Pie

Notes :

  • When using the "border-width:" CSS shortcut property, the order of the four space-separated specified values is: top, right, bottom, left. As an example from above:
"border-width: 0 1px 0 0"
When there are fewer than 4 values, the value for left takes its default from the value for right, the value for bottom takes its default from the value for top, and the value for right takes its default from the value for top.
  • The HTML attributes (such as "width=", "border=", "cellspacing=", "cellpadding=") do not need any length unit (the pixel unit is assumed). The CSS style properties (which override the HTML attributes) require an explicit length unit (if the value is not 0) such as "px" for the pixel.

HTML colspan and rowspan

You can use HTML colspan and rowspan attributes on cells for advanced layout.

You type You get
{| border="1"
!colspan="6"|Shopping List
|-
|rowspan="2"|Bread & Butter
|Pie
|Buns
|Danish
|colspan="2"|Croissant
|-
|Cheese
|colspan="2"|Ice cream
|Butter
|Yoghurt
|}
Shopping List
Bread & Butter Pie Buns Danish Croissant
Cheese Ice cream Butter Yoghurt

With HTML attributes and CSS styles

CSS style attributes can be added with or without other HTML attributes.

You type You get
{| style="color:green; background-color:#ffffcc;" cellpadding="10" cellspacing="0" border="1"
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}
Orange Apple
Bread Pie
Butter Ice cream

Attributes can be added to the caption and headers as follows.

You type You get
{| border="1" cellpadding="20" cellspacing="0"
|+ align="bottom" style="color:#e76700;" |''Food complements''
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}
Food complements
Orange Apple
Bread Pie
Butter Ice cream

Accessibility of table header cells

Table header cells do not explicitly specify which table data cells they apply to (those on their right on the same row, or those below them on the same column). When the table is displayed in a visual 2D environment, this is usually easy to infer.

However when tables are rendered on non-visual medias, you can help the browser to determine which table header cell applies to the description of any selected cell (in order to repeat its content in some accessibility helper) using a scope="row" or scope="col" attribute on table header cells. In most cases with simple tables, you'll use scope="col" on all header cells of the first row, and scope="row" on the first cell of the following rows:

You type You get
{| border="1" cellspacing="0" cellpadding="2"
|-
!scope="col"| Item
!scope="col"| Quantity
!scope="col"| Price
|-
!scope="row"| Bread
| 0.3 kg
| $0.65
|-
!scope="row"| Butter
| 0.125 kg
| $1.25
|-
!scope="row" colspan="2"| Total
| $1.90
|}
Item Quantity Price
Bread 0.3 kg $0.65
Butter 0.125 kg $1.25
Total $1.90

Table pitfalls!

If you start a cell on a new line with a negative number with a minus sign (or a parameter that evaluates to a negative number), your table can get broken, because the characters |- will be parsed as the wiki markup for table row, not table cell. To avoid this, insert a space before the value (| -6) or use in-line cell markup (|| -6).

Images

Note Note: Images must be uploaded to the wiki before they can be used.

Supported media types for images

The following file formats are supported on Nottinghack Wiki:

  • .jpg or .jpeg : bitmap image compressed in the standard JPEG format (this lossy format is most suitable for photographs).
  • .png : bitmap image in the Portable Network Graphics format (specified by the W3 Consortium).
  • .gif : bitmap image in the legacy Graphics Interchange Format.
  • .svg : scalable image in the Scalable Vector Graphics format (specified by the W3 Consortium).

Uploading an image

  1. In the sidebar, under “toolbox”, click “Upload file.”
  2. Select the “Source filename”
  3. You can fill in the optional “Summary” text.
    Note Note: This is plain text and not wikitext

After you upload a file, you will be redirected to the “file description page”. You should edit this page to provide more information about the file. For example, you should explain where you got the file from, and what its copyright status is.

Displaying an image

The wikitext to display an image is:

[[File:filename.extension|options|caption]]

The options can be given in any order separated by pipes (|):

border
Adds a very thin border around the image.
frame, frameless, thumb or thumbnail
Controls how the image is formatted and embedded in the rest of the page. See the examples of image formats.
{width}x{height}px
Resizes the image to fit inside a maximum {width} and {height} in pixels. See the examples of image resizing.
Note Note: The image will always retain its aspect ratio.
{width}px
Resizes the image using a maximum width in pixels.
x{height}px
Resizes the image using maximum height in pixels.
upright
Uses a resizing algorithm suitable for images in portrait orientation rather than landscape.
left, right, center, or none
Controls the horizontal alignment (and inline/block or floating styles) of the image within a text (no default value).
baseline, sub, super, top, text-top, middle, bottom, or text-bottom
Controls the vertical alignment of a non-floating inline image with the text before or after the image, and in the same block (the default vertical alignment is middle).
link={target}
Allows to change the target of the generated link associated with the image. See Altering the default link target.
Note Note: link does not work with thumb, thumbnail or frame.
alt={alternative text}
Defines the alternative text (maps to the HTML alt="..." attribute).
page={number}
Renders the specified page number (only applicable when showing a .djvu or .pdf file).

If a parameter does not match any of the other possibilities, it is assumed to be the caption text. Caption text is shown below the image in thumb and frame formats, or as mouseover text in border and frameless formats or when the format is omitted. Caption text displayed in the thumb and frame formats may contain wiki links and other formatting. In the other options, wiki-formatting will not work. If no caption text is supplied, a caption is automatically created showing the file name. To completely remove the caption, set it to <span title=""></span>.

Image dimensions and borders

The effect of the size parameters depend on how the image is formatted, but images will always retain their aspect ratio. When the format is not specified the image can be reduced or enlarged to any size. An image with the frame format always ignores the size specification and the original image will be reduced if it exceeds a maximum size. The size of an image with the thumb format can be reduced, but can not be enlarged beyond the original image size unless it is a scalable media type.

In the examples below, the original size of the image is 400 × 267 pixels.

Format Reduced Size Enlarged

Template:ImageExamples/size Template:ImageExamples/size Template:ImageExamples/size Template:ImageExamples/size Template:ImageExamples/size

Horizontal alignment

Note that when using the frame or thumb[nail] formats, the default horizontal alignment will be right.

Description You type You get

Template:ImageExamples/frame Template:ImageExamples/frame Template:ImageExamples/frame Template:ImageExamples/frame Template:ImageExamples/frame

Vertical alignment

The vertical alignment options take effect only if the image is displayed as an inline element and is not floating. They alter the way the inlined image will be vertically aligned with the text present in the same block before and/or after this image on the same row. Note that the displayed line of text where inline images are inserted (and the lines of text displayed after the current one) may be moved down. The line spacing will increase, just as may occur with spans of text with variable font sizes to allow the image height to be fully displayed with this alignment constraint.

To show the alignment result more clearly in this example, the text spans are overlined and underlined, the line-height is increased and emphasized with a yellow background and grey border:

text top: Example.jpg Example.jpg Example.jpg text

text text-top: Example.jpg Example.jpg Example.jpg text

text super: Example.jpg Example.jpg Example.jpg text

text baseline: Example.jpg Example.jpg Example.jpg text

text sub: Example.jpg Example.jpg Example.jpg text

text default: Example.jpg Example.jpg Example.jpg text

text middle: Example.jpg Example.jpg Example.jpg text

text text-bottom: Example.jpg Example.jpg Example.jpg text

text bottom: Example.jpg Example.jpg Example.jpg text

Source code for the example above
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
'''top:''' [[File:Example.jpg|20px|top]] [[File:Example.jpg|40px|top]] [[File:Example.jpg|40px|border|top]]
<del>text</del></u></span></p>
 
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
'''text-top:''' [[File:Example.jpg|20px|text-top]] [[File:Example.jpg|40px|text-top]] [[File:Example.jpg|40px|border|text-top]]
<del>text</del></u></span></p>
 
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
<sup>super:</sup> [[File:Example.jpg|20px|super]] [[File:Example.jpg|40px|super]] [[File:Example.jpg|40px|border|super]]
<del>text</del></u></span></p>
 
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
'''baseline:''' [[File:Example.jpg|20px|baseline]] [[File:Example.jpg|40px|baseline]] [[File:Example.jpg|40px|border|baseline]]
<del>text</del></u></span></p>
 
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
<sub>'''sub:'''</sub> [[File:Example.jpg|20px|sub]] [[File:Example.jpg|40px|sub]] [[File:Example.jpg|40px|border|sub]]
<del>text</del></u></span></p>
 
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
'''default:''' [[File:Example.jpg|20px]][[File:Example.jpg|40px]] [[File:Example.jpg|40px|border]]
<del>text</del></u></span></p>
 
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
'''middle:''' [[File:Example.jpg|20px|middle]] [[File:Example.jpg|40px|middle]] [[File:Example.jpg|40px|border|middle]]
<del>text</del></u></span></p>
 
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
'''text-bottom:''' [[File:Example.jpg|20px|text-bottom]] [[File:Example.jpg|40px|text-bottom]] [[File:Example.jpg|40px|border|text-bottom]]
<del>text</del></u></span></p>
 
<p style="border:1px solid #AAA;background:#FFC;padding:0;font-size:150%;line-height:2">
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
'''bottom:'' [[File:Example.jpg|20px|bottom]] [[File:Example.jpg|40px|bottom]] [[File:Example.jpg|40px|border|bottom]]
<del>text</del></u></span></p>

Stopping the text flow

On occasion it is desirable to stop text (or other inline non-floating images) from flowing around a floating image. Depending on the web browser's screen resolution and such, text flow on the right side of an image may cause a section header (for instance, == My Header ==) to appear to the right of the image, instead of below it, as a user may expect. The text flow can be stopped by placing <br style="clear: both" /> before the text that should start below the floating image.

All images displayed as blocks (including non-floating centered images, left- or right-floating images, as well as framed or thumbnailed floating images) are implicitly breaking the surrounding lines of text (terminating the current block of text before the image, and creating a new paragraph for the text after them). They will then stack vertically along their left or right alignment margin (or along the center line between these margins for centered images).

Altering the link target

The table below shows how to alter or remove the link target associated with an image. Note Note: The link attribute does not work with thumb or frame formats.

Displaying an image gallery

It's easy to make a gallery of thumbnails with the <gallery> tag:

<gallery>
Image:file_name.ext|caption
Image:file_name.ext|caption
{...}
</gallery>

Note that the image code is not enclosed in quare brackets inside gallery tags. Captions are optional, and may contain wiki links or other formatting. For example:

<gallery>
File:Example.jpg|Item 1
File:Example.jpg|a link to [[Help:Contents]]
File:Example.jpg
File:Example.jpg
File:Example.jpg| ''italic caption''
File:Example.jpg|on page "{{PAGENAME}}"
</gallery>

Is displayed as:

Optional gallery attributes

The gallery tag itself takes several additional parameters, specified as attribute name-value pairs:

<gallery {parameters}>
{images}
</gallery>
  • caption={caption}: A caption for the gallery.
  • widths={width}px: The maximum width for the images. Note the plural (widths)
  • heights={heights}px: The maximum height for the images.
  • perrow={integer}: The number of images per row.
  • showfilename={y or n}: Show the filenames in the image captions.

Example wikitext:

<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
File:Example.jpg
File:Example.jpg
File:Example.jpg
File:Example.jpg
File:Example.jpg
File:Example.jpg
File:Example.jpg
File:Example.jpg
File:Example.jpg
File:Example.jpg
</gallery>

Result:

Linking to an image without displaying it

Link to the description page

If you put a colon (:) before File:, the image will not be embedded and the link will lead to the description page of the file.

Description You type You get
Link to the description page of the file
[[:{{ns:image}}:Example.jpg]]

File:Example.jpg

Link to the description page with a custom title.
[[:{{ns:image}}:Example.jpg|Sunflowers]]

Sunflowers

Link directly to the media file

You can use the pseudo-namespace “Media” to link directly to a file without displaying it, bypassing the description page.

Description You type You get
Link directly to a file.
[[{{ns:media}}:Example.jpg]]

Media:Example.jpg

Link directly to a file, with a custom title.
[[{{ns:media}}:Example.jpg|Sunflowers]]

Sunflowers

link to a potential file, even if it doesn't exist.
[[{{#special:Filepath}}/Example.jpg]]

Special:FilePath/Example.jpg

Generate an external URL to the file
{{FILEPATH:Example.jpg}}

https://wiki.nottinghack.org.uk/images/a/a9/Example.jpg

Displaying images from other websites

Currently it is not possible to embed images from other websites into Nottinghack Wiki. Links are displayed instead. External image embedding could be enabled using mw:Manual:$wgAllowExternalImages.

Description You type You get
Link or embed an image from another website
http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png

http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png

Categories

See wikipedia:Help:Categories.

Subpages

See wikipedia:Help:Subpages.

Namespaces

See wikipedia:Help:Namespaces.

Templates

See wikipedia:Help:Templates.

Redirects

See wikipedia:Help:Redirects.

Magic Words

Magic words are strings of text that MediaWiki interprets as a value or function. Page-dependent magic words will affect or return data about the current page (by default), even if the word is added through a transcluded template or included system message.

Behavior switches

A behavior switch controls the layout or behaviour of the page and can often be used to specify desired omissions and inclusions.

Word Description
__NOTOC__ Hides the table of contents (TOC).
__FORCETOC__ Forces the table of contents to appear at its normal position (above the first header).
__TOC__ Places a table of contents at the word's current position (overriding __NOTOC__). If this is used multiple times, the table of contents will appear at the first word's position.
__NEWSECTIONLINK__ Adds a link ("+" by default) beside the "edit" tab for adding a new section on a non-talk page (see Adding a section to the end).
__NOINDEX__ Tell search engines not to index the page (ie, do not list in search engines' results).

Variables

Variables return information about the current page, wiki, or date. Their syntax is similar to templates.

Technical metadata

Revision variables return data about the latest edit to the current page, even if viewing an older version of the page.

Variable Output Description
Site
{{SITENAME}} Nottinghack Wiki The wiki's site name.
{{SERVER}} https://wiki.nottinghack.org.uk Domain URL.
{{SERVERNAME}} wiki.nottinghack.org.uk Domain name.
{{SCRIPTPATH}} Relative path to the wiki scripts on the server.
{{STYLEPATH}} /skins Relative path to the wiki style sheet on the server.
{{CURRENTVERSION}} 1.35.1 The wiki's MediaWiki version.
Latest revision to current page
{{REVISIONID}} 388 Unique revision ID
{{REVISIONDAY}} 28 Day the edit was made (unpadded number)
{{REVISIONMONTH}} 02 Month the edit was made (zero-padded number as of Template:Mediawiki, unpadded number in prior versions)
{{REVISIONYEAR}} 2011 Year the edit was made
{{REVISIONTIMESTAMP}} 20110228072147 Timestamp of the edit
{{REVISIONUSER}} Marcus The user who made the most recent edit to the page, or the current user when previewing an edit
{{PROTECTIONLEVEL:action}} protection level The protection level (e.g. 'autoconfirm', 'sysop') for a given action (e.g. 'edit', 'move') on the current page or an empty string if not protected.
Affects page content
{{DISPLAYTITLE:title}} Format the current page's title. The value must be equivalent to the default title: only capitalization changes and replacing spaces with underscores are allowed.
{{DEFAULTSORT:sortkey}}
{{DEFAULTSORTKEY:sortkey}}
{{DEFAULTCATEGORYSORT:sortkey}}
Used for categorizing pages, sets a default category sort key. For example if you put {{DEFAULTSORT:Smith, John}} at the end of John Smith, the page would be sorted under "S" by default in categories.

Statistics

Numbers returned by these variables normally contain separators (commas or spaces, depending on the local language), but can return raw numbers with the ":R" flag (for example, {{NUMBEROFPAGES}} → 5,306 and {{NUMBEROFPAGES:R}} → 5306). Use "|R" for magic words that require a parameter like PAGESINCATEGORY (for example {{PAGESINCATEGORY:Help}} and {{PAGESINCATEGORY:Help|R}}). Also applicable to {{PAGESIZE:page name}} above.

Variable Output Description
Entire wiki
{{NUMBEROFPAGES}} 5,306 Number of wiki pages.
{{NUMBEROFARTICLES}} 929 Number of pages in content namespaces.
{{NUMBEROFFILES}} 2,564 Number of uploaded files.
{{NUMBEROFEDITS}} 27,909 Number of page edits.
{{NUMBEROFVIEWS}} Template:NUMBEROFVIEWS Number of page views. Usually useless on a wiki using caching.
{{NUMBEROFUSERS}} 341 Number of registered users.
{{NUMBEROFADMINS}} 19 Number of users in the sysop admin group.
{{NUMBEROFACTIVEUSERS}} 11 Number of active users, based on the criteria used in Special:Statistics.
{{NUMBERINGROUP:groupname}}
{{NUMINGROUP:groupname}}
Number of users in a specific group.

Page name variables

Variable Output Description
{{FULLPAGENAME}} User:Marcus/MediaWiki Quick Reference Namespace and page title.
{{PAGENAME}} Marcus/MediaWiki Quick Reference Page title.
{{BASEPAGENAME}} Marcus Page title excluding the current subpage and namespace. For more complex splitting, use {{#titleparts:}}.
{{SUBPAGENAME}} MediaWiki Quick Reference The subpage title.
{{SUBJECTPAGENAME}} User:Marcus/MediaWiki Quick Reference The namespace and title of the associated content page.
{{TALKPAGENAME}} User talk:Marcus/MediaWiki Quick Reference The namespace and title of the associated talk page.

The following are equivalents encoded for use in MediaWiki URLs (i.e. spaces replaced with underscores and some characters percent-encoded):

  • {{FULLPAGENAMEE}}
  • {{PAGENAMEE}}
  • {{BASEPAGENAMEE}}
  • {{SUBPAGENAMEE}}
  • {{SUBJECTPAGENAMEE}}
  • {{TALKPAGENAMEE}}

These can all take a parameter allowing specification of the page to be operated on, instead of just the current page:

  • {{PAGENAME:Template:Main Page}}Main Page

Namespace variables

Variable Output Description
{{NAMESPACE}} User Name of the page's namespace
{{SUBJECTSPACE}}
{{ARTICLESPACE}}
User
User
Name of the associated content namespace
{{TALKSPACE}} User talk Name of the associated talk namespace

The following are equivalents encoded for use in MediaWiki URLs (spaces replaced with underscores and some characters percent-encoded):

  • {{NAMESPACEE}}
  • {{SUBJECTSPACEE}}
  • {{TALKSPACEE}}

These can take a page name instead of operating on the current page:

  • {{NAMESPACE:Template:Main Page}}Template
  • {{SUBJECTSPACE:Template:Main Page}}Template
  • {{TALKSPACE:Template:Main Page}}Template talk

Parser functions

Parser functions have the same syntax as templates. The names are sometimes prefixed with a hash to distinguish them from template page names.

Conditional expressions

#if

This function tests whether the first parameter is non-empty. It evaluates to false if the test string is empty or contains only whitespace characters (spaces, newlines, etc).

{{#if: test string | value if true | value if false }}
#ifeq

This parser function compares two strings and determines whether they are identical.

{{#ifeq: string 1 | string 2 | value if identical | value if different }}
#iferror

This function evaluates to true if the input string contains an HTML object with class="error", as generated by other parser functions such as #expr, #time and #rel2abs, template and errors such as loops and recursions.

{{#iferror: test string | value if error | value if correct }}
#ifexpr

This function evaluates a mathematical expression and returns one of two strings depending on the boolean value of the result:

{{#ifexpr: expression | value if true | value if false }}
#ifexist

This function returns one of two values depending on whether a page exists on the local wiki.

{{#ifexist: page title | value if the page exists | value if it doesn't exist }}
#switch

This function compares one input value against several test cases, returning an associated string if a match is found.

{{#switch: comparison string
 | case1 = result1
 | case2 = result2
 | ...
 | caseN = resultN
 | default result0
}}
#expr

This function evaluates a mathematical expression and returns the calculated value. See metawiki:Help:Calculation for details of operators and constants.

{{#expr: expression }}

URL data

Parser function Input → Output Description
{{localurl:page name}}
{{localurl:page name|query_string}}
{{localurl:MediaWiki}} → /wiki/MediaWiki
{{localurl:MediaWiki|printable=yes}} → /index.php?title=MediaWiki&printable=yes
The relative path to the title.
{{fullurl:page name}}
{{fullurl:page name|query_string}}
{{fullurl:interwiki:remote page name|query_string}}
{{fullurl:Category:Top level}}https://wiki.nottinghack.org.uk/wiki/Category:Top_level

{{fullurl:Category:Top level|action=edit}}https://wiki.nottinghack.org.uk/index.php?title=Category:Top_level&action=edit

The absolute path to the title. This will also resolve Interwiki prefixes.
{{filepath:file name}}
{{filepath:file name|nowiki}}
{{filepath:Example.jpg}}https://wiki.nottinghack.org.uk/images/a/a9/Example.jpg
The absolute URL to the full size media file.
{{#rel2abs: path }}
{{#rel2abs: path | base path }}
{{#rel2abs:.}} → User:Marcus/MediaWiki Quick Reference
{{#rel2abs:.|Help:Contents}} → Help:Contents
Converts a relative file path into an absolute filepath. In path</path> the following syntax is valid:
  • . → the current level
  • .. → "go up one level"
  • /foo → "go into the subdirectory /foo"

If base path is not specified, the full page name of the page will be used instead.

Date and time functions

Variable Output Description
{{#timel: Y F d, h:i:s}} 2024 May 03, 10:20:48 Displays the current time and date in the local timezone of the wiki. Due to caching, these variables frequently show when the page was cached rather than the current time.

Namespace functions

{{ns:}} returns the localized name for a namespace. {{nse:}} is the equivalent encoded for MediaWiki URLs. It does the same, but it replaces spaces with underscores, making it usable in external links.

Content namespaces Talk namespaces
Usage Output Usage Output
{{ns:-2}} or {{ns:Media}} Media
{{ns:-1}} or {{ns:Special}} Special
{{ns:0}} or {{ns:}} {{ns:1}} or {{ns:Talk}} Talk
{{ns:2}} or {{ns:User}} User {{ns:3}} or {{ns:User talk}} User talk
{{ns:4}} or {{ns:Project}} Nottinghack Wiki {{ns:5}} or {{ns:Project talk}} Nottinghack Wiki talk
{{ns:6}} or {{ns:File}} or {{ns:Image}} File {{ns:7}} or {{ns:File talk}} or {{ns:Image talk}} File talk
{{ns:8}} or {{ns:MediaWiki}} MediaWiki {{ns:9}} or {{ns:MediaWiki talk}} MediaWiki talk
{{ns:10}} or {{ns:Template}} Template {{ns:11}} or {{ns:Template talk}} Template talk
{{ns:12}} or {{ns:Help}} Help {{ns:13}} or {{ns:Help talk}} Help talk
{{ns:14}} or {{ns:Category}} Category {{ns:15}} or {{ns:Category talk}} Category talk

Formatting functions

Usage Input → Output Description
{{lc:string}} {{lc:DATA CENTER}} → data center The lowercase input.
{{lcfirst:string}} {{lcfirst:DATA center}} → dATA center The input with the first character lowercase.
{{uc:string}} {{uc:text transform}} → TEXT TRANSFORM The uppercase input.
{{ucfirst:string}} {{ucfirst:text TRANSFORM}} → Text TRANSFORM The input with the first character uppercase.
{{padleft:xyz|stringlength}}
{{padleft:xyz|strlen|char}}
{{padleft:xyz|strlen|string}}
{{padleft:xyz|5}} → 00xyz
{{padleft:xyz|5|_}} → __xyz {{padleft:xyz|5|abc}} → abxyz {{padleft:xyz|2}} → xyz
{{padleft:|1|xyz}} → x (first character of the string)
Inserts a string of padding characters (parameter 3) of a specified length (parameter 2) next to a chosen base character or variable (first parameter). The final digits or characters in the base replace the final characters in the padding. The padding string may be truncated if its length does not evenly divide the required number of characters.
{{padright:xyz|stringlength}}
{{padright:xyz|strlen|char}}
{{padright:xyz|strlen|string}}
{{padright:xyz|5}} → xyz00

{{padright:xyz|5|_}} → xyz__ {{padright:xyz|5|abc}} → xyzab {{padright:xyz|2}} → xyz
{{padright:|1|xyz}} → x

Identical to padleft, but adds padding characters to the right side.
{{plural:2|is|are}} {{plural:0|is|are}} → are
{{plural:1*1|is|are}} → is
{{plural:21 mod 10|is|are}} → are
{{plural:{{#expr:21 mod 10}}|is|are}} → is
{{plural:1|is|are}} → is
{{plural:2|is|are}} → are
Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Plural transformations are used for languages like Russian based on "count mod 10".
{{#titleparts: pagename | number of segments to return | first segment to return }}

{{#titleparts: Talk:Foo/bar/baz }}Talk:Foo/bar/baz
{{#titleparts: Talk:Foo/bar/baz | 1 }}Talk:Foo
{{#titleparts: Talk:Foo/bar/baz | 2 }}Talk:Foo/bar
{{#titleparts: Talk:Foo/bar/baz | 2 | 2 }}bar/baz

Separates a pagetitle into segments based on slashes, then returns some of those segments as output. If the number of segments parameter is not specified, it defaults to "0", which returns all the segments. If the first segment parameter is not specified or is "0", it defaults to "1":

Miscellaneous functions

Managing files and pages

Moving (renaming) a page

See mw:Help:Moving_a_page.

Deleting a page

See mw:Help:Deleting_a_page.

Importing files from another wiki

See Special:Import and Special:Export.

System Information

Nottinghack Wiki is running MediaWiki 1.35.1. See:

See also