How to format articles

This page details instructions for formatting articles. See this page to add a new article. When in doubt, use the default formatting provided by the site.

Adding Headers

One of the most useful ways to format an article is to add headers - which mediawiki calls 'sections'. To add a section place an = on either side of the section text - the section text should be its own line. After adding sections, the site will automatically create a table of contents based on the sections used. Below is an example of the text you would enter to create sections.

Useful Code
= Title (For documents consistency, please do not use one equal sign. This would be the same size font as the page title) =
== Section 1 ==
=== Subsection ===
==== Sub-subsection ====

Adding Links:

There are several ways to add links. Read the mediawiki article for a full list.

  • The most simple way to add a link to an external link to other websites, is to simply add the URL, and it will be linked automatically
Example https://www.mediawiki.org/wiki/Help:Links#External_links 
Will display as https://www.mediawiki.org/wiki/Help:Links#External_links
  • For internal and external links you can add add a link to text on the page by using one bracket followed by the URL with a space and then the text to be linked:
Example [http://toolbox.calwep.org/wiki/Main_Page Toolbox] 
Will display as Toolbox 
Example [https://www.mediawiki.org/wiki/Help:Links learn more about links at mediawiki.org] Will display as learn more about links at this help page

Tips for internal links:

  • Alternatively, for internal links (links at toolbox.calwep.org) use the page name (case sensitive) and double brackets. To link to the Toolbox homepage, (http://toolbox.calwep.org/wiki/Main_Page), simply:
Example [[Main Page]]
Will display as Main Page
  • To change the the displayed text when using internal links, use a piped link.
Example [[Main Page]] | use a pipe to display text using internal links]]
Will display as Main Page | use a pipe to display text using internal links]]
  • To add a link to an upcoming internal page or to suggest a new internal page could be created, use a internal link with a non-existent page name. If the page is created, the link will turn from red to blue link directly to the new page contents.
Example [[a non-existent toolbox page that should exist]]
Will display as a non-existent toolbox page that should exist
  • If an internal link leads to the page being displayed, it will not show as a blue link, but as a bolded text with no link.
Example linking to this page [[How to format articles]]
Will display as How to format articles


Adding Tables:

Adding tables involves somewhat complex wiki markup - luckily there are online table generators. TableGenerators.com works well for creating wiki markup tables either by importing a csv file, or copying and pasting - don't forget to regenerate the table after making any changes! http://www.tablesgenerator.com/mediawiki_tables

Adding Lists:

To create a numbered list simply start each new line with a #. To create a bulleted list start each line with a *. Mixing these two is easy as well, you could start with a # for three lines, then introduce a #* or #** for indented bullets. For full options visit https://www.mediawiki.org/wiki/Help:Lists.

Adding Images:

Image help and options: https://www.mediawiki.org/wiki/Help:Images

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

Adding Footnotes to a page:

For full coding information, see: https://www.mediawiki.org/wiki/Extension:Cite#Usage

  • Add this where you want the footnote number:
 Useful code <ref>add your footnote content here too, although this conent will appear below in your footnote section (can include links)</ref>
  • Add the following code where you want the list of footnotes to appear:
 Useful code <references /> In order to make the Footnotes section you will need to add ==Footnotes== above the references code.
  • For consistency, please call these footnotes, not references or bibliography.

Other Formatting Options

Adding sub and super scripts: https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Superscripts_and_subscripts

Additional Resources