Help:Editing

From BioDivBorneo2010

Jump to: navigation, search

MediaWiki uses (fairly) simple markup code to speed up the creation of web pages. Some of these codes are available via the formatting palate above the editing box.

This document is copied and modified (with thanks) from the (public domain) MediaWiki help pages.


Contents

Text formatting

Font control

  • ''italic'' gives: italic
  • '''bold''' gives: bold
  • '''''bold & italic''''' gives: bold & italic
  • <nowiki>no ''markup''</nowiki> gives: no ''markup''
  • <tt>fixed width</tt> gives: fixed width
  • <code>mysql</code> gives: mysql
  • x<sup>2</sup> gives: x2
  • x<sub>t1</sub> gives: xt1

Headings

  • == level 2 ==
  • === level 3 ===
  • ==== level 4 ====

Don't use level 1 headings; these are automatically created by the Wiki.

Tabs

Base
:Tab
::Two tabs</nowiki>

gives:

Base

Tab
Two tabs

Horizontal line

  • ----

Unordered list

* one
* two
* three
** three point one
** three point two

gives:

  • one
  • two
  • three
    • three point one
    • three point two

Ordered list

# one
# two <br />spanning several lines<br />without breaking the numbering
# three
## three point one
## three point two

gives:

  1. one
  2. two
    spanning several lines
    without breaking the numbering
  3. three
    1. three point one
    2. three point two

Definitions

;item 1
:definition 1
;item 2
:definition 2-1
:definition 2-2

gives:

item 1
definition 1
item 2
definition 2-1
definition 2-2

Paragraphs

MediaWiki ignores normal line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tags <br />.

Comments

To add a comment in the text, to be invisible one the processed page, use <!-- this is a comment -->

Code boxes

<pre>yum install samba system-config-samba</pre> gives:

yum install samba system-config-samba

Maths

Include LaTeX maths expressions: <math>\int\limits_a^x f(\frac{\alpha}{2}\,)\,dx</math> is created by:

<math>\int\limits_a^x f(\frac{\alpha}{2}\,)\,dx</math>

See this guide to LaTeX maths markup.

Footnotes

To add a footnoote, use ... is thought to be rare<ref>Jones, A. N., Pers. Comm.</ref>. However, ..., and add a <references/> to insert the references. This will appear as:

... is thought to be rare[1]. However, ...
Footnootes
  1. Jones, A. N., Pers. Comm.

Links

A key feature of web pages is that they use hypertext, or links.

Internal links

  • [[Main Page]] gives: Main Page
  • [[Main Page|different text]] gives: the same link with different text (mouse-over to see the link name)
  • [[#Horizontal line|Subsection]] gives a link to an anchored section in this document: Subsection
  • [[Biodiversity of Borneo 2009#Staff|Staff]] gives a link to a section in another page: Staff
  • [[:Category:Person|People]] gives a link to a Category page: People
  • [[media:Downes2002.pdf|A LaTeX maths guide]] gives a link to a media file: A LaTeX maths guide

External links

  • http://mediawiki.org gives: http://mediawiki.org
  • [http://mediawiki.org MediaWiki] gives: MediaWiki
  • [http://mediawiki.org] gives: [1]
  • [http://google.com/search?q={{PAGENAMEE}} Google query] gives an external link to other host passing the pagename: Google query

Tables

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


Example

You type You get
{| border="1" align="center"
|+ This is my table
! Item
! Amount
! Cost
|-
|Orange
|10
|7.00
|-
|Bread
|4
|3.00
|-
|Butter
|1
|5.00
|-
!Total
|
|align="right"|15.00
|}
This is my table
Item Amount Cost
Orange 10 7.00
Bread 4 3.00
Butter 1 5.00
Total 15.00

The border="1" and align="right" and align="center"are an included xhtml attribute for tables. Use the appropriate attribute for cells or for the whole table.

Images

Syntax

The full syntax for displaying an image is:

[[File:{filename}|{options}|caption]]

Where basic options can be zero or more of the following, separated by pipes:

  • border, frame, thumb: Controls how the image is formatted
  • left, right, center, none: Controls the alignment of the image within a text
  • baseline, sub, super, top, text-top, middle, bottom, text-bottom: Controls the vertical alignment of the image within a text
  • {width}px: Resizes the image to the given width in pixels
  • link={destination}: Allows to link to an arbitrary title, URL or just nowhere (note that link cannot be used in conjunction with thumb or frame).
  • alt={alternative text}: For changing the alternative text (alt="")

Examples

Inline 1

...text text text
[[File:BOB2010logo.png|50px|This is our logo]]
text text text ...

text text text text text text text text text text text text text text text text text text This is our logo text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

Inline 2

Note: the link overrides the caption.

...text text text
[[File:BOB2010logo.png|border|200px|left|link=http://wikipedia.org|This is our logo]]
text text text ...
text text text text text text text text text text text text text text text text text text text text text text
This is our logo
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

A Frame

Note that when using frame or thumb, the default alignment will be right. Also, resizing does not work for a frame, so you image should be a good size to start: most laptop pages are ca. 1024 pixels wide, so a width of 400-500px is appropriate.

...text text text
[[File:BOB2010logo.png|frame|This is our logo]]
text text text ...
text text text text text text text text text text text text text text text text text text text text text text
This is our logo
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

A Thumbnail

Please use this as your standard way to include an image.

...text text text
[[File:BOB2010logo.png|thumb|300px|This is our logo]]
text text text ...
text text text text text text text text text text text text text text text text text text text text text text
This is our logo
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

Galleries

<gallery>
File:BOB2010logo.png|
File:BOB2010logo.png|Item 1
File:BOB2010logo.png|a link to [[Main Page]]
File:BOB2010logo.png|''italic caption''
File:BOB2010logo.png|
File:BOB2010logo.png|on page "{{PAGENAME}}"
</gallery>

gives: