1f8369d7dSTobias Sarnowski====== Formatting Syntax ====== 2f8369d7dSTobias Sarnowski 3f8369d7dSTobias Sarnowski[[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 the //Edit this page// button at the top or bottom of the 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. 4f8369d7dSTobias Sarnowski 5f8369d7dSTobias Sarnowski===== Basic Text Formatting ===== 6f8369d7dSTobias Sarnowski 7f8369d7dSTobias SarnowskiDokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. Of course you can **__//''combine''//__** all these. 8f8369d7dSTobias Sarnowski 9f8369d7dSTobias Sarnowski DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. 10f8369d7dSTobias Sarnowski Of course you can **__//''combine''//__** all these. 11f8369d7dSTobias Sarnowski 12f8369d7dSTobias SarnowskiYou can use <sub>subscript</sub> and <sup>superscript</sup>, too. 13f8369d7dSTobias Sarnowski 14f8369d7dSTobias Sarnowski You can use <sub>subscript</sub> and <sup>superscript</sup>, too. 15f8369d7dSTobias Sarnowski 16f8369d7dSTobias SarnowskiYou can mark something as <del>deleted</del> as well. 17f8369d7dSTobias Sarnowski 18f8369d7dSTobias Sarnowski You can mark something as <del>deleted</del> as well. 19f8369d7dSTobias Sarnowski 20f8369d7dSTobias Sarnowski**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. 21f8369d7dSTobias Sarnowski 22f8369d7dSTobias SarnowskiThis is some text with some linebreaks\\ Note that the 23f8369d7dSTobias Sarnowskitwo backslashes are only recognized at the end of a line\\ 24f8369d7dSTobias Sarnowskior followed by\\ a whitespace \\this happens without it. 25f8369d7dSTobias Sarnowski 26f8369d7dSTobias Sarnowski This is some text with some linebreaks\\ Note that the 27f8369d7dSTobias Sarnowski two backslashes are only recognized at the end of a line\\ 28f8369d7dSTobias Sarnowski or followed by\\ a whitespace \\this happens without it. 29f8369d7dSTobias Sarnowski 30f8369d7dSTobias SarnowskiYou should use forced newlines only if really needed. 31f8369d7dSTobias Sarnowski 32f8369d7dSTobias Sarnowski===== Links ===== 33f8369d7dSTobias Sarnowski 34f8369d7dSTobias SarnowskiDokuWiki supports multiple ways of creating links. 35f8369d7dSTobias Sarnowski 36f8369d7dSTobias Sarnowski==== External ==== 37f8369d7dSTobias Sarnowski 38f8369d7dSTobias SarnowskiExternal 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. 39f8369d7dSTobias Sarnowski 40f8369d7dSTobias Sarnowski DokuWiki supports multiple ways of creating links. External links are recognized 41f8369d7dSTobias Sarnowski automagically: http://www.google.com or simply www.google.com - You can set 42f8369d7dSTobias Sarnowski link text as well: [[http://www.google.com|This Link points to google]]. Email 43f8369d7dSTobias Sarnowski addresses like this one: <andi@splitbrain.org> are recognized, too. 44f8369d7dSTobias Sarnowski 45f8369d7dSTobias Sarnowski==== Internal ==== 46f8369d7dSTobias Sarnowski 47f8369d7dSTobias SarnowskiInternal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]]. 48f8369d7dSTobias Sarnowski 49f8369d7dSTobias Sarnowski Internal links are created by using square brackets. You can either just give 50f8369d7dSTobias Sarnowski a [[pagename]] or use an additional [[pagename|link text]]. 51f8369d7dSTobias Sarnowski 52f8369d7dSTobias Sarnowski[[doku>pagename|Wiki pagenames]] are converted to lowercase automatically, special characters are not allowed. 53f8369d7dSTobias Sarnowski 54f8369d7dSTobias SarnowskiYou can use [[some:namespaces]] by using a colon in the pagename. 55f8369d7dSTobias Sarnowski 56f8369d7dSTobias Sarnowski You can use [[some:namespaces]] by using a colon in the pagename. 57f8369d7dSTobias Sarnowski 58f8369d7dSTobias SarnowskiFor details about namespaces see [[doku>namespaces]]. 59f8369d7dSTobias Sarnowski 60f8369d7dSTobias SarnowskiLinking 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]]. 61f8369d7dSTobias Sarnowski 62f8369d7dSTobias Sarnowski This links to [[syntax#internal|this Section]]. 63f8369d7dSTobias Sarnowski 64f8369d7dSTobias SarnowskiNotes: 65f8369d7dSTobias Sarnowski 66f8369d7dSTobias Sarnowski * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. 67f8369d7dSTobias Sarnowski * 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. 68f8369d7dSTobias Sarnowski * When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much. 69f8369d7dSTobias Sarnowski 70f8369d7dSTobias Sarnowski==== Interwiki ==== 71f8369d7dSTobias Sarnowski 72f8369d7dSTobias SarnowskiDokuWiki 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]]. 73f8369d7dSTobias Sarnowski 74f8369d7dSTobias Sarnowski DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. 75f8369d7dSTobias Sarnowski For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. 76f8369d7dSTobias Sarnowski 77f8369d7dSTobias Sarnowski==== Windows Shares ==== 78f8369d7dSTobias Sarnowski 79f8369d7dSTobias SarnowskiWindows 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]]. 80f8369d7dSTobias Sarnowski 81f8369d7dSTobias Sarnowski Windows Shares like [[\\server\share|this]] are recognized, too. 82f8369d7dSTobias Sarnowski 83f8369d7dSTobias SarnowskiNotes: 84f8369d7dSTobias Sarnowski 85f8369d7dSTobias Sarnowski * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone"). 86f8369d7dSTobias Sarnowski * 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/local.protected.php'': 87f8369d7dSTobias Sarnowski 88f8369d7dSTobias Sarnowski $lang['js']['nosmblinks'] = ''; 89f8369d7dSTobias Sarnowski 90f8369d7dSTobias Sarnowski==== Image Links ==== 91f8369d7dSTobias Sarnowski 92f8369d7dSTobias SarnowskiYou 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: 93f8369d7dSTobias Sarnowski 94*59752844SAnders Sandblad [[http://php.net|{{wiki:dokuwiki-128.png}}]] 95f8369d7dSTobias Sarnowski 96*59752844SAnders Sandblad[[http://php.net|{{wiki:dokuwiki-128.png}}]] 97f8369d7dSTobias Sarnowski 98f8369d7dSTobias SarnowskiPlease note: The image formatting is the only formatting syntax accepted in link names. 99f8369d7dSTobias Sarnowski 100f8369d7dSTobias SarnowskiThe whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links). 101f8369d7dSTobias Sarnowski 102f8369d7dSTobias Sarnowski===== Footnotes ===== 103f8369d7dSTobias Sarnowski 104f8369d7dSTobias SarnowskiYou can add footnotes ((This is a footnote)) by using double parentheses. 105f8369d7dSTobias Sarnowski 106f8369d7dSTobias Sarnowski You can add footnotes ((This is a footnote)) by using double parentheses. 107f8369d7dSTobias Sarnowski 108f8369d7dSTobias Sarnowski===== Sectioning ===== 109f8369d7dSTobias Sarnowski 110f8369d7dSTobias SarnowskiYou 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. 111f8369d7dSTobias Sarnowski 112f8369d7dSTobias Sarnowski==== Headline Level 3 ==== 113f8369d7dSTobias Sarnowski=== Headline Level 4 === 114f8369d7dSTobias Sarnowski== Headline Level 5 == 115f8369d7dSTobias Sarnowski 116f8369d7dSTobias Sarnowski ==== Headline Level 3 ==== 117f8369d7dSTobias Sarnowski === Headline Level 4 === 118f8369d7dSTobias Sarnowski == Headline Level 5 == 119f8369d7dSTobias Sarnowski 120f8369d7dSTobias SarnowskiBy using four or more dashes, you can make a horizontal line: 121f8369d7dSTobias Sarnowski 122f8369d7dSTobias Sarnowski---- 123f8369d7dSTobias Sarnowski 124f8369d7dSTobias Sarnowski===== Images and Other Files ===== 125f8369d7dSTobias Sarnowski 126f8369d7dSTobias SarnowskiYou can include external and internal [[doku>images]] with curly brackets. Optionally you can specify the size of them. 127f8369d7dSTobias Sarnowski 128f8369d7dSTobias SarnowskiReal size: {{wiki:dokuwiki-128.png}} 129f8369d7dSTobias Sarnowski 130f8369d7dSTobias SarnowskiResize to given width: {{wiki:dokuwiki-128.png?50}} 131f8369d7dSTobias Sarnowski 132f8369d7dSTobias SarnowskiResize 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}} 133f8369d7dSTobias Sarnowski 134*59752844SAnders SandbladResized external image: {{http://php.net/images/php.gif?200x50}} 135f8369d7dSTobias Sarnowski 136f8369d7dSTobias Sarnowski Real size: {{wiki:dokuwiki-128.png}} 137f8369d7dSTobias Sarnowski Resize to given width: {{wiki:dokuwiki-128.png?50}} 138f8369d7dSTobias Sarnowski Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} 139*59752844SAnders Sandblad Resized external image: {{http://php.net/images/php.gif?200x50}} 140f8369d7dSTobias Sarnowski 141f8369d7dSTobias Sarnowski 142f8369d7dSTobias SarnowskiBy using left or right whitespaces you can choose the alignment. 143f8369d7dSTobias Sarnowski 144f8369d7dSTobias Sarnowski{{ wiki:dokuwiki-128.png}} 145f8369d7dSTobias Sarnowski 146f8369d7dSTobias Sarnowski{{wiki:dokuwiki-128.png }} 147f8369d7dSTobias Sarnowski 148f8369d7dSTobias Sarnowski{{ wiki:dokuwiki-128.png }} 149f8369d7dSTobias Sarnowski 150f8369d7dSTobias Sarnowski {{ wiki:dokuwiki-128.png}} 151f8369d7dSTobias Sarnowski {{wiki:dokuwiki-128.png }} 152f8369d7dSTobias Sarnowski {{ wiki:dokuwiki-128.png }} 153f8369d7dSTobias Sarnowski 154f8369d7dSTobias SarnowskiOf course, you can add a title (displayed as a tooltip by most browsers), too. 155f8369d7dSTobias Sarnowski 156f8369d7dSTobias Sarnowski{{ wiki:dokuwiki-128.png |This is the caption}} 157f8369d7dSTobias Sarnowski 158f8369d7dSTobias Sarnowski {{ wiki:dokuwiki-128.png |This is the caption}} 159f8369d7dSTobias Sarnowski 160f8369d7dSTobias SarnowskiIf you specify a filename (external or internal) that is not an image (''gif, jpeg, png''), then it will be displayed as a link instead. 161f8369d7dSTobias Sarnowski 162f8369d7dSTobias SarnowskiFor linking an image to another page see [[#Image Links]] above. 163f8369d7dSTobias Sarnowski 164f8369d7dSTobias Sarnowski===== Lists ===== 165f8369d7dSTobias Sarnowski 166f8369d7dSTobias SarnowskiDokuwiki 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. 167f8369d7dSTobias Sarnowski 168f8369d7dSTobias Sarnowski * This is a list 169f8369d7dSTobias Sarnowski * The second item 170f8369d7dSTobias Sarnowski * You may have different levels 171f8369d7dSTobias Sarnowski * Another item 172f8369d7dSTobias Sarnowski 173f8369d7dSTobias Sarnowski - The same list but ordered 174f8369d7dSTobias Sarnowski - Another item 175f8369d7dSTobias Sarnowski - Just use indention for deeper levels 176f8369d7dSTobias Sarnowski - That's it 177f8369d7dSTobias Sarnowski 178f8369d7dSTobias Sarnowski<code> 179f8369d7dSTobias Sarnowski * This is a list 180f8369d7dSTobias Sarnowski * The second item 181f8369d7dSTobias Sarnowski * You may have different levels 182f8369d7dSTobias Sarnowski * Another item 183f8369d7dSTobias Sarnowski 184f8369d7dSTobias Sarnowski - The same list but ordered 185f8369d7dSTobias Sarnowski - Another item 186f8369d7dSTobias Sarnowski - Just use indention for deeper levels 187f8369d7dSTobias Sarnowski - That's it 188f8369d7dSTobias Sarnowski</code> 189f8369d7dSTobias Sarnowski 190f8369d7dSTobias SarnowskiAlso take a look at the [[doku>faq:lists|FAQ on list items]]. 191f8369d7dSTobias Sarnowski 192f8369d7dSTobias Sarnowski===== Text Conversions ===== 193f8369d7dSTobias Sarnowski 194f8369d7dSTobias SarnowskiDokuWiki can convert certain pre-defined characters or strings into images or other text or HTML. 195f8369d7dSTobias Sarnowski 196f8369d7dSTobias SarnowskiThe 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. 197f8369d7dSTobias Sarnowski 198f8369d7dSTobias Sarnowski==== Text to Image Conversions ==== 199f8369d7dSTobias Sarnowski 200f8369d7dSTobias SarnowskiDokuWiki 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: 201f8369d7dSTobias Sarnowski 202f8369d7dSTobias Sarnowski * 8-) %% 8-) %% 203f8369d7dSTobias Sarnowski * 8-O %% 8-O %% 204f8369d7dSTobias Sarnowski * :-( %% :-( %% 205f8369d7dSTobias Sarnowski * :-) %% :-) %% 206f8369d7dSTobias Sarnowski * =) %% =) %% 207f8369d7dSTobias Sarnowski * :-/ %% :-/ %% 208f8369d7dSTobias Sarnowski * :-\ %% :-\ %% 209f8369d7dSTobias Sarnowski * :-? %% :-? %% 210f8369d7dSTobias Sarnowski * :-D %% :-D %% 211f8369d7dSTobias Sarnowski * :-P %% :-P %% 212f8369d7dSTobias Sarnowski * :-O %% :-O %% 213f8369d7dSTobias Sarnowski * :-X %% :-X %% 214f8369d7dSTobias Sarnowski * :-| %% :-| %% 215f8369d7dSTobias Sarnowski * ;-) %% ;-) %% 216f8369d7dSTobias Sarnowski * ^_^ %% ^_^ %% 217f8369d7dSTobias Sarnowski * :?: %% :?: %% 218f8369d7dSTobias Sarnowski * :!: %% :!: %% 219f8369d7dSTobias Sarnowski * LOL %% LOL %% 220f8369d7dSTobias Sarnowski * FIXME %% FIXME %% 221f8369d7dSTobias Sarnowski * DELETEME %% DELETEME %% 222f8369d7dSTobias Sarnowski 223f8369d7dSTobias Sarnowski==== Text to HTML Conversions ==== 224f8369d7dSTobias Sarnowski 225f8369d7dSTobias SarnowskiTypography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. 226f8369d7dSTobias Sarnowski 227f8369d7dSTobias Sarnowski-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) 228f8369d7dSTobias Sarnowski"He thought 'It's a man's world'..." 229f8369d7dSTobias Sarnowski 230f8369d7dSTobias Sarnowski<code> 231f8369d7dSTobias Sarnowski-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) 232f8369d7dSTobias Sarnowski"He thought 'It's a man's world'..." 233f8369d7dSTobias Sarnowski</code> 234f8369d7dSTobias Sarnowski 235f8369d7dSTobias SarnowskiThe same can be done to produce any kind of HTML, it just needs to be added to the [[doku>entities|pattern file]]. 236f8369d7dSTobias Sarnowski 237f8369d7dSTobias SarnowskiThere are three exceptions which do not come from that pattern file: multiplication entity (640x480), 'single' and "double quotes". They can be turned off through a [[doku>config:typography|config option]]. 238f8369d7dSTobias Sarnowski 239f8369d7dSTobias Sarnowski===== Quoting ===== 240f8369d7dSTobias Sarnowski 241f8369d7dSTobias SarnowskiSome times you want to mark some text to show it's a reply or comment. You can use the following syntax: 242f8369d7dSTobias Sarnowski 243f8369d7dSTobias Sarnowski I think we should do it 244f8369d7dSTobias Sarnowski 245f8369d7dSTobias Sarnowski > No we shouldn't 246f8369d7dSTobias Sarnowski 247f8369d7dSTobias Sarnowski >> Well, I say we should 248f8369d7dSTobias Sarnowski 249f8369d7dSTobias Sarnowski > Really? 250f8369d7dSTobias Sarnowski 251f8369d7dSTobias Sarnowski >> Yes! 252f8369d7dSTobias Sarnowski 253f8369d7dSTobias Sarnowski >>> Then lets do it! 254f8369d7dSTobias Sarnowski 255f8369d7dSTobias SarnowskiI think we should do it 256f8369d7dSTobias Sarnowski 257f8369d7dSTobias Sarnowski> No we shouldn't 258f8369d7dSTobias Sarnowski 259f8369d7dSTobias Sarnowski>> Well, I say we should 260f8369d7dSTobias Sarnowski 261f8369d7dSTobias Sarnowski> Really? 262f8369d7dSTobias Sarnowski 263f8369d7dSTobias Sarnowski>> Yes! 264f8369d7dSTobias Sarnowski 265f8369d7dSTobias Sarnowski>>> Then lets do it! 266f8369d7dSTobias Sarnowski 267f8369d7dSTobias Sarnowski===== Tables ===== 268f8369d7dSTobias Sarnowski 269f8369d7dSTobias SarnowskiDokuWiki supports a simple syntax to create tables. 270f8369d7dSTobias Sarnowski 271f8369d7dSTobias Sarnowski^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 272f8369d7dSTobias Sarnowski| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | 273f8369d7dSTobias Sarnowski| Row 2 Col 1 | some colspan (note the double pipe) || 274f8369d7dSTobias Sarnowski| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | 275f8369d7dSTobias Sarnowski 276f8369d7dSTobias SarnowskiTable rows have to start and end with a ''|'' for normal rows or a ''^'' for headers. 277f8369d7dSTobias Sarnowski 278f8369d7dSTobias Sarnowski ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 279f8369d7dSTobias Sarnowski | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | 280f8369d7dSTobias Sarnowski | Row 2 Col 1 | some colspan (note the double pipe) || 281f8369d7dSTobias Sarnowski | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | 282f8369d7dSTobias Sarnowski 283f8369d7dSTobias SarnowskiTo connect cells horizontally, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators! 284f8369d7dSTobias Sarnowski 285f8369d7dSTobias SarnowskiVertical tableheaders are possible, too. 286f8369d7dSTobias Sarnowski 287f8369d7dSTobias Sarnowski| ^ Heading 1 ^ Heading 2 ^ 288f8369d7dSTobias Sarnowski^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | 289f8369d7dSTobias Sarnowski^ Heading 4 | no colspan this time | | 290f8369d7dSTobias Sarnowski^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | 291f8369d7dSTobias Sarnowski 292f8369d7dSTobias SarnowskiAs you can see, it's the cell separator before a cell which decides about the formatting: 293f8369d7dSTobias Sarnowski 294f8369d7dSTobias Sarnowski | ^ Heading 1 ^ Heading 2 ^ 295f8369d7dSTobias Sarnowski ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | 296f8369d7dSTobias Sarnowski ^ Heading 4 | no colspan this time | | 297f8369d7dSTobias Sarnowski ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | 298f8369d7dSTobias Sarnowski 299f8369d7dSTobias SarnowskiYou can have rowspans (vertically connected cells) by adding '':::'' into the cells below the one to which they should connect. 300f8369d7dSTobias Sarnowski 301f8369d7dSTobias Sarnowski^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 302f8369d7dSTobias Sarnowski| Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | 303f8369d7dSTobias Sarnowski| Row 2 Col 1 | ::: | Row 2 Col 3 | 304f8369d7dSTobias Sarnowski| Row 3 Col 1 | ::: | Row 2 Col 3 | 305f8369d7dSTobias Sarnowski 306f8369d7dSTobias SarnowskiApart from the rowspan syntax those cells should not contain anything else. 307f8369d7dSTobias Sarnowski 308f8369d7dSTobias Sarnowski ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 309f8369d7dSTobias Sarnowski | Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | 310f8369d7dSTobias Sarnowski | Row 2 Col 1 | ::: | Row 2 Col 3 | 311f8369d7dSTobias Sarnowski | Row 3 Col 1 | ::: | Row 2 Col 3 | 312f8369d7dSTobias Sarnowski 313f8369d7dSTobias SarnowskiYou 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. 314f8369d7dSTobias Sarnowski 315f8369d7dSTobias Sarnowski^ Table with alignment ^^^ 316f8369d7dSTobias Sarnowski| right| center |left | 317f8369d7dSTobias Sarnowski|left | right| center | 318f8369d7dSTobias Sarnowski| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | 319f8369d7dSTobias Sarnowski 320f8369d7dSTobias SarnowskiThis is how it looks in the source: 321f8369d7dSTobias Sarnowski 322f8369d7dSTobias Sarnowski ^ Table with alignment ^^^ 323f8369d7dSTobias Sarnowski | right| center |left | 324f8369d7dSTobias Sarnowski |left | right| center | 325f8369d7dSTobias Sarnowski | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | 326f8369d7dSTobias Sarnowski 327f8369d7dSTobias SarnowskiNote: Vertical alignment is not supported. 328f8369d7dSTobias Sarnowski 329f8369d7dSTobias Sarnowski===== No Formatting ===== 330f8369d7dSTobias Sarnowski 331f8369d7dSTobias SarnowskiIf 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>''. 332f8369d7dSTobias Sarnowski 333f8369d7dSTobias Sarnowski<nowiki> 334f8369d7dSTobias SarnowskiThis is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. 335f8369d7dSTobias Sarnowski</nowiki> 336f8369d7dSTobias SarnowskiThe same is true for %%//__this__ text// with a smiley ;-)%%. 337f8369d7dSTobias Sarnowski 338f8369d7dSTobias Sarnowski <nowiki> 339f8369d7dSTobias Sarnowski This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. 340f8369d7dSTobias Sarnowski </nowiki> 341f8369d7dSTobias Sarnowski The same is true for %%//__this__ text// with a smiley ;-)%%. 342f8369d7dSTobias Sarnowski 343f8369d7dSTobias Sarnowski===== Code Blocks ===== 344f8369d7dSTobias Sarnowski 345f8369d7dSTobias SarnowskiYou 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>%%''. 346f8369d7dSTobias Sarnowski 347f8369d7dSTobias Sarnowski This is text is indented by two spaces. 348f8369d7dSTobias Sarnowski 349f8369d7dSTobias Sarnowski<code> 350f8369d7dSTobias SarnowskiThis is preformatted code all spaces are preserved: like <-this 351f8369d7dSTobias Sarnowski</code> 352f8369d7dSTobias Sarnowski 353f8369d7dSTobias Sarnowski<file> 354f8369d7dSTobias SarnowskiThis is pretty much the same, but you could use it to show that you quoted a file. 355f8369d7dSTobias Sarnowski</file> 356f8369d7dSTobias Sarnowski 357f8369d7dSTobias SarnowskiThose blocks were created by this source: 358f8369d7dSTobias Sarnowski 359f8369d7dSTobias Sarnowski This is text is indented by two spaces. 360f8369d7dSTobias Sarnowski 361f8369d7dSTobias Sarnowski <code> 362f8369d7dSTobias Sarnowski This is preformatted code all spaces are preserved: like <-this 363f8369d7dSTobias Sarnowski </code> 364f8369d7dSTobias Sarnowski 365f8369d7dSTobias Sarnowski <file> 366f8369d7dSTobias Sarnowski This is pretty much the same, but you could use it to show that you quoted a file. 367f8369d7dSTobias Sarnowski </file> 368f8369d7dSTobias Sarnowski 369f8369d7dSTobias Sarnowski==== Syntax Highlighting ==== 370f8369d7dSTobias Sarnowski 371f8369d7dSTobias Sarnowski[[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>''. 372f8369d7dSTobias Sarnowski 373f8369d7dSTobias Sarnowski<code java> 374f8369d7dSTobias Sarnowski/** 375f8369d7dSTobias Sarnowski * The HelloWorldApp class implements an application that 376f8369d7dSTobias Sarnowski * simply displays "Hello World!" to the standard output. 377f8369d7dSTobias Sarnowski */ 378f8369d7dSTobias Sarnowskiclass HelloWorldApp { 379f8369d7dSTobias Sarnowski public static void main(String[] args) { 380f8369d7dSTobias Sarnowski System.out.println("Hello World!"); //Display the string. 381f8369d7dSTobias Sarnowski } 382f8369d7dSTobias Sarnowski} 383f8369d7dSTobias Sarnowski</code> 384f8369d7dSTobias Sarnowski 385f8369d7dSTobias SarnowskiThe following language strings are currently recognized: //4cs, abap, actionscript-french, actionscript, actionscript3, ada, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, ecmascript, eiffel, email, erlang, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lisp, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, plsql, postgresql, povray, powerbuilder, powershell, progress, prolog, properties, providex, purebasic, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, z80// 386f8369d7dSTobias Sarnowski 387f8369d7dSTobias Sarnowski==== Downloadable Code Blocks ==== 388f8369d7dSTobias Sarnowski 389f8369d7dSTobias SarnowskiWhen 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: 390f8369d7dSTobias Sarnowski 391f8369d7dSTobias Sarnowski<code> 392f8369d7dSTobias Sarnowski<file php myexample.php> 393f8369d7dSTobias Sarnowski<?php echo "hello world!"; ?> 394f8369d7dSTobias Sarnowski</file> 395f8369d7dSTobias Sarnowski</code> 396f8369d7dSTobias Sarnowski 397f8369d7dSTobias Sarnowski<file php myexample.php> 398f8369d7dSTobias Sarnowski<?php echo "hello world!"; ?> 399f8369d7dSTobias Sarnowski</file> 400f8369d7dSTobias Sarnowski 401f8369d7dSTobias SarnowskiIf you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. 402f8369d7dSTobias Sarnowski 403f8369d7dSTobias Sarnowski 404f8369d7dSTobias Sarnowski===== Embedding HTML and PHP ===== 405f8369d7dSTobias Sarnowski 406f8369d7dSTobias SarnowskiYou can embed raw HTML or PHP code into your documents by using the ''%%<html>%%'' or ''%%<php>%%'' tags. (Use uppercase tags if you need to enclose block level elements.) 407f8369d7dSTobias Sarnowski 408f8369d7dSTobias SarnowskiHTML example: 409f8369d7dSTobias Sarnowski 410f8369d7dSTobias Sarnowski<code> 411f8369d7dSTobias Sarnowski<html> 412f8369d7dSTobias SarnowskiThis is some <span style="color:red;font-size:150%;">inline HTML</span> 413f8369d7dSTobias Sarnowski</html> 414f8369d7dSTobias Sarnowski<HTML> 415f8369d7dSTobias Sarnowski<p style="border:2px dashed red;">And this is some block HTML</p> 416f8369d7dSTobias Sarnowski</HTML> 417f8369d7dSTobias Sarnowski</code> 418f8369d7dSTobias Sarnowski 419f8369d7dSTobias Sarnowski<html> 420f8369d7dSTobias SarnowskiThis is some <span style="color:red;font-size:150%;">inline HTML</span> 421f8369d7dSTobias Sarnowski</html> 422f8369d7dSTobias Sarnowski<HTML> 423f8369d7dSTobias Sarnowski<p style="border:2px dashed red;">And this is some block HTML</p> 424f8369d7dSTobias Sarnowski</HTML> 425f8369d7dSTobias Sarnowski 426f8369d7dSTobias SarnowskiPHP example: 427f8369d7dSTobias Sarnowski 428f8369d7dSTobias Sarnowski<code> 429f8369d7dSTobias Sarnowski<php> 430f8369d7dSTobias Sarnowskiecho 'A logo generated by PHP:'; 431f8369d7dSTobias Sarnowskiecho '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; 432f8369d7dSTobias Sarnowskiecho '(generated inline HTML)'; 433f8369d7dSTobias Sarnowski</php> 434f8369d7dSTobias Sarnowski<PHP> 435f8369d7dSTobias Sarnowskiecho '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 436f8369d7dSTobias Sarnowskiecho '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; 437f8369d7dSTobias Sarnowskiecho '</tr></table>'; 438f8369d7dSTobias Sarnowski</PHP> 439f8369d7dSTobias Sarnowski</code> 440f8369d7dSTobias Sarnowski 441f8369d7dSTobias Sarnowski<php> 442f8369d7dSTobias Sarnowskiecho 'A logo generated by PHP:'; 443f8369d7dSTobias Sarnowskiecho '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; 444f8369d7dSTobias Sarnowskiecho '(inline HTML)'; 445f8369d7dSTobias Sarnowski</php> 446f8369d7dSTobias Sarnowski<PHP> 447f8369d7dSTobias Sarnowskiecho '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 448f8369d7dSTobias Sarnowskiecho '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; 449f8369d7dSTobias Sarnowskiecho '</tr></table>'; 450f8369d7dSTobias Sarnowski</PHP> 451f8369d7dSTobias Sarnowski 452f8369d7dSTobias Sarnowski**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. 453f8369d7dSTobias Sarnowski 454f8369d7dSTobias Sarnowski===== RSS/ATOM Feed Aggregation ===== 455f8369d7dSTobias Sarnowski[[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: 456f8369d7dSTobias Sarnowski 457f8369d7dSTobias Sarnowski^ Parameter ^ Description ^ 458f8369d7dSTobias Sarnowski| any number | will be used as maximum number items to show, defaults to 8 | 459f8369d7dSTobias Sarnowski| reverse | display the last items in the feed first | 460f8369d7dSTobias Sarnowski| author | show item authors names | 461f8369d7dSTobias Sarnowski| date | show item dates | 462f8369d7dSTobias Sarnowski| description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped | 463f8369d7dSTobias Sarnowski| //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | 464f8369d7dSTobias Sarnowski 465f8369d7dSTobias SarnowskiThe 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. 466f8369d7dSTobias Sarnowski 467f8369d7dSTobias Sarnowski**Example:** 468f8369d7dSTobias Sarnowski 469f8369d7dSTobias Sarnowski {{rss>http://slashdot.org/index.rss 5 author date 1h }} 470f8369d7dSTobias Sarnowski 471f8369d7dSTobias Sarnowski{{rss>http://slashdot.org/index.rss 5 author date 1h }} 472f8369d7dSTobias Sarnowski 473f8369d7dSTobias Sarnowski 474f8369d7dSTobias Sarnowski===== Control Macros ===== 475f8369d7dSTobias Sarnowski 476f8369d7dSTobias SarnowskiSome syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: 477f8369d7dSTobias Sarnowski 478f8369d7dSTobias Sarnowski^ Macro ^ Description | 479f8369d7dSTobias Sarnowski| %%~~NOTOC~~%% | If this macro is found on the page, no table of contents will be created | 480f8369d7dSTobias Sarnowski| %%~~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 | 481f8369d7dSTobias Sarnowski 482f8369d7dSTobias Sarnowski===== Syntax Plugins ===== 483f8369d7dSTobias Sarnowski 484f8369d7dSTobias SarnowskiDokuWiki'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: 485f8369d7dSTobias Sarnowski 486f8369d7dSTobias Sarnowski~~INFO:syntaxplugins~~ 487