User Tools

Site Tools


en:wiki:syntax

Differences

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

Link to this comparison view

en:wiki:syntax [2024/02/08 08:02] – created - external edit 127.0.0.1en:wiki:syntax [2025/06/19 20:18] (current) – Automatic push translation domele
Line 1: Line 1:
 ====== Formatting Syntax ====== ====== Formatting Syntax ======
  
-[[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing "Edit this page". If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too.+[[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing "Edit this page". If you want to try something, just use the [[en:playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too.
  
 ===== Basic Text Formatting ===== ===== Basic Text Formatting =====
Line 45: Line 45:
 ==== Internal ==== ==== Internal ====
  
-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 [[en:wiki:pagename]] or use an additional [[en:wiki: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 [[en:wiki:pagename]] or use an additional [[en:wiki: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 56:
   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]] .
  
-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 [[en:wiki:syntax#internal|this Section]].
  
-  This links to [[syntax#internal|this Section]].+  This links to [[en:wiki:syntax#internal|this Section]].
  
 Notes: Notes:
  
-  * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones.+  * Links to [[en:wiki:syntax|existing pages]] are shown in a different style from [[en:wiki: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.
Line 70: Line 70:
 ==== Interwiki ==== ==== Interwiki ====
  
-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 ====
  
-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.
Line 95: Line 95:
 ==== Image Links ==== ==== Image Links ====
  
-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 [[en:wiki:syntax#images_and_other_files|images]] (see below) like this:
  
   [[http://php.net|{{wiki:dokuwiki-128.png}}]]   [[http://php.net|{{wiki:dokuwiki-128.png}}]]
Line 103: Line 103:
 Please note: The image formatting is the only formatting syntax accepted in link names. Please note: The image formatting is the only formatting syntax accepted in link names.
  
-The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links).+The whole [[en:wiki:syntax#images_and_other_files|image]] and [[en:wiki:syntax#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links).
  
 ===== Footnotes ===== ===== Footnotes =====
Line 131: Line 131:
 You can include external and internal [[doku>images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them. You can include external and internal [[doku>images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them.
  
-Real size:                        {{wiki:dokuwiki-128.png}}+Real size:    {{wiki:dokuwiki-128.png}}
  
-Resize to given width:            {{wiki:dokuwiki-128.png?50}}+Resize to given width:     {{wiki:dokuwiki-128.png?50}}
  
 Resize to given width and height((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)): {{wiki:dokuwiki-128.png?200x50}} Resize to given width and height((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)): {{wiki:dokuwiki-128.png?200x50}}
  
-Resized external image:           {{https://www.php.net/images/php.gif?200x50}}+Resized external image:           {{https://www.php.net/images/php.gif?200x50}}
  
-  Real size:                        {{wiki:dokuwiki-128.png}} +  Real size:    {{wiki:dokuwiki-128.png}} 
-  Resize to given width:            {{wiki:dokuwiki-128.png?50}}+  Resize to given width:     {{wiki:dokuwiki-128.png?50}}
   Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}   Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}
-  Resized external image:           {{https://www.php.net/images/php.gif?200x50}}+  Resized external image:           {{https://www.php.net/images/php.gif?200x50}}
  
  
Line 153: Line 153:
 {{ wiki:dokuwiki-128.png }} {{ wiki:dokuwiki-128.png }}
  
-  {{ wiki:dokuwiki-128.png}} + {{ wiki:dokuwiki-128.png}} 
-  {{wiki:dokuwiki-128.png }} + {{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. Of course, you can add a title (displayed as a tooltip by most browsers), too.
Line 163: Line 163:
   {{ wiki:dokuwiki-128.png |This is the caption}}   {{ wiki:dokuwiki-128.png |This is the caption}}
  
-For linking an image to another page see [[#Image Links]] above.+For linking an image to another page see [[en:wiki:syntax#Image Links]] above.
  
 ==== Supported Media Formats ==== ==== Supported Media Formats ====
Line 178: Line 178:
 By adding ''?linkonly'' you provide a link to the media without displaying it inline By adding ''?linkonly'' you provide a link to the media without displaying it inline
  
-  {{wiki:dokuwiki-128.png?linkonly}}+ {{wiki:dokuwiki-128.png?linkonly}}
  
 {{wiki:dokuwiki-128.png?linkonly}} This is just a link to the image. {{wiki:dokuwiki-128.png?linkonly}} This is just a link to the image.
Line 188: Line 188:
 For example consider this embedded mp4 video: For example consider this embedded mp4 video:
  
-  {{video.mp4|A funny video}}+  {{en:wiki:video.mp4|A funny video}}
  
 When you upload a ''video.webm'' and ''video.ogv'' next to the referenced ''video.mp4'', DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser. When you upload a ''video.webm'' and ''video.ogv'' next to the referenced ''video.mp4'', DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser.
Line 230: Line 230:
 ==== Text to Image Conversions ==== ==== Text to Image Conversions ====
  
-DokuWiki converts commonly used [[wp>emoticon]]s to their graphical equivalents. Those [[doku>Smileys]] and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki:+DokuWiki converts commonly used [[wp>emoticon]] s to their graphical equivalents. Those [[doku>Smileys]] and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki:
  
-  * 8-) %%  8-)  %% +  * 8-) %% 8-)  %% 
-  * 8-O %%  8-O  %% +  * 8-O %% 8-O  %% 
-  * :-( %%  :-(  %% +  * :-( %% :-(  %% 
-  * :-) %%  :-)  %% +  * :-) %% :-)  %% 
-  * =)  %%  =)   %% +  * =)  %% = )   %% 
-  * :-/ %%  :-/  %% +  * :-/ %% :-/  %% 
-  * :-\ %%  :-\  %% +  * :-\ %% :-\  %% 
-  * :-? %%  :-?  %% +  * :-? %% :-?  %% 
-  * :-D %%  :-D  %% +  * :-D %% :-D  %% 
-  * :-P %%  :-P  %% +  * :-P %% :-P  %% 
-  * :-O %%  :-O  %% +  * :-O %% :-O  %% 
-  * :-X %%  :-X  %%+  * :-X %% :-X  %%
   * :-| %%  :-|  %%   * :-| %%  :-|  %%
-  * ;-) %%  ;-)  %%+  * ;-) %% ;-)  %%
   * ^_^ %%  ^_^  %%   * ^_^ %%  ^_^  %%
-  * m(  %%  m(   %% +  * m( %% m(   %% 
-  * :?: %%  :?:  %% +  * :?: %% :?:  %% 
-  * :!: %%  :!:  %% +  * :!: %% :!:  %% 
-  * LOL %%  LOL  %% +  * LOL %% LOL  %% 
-  * FIXME %%  FIXME %%+  * FIXME %% FIXME %%
   * DELETEME %% DELETEME %%   * DELETEME %% DELETEME %%
  
 ==== Text to HTML Conversions ==== ==== Text to HTML Conversions ====
  
-Typography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.+Typography: [[en:wiki:dokuwiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.
  
 -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r)
Line 304: Line 304:
 DokuWiki supports a simple syntax to create tables. DokuWiki supports a simple syntax to create tables.
  
-^ 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   |
  
 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 320: Line 320:
 Vertical tableheaders are possible, too. Vertical tableheaders are possible, too.
  
-|              ^ 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   |
  
 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.
  
-^ 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   |
  
 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.
  
 ^           Table with alignment           ^^^ ^           Table with alignment           ^^^
-|         right|    center    |left          +|         right|    center    |left      
-|left          |         right|    center    |+|left      |         right|    center    |
 | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
  
Line 356: Line 356:
  
   ^           Table with alignment           ^^^   ^           Table with alignment           ^^^
-  |         right|    center    |left          +  |         right|    center    |left      
-  |left          |         right|    center    |+  |left      |         right|    center    |
   | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |   | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
  
Line 404: Line 404:
 ==== Syntax Highlighting ==== ==== Syntax Highlighting ====
  
-[[wiki:DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http://qbnz.com/highlighter/|GeSHi]] Generic Syntax Highlighter -- so any language supported by GeSHi is supported. The syntax uses the same code and file blocks described in the previous section, but this time the name of the language syntax to be highlighted is included inside the tag, e.g. ''<nowiki><code java></nowiki>'' or ''<nowiki><file java></nowiki>''.+[[en:wiki:dokuwiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http://qbnz.com/highlighter/|GeSHi]] Generic Syntax Highlighter -- so any language supported by GeSHi is supported. The syntax uses the same code and file blocks described in the previous section, but this time the name of the language syntax to be highlighted is included inside the tag, e.g. ''<nowiki><code java></nowiki>'' or ''<nowiki><file java></nowiki>''.
  
 <code java> <code java>
Line 439: Line 439:
  
 ===== RSS/ATOM Feed Aggregation ===== ===== RSS/ATOM Feed Aggregation =====
-[[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|SimplePie]] is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters:+[[en:wiki:dokuwiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|SimplePie]] is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters:
  
 ^ Parameter  ^ Description ^ ^ Parameter  ^ Description ^
Line 445: Line 445:
 | reverse    | display the last items in the feed first | | reverse    | display the last items in the feed first |
 | author     | show item authors names | | author     | show item authors names |
-| date       | show item dates |+| date      | show item dates |
 | description| show the item description. All HTML tags will be stripped | | description| show the item description. All HTML tags will be stripped |
 | nosort     | do not sort the items in the feed | | nosort     | do not sort the items in the feed |
 | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). |
  
-The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki:DokuWiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered.+The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[en:wiki:dokuwiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[en:wiki:dokuwiki]] to re-render the page if it is more than //refresh period// since the page was last rendered.
  
 By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the ''reverse'' parameter, or display the feed as is with ''nosort''. By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the ''reverse'' parameter, or display the feed as is with ''nosort''.
Line 465: Line 465:
 Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble:
  
-^ Macro           ^ Description |+^ Macro       ^ Description |
 | %%~~NOTOC~~%%   | If this macro is found on the page, no table of contents will be created | | %%~~NOTOC~~%%   | If this macro is found on the page, no table of contents will be created |
 | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%<php>%% syntax above is used), adding this macro will force DokuWiki to rerender a page on every call | | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%<php>%% syntax above is used), adding this macro will force DokuWiki to rerender a page on every call |
en/wiki/syntax.txt · Last modified: by domele