User Tools

Site Tools


wiki:syntax

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
wiki:syntax [2023/05/13 17:04] – Removed some DokuWiki references epicpuppy613wiki:syntax [2023/05/16 13:21] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Formatting Syntax ====== ====== Formatting Syntax ======
  
-This wiki 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.+[[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.
  
 ===== Basic Text Formatting ===== ===== Basic Text Formatting =====
  
-This wiki 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.
  
-  This wiki 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.
  
Line 20: Line 20:
 **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.
  
-This is some text with some linebreaks\\ Note that the two backslashes are only recognized at the end of a line\\  or followed by\\ a whitespace \\this happens without it.+This is some text with some linebreaks\\ Note that the 
 +two backslashes are only recognized at the end of a line\\ 
 +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
Line 30: Line 32:
 ===== Links ===== ===== Links =====
  
-This wiki supports multiple ways of creating links.+DokuWiki supports multiple ways of creating links.
  
 ==== External ==== ==== External ====
  
-External links are recognized automagically: [[http://www.google.com]] or simply [[http://www.google.com|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.orgare recognized, too.
  
-  This wiki 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
Line 68: Line 70:
 ==== Interwiki ==== ==== Interwiki ====
  
-This wiki also 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.
Line 105: Line 107:
 ===== Footnotes ===== ===== Footnotes =====
  
-You can add footnotes (( +You can add footnotes ((This is a footnote)) by using double parentheses.
-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.
Line 113: Line 113:
 ===== Sectioning ===== ===== Sectioning =====
  
-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.+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 ''<nowiki>~~NOTOC~~</nowiki>'' in the document.
  
 ==== Headline Level 3 ==== ==== Headline Level 3 ====
- 
 === Headline Level 4 === === Headline Level 4 ===
- 
 == Headline Level 5 == == Headline Level 5 ==
  
Line 137: Line 135:
 Resize to given width:            {{wiki:dokuwiki-128.png?50}} Resize to given width:            {{wiki:dokuwiki-128.png?50}}
  
-Resize to given width and height(( +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}}
-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://secure.php.net/images/php.gif?200x50}} Resized external image:           {{https://secure.php.net/images/php.gif?200x50}}
Line 147: Line 143:
   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://secure.php.net/images/php.gif?200x50}}   Resized external image:           {{https://secure.php.net/images/php.gif?200x50}}
 +
  
 By using left or right whitespaces you can choose the alignment. By using left or right whitespaces you can choose the alignment.
Line 170: Line 167:
 ==== Supported Media Formats ==== ==== Supported Media Formats ====
  
-This wiki can embed the following media formats directly.+DokuWiki can embed the following media formats directly.
  
 | Image | ''gif'', ''jpg'', ''png''  | | Image | ''gif'', ''jpg'', ''png''  |
 | Video | ''webm'', ''ogv'', ''mp4'' | | Video | ''webm'', ''ogv'', ''mp4'' |
 | Audio | ''ogg'', ''mp3'', ''wav''  | | Audio | ''ogg'', ''mp3'', ''wav''  |
-| Flash | ''swf''  |+| Flash | ''swf''                    |
  
 If you specify a filename that is not a supported media format, then it will be displayed as a link instead. If you specify a filename that is not a supported media format, then it will be displayed as a link instead.
Line 199: Line 196:
 ===== Lists ===== ===== Lists =====
  
-This wiki 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.
  
   * This is a list   * This is a list
Line 211: Line 208:
   - That's it   - That's it
  
-<code ->+<code>
   * This is a list   * This is a list
   * The second item   * The second item
Line 227: Line 224:
 ===== Text Conversions ===== ===== Text Conversions =====
  
-This wiki can convert certain pre-defined characters or strings into images or other text or HTML.+DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML.
  
 The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, but can be configured to use other HTML as well. The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, but can be configured to use other HTML as well.
Line 233: Line 230:
 ==== Text to Image Conversions ==== ==== Text to Image Conversions ====
  
-This wiki converts commonly used [[wp>emoticon]]s to their graphical equivalents. Those emoji and other images can be configured and extended. Here is an overview of emoji included in this wiki:+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-)  %%
Line 259: Line 256:
 ==== Text to HTML Conversions ==== ==== Text to HTML Conversions ====
  
-Typography: This wiki can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.+Typography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.
  
--> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) "He thought 'It's a man's world'..."+-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) 
 +"He thought 'It's a man's world'..."
  
-<code ->+<code>
 -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r)
 "He thought 'It's a man's world'..." "He thought 'It's a man's world'..."
Line 276: Line 274:
 Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: Some times you want to mark some text to show it's a reply or comment. You can use the following syntax:
  
-<code ->+<code>
 I think we should do it I think we should do it
  
Line 306: 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.
Line 322: 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:
Line 336: Line 334:
 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.
Line 350: Line 348:
 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 368: Line 366:
 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 ''<nowiki>%%</nowiki>''. 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 ''<nowiki>%%</nowiki>''.
  
-%% 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 ;-)%%.
  
   <nowiki>   <nowiki>
Line 381: Line 382:
   This is text is indented by two spaces.   This is text is indented by two 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>
  
-<code ->+<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.
-</code>+</file>
  
 Those blocks were created by this source: Those blocks were created by this source:
Line 403: Line 404:
 ==== Syntax Highlighting ==== ==== Syntax Highlighting ====
  
-This wiki 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. ''%%<code java>%%'' or ''%%<file java>%%''.+[[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 425: Line 426:
 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 do this by specifying a file name after language code like this: 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 do this by specifying a file name after language code like this:
  
-<code ->+<code>
 <file php myexample.php> <file php myexample.php>
 <?php echo "hello world!"; ?> <?php echo "hello world!"; ?>
Line 431: Line 432:
 </code> </code>
  
-<code php myexample.php>+<file php myexample.php>
 <?php echo "hello world!"; ?> <?php echo "hello world!"; ?>
-</code>+</file>
  
 If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''.
  
 ===== 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:
-This wiki 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 ^
 | any number | will be used as maximum number items to show, defaults to 8 | | any number | will be used as maximum number items to show, defaults to 8 |
-| 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). |
  
Line 458: Line 458:
   {{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 }} 
  
 ===== Control Macros ===== ===== Control Macros =====
  
-Some syntax influences how this wiki 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 this wiki 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 |
  
 ===== Syntax Plugins ===== ===== Syntax Plugins =====
  
-This wiki's syntax can be extended by [[doku>plugins|Plugins]]. How the installed plugins are used is described on their appropriate description pages. The following syntax plugins are available in this particular wiki:+DokuWiki's syntax can be extended by [[doku>plugins|Plugins]]. How the installed plugins are used is described on their appropriate description pages. The following syntax plugins are available in this particular DokuWiki installation:
  
 ~~INFO:syntaxplugins~~ ~~INFO:syntaxplugins~~
- 
  
wiki/syntax.1683997467.txt.gz · Last modified: 2023/05/13 17:04 by epicpuppy613