Dies ist eine alte Version des Dokuments!


DokuWiki

Diese Seite erklärt den Umgang mit DokuWiki. Fragen und Anregungen bitte per Email an Martin Züger.

Einfache Text Formatierung

DokuWiki unterstützt fette, kursive, unterstrichene und nichtproportionale Textformatierung. Natürlich kann dies auch beliebig kombiniert werden.

DokuWiki unterstützt **fette**, //kursive//, __unterstrichene__ und ''nichtproportionale'' Textformatierung.
Natürlich kann dies auch **__//''beliebig kombiniert''//__** werden.

Text kann auch hoch- oder tiefgestellt werden.

Text kann auch <sub>hoch-</sub> oder <sup>tiefgestellt</sup> werden.

Auch kann ein Text durchgestrichen werden.

Auch kann ein Text <del>durchgestrichen</del> werden.

Abschnitte werden automatisch durch eine leere Zeile generiert. Um einen einfachen Zeilenumbruch zu erstellen, ohne einen neuen Absatz zu beginnen, können zwei Backslashes verwendet werden, gefolgt von einem Zeilenumbruch oder Leerzeichen.

DokuWiki unterstützt verschiedene Arten von Links.

Extern

Externe Links werden automatisch genriert: http://www.ntb.ch oder einfach www.ntb.ch - Der Linktext kann natürlich auch explizit vorgegeben werden: Hier geht's zum NTB!. Emailadressen können natürlich auch verlinkt werden: info@ntb.ch.

Externe Links werden automatisch genriert: http://www.ntb.ch oder einfach www.ntb.ch - Der Linktext kann natürlich auch explizit vorgegeben werden:
[[http://www.ntb.ch | Hier geht's zum NTB!]]. Emailadressen können natürlich auch verlinkt werden: <info@ntb.ch>.

Intern

Interne Links werden ebenfalls mit eckigen Klammern erstellt. Dazu wird einfach entweder nur der Seitenname oder alternativ noch ein Linktex angegeben.

Interne Links werden ebenfalls mit eckigen Klammern erstellt. Dazu wird einfach entweder nur der [[Seitenname]] oder alternativ noch ein [[Seitenname | Linktex]] angegeben.

Wiki Seitennamen werden automatisch in Kleinbuchstaben umgewandelt. Sonderzeichen sind nicht erlaubt und werden durch Underlines ersetzt. Auf dem Infoportal sind nur Seitennamen mit normalen Buchstaben, Zahlen und Leerzeichen erlaubt.

Für eine hirarchische Strukturierung werden Namensräume unterstützt. Diese werden durch Doppelpunkte getrennt: Seitentitel.

Für eine hirarchische Strukturierung werden Namensräume unterstützt. Diese werden durch Doppelpunkte getrennt: [[Namensraum:Seitentitel]].

Eine detailierte Erklärung ist auf der DokuWiki-Seite vorhanden: namespaces.

Interwiki

DokuWiki unterstütz auch Interwiki Links. Damit lassen sich einfach Links auf andere Wikis erstellen. Beispiel für einen Link zum Wikipedia Artikel über die NTB.

DokuWiki unterstütz auch [[doku>Interwiki]] Links. Damit lassen sich einfach Links auf andere Wikis erstellen. Beispiel für einen Link zum Wikipedia Artikel über die [[wp>Interstaatliche Hochschule für Technik NTB Buchs | NTB]].

Windows Freigaben

Windowsfreigaben wie z.B. dieses hier werden auch unterstütz. Solche Links sollten jedoch auf jeden Fall vermieden werden, da sie einerseits nur NTB-intern funktionieren und auch hier nur je nach Browser und Version.

Windowsfreigaben wie z.B. [[\\ntb\exchange|dieses hier]] werden auch unterstütz.

Verlinkte Bilder

Es können natürlich auch Bilder verlinkt werden, nicht nur Texte. Dazu ist einfach der Text in einem Link durch die entsprechnde Syntax für ein Bild (siehe weiter unten) zu ersetzen:

[[http://www.php.net|{{Intern:NTB-Logo_blau_grau.png}}]]

Fussnoten

Fussnoten können ebenfalls hinzugefügt werden 1).

Fussnoten können ebenfalls hinzugefügt werden ((Wie zum Beispiel diese hier)).

Überschriften

DokuWiki unterstützt bis zu 5 Überschrifts-Hirarchien. Überschrift 1 wird für den Seitentitel verwendet. Für die Überschriften 2 bis 4 wird automatisch ein Inhaltsverzeichnis auf der linken Seite erstellt (erst ab 3 Überschriften). Dies kann mit ~~NOTOC~~ unterbunden werden (siehe Abschnitt Makros.

Headline Level 2

Headline Level 3

Headline Level 4

Headline Level 5
===== Headline Level 2 =====
==== Headline Level 3 ====
=== Headline Level 4 ===
== Headline Level 5 ==

Werden mehr als 4 Bindestriche ( ---- ) hintereinander geschrieben, so wird eine horizontale Linie gezeichnet.


Bilder und andere Dateien

You can include external and internal images with curly brackets. Optionally you can specify the size of them.

Real size:

Resize to given width:

Resize to given width and height2):

Resized external image:

Real size:                        {{wiki:dokuwiki-128.png}}
Resize to given width:            {{wiki:dokuwiki-128.png?50}}
Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}
Resized external image:           {{http://de3.php.net/images/php.gif?200x50}}

By using left or right whitespaces you can choose the alignment.

{{ wiki:dokuwiki-128.png}}
{{wiki:dokuwiki-128.png }}
{{ wiki:dokuwiki-128.png }}

Of course, you can add a title (displayed as a tooltip by most browsers), too.

This is the caption

{{ wiki:dokuwiki-128.png |This is the caption}}

If you specify a filename (external or internal) that is not an image (gif, jpeg, png), then it will be displayed as a link instead.

For linking an image to another page see Image Links above.

Lists

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
  1. The same list but ordered
  2. Another item
    1. Just use indention for deeper levels
  3. 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

Also take a look at the FAQ on list items.

Boxen

Boxen können relativ leicht erzeugt werden. Einige Beispiele:

Titel

Das ist die einfachste möglichkeit für eine Box
<box | Titel > Das ist die einfachste möglichkeit für eine Box </box>

Das selbe noch mit etwas Farbe und rechts ausgerichtet:

Titel

Das ist die einfachste Möglichkeit für eine farbige Box
<box 70% right green | Titel > Das ist die einfachste Möglichkeit für eine farbige Box </box>

Oder als Warnung:

Titel

Das ist eine einfache Möglichkeit für eine Warnung
<box red 100% | Titel > Das ist eine einfache Möglichkeit für eine Warnung </box>

Die blauen Boxen bedürfen noch einer Überarbeitung:

Titel

Blaue Boxen sehen noch sehr hässlich aus…
<box blue | Titel > Blaue Boxen sehen noch sehr hässlich aus... </box>

Zur Zeit funktionieren die Boxen leider noch nicht mit Code Inhalt:

Beispiel

Das ist ein Beispiel mit etwas Code:
<code java>
public class HalloWelt {
  public static void main(String[] args) {
    System.out.println("Hallo Welt!");
  }
}
</code>
Und hier könnte noch eine Erkärung stehen.
<box 50% center green | Beispiel>
  Das ist ein Beispiel mit etwas Code:
  <code java>
  public class HalloWelt {
    public static void main(String[] args) {
      System.out.println("Hallo Welt!");
    }
  }
  </code>
  Und hier könnte noch eine Erkärung stehen.
</box>

Text to Image Conversions

DokuWiki converts commonly used emoticons to their graphical equivalents. Those Smileys and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki:

  • 8-) 8-)
  • 8-O 8-O
  • :-( :-(
  • :-) :-)
  • =) =)
  • :-/ :-/
  • :-\ :-\
  • :-? :-?
  • :-D :-D
  • :-P :-P
  • :-O :-O
  • :-X :-X
  • :-| :-|
  • ;-) ;-)
  • ^_^ ^_^
  • :?: :?:
  • :!: :!:
  • LOL LOL
  • FIXME FIXME
  • DELETEME DELETEME

Text to HTML Conversions

Typography: DokuWiki can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.

→ ← ↔ ⇒ ≤ ⇔ » « – — 640×480 © ™ ® „He thought 'It's a man's world'…“

-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r)
"He thought 'It's a man's world'..."

The same can be done to produce any kind of HTML, it just needs to be added to the pattern file.

There are three exceptions which do not come from that pattern file: multiplication entity (640×480), 'single' and „double quotes“. They can be turned off through a config option.

Quoting

Some times you want to mark some text to show it's a reply or comment. You can use the following syntax:

I think we should do it

> No we shouldn't

>> Well, I say we should

> Really?

>> Yes!

>>> Then lets do it!

I think we should do it

No we shouldn't
Well, I say we should
Really?
Yes!
Then lets do it!

Tables

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 3 Col 2 Row 3 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 3 Col 2     | Row 3 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        |

You can have rowspans (vertically connected cells) by adding ::: into the cells below the one to which they should connect.

Heading 1 Heading 2 Heading 3
Row 1 Col 1 this cell spans vertically Row 1 Col 3
Row 2 Col 1 Row 2 Col 3
Row 3 Col 1 Row 2 Col 3

Apart from the rowspan syntax those cells should not contain anything else.

^ Heading 1      ^ Heading 2                  ^ Heading 3          ^
| Row 1 Col 1    | this cell spans vertically | Row 1 Col 3        |
| Row 2 Col 1    | :::                        | Row 2 Col 3        |
| Row 3 Col 1    | :::                        | Row 2 Col 3        |

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 |

Note: Vertical alignment is not supported.

No Formatting

If you need to display text exactly like it is typed (without any formatting), 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. The same is true for //__this__ text// with a smiley ;-).

<nowiki>
This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it.
</nowiki>
The same is true for %%//__this__ text// with a smiley ;-)%%.

Code Blocks

You can include code 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 text is indented by two spaces.
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.

Those blocks were created by this source:

  This is text is indented by two spaces.
<code>
This is preformatted code all spaces are preserved: like              <-this
</code>
<file>
This is pretty much the same, but you could use it to show that you quoted a file.
</file>

Syntax Highlighting

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 and file blocks in the previous section, but this time the name of the used language is inserted inside the tag. Eg. <code java> or <file java>.

/**
 * 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 language strings are currently recognized: abap, actionscript-french, actionscript, actionscript3, ada, apache, applescript, asm, asp, autoit, avisynth, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, cil, cmake, cobol, cpp, cpp-qt, csharp, css, d, dcs, delphi, diff, div, dos, dot, eiffel, email, erlang, fo, fortran, freebasic, genero, glsl, gml, gnuplot, groovy, gettext, haskell, hq9plus, html, idl, ini, inno, intercal, io, java5, java, javascript, kixtart, klonec, klonecpp, latex, lisp, locobasic, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, make, matlab, mirc, modula3, mpasm, mxml, mysql, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle8, oracle11, pascal, perl, per, php-brief, php, pic16, pixelbender, plsql, povray, powershell, progress, prolog, properties, providex, python, qbasic, rails, rebol, reg, robots, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, tcl, teraterm, text, thinbasic, tsql, typoscript, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xml, xorg_conf, xpp, z80

Downloadable Code Blocks

When you use the <code> or <file> syntax as above, you might want to make the shown code available for download as well. You can to this by specifying a file name after language code like this:

<file php myexample.php>
<?php echo "hello world!"; ?>
</file>
myexample.php
<?php echo "hello world!"; ?>

If you don't want any highlighting but want a downloadable file, specify a dash (-) as the language code: <code - myfile.foo>.

Makros

Die folgenden Makros stehen zur Zeit zur verfügung:

Makro Beschreibung
~~NOTOC~~ Wird dieses Makro im Dokument gefunden, so wird kein Inhaltsverzeichnis erstellt. Es sollte immer zuoberst gleich nach dem Seitentitel eingefügt werden.
~~NOCACHE~~ Standardmässig speichert DokuWiki alle inhalte zwischen und rendert die Seiten nur nach einer Änderung neu. Mit diesem Makro kann DokuWiki gezwungen werden, eine Seite bei jeder Auslieferung neu zu rendern. Da dadurch die Serverlast je nach Seitenaufrufen stark erhöht werden kann, sollte auf den Einsatz dieses Makros wenn möglich verzichtet werden.
~~CLEARFLOAT~~ Textfluss aufheben. Sehr nützlich im Zusammenhang mit Boxen und Bildern.
1)
Wie zum Beispiel diese hier
2)
when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing