Demonstration of Wiki formatting
Styles and Effects
There are a number of effects to use on ordinary text:
- We can use italic text, which is written between pairs of apostrophes: ''italic'' becomes italic.
- There is also bold text, which is written between groups of three apostrophes: '''bold''' becomes bold.
- A combination of the two can be achieved by using five apostrophes: '''''bold and italic''''' becomes bold and italic.
- Monospaced text is written between backticks: `code` becomes code.
- Underlined text is surrounded on each side by two underscores: __underlined__ becomes underlined.
List items
List items appear lines which begin with the * character. There needs to be a space
before the item text, otherwise it will be treated as part of the item's format
string. For example:
- This item began with * and was immediately followed by a space.
- The next item contains the text "*Different_list: This mistake was intentional.":
- Different_list: This mistake was intentional.
In the above items, the * character in the body of each item was written directly but, at the
beginning of a line, you need to use \* to avoid the * character being used to create a list
element. Note also that:
- The \ character which was itself written using the \\ sequence of characters.
- Deeper levels of nesting can be created by using multiple * characters:
- This element was generated using the string **, for example.
- . This element used *.* which was naughty because the decimal point is redundant and should really only be used in enumerated lists.
Enumerated lists can take the form of ordinary sequences of numbered items:
- 1. This item began with the #. string.
- 2. To write # at the start of a line, you would use \# to avoid the # being treated as a list item.
- 3. The decimal point following the # character indicates that this index in the list item will be followed by a decimal point.
- 3.1. When inserted between # characters, the decimal point appears as in this item.
- 3.1 The lack of a trailing decimal point is not a problem.
Various formatting characters can also be used:
- a) Lower case letters are entered using the @ character.
- b) In this case we have used the @) format string.
- 1A) Upper case letters are entered using the $ character.
- 1B) Changing the list format string causes a new list to be created.
Preformatted text
To switch off formatting and display text in a monospaced font, we precede text by a
group of three opening braces at the beginning of a line and follow it by a
corresponding group of three closing braces at the beginning of a line.
For example, the text
{{{def greeting():
print "Hello!"
}}}
will produce the following result:
def greeting():
print "Hello!"
Opening and closing braces can be included within preformatted areas but care must be
taken to avoid placing three of either at the beginning of a line.