You can use up to five different levels of headlines to structure your content. If you have more than three headlines, a table of contents is generated automatically – this can be disabled by including the string ~~NOTOC~~ in the document.
Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a * for unordered lists or a - for ordered ones.
This is a list
The second item
You may have different levels
Another item
The same list but ordered
Another item
Just use indention for deeper levels
That’s it
* This is a list
* The second item
* You may have different levels
* Another item
- The same list but ordered
- Another item
- Just use indention for deeper levels
- That's it
DokuWiki converts commonly used emoticons to their graphical equivalents. More smileys can be placed in the smiley directory and configured in the conf/smileys.conf file. Here is an overview of Smileys included in DokuWiki.
DokuWiki supports a simple syntax to create tables.
Heading 1
Heading 2
Heading 3
Row 1 Col 1
Row 1 Col 2
Row 1 Col 3
Row 2 Col 1
some colspan (note the double pipe)
Row 3 Col 1
Row 2 Col 2
Row 2 Col 3
Table rows have to start and end with a | for normal rows or a ^ for headers.
^ Heading 1 ^ Heading 2 ^ Heading 3 ^
| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 |
| Row 2 Col 1 | some colspan (note the double pipe) ||
| Row 3 Col 1 | Row 2 Col 2 | Row 2 Col 3 |
To connect cells horizontally, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators!
Vertical tableheaders are possible, too.
Heading 1
Heading 2
Heading 3
Row 1 Col 2
Row 1 Col 3
Heading 4
no colspan this time
Heading 5
Row 2 Col 2
Row 2 Col 3
As you can see, it’s the cell separator before a cell which decides about the formatting:
| ^ Heading 1 ^ Heading 2 ^
^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 |
^ Heading 4 | no colspan this time | |
^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 |
Note: Vertical spans (rowspan) are not possible.
You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text.
Table with alignment
right
center
left
left
right
center
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
This is how it looks in the source:
^ Table with alignment ^^^
| right| center |left |
|left | right| center |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
You can include non-parsed blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags code or file.
This is preformatted code all spaces are preserved: like <-this
This is pretty much the same, but you could use it to show that you quoted a file.
To let the parser ignore an area completely (ie. do no formatting on it), enclose the area either with nowiki tags or even simpler, with double percent signs %%.
This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it.
See the source of this page to see how to use these blocks.
DokuWiki can highlight sourcecode, which makes it easier to read. It uses the GeSHi Generic Syntax Highlighter – so any language supported by GeSHi is supported. The syntax is the same like in the code block in the previous section, but this time the name of the used language is inserted inside the tag. Eg. <code java>.
/**
* The HelloWorldApp class implements an application that
* simply displays "Hello World!" to the standard output.
*/class HelloWorldApp {publicstaticvoid main(String[] args){System.out.println("Hello World!"); //Display the string.}}