Search:

Wiki Formatting: Text Formatting

Abstract: This text explains the basic wiki formatting rules and markup.

Formatting basics

There are some really basic rules about wiki text formatting:

  1. Usual text is typed as is. Line breaks don't matter.

  2. Text indentantion with less than three spaces is insignificant. Three or more spaces create an item list.

  3. No direct HTML is possible.

  4. An empty line results in a paragraph break (line break and an empty line) in the output text.

  5. A line break is printed if two colons :: are found at the end of a line.

  6. Text enclosed in two consequetive '' single quote prevents formatting of text. Four single quotes result in two in the output.

Text attributes

Text attributes can be turned on or off just as in HTML. The on/off sequences are however the same.

Table 1 - Basic Formatting
Markup Function
__ Two underscores turn italics on or off.
** Two stars turn bold on or off.
%% Two percents signs turn underlining on or off.
%* A percent followed by a star turns %-strike-through on or off.
== Two equal signs switch text output to a mono space font.
^^ Two carets remove white space to the left and right side of the carets.
%:[[fgcolor] [,bgcolor]]: Sets fgcolor as foreground and bgcolor as background color. Both colors are optional, if none is given the last previous color sequence is turned off. Both color values can be a hexadecimal color value or lowercase color name.
%[class]- Applies the text formatting class class to the following text. class must be defined in the wiki's stylesheet. If class is omited class formatting is turned off.
%[class]= Same as %- but applies also paragraph breaks (creates a DIV).

Diversions

In addition to the %= markup above

. name

produces also a DIV of class name if found at the beginning of a line. E.g. .wikiseq creates a <DIV CLASS="wikiseq"> and is equivalent with %wikiseq=. So "dot-diversions" are basically just a different notation.

The diversion ends when two dots at the beginning of a line are found. If the markup is followed by some text

. name text

only text is enclosed in the DIV.

Headers

Wiki markup that produces a HTML heading must start with three dashes at the beginning of the line, followed be the heading level:

--- heading-number

followed by the heading's text. E.g. ---2 creates a level 2 heading.

---+

is an alternative to create a H3 heading. Adding a second + creates a H4 and a third a H5 heading.

---* text

puts a paragraph break P before and after text which is printed in bold.

----

prints a horizontal rule.

Preformatted text

yawk supports preformatted paragraphs with two sequences, one for printing text as-is and one with markup interpretation.

--- [ : | = ] [#] [ =class ] [" title " ]

The sequences work as follows:

As for preformatted sequences, they are only recognised if they appear at the beginning of the line. So quoting is not necessary.

< dag | at | awk-scripting.de >