Help:Formatting

Formatting is the technique of transforming text in articles. For example, making text bold or italics. A comprehensive tutorial follows, arranged generally in order from simpler formatting to advanced formatting.

Headings

To create a heading, surround the text you wish to make a header with a number of equals signs, corresponding to the size of the heading. Here are the six types of headings:

= Heading 1 =
== Heading 2 ==
=== Heading 3 ===
==== Heading 4 ====
===== Heading 5 =====
====== Heading 6 ======

Resulting in:

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Use of level one headings is not recommended, as this is the level of the title of the page. Simply start at level two and go to the next level for subheadings.

Table of Contents

If you have more than four headers in a page, a table of contents box listing the headers appears at the top. You can remove the table of contents using __NOTOC__. You can place the table of contents in a different position using __TOC__

Links

Internal Links

To turn text into an internal link (i.e. a link to a page within the wiki), you format the text as follows: [[FULL NAME OF ARTICLE HERE]]. This would link to the article FULL NAME OF ARTICLE HERE.

To link to an article but display text other than the article name, you format as follows: [[FULL NAME OF ARTICLE HERE|TEXT TO DISPLAY HERE]] This results in: TEXT TO DISPLAY HERE

If a link that you post is colored red, it means the article does not exist yet.

External Links

To turn text into an external link (a link to a page outside the wiki), you format the text as follows:

[//URL_OF_PAGE_HERE]

Note that there cannot be any spaces in the URL. The // sets to http(s):// depending on your browser's default. You should replace http(s)://artofproblemsolving.com with {{SERVER}} in external links.

To link to a website but display text other than the website's URL, you format as follows:

[//URL_OF_PAGE_HERE TEXT TO DISPLAY HERE]

Note the space between the URL of the page and the text to display. The above results in: TEXT TO DISPLAY HERE.

Text Formatting

Description Input Output
Triple apostrophes give you bold text '''Example''' Example
Double apostrophes give you italic text ''Example'' Example
These two formatting tricks can be combined to make bold italic text '''''Example'''''. Example
Underlining text uses HTML tags. <u>Example</u> Example
Strikethrough uses HTML tags. <s>Example</s> Example
Small text <small>Example</small> Example
Inline code <tt>Example></tt> Example

Section Formatting

These can only be done at the start of a line. This includes headers.

Boxes

To achieve a grey box with mono type text like the ones above, use the <pre /> tags or simply put a space before the line(s) you wish to place in the box, like so:

Whee, what fun!

And an example of multiple lines:

First.
Second!
Third?

Note that this does not stop any code in the boxes from being parsed.

This text is still bold, though it's in a box

Lists

Lists are a group of items that are, as the name implies, listed one by one on separate lines. There are two types of lists: ordered and unordered.

Ordered Lists

Each item in an ordered list is preceded by its number in the list. To create an ordered list, simply insert the symbol # before each list item. Example:

 # This is number 1.
 # Two! 
 # Three.
 # Four. Yawn...
 #etc...
 

Results in:

  1. This is number 1.
  2. Two!
  3. Three.
  4. Four. Yawn...
  5. etc...

Unordered Lists =

Each item in an unordered list is preceded by a small box. To create an unordered list, insert a * before each list item.Example:

 * This is unordered.
 * Oh, the chaos!
 * Pretty nice.
 

Results in:

  • This is unordered.
  • Oh, the chaos!
  • Pretty nice.

Nested Lists

You can also nest both ordered and unordered lists.
This is how to do it:

 * Cool.
 * Yeah.
 ** Hey, it's a sub-item!
 ** This is great.
 *** Yup.
 **** It is.
 *** Really?
 ** Of course.
 * Okay.
 # You can do that for numbered lists too.
 # Yup.
 ## It works.
 ## Yay!
 ### w00t!
 # Hurray!
 

Results in:

  • Cool.
  • Yeah.
    • Hey, it's a sub item!
    • This is great.
      • Yup.
        • It is.
      • Really?
    • Of course.
  • Okay.
  1. You can do that for numbered lists too.
  2. Yup.
    1. It works.
    2. Yay!
      1. w00t!
  3. Hurray!

There is also a way to nest ordinary text, namely, to place the a colon (:) before the nested text.

 Hi
 : Nest!
 :: Double nest!
 ::: Triple nest!
 

Results in:

Hi

Nest!
Double nest!
Triple nest!

Unformatting

To prevent parsing, you must do this:

<nowiki>NON FORMATTED TEXT AND ANYTHING ELSE HERE</nowiki>

This removes all wiki formatting from the contained text.


This concludes our article on basic text formatting. To learn about more complex text formatting, it is recommended you read the MediaWiki articles.

This article is a tutorial about the AoPSWiki or AoPS Forum.