DokuWiki is characterised by simple text formatting, among other things. This means that the files containing the content remain easy to read. The possible formatting types that can be used within the editor are listed in the following sections. Some of the formatting presented here can also be accessed directly via the quick buttons. You can find a first example of how the structure of a page can look if you display this page in source code mode. To do this, click on the „Preview“ button.
To try out or practise, you can use the Playground can be used for testing or practising.
Because we always want to have PC CADDIE in one line in the wiki, we write it as follows: PC CADDIE
Please go to EDIT and have a look at it!!! Otherwise you won't see what is meant…
DokuWiki supports bold, italics, underlined and bold
(Thick) text. Of course everything can be combined
can be combined.
DokuWiki supports **bold**, //italics//, __underlined__ and ''bold'' text. Of course, everything can also be **__//''combined''//__** can be combined.
There are also deep-set and superscript text.
There are also <sub>subscript</sub> and <sup>superscript</sup> text.
Text can be deleted1) can be marked as deleted.
Text can be marked as <del>deleted</del> can be marked as deleted.
A paragraph is created by an empty line. A new line (line break) can be created by two „backslashes“ (backslashes inverted: \\) followed by a space.
This is an example text with some line breaks.
Note: The two backslashes
are only recognised if they are at the end of the line
or if they are followed by a
followed by a space.
This is how\\it looks without spaces.
This is an example text with some line breaks.\\ Note: The two backslashes are only recognised if they are at the end of the line\\ or if they are followed by a\\ followed by a space.\\ This is how\\it looks without spaces.
Line breaks with two „backslashes“ (backslashes inverted: \\) should only be used if they are absolutely necessary.
The content of a page can be structured with five different levels, separated by headings. The headings are framed with a maximum of six „=“, depending on their size. H1 is the heading at the highest level. The easiest way to create headings is to use the toolbar. The headings are inserted using the buttons that display an „H“.
It is usefulif there is always a level 1 heading at the beginning of an article.
If there are more than three headings on a page, a table of contents is automatically created which lists all the headings.
If this table of contents is not to be created, the command: ~~NOTOC~~
must be included in the page.
====== Heading level 1 ====== ===== Heading level 2 ===== ==== Heading level 3 ==== === Heading level 4 === == Heading level 5 ==
No further formatting can be carried out within headings by default! (s. FAQ - Header links)
To display text as it was written, regardless of whether it contains DokuWiki formatting or other formatting, you can start each line with two spaces (as used in this page) or use one of the identifiers „code“ or „file“. line with two spaces (as used in this page) or use one of the identifiers „code“ or „file“:
Mit "code": In diesem Text werden keine überflüssigen Leerzeichen entfernt: wie hier <-- zwischen
<file plain Beispiel.txt>
Mit dem Bezeichner "file" kann ein bestimmter Abschnitt als einzelner Bestandteil
auf einer Seite zum Download angeboten werden.
</file>
The syntax highlighting described in the section below can also be activated within „file“. syntax highlighting described in the section below.
#!/usr/bin/perl print "Hello World!\n";
<file perl HelloWorld.pl> #!/usr/bin/perl print "Hello World!\n"; </file>
To disable any conversion by DokuWiki, enclose the corresponding area with „nowiki“ identifiers or shorter with double percent signs %%
.
This text contains links like: http://www.splitbrain.org and **formatting** but they are not converted and appear as normal text.
This text is now marked with %%
and has the same effect as "nowiki".
"This text contains links like: http://www.splitbrain.org and **formatting** but they are not converted and appear as normal text."
Just look at the source code of this page (press the „Edit“ button) to see how these blocks are applied.
DokuWiki recognises syntax highlighting for source code to increase its readability. For this purpose GeSHi „Generic Syntax Highlighter“ is used. This means that every programming language known to GeSHi is supported.
The same identifier is used as in the previous section, except that it now also contains the name of the language:
<code java> Quelltext </code>
/** * The HelloWorldApp class implements an application that * simply displays "Hello World!" to the standard output. */ class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); //Display the string. } }
The following languages are supported: actionscript, actionscript-french, ada, apache, applescript, asm, asp, bash, caddcl, cadlisp, c, c_mac, cpp, csharp, css, delphi, diff, d, div, dos, eiffel, freebasic, gml, html4strict, ini, inno, javajavascript, lisp, lua, matlab, mpasm, nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, perl, php-brief, phppython, qbasic, scheme, sdlbasic, smarty, sql, ruby, vb, vbnet, vhdl, visualfoxpro, xml
To mark a text as a quote or comment, the „greater than“ character is used as follows:
I think we should.
> No, we should not.
>> Yes we should!
> Really?
>> Yes!
>>> Then let's do it!
>>> Comments or quotations can also extend over several lines, as this completely nonsensical text shows. To mark a text as a quote or comment, the "greater than" sign is used as follows
I think we should do it
No, we shouldn't.
Yes we should!
Really?
Yes!
Then let's do it
Comments or quotations can also extend over several lines, as this completely nonsensical text shows. To mark a text as a quote or comment, the „greater than“ sign is used as follows
If you want to prevent DokuWiki from carrying out any formatting or conversions in the text, you can use the percentage signs
%%[[wiki:testseite|Testseite]]%%
The output would then look like this [[wiki:testseite|Test page]]
Footnotes 2) are represented by a double round bracket 3). The text between the brackets is written at the end of the page. The order and thus the numbering is taken over by DokuWiki.
Footnotes ((this is a footnote)) are represented by a double round bracket ((a second footnote))
Five different types of links can be used with DokuWiki:
External links (links to other websites or files) are recognised automatically: http://www.google.com or simply www.google.com. Links can also be hidden behind your own terms: hier is google. E-mail addresses are placed in angle brackets: andi@splitbrain.org.
External links are recognised automatically: http://www.google.com or simply www.google.com. Links can also be hidden behind your own terms: [[http://www.google.com|hier is google]]. E-mail addresses are placed in angle brackets: <andi@splitbrain.org>.
Internal links, i.e. links to pages within DokuWiki, are enclosed in double square brackets („Alt Gr+8“ or Alt Gr+9 on Windows or Option+5 and Option+6 on Apple operating systems): pagename
A link can also be hidden behind a term or a description: Description for a link.
Internal links are placed in double square brackets:
A link can also be hidden behind a term or a description: [[pagename|Description for a link]].
File names for new pages in the wiki are automatically converted to lower case! Umlauts and special characters are not allowed!
A colon resolves name ranges in the wiki: namespaces
A colon resolves name ranges in the wiki:[[de:namespaces]]
Further information on namespaces: de:namespaces .
It is also possible to link to a specific section within the document (anchor). The section name is appended to the page name, separated by a double cross (#).
This example links to this section.
This example links to [[en:wiki:syntax#intern|this section]].
Notes:
DokuWiki also supports links to other wikis, so-called de:interwiki links. A link to the Wikipedia page about wikis:Wiki
DokuWiki also supports links to other wikis, so-called [[doku>de:interwiki]] links.
A link to the Wikipedia page about wikis:[[wpde>Wiki]]
DokuWiki also recognises links to Windows shares: shared-folder. However, this only makes sense in a homogeneous user group (see Intranet ).
[[\\server\freigabe|this]].
Note:
Images can be used for a link to an internal or external file. To do this, the syntax for displaying links is simply combined with the syntax for displaying images (see below):
[[http://www.php.net|{{wiki:dokuwiki-128.png}}]]
Please note: Image formatting is the only formatting that can be used in link names!
To be able to save images in the DokuWiki, the user must have the appropriate authorisation (ACL). At least the authorisation „Upload“ is required for uploading and „Delete“ for deleting for the namespace namespace is required.
Both external and internal images can be integrated with curly brackets. internal images can be included. In this example, the image is called „dokuwiki-128.png“. Its size can be specified as an option:
Specify size for external images:
Original size: {{wiki:dokuwiki-128.png}}
Specify a width: {{wiki:dokuwiki-128.png?50}}
Specify width and height: {{wiki:dokuwiki-128.png?200x50}}
Specify size for external images: {{http://de3.php.net/images/php.gif?200x50}}
With spaces to the right and/or left within the brackets, an image can be aligned horizontally (left, centred, right).
When aligning and using a title, make sure that the title comes after the space:
{{wiki:dokuwiki-128.png |Left-aligned}} {{ wiki:dokuwiki-128.png |centred }} {{ wiki:dokuwiki-128.png|Right-aligned}}
Titles, displayed as tooltips in most browsers, can also be specified.
{{ wiki:dokuwiki-128.png |This is a title}}
If a file is specified that does not contain an image (gif, jpeg, png
), it is displayed as a link and offered for download.
{{ wiki:dokuwiki-128.txt |Beispiel}}
Images are automatically created with a link to your Metadaten - e.g:
This behaviour can be prevented via the option ?nolink4). this, often undesirable, behaviour cannot currently (13.03.2009) be deactivated for the entire DokuWiki)):
In addition, ?direct can be used to link directly to the image, e.g. as a full view:
DokuWiki recognises unsorted and numbered lists. To create a list entry, start a line with two spaces. These spaces are then followed by a „*“ for unsorted lists or a „-“ for numbered lists.
* Dies ist ein Eintrag einer unsortierten Liste * Ein zweiter Eintrag * Unterschiedliche Ebenen einer Liste durch Hinzufügen von weiteren zwei Leerzeichen * Noch ein Eintrag - Dies ist ein Eintrag einer nummerierte Liste - Ein zweiter Eintrag - Unterschiedliche Ebenen einer Liste durch Hinzufügen von weiteren zwei Leerzeichen - Noch ein Eintrag
DokuWiki makes it very easy to create tables:
Fields in a table start with „|“ for a normal field or with a „^“ for a highlighted field.
^ highlighted ^ for example for ^ a title line ^ | Line 1 Column 1 | Line 1 Column 2 | Line 1 Column 3 | | Row 2 Column 1 | double column width (note the double vertical line) || | Row 3 Column 1 | Row 2 Column 2 | Row 2 Column 3 |
Cells across several columns are created if, as shown above, as many „|“ or „^“ without spaces in between are placed at the end of such a column as there are columns to be bridged. In short: All rows of a table must have the same number of field separators „|“ or „^“.
Highlighted fields in vertical alignment are also possible.
highlighted 1 | highlighted 2 | |
---|---|---|
highlighted 3 | Line 1 Column 2 | Line 1 Column 3 |
highlighted 4 | Line 2 Column 2 | |
highlighted 5 | Line 3 Column 2 | Line 3 Column 3 |
As we can see, the field separator („|“ or „^“) in front of a cell determines its appearance:
| ^ highlighted 1 ^ highlighted 2 ^ ^ highlighted 3 | Line 1 Column 2 | Line 1 Column 3 | ^ highlighted 4 | Line 2 Column 2 | | ^ highlighted 5 | Line 3 Column 2 | Line 3 Column 3 |
Fields over several rows (vertically connected cells) can be joined by adding :::
in the cell to be joined.
Title row 1 | Title row 2 | Title row 3 |
---|---|---|
Row 1 Column 1 | This cell is vertically connected | Row 1 Column 3 |
Row 2 Column 1 | Row 2 Column 3 | |
Line 3 Column 1 | Line 3 Column 3 |
Apart from the three colons, the cell to be joined must not have any other content.
^ Title row 1 ^ Title row 2 ^ Title row 3 ^ | Row 1 Column 1 | This cell is vertically connected | Row 1 Column 3 | | Row 2 Column 1 | ::: | Row 2 Column 3 | | Line 3 Column 1 | ::: | Line 3 Column 3 |
Fields over several columns (horizontally connected cells) can be created by adding ^
or |
in the cell to be joined.
Title row 1 | Title row 2 | Title row 3 |
---|---|---|
Row 1 Column 1 | This cell is connected horizontally | |
Row 2 Column 1 | Row 2 Column 2 | Row 2 Column 3 |
Line 3 Column 1 | Line 3 Column 2 | Line 3 Column 3 |
Apart from the three colons, the cell to be joined must not have any other content.
^ Title row 1 ^ Title row 2 ^ Title row 3 ^ | Row 1 Column 1 | This cell is connected horizontally || | Row 2 Column 1 | Row 2 Column 2 | Row 2 Column 3 | | Line 3 Column 1 | Line 3 Column 2 | Line 3 Column 3 |
The content of a cell can be aligned horizontally within the cell:
Table with alignment | ||
---|---|---|
Right | Centre | Left centre |
Left centre | Right centre | Centre |
xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
This is what the formatting looks like:
^ Table with alignment ^^^ | Right| Centre |Left centre | |Left centre | Right centre| Centre | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
Note on the vertical bar character: this character can be reached on a PC keyboard by pressing the „<“ bei zusätzlich gedrückter „AltGr“-Taste. Ist dort auch aufgedruckt. Apple-Nutzer erreichen das Zeichen mit der Wahltaste („Alt“) und der „7“. |
Mit vier aufeinander folgenden Minuszeichen (alleine in einer Zeile) kann eine horizontale Linie erzeugt werden:
----
DokuWiki verwandelt oft genutzte Emoticons zu kleinen Smiley-Grafiken.
Weitere Smiley-Grafiken können im Ordner „smily“ abgelegt und dann in der Datei conf/smileys.conf
bzw. für benutzereigene Smileys unter conf/smileys.local.conf
eingetragen werden.
Hier ist nun eine Übersicht der standardmäßig in DokuWiki enthaltenen Smileys:
| | | | | | | | | | | | | | | | | | | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8-) | 8-O | :-( | :-) | =) | :-/ | :-\ | :-? | :-D | :-P | :-O | :-X | :-| | ;-) | :?: | :!: | ^_^ | LOL | FIXME | DELETEME |
DokuWiki kann einfache Textzeichen in ihre typografischen Entsprechungen umwandeln. Hier eine Liste aller Zeichen, die DokuWiki kennt:
→ ← ↔ ⇒ ⇐ ⇔ » « – — 640×480 © ™ ® „He thought 'It's a man's world'…“
-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) "He thought 'It's a man's world'..."
Bitte beachtet: Diese Umwandlungen können in der Konfigurationsdatei abgestellt werden
In einer Seite kann sowohl HTML als auch PHP direkt benutzt werden.
<html> This is some <font color=„red“ size=„+1“>HTML-Code</font> </html>
<html> This is some <font color="red" size="+1">HTML-Code</font> </html>
<php> echo 'A logo generated by PHP:'; echo '<img src=„' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '“ alt=„PHP Logo !“ />'; </php>
<php> echo 'A logo generated by PHP:'; echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; </php>
AttentionThe inclusion of HTML and PHP in a page can be switched off in the configuration file 5). If this option is activated, the source code of these sections is displayed as text and not executed.
CautionIncluding HTML and PHP on a page on the Internet is usually a serious security risk! This function is only intended for the intranet!
Some syntax commands influence how Dokuwiki displays a page when it is called up. The following control macros are available:
Macro | Description |
---|---|
~~NOTOC~~ | If this macro is included in a page, the Table of Content is not created. |
~~NOCACHE~~ | All pages are cached for performance reasons. Under certain circumstances, however, this behaviour is not desired. When this macro is inserted, DokuWiki is instructed to rebuild the content of the page. |
The syntax of DokuWiki can be extended by plugins. How the individual plugins are used can be found on the corresponding description pages. The following plugins are available on this DokuWiki installation: