wiki:syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
wiki:syntax [2026/08/11 20:30] – external edit 127.0.0.1wiki:syntax [2026/08/17 22:24] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +See [[doc:start|more documentation]] 
 +
 ====== Formatting Syntax ====== ====== Formatting Syntax ======
  
Line 7: Line 9:
 DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. Of course you can **__//''combine''//__** all these. DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. Of course you can **__//''combine''//__** all these.
  
-  DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. +    DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts.   
-  Of course you can **__//''combine''//__** all these.+    Of course you can **__//''combine''//__** all these.
  
-Note that the formatting markers have to directly enclose the text, so ''%%** bold **%%'' with spaces inside the markers will not be formatted.+Note that the formatting markers have to directly enclose the text, with no space, so ''%%** bold **%%'' with spaces inside the markers will not be formatted.
  
-You can use <sub>subscript</sub> and <sup>superscript</sup>, too.+You can use <sub>subscript</sub> and <sup>superscript</sup>, too. This is DokuWiki (and MediaWiki).
  
-  You can use <sub>subscript</sub> and <sup>superscript</sup>, too.+    You can use <sub>subscript</sub> and <sup>superscript</sup>, too. This is DokuWiki (and MediaWiki).
  
 You can mark something as <del>deleted</del> as well. You can mark something as <del>deleted</del> as well.
  
-  You can mark something as <del>deleted</del> as well.+    You can mark something as <del>deleted</del> as well.
  
 **Paragraphs** are created from blank lines. If you want to **force a newline** without a paragraph, you can use two backslashes followed by a whitespace or the end of line. **Paragraphs** are created from blank lines. If you want to **force a newline** without a paragraph, you can use two backslashes followed by a whitespace or the end of line.
Line 26: Line 28:
 or followed by\\ a whitespace \\this happens without it. or followed by\\ a whitespace \\this happens without it.
  
-  This is some text with some linebreaks\\ Note that the +    This is some text with some linebreaks\\ Note that the 
-  two backslashes are only recognized at the end of a line\\ +    two backslashes are only recognized at the end of a line\\ 
-  or followed by\\ a whitespace \\this happens without it.+    or followed by\\ a whitespace \\this happens without it.
  
 You should use forced newlines only if really needed. You should use forced newlines only if really needed.
Line 40: Line 42:
 External links are recognized automagically: http://www.google.com or simply www.google.com - You can set the link text as well: [[http://www.google.com|This Link points to google]]. Email addresses like this one: <andi@splitbrain.org> are recognized, too. External links are recognized automagically: http://www.google.com or simply www.google.com - You can set the link text as well: [[http://www.google.com|This Link points to google]]. Email addresses like this one: <andi@splitbrain.org> are recognized, too.
  
-  DokuWiki supports multiple ways of creating links. External links are recognized +    DokuWiki supports multiple ways of creating links. External links are recognized 
-  automagically: http://www.google.com or simply www.google.com - You can set +    automagically: http://www.google.com or simply www.google.com - You can set 
-  link text as well: [[http://www.google.com|This Link points to google]]. Email +    link text as well: [[http://www.google.com|This Link points to google]]. Email 
-  addresses like this one: <andi@splitbrain.org> are recognized, too.+    addresses like this one: <andi@splitbrain.org> are recognized, too.
  
 ==== Internal ==== ==== Internal ====
Line 49: Line 51:
 Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]]. Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]].
  
-  Internal links are created by using square brackets. You can either just give +    Internal links are created by using square brackets. You can either just give 
-  a [[pagename]] or use an additional [[pagename|link text]].+    a [[pagename]] or use an additional [[pagename|link text]].
  
 [[doku>pagename|Wiki pagenames]] are converted to lowercase automatically, special characters are not allowed. [[doku>pagename|Wiki pagenames]] are converted to lowercase automatically, special characters are not allowed.
Line 56: Line 58:
 You can use [[some:namespaces]] by using a colon in the pagename. You can use [[some:namespaces]] by using a colon in the pagename.
  
-  You can use [[some:namespaces]] by using a colon in the pagename.+    You can use [[some:namespaces]] by using a colon in the pagename.
  
 For details about namespaces see [[doku>namespaces]]. For details about namespaces see [[doku>namespaces]].
Line 62: Line 64:
 Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to [[syntax#internal|this Section]]. Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to [[syntax#internal|this Section]].
  
-  This links to [[syntax#internal|this Section]].+    This links to [[syntax#internal|this Section]].
  
 Notes: Notes:
  
-  * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. +* Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. 
-  * DokuWiki does not use [[wp>CamelCase]] to automatically create links by default, but this behavior can be enabled in the [[doku>config]] file. Hint: If DokuWiki is a link, then it's enabled. +* DokuWiki does not use [[wp>CamelCase]] to automatically create links by default, but this behavior can be enabled in the [[doku>config]] file. Hint: If DokuWiki is a link, then it's enabled. 
-  * When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much.+* When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much.
  
 ==== Interwiki ==== ==== Interwiki ====
Line 74: Line 76:
 DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]].
  
-  DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. +    DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. 
-  For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]].+    For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]].
  
 ==== Windows Shares ==== ==== Windows Shares ====
Line 81: Line 83:
 Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate [[wp>Intranet]]. Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate [[wp>Intranet]].
  
-  Windows Shares like [[\\server\share|this]] are recognized, too.+    Windows Shares like [[\\server\share|this]] are recognized, too.
  
 Notes: Notes:
  
-  * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone"). +* For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone"). 
-  * For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http://kb.mozillazine.org/Links_to_local_pages_do_not_work|Mozilla Knowledge Base]]. However, there will still be a JavaScript warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in ''conf/lang/en/lang.php'' (more details at [[doku>localization#changing_some_localized_texts_and_strings_in_your_installation|localization]]): <code - conf/lang/en/lang.php>+* For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http://kb.mozillazine.org/Links_to_local_pages_do_not_work|Mozilla Knowledge Base]]. However, there will still be a JavaScript warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in ''conf/lang/en/lang.php'' (more details at [[doku>localization#changing_some_localized_texts_and_strings_in_your_installation|localization]]): 
 +<code - conf/lang/en/lang.php>
 <?php <?php
 /** /**
Line 99: Line 102:
 You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this: You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this:
  
-  [[http://php.net|{{wiki:dokuwiki-128.png}}]]+    [[http://php.net|{{wiki:dokuwiki-128.png}}]]
  
 [[http://php.net|{{wiki:dokuwiki-128.png}}]] [[http://php.net|{{wiki:dokuwiki-128.png}}]]
Line 111: Line 114:
 You can add footnotes ((This is a footnote)) by using double parentheses. You can add footnotes ((This is a footnote)) by using double parentheses.
  
-  You can add footnotes ((This is a footnote)) by using double parentheses.+    You can add footnotes ((This is a footnote)) by using double parentheses.
  
 ===== Sectioning ===== ===== Sectioning =====
Line 121: Line 124:
 == Headline Level 5 == == Headline Level 5 ==
  
-  ==== Headline Level 3 ==== +    ==== Headline Level 3 ==== 
-  === Headline Level 4 === +    === Headline Level 4 === 
-  == Headline Level 5 ==+    == Headline Level 5 ==
  
-By using four or more dashes, you can make a horizontal line:+or 
 + 
 +### level 3 
 +#### level 4 
 +##### level 5 
 + 
 +    ### level 3 
 +    #### level 4 
 +    ##### level 5 
 + 
 +By using three or more dashes, you can make a horizontal line: 
 + 
 +--- 
 + 
 +    ---
  
 ---- ----
 +
 +    ----
 +
 +------------
 +
 +    ------------
  
 ===== Media Files ===== ===== Media Files =====
Line 204: Line 227:
 ===== Lists ===== ===== 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.+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. First, here is the native DokuWiki syntax:
  
   * This is a list   * This is a list
   * The second item   * The second item
     * You may have different levels     * You may have different levels
 +      * and deeper levels: indent by 2 spaces each time
   * Another item   * Another item
- 
-  - The same list but ordered 
-  - Another item 
-    - Just use indention for deeper levels 
-  - That's it 
  
 <code> <code>
Line 220: Line 239:
   * The second item   * The second item
     * You may have different levels     * You may have different levels
 +      * and deeper levels
   * Another item   * Another item
 +</code>
  
-  - The same list but ordered +Also take a look at the DokuWiki [[doku>faq:lists|FAQ on list items]]. 
-  - Another item + 
-    - Just use indention for deeper levels +However, because of the conflict between DokuWiki and Markdown syntax, to do an ordered list you need Markdown: 
-  - That's it+ 
 +1. First in an ordered list 
 +2. Second, as expected 
 +9. Third, output as "3" even though numbered "9" in the code 
 + 
 +<code> 
 +1. First in an ordered list 
 +2. Second, as expected 
 +9. Third, output as "3" even though numbered "9" in the code
 </code> </code>
  
-Also take a look at the [[doku>faq:lists|FAQ on list items]]. 
  
 ===== Text Conversions ===== ===== Text Conversions =====
Line 319: Line 347:
 Table rows have to start and end with a ''|'' for normal rows or a ''^'' for headers. Table rows have to start and end with a ''|'' for normal rows or a ''^'' for headers.
  
-  ^ Heading 1      ^ Heading 2       ^ Heading 3          ^ +    ^ Heading 1      ^ Heading 2       ^ Heading 3          ^ 
-  | Row 1 Col 1    | Row 1 Col 2     | Row 1 Col 3        | +    | Row 1 Col 1    | Row 1 Col 2     | Row 1 Col 3        | 
-  | Row 2 Col 1    | some colspan (note the double pipe) || +    | Row 2 Col 1    | some colspan (note the double pipe) || 
-  | Row 3 Col 1    | Row 3 Col 2     | Row 3 Col 3        |+    | 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! 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!
Line 335: Line 363:
 As you can see, it's the cell separator before a cell which decides about the formatting: As you can see, it's the cell separator before a cell which decides about the formatting:
  
-  |              ^ Heading 1            ^ Heading 2          ^ +    |              ^ Heading 1            ^ Heading 2          ^ 
-  ^ Heading 3    | Row 1 Col 2          | Row 1 Col 3        | +    ^ Heading 3    | Row 1 Col 2          | Row 1 Col 3        | 
-  ^ Heading 4    | no colspan this time |                    | +    ^ Heading 4    | no colspan this time |                    | 
-  ^ Heading 5    | Row 2 Col 2          | Row 2 Col 3        |+    ^ 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. You can have rowspans (vertically connected cells) by adding ''%%:::%%'' into the cells below the one to which they should connect.
Line 349: Line 377:
 Apart from the rowspan syntax those cells should not contain anything else. Apart from the rowspan syntax those cells should not contain anything else.
  
-  ^ Heading 1      ^ Heading 2                  ^ Heading 3          ^ +    ^ Heading 1      ^ Heading 2                  ^ Heading 3          ^ 
-  | Row 1 Col 1    | this cell spans vertically | Row 1 Col 3        | +    | Row 1 Col 1    | this cell spans vertically | Row 1 Col 3        | 
-  | Row 2 Col 1    | :::                        | Row 2 Col 3        | +    | Row 2 Col 1    | :::                        | Row 2 Col 3        | 
-  | Row 3 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. 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.
Line 363: Line 391:
 This is how it looks in the source: This is how it looks in the source:
  
-  ^           Table with alignment           ^^^ +    ^           Table with alignment           ^^^ 
-  |         right|    center    |left          | +    |         right|    center    |left          | 
-  |left          |         right|    center    | +    |left          |         right|    center    | 
-  | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |+    | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
  
 Note: Vertical alignment is not supported. Note: Vertical alignment is not supported.
Line 379: Line 407:
 The same is true for %%//__this__ text// with a smiley ;-)%%. The same is true for %%//__this__ text// with a smiley ;-)%%.
  
-  <nowiki> +    <nowiki> 
-  This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. +    This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. 
-  </nowiki> +    </nowiki> 
-  The same is true for %%//__this__ text// with a smiley ;-)%%.+    The same is true for %%//__this__ text// with a smiley ;-)%%.
  
 ===== Code Blocks ===== ===== 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>%%''.+You can include code blocks into your documents by either indenting them by at least four 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 text is indented by four spaces.
  
 <code> <code>
Line 400: Line 428:
 Those blocks were created by this source: Those blocks were created by this source:
  
-    This is text is indented by two spaces.+      This is text is indented by four spaces.
  
-  <code> +    <code> 
-  This is preformatted code all spaces are preserved: like              <-this +    This is preformatted code all spaces are preserved: like              <-this 
-  </code>+    </code>
  
-  <file> +    <file> 
-  This is pretty much the same, but you could use it to show that you quoted a file. +    This is pretty much the same, but you could use it to show that you quoted a file. 
-  </file>+    </file>
  
 ==== Syntax Highlighting ==== ==== Syntax Highlighting ====
Line 464: Line 492:
 **Example:** **Example:**
  
-  {{rss>http://slashdot.org/index.rss 5 author date 1h }}+     {{rss>http://slashdot.org/index.rss 5 author date 1h }}
  
 {{rss>http://slashdot.org/index.rss 5 author date 1h }} {{rss>http://slashdot.org/index.rss 5 author date 1h }}
  • wiki/syntax.1786480255.txt.gz
  • Last modified: 2026/08/11 20:30
  • by 127.0.0.1