Help:Contents/Basic Wiki Syntax

From MarketsWiki
Jump to: navigation, search

Wiki pages that display in a browser ultimately have the same underlying structure as any other web page. The main distinction for the article writer is that unlike a conventional web page, the writing of a wiki article can employ minimal formatting instructions (or none at all), and the final result actually still looks reasonable and standardized. If you don't put formatting style instructions in an ordinary web page, it looks awful.

The wiki extensions and environment also provide some semi-automatic formatting, so that using standardized syntax elements can result in extra material for little effort. For example, using standard wiki markup conventions for section headers will also produce a table of contents without additional work.

Many of the common constructs in an HTML web document, like tables or boldface text, are also present in wiki pages, but in a simplified form. Most of the time, the wiki form can be extended to include more complicated elements (e.g. changes to font style, or defining column widths in tables). If it's really necessary, HTML, Java and other code can go directly into a wiki page; however, at this point that necessity has not presented itself.

The rest of this page describes and demonstrates some of the common things you can do in a wiki. It is not meant to be a complete, exhaustive syntax description; we're trying to keep it simple. If you don't see what you need... ask us!

Section Headers

To put section headers into your document, surround your header text with equal signs. Use "==" to identify a primary section, and "===" to indicate a subsection. Primary headers will appear larger than subheaders, and will add a horizontal line across the page. Headers will also be used to generate the table of contents.

Primary headers:

    ==Flora of Mars==

Secondary headers:

    ===The Zzzbrlxrvx Fern===

Can you keep going, with subsections using four and five equal signs? Yes, you can! No, please don't! You're not writing IEEE standards documents, you're writing informative articles for people to read. If you need to nest your section headers four and five deep, consider other ways to organize your information.


Bold and Italic Text

Use apostrophes to create both italic and boldface text. Surround the text with sets of either two or three (two for italic, three for bold).

Italics:

    Make ''words'' or ''multiple word phrases'' stand out with italics.

Boldface:

    Boldface text '''gets created this way.'''

If you want bold and italic text together, use five apostrophes (you're simply putting the two for italic and the three for bold all together):

    '''''like this'''''


Unordered (Bulleted) Lists

Unordered lists are lines that start with the "*" symbol. All lines that are together with that starting symbol go in the same list. If you want to make separate lists, put a line between the lists that doesn't start with "*".

Here's an example:

    
     *First line
     *Second line
     *Third line
     

And here's how it looks:

  • First line
  • Second line
  • Third line


Ordered (Numbered) Lists

Ordered lists have the same rules as unordered lists, but they use the "#" symbol to start:

    
     #First line
     #Second line
     #Third line
     

And here's how it looks:

  1. First line
  2. Second line
  3. Third line


Making Gray Quote (or Example) Boxes

To make the gray quote boxes appear, like we use for examples here, simply indent the start of each line with a leading space.

    Note that even in an example box, formatting commands will still be recognized.


Forcing The Wiki Page Builder to NOT See Special Characters

If you are using text in your articles that also happen to be wiki markup syntax (for example, you need to use two equal signs together and you see section headers appearing instead), you can tell the page builder to ignore your special characters by surrounding the text with "nowiki" tags, like this:

    <nowiki>Jim ==Ondeev confuses many people with the use of equal signs in his legal name.</nowiki>


Tables

Use tables to lay things out in grid format. Like other kinds of HTML and wiki markup constructs, tables can be created simply or with a daunting complexity. This guide will stay on the "simple" side of the fence.

A basic table structure in a wiki page looks like this:

 {|border=1
 |+ Caption text (optional)
 |-
 ! Header 1
 ! Header 2
 |-
 | First cell in row
 | Next cell in row
 |-
 | First cell, second row
 | Repeat as needed
 |}
 

That creates a table that looks like this:

Caption text (optional)
Header 1 Header 2
First cell in row Next cell in row
First cell, second row Repeat as needed


The symbols "{|" and "|}" start and end the table. Each row in the table starts with "|-" (with the one exception that if you want a caption for the table, use "|+"). Within each row, each cell begins with a "|" pipe symbol for regular rows, or the "!" character for header text.

If you're an HTML coder, you can use style parameters like border, cellspacing, etc. They go before the start of the first row, for the whole table (the "border" parameter is shown above in that place), or as each row is declared if parameters are to be used row by row.

You can change the look, spacing, size, font and cell layout in tables. You can nest tables within tables, and all kinds of other things. Please, keep it simple! Provide information to readers that is easy to read and direct.

For a more complete description of table syntax, please see the full syntax description from our ten-ton gorilla cousin, Wikipedia. We use their software, MediaWiki, so our syntax is the same as theirs, and their explanation is comprehensive.

Color

If you wish to use color in your article, whether it be changing the color of some text or a background color in a table, you need to use a code for the color. Below is a list of some various codes for their given color.

#FFFFFF #FFFFCC #FFFF99 #FFFF66 #FFFF33 #FFFF00
#FFCCFF #FFCCCC #FFCC99 #FFCC66 #FFCC33 #FFCC00
#FF99FF #FF99CC #FF9999 #FF9966 #FF9933 #FF9900
#FF66FF #FF66CC #FF6699 #FF6666 #FF6633 #FF6600
#FF33FF #FF33CC #FF3399 #FF3366 #FF3333 #FF3300
#FF00FF #FF00CC #FF0099 #FF0066 #FF0033 #FF0000
#CCFFFF #CCFFCC #CCFF99 #CCFF66 #CCFF33 #CCFF00
#CCCCFF #CCCCCC #CCCC99 #CCCC66 #CCCC33 #CCCC00
#CC99FF #CC99CC #CC9999 #CC9966 #CC9933 #CC9900
#CC66FF #CC66CC #CC6699 #CC6666 #CC6633 #CC6600
#CC33FF #CC33CC #CC3399 #CC3366 #CC3333 #CC3300
#CC00FF #CC00CC #CC0099 #CC0066 #CC0033 #CC0000
#99FFFF #99FFCC #99FF99 #99FF66 #99FF33 #99FF00
#99CCFF #99CCCC #99CC99 #99CC66 #99CC33 #99CC00
#9999FF #9999CC #999999 #999966 #999933 #999900
#9966FF #9966CC #996699 #996666 #996633 #996600
#9933FF #9933CC #993399 #993366 #993333 #993300
#9900FF #9900CC #990099 #990066 #990033 #990000
#66FFFF #66FFCC #66FF99 #66FF66 #66FF33 #66FF00
#66CCFF #66CCCC #66CC99 #66CC66 #66CC33 #66CC00
#6699FF #6699CC #669999 #669966 #669933 #669900
#6666FF #6666CC #666699 #666666 #666633 #666600
#6633FF #6633CC #663399 #663366 #663333 #663300
#6600FF #6600CC #660099 #660066 #660033 #660000
#33FFFF #33FFCC #33FF99 #33FF66 #33FF33 #33FF00
#33CCFF #33CCCC #33CC99 #33CC66 #33CC33 #33CC00
#3399FF #3399CC #339999 #339966 #339933 #339900
#3366FF #3366CC #336699 #336666 #336633 #336600
#3333FF #3333CC #333399 #333366 #333333 #333300
#3300FF #3300CC #330099 #330066 #330033 #330000
#00FFFF #00FFCC #00FF99 #00FF66 #00FF33 #00FF00
#00CCFF #00CCCC #00CC99 #00CC66 #00CC33 #00CC00
#0099FF #0099CC #009999 #009966 #009933 #009900
#0066FF #0066CC #006699 #006666 #006633 #006600
#0033FF #0033CC #003399 #003366 #003333 #003300
#0000FF #0000CC #000099 #000066 #000033 #000000