Syntax

From MetreWiki

Jump to: navigation, search

Editing a Wiki is very simple - just type some text and it will be displayed. However, like all communications a bit of layout or structure will improve its readability. This page covers some of the basics - refer to the MediaWiki User's Guide for more information. If your browser supports it, a number of these formatting elements can be added from the editing toolbar which is displayed above the edit box.

Contents

Paragraphs

A single paragraph character (<cr> or 'enter' key) has no effect on the layout of normal text. It is sometimes useful when editing to break the text into lines. It will break lists into lines.

A blank new line forces a paragraph, i.e. two paragraph marks.

A line break can be forced by adding the tag <br> where the break is required.

Basic text formatting

Is accomplished with apostrophes (') on each side of the formatted text:

Italics = 2 apostrophes; i.e. ''text'' = text
Bold = 3 apostrophes; i.e. '''text''' = text
Italics + bold = 5 apostrophes; i.e. '''''text''''' = text

Signing your contribution

You should "sign" your comments and on talk pages:
- Three tildes gives your user name: ~~~ = WikiSysop
- Four tildes give your user name plus DateTime: ~~~~ = WikiSysop 12:31, 14 September 2006 (BST)

Section Headings

Are accomplished with '=' character either side of the text
Level 0 with 1 is reserved for page headings
Level 1 has 2; i.e. ==Heading==
Level 2 has 3; i.e. ===Heading===
Level 3 has 4; i.e. ====Heading====

Once four headings have been inserted a Table of Contents will be automatically generated at the top of the page but can be forced with the tag __TOC__ or suppressed with __NOTOC__ .

Lists

Are created with characters at the beginning of the line '*' for unordered lists, '#' for numbered lists or ':' to indent with the number of characters indicating the level.

For instance, using '*' :

  • level one
    • level two
      • level three

For instance, using '#' :

  1. level one
    1. level two
      1. level three

For instance, using ':' :

level one
level two
level three

When adding comments to Discussion or Talk pages, and commenting on someone else's comment, it is good practice to indent your comment with the appropriate number of : characters to improve readability and to add your signature.

Links

Links can be created to other pages or to external URLs

The basic format for an internal link is [[PageName|DisplayText]] where PageName = the title of the page and DisplayText = the text you want to appear. If you omit the pipe character '|' and DisplayText, the PageName will be displayed. Names are case sensitive.

If the page exists it will be shown in blue, if not in red. If you click on a red link, the page will open in editing mode so you can create the page. You can link to a section in a page by adding the section heading to the page name seperated by a '#' character: e.g. [[Syntax#Paragraphs|Paragraphs]] = Paragraphs

It is the same for an external link but using only single square brackets, a space instead of the pipe character '|' and PageName = the URL you are linking to, e.g. [http://www.theresponsiblemarketer.org Network for Responsible Marketers] displays as Network for Responsible Marketers.
A URL with no brackets will display in full and link; e.g. http://www.theresponsiblemarketer.org.

When adding pages, do try to work within the structure of the wiki so that people can find it. You can put links to the same page in as many places as you want if it helps people find it from different perspectives.

Images & Files

In the syntax, all files are referred to as images, even if they are not pictures. Upload files as described in the help file.

Images are displayed using the link syntax with the special name 'Image:' and the filename; e.g. [[Image:MyBoat2.jpg]] will display the image on the page.

Image:MyBoat2.jpg

[[Image:myboat.jpg|Alternate text]] will display the image with alternate text for browsers not supporting images
[[:Image:myboat.jpg|Link to page]] will link to the image page: e.g. Link to page note leading colon
[[Media:myboat.jpg|Link to image]] will link to the image itself: e.g. Link to image note use of special name Media: instead of Image: You would use this for instance to link to a .pdf file
[[Image:myboat.jpg|frame|center|Caption text]] will display the image in a frame with a caption: e.g.

Monsoon off Cowes in a breeze
Monsoon off Cowes in a breeze

See http://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax for more on the use of images.

Tables

Tables are simply defined between {| and |} characters
End of row with |- characters
and cells with additional | characters
Thus:

{| border="1" cellspacing="0" cellpadding="5" align="center"
| This
| is
|- 
| a
| table
|-
|}

This is
a table

replacing | with ! sets the row as a heading

This is
a table

See http://meta.wikimedia.org/wiki/Help:Table for more about tables.

Personal tools