1f8369d7dSTobias Sarnowski====== Formatting Syntax ====== 2f8369d7dSTobias Sarnowski 3*bbe6b3a7SAndreas Gohr[[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. 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"). 86*bbe6b3a7SAndreas Gohr * 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> 87*bbe6b3a7SAndreas Gohr<?php 88*bbe6b3a7SAndreas Gohr/** 89*bbe6b3a7SAndreas Gohr * Customization of the english language file 90*bbe6b3a7SAndreas Gohr * Copy only the strings that needs to be modified 91*bbe6b3a7SAndreas Gohr */ 92f8369d7dSTobias Sarnowski$lang['js']['nosmblinks'] = ''; 93*bbe6b3a7SAndreas Gohr</code> 94f8369d7dSTobias Sarnowski 95f8369d7dSTobias Sarnowski==== Image Links ==== 96f8369d7dSTobias Sarnowski 97f8369d7dSTobias 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: 98f8369d7dSTobias Sarnowski 9959752844SAnders Sandblad [[http://php.net|{{wiki:dokuwiki-128.png}}]] 100f8369d7dSTobias Sarnowski 10159752844SAnders Sandblad[[http://php.net|{{wiki:dokuwiki-128.png}}]] 102f8369d7dSTobias Sarnowski 103f8369d7dSTobias SarnowskiPlease note: The image formatting is the only formatting syntax accepted in link names. 104f8369d7dSTobias Sarnowski 105f8369d7dSTobias 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). 106f8369d7dSTobias Sarnowski 107f8369d7dSTobias Sarnowski===== Footnotes ===== 108f8369d7dSTobias Sarnowski 109f8369d7dSTobias SarnowskiYou can add footnotes ((This is a footnote)) by using double parentheses. 110f8369d7dSTobias Sarnowski 111f8369d7dSTobias Sarnowski You can add footnotes ((This is a footnote)) by using double parentheses. 112f8369d7dSTobias Sarnowski 113f8369d7dSTobias Sarnowski===== Sectioning ===== 114f8369d7dSTobias Sarnowski 115f8369d7dSTobias 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. 116f8369d7dSTobias Sarnowski 117f8369d7dSTobias Sarnowski==== Headline Level 3 ==== 118f8369d7dSTobias Sarnowski=== Headline Level 4 === 119f8369d7dSTobias Sarnowski== Headline Level 5 == 120f8369d7dSTobias Sarnowski 121f8369d7dSTobias Sarnowski ==== Headline Level 3 ==== 122f8369d7dSTobias Sarnowski === Headline Level 4 === 123f8369d7dSTobias Sarnowski == Headline Level 5 == 124f8369d7dSTobias Sarnowski 125f8369d7dSTobias SarnowskiBy using four or more dashes, you can make a horizontal line: 126f8369d7dSTobias Sarnowski 127f8369d7dSTobias Sarnowski---- 128f8369d7dSTobias Sarnowski 129*bbe6b3a7SAndreas Gohr===== Media Files ===== 130f8369d7dSTobias Sarnowski 131*bbe6b3a7SAndreas GohrYou can include external and internal [[doku>images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them. 132f8369d7dSTobias Sarnowski 133f8369d7dSTobias SarnowskiReal size: {{wiki:dokuwiki-128.png}} 134f8369d7dSTobias Sarnowski 135f8369d7dSTobias SarnowskiResize to given width: {{wiki:dokuwiki-128.png?50}} 136f8369d7dSTobias Sarnowski 137f8369d7dSTobias 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}} 138f8369d7dSTobias Sarnowski 139*bbe6b3a7SAndreas GohrResized external image: {{https://secure.php.net/images/php.gif?200x50}} 140f8369d7dSTobias Sarnowski 141f8369d7dSTobias Sarnowski Real size: {{wiki:dokuwiki-128.png}} 142f8369d7dSTobias Sarnowski Resize to given width: {{wiki:dokuwiki-128.png?50}} 143f8369d7dSTobias Sarnowski Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} 144*bbe6b3a7SAndreas Gohr Resized external image: {{https://secure.php.net/images/php.gif?200x50}} 145f8369d7dSTobias Sarnowski 146f8369d7dSTobias Sarnowski 147f8369d7dSTobias SarnowskiBy using left or right whitespaces you can choose the alignment. 148f8369d7dSTobias Sarnowski 149f8369d7dSTobias Sarnowski{{ wiki:dokuwiki-128.png}} 150f8369d7dSTobias Sarnowski 151f8369d7dSTobias Sarnowski{{wiki:dokuwiki-128.png }} 152f8369d7dSTobias Sarnowski 153f8369d7dSTobias Sarnowski{{ wiki:dokuwiki-128.png }} 154f8369d7dSTobias Sarnowski 155f8369d7dSTobias Sarnowski {{ wiki:dokuwiki-128.png}} 156f8369d7dSTobias Sarnowski {{wiki:dokuwiki-128.png }} 157f8369d7dSTobias Sarnowski {{ wiki:dokuwiki-128.png }} 158f8369d7dSTobias Sarnowski 159f8369d7dSTobias SarnowskiOf course, you can add a title (displayed as a tooltip by most browsers), too. 160f8369d7dSTobias Sarnowski 161f8369d7dSTobias Sarnowski{{ wiki:dokuwiki-128.png |This is the caption}} 162f8369d7dSTobias Sarnowski 163f8369d7dSTobias Sarnowski {{ wiki:dokuwiki-128.png |This is the caption}} 164f8369d7dSTobias Sarnowski 165f8369d7dSTobias SarnowskiFor linking an image to another page see [[#Image Links]] above. 166f8369d7dSTobias Sarnowski 167*bbe6b3a7SAndreas Gohr==== Supported Media Formats ==== 168*bbe6b3a7SAndreas Gohr 169*bbe6b3a7SAndreas GohrDokuWiki can embed the following media formats directly. 170*bbe6b3a7SAndreas Gohr 171*bbe6b3a7SAndreas Gohr| Image | ''gif'', ''jpg'', ''png'' | 172*bbe6b3a7SAndreas Gohr| Video | ''webm'', ''ogv'', ''mp4'' | 173*bbe6b3a7SAndreas Gohr| Audio | ''ogg'', ''mp3'', ''wav'' | 174*bbe6b3a7SAndreas Gohr| Flash | ''swf'' | 175*bbe6b3a7SAndreas Gohr 176*bbe6b3a7SAndreas GohrIf you specify a filename that is not a supported media format, then it will be displayed as a link instead. 177*bbe6b3a7SAndreas Gohr 178*bbe6b3a7SAndreas GohrBy adding ''?linkonly'' you provide a link to the media without displaying it inline 179*bbe6b3a7SAndreas Gohr 180*bbe6b3a7SAndreas Gohr {{wiki:dokuwiki-128.png?linkonly}} 181*bbe6b3a7SAndreas Gohr 182*bbe6b3a7SAndreas Gohr{{wiki:dokuwiki-128.png?linkonly}} This is just a link to the image. 183*bbe6b3a7SAndreas Gohr 184*bbe6b3a7SAndreas Gohr==== Fallback Formats ==== 185*bbe6b3a7SAndreas Gohr 186*bbe6b3a7SAndreas GohrUnfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility. 187*bbe6b3a7SAndreas Gohr 188*bbe6b3a7SAndreas GohrFor example consider this embedded mp4 video: 189*bbe6b3a7SAndreas Gohr 190*bbe6b3a7SAndreas Gohr {{video.mp4|A funny video}} 191*bbe6b3a7SAndreas Gohr 192*bbe6b3a7SAndreas GohrWhen 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. 193*bbe6b3a7SAndreas Gohr 194*bbe6b3a7SAndreas GohrAdditionally DokuWiki supports a "poster" image which will be shown before the video has started. That image needs to have the same filename as the video and be either a jpg or png file. In the example above a ''video.jpg'' file would work. 195*bbe6b3a7SAndreas Gohr 196f8369d7dSTobias Sarnowski===== Lists ===== 197f8369d7dSTobias Sarnowski 198f8369d7dSTobias 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. 199f8369d7dSTobias Sarnowski 200f8369d7dSTobias Sarnowski * This is a list 201f8369d7dSTobias Sarnowski * The second item 202f8369d7dSTobias Sarnowski * You may have different levels 203f8369d7dSTobias Sarnowski * Another item 204f8369d7dSTobias Sarnowski 205f8369d7dSTobias Sarnowski - The same list but ordered 206f8369d7dSTobias Sarnowski - Another item 207f8369d7dSTobias Sarnowski - Just use indention for deeper levels 208f8369d7dSTobias Sarnowski - That's it 209f8369d7dSTobias Sarnowski 210f8369d7dSTobias Sarnowski<code> 211f8369d7dSTobias Sarnowski * This is a list 212f8369d7dSTobias Sarnowski * The second item 213f8369d7dSTobias Sarnowski * You may have different levels 214f8369d7dSTobias Sarnowski * Another item 215f8369d7dSTobias Sarnowski 216f8369d7dSTobias Sarnowski - The same list but ordered 217f8369d7dSTobias Sarnowski - Another item 218f8369d7dSTobias Sarnowski - Just use indention for deeper levels 219f8369d7dSTobias Sarnowski - That's it 220f8369d7dSTobias Sarnowski</code> 221f8369d7dSTobias Sarnowski 222f8369d7dSTobias SarnowskiAlso take a look at the [[doku>faq:lists|FAQ on list items]]. 223f8369d7dSTobias Sarnowski 224f8369d7dSTobias Sarnowski===== Text Conversions ===== 225f8369d7dSTobias Sarnowski 226f8369d7dSTobias SarnowskiDokuWiki can convert certain pre-defined characters or strings into images or other text or HTML. 227f8369d7dSTobias Sarnowski 228f8369d7dSTobias 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. 229f8369d7dSTobias Sarnowski 230f8369d7dSTobias Sarnowski==== Text to Image Conversions ==== 231f8369d7dSTobias Sarnowski 232f8369d7dSTobias 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: 233f8369d7dSTobias Sarnowski 234f8369d7dSTobias Sarnowski * 8-) %% 8-) %% 235f8369d7dSTobias Sarnowski * 8-O %% 8-O %% 236f8369d7dSTobias Sarnowski * :-( %% :-( %% 237f8369d7dSTobias Sarnowski * :-) %% :-) %% 238f8369d7dSTobias Sarnowski * =) %% =) %% 239f8369d7dSTobias Sarnowski * :-/ %% :-/ %% 240f8369d7dSTobias Sarnowski * :-\ %% :-\ %% 241f8369d7dSTobias Sarnowski * :-? %% :-? %% 242f8369d7dSTobias Sarnowski * :-D %% :-D %% 243f8369d7dSTobias Sarnowski * :-P %% :-P %% 244f8369d7dSTobias Sarnowski * :-O %% :-O %% 245f8369d7dSTobias Sarnowski * :-X %% :-X %% 246f8369d7dSTobias Sarnowski * :-| %% :-| %% 247f8369d7dSTobias Sarnowski * ;-) %% ;-) %% 248f8369d7dSTobias Sarnowski * ^_^ %% ^_^ %% 249*bbe6b3a7SAndreas Gohr * m( %% m( %% 250f8369d7dSTobias Sarnowski * :?: %% :?: %% 251f8369d7dSTobias Sarnowski * :!: %% :!: %% 252f8369d7dSTobias Sarnowski * LOL %% LOL %% 253f8369d7dSTobias Sarnowski * FIXME %% FIXME %% 254f8369d7dSTobias Sarnowski * DELETEME %% DELETEME %% 255f8369d7dSTobias Sarnowski 256f8369d7dSTobias Sarnowski==== Text to HTML Conversions ==== 257f8369d7dSTobias Sarnowski 258f8369d7dSTobias SarnowskiTypography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. 259f8369d7dSTobias Sarnowski 260f8369d7dSTobias Sarnowski-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) 261f8369d7dSTobias Sarnowski"He thought 'It's a man's world'..." 262f8369d7dSTobias Sarnowski 263f8369d7dSTobias Sarnowski<code> 264f8369d7dSTobias Sarnowski-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) 265f8369d7dSTobias Sarnowski"He thought 'It's a man's world'..." 266f8369d7dSTobias Sarnowski</code> 267f8369d7dSTobias Sarnowski 268f8369d7dSTobias SarnowskiThe same can be done to produce any kind of HTML, it just needs to be added to the [[doku>entities|pattern file]]. 269f8369d7dSTobias Sarnowski 270f8369d7dSTobias 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]]. 271f8369d7dSTobias Sarnowski 272f8369d7dSTobias Sarnowski===== Quoting ===== 273f8369d7dSTobias Sarnowski 274f8369d7dSTobias SarnowskiSome times you want to mark some text to show it's a reply or comment. You can use the following syntax: 275f8369d7dSTobias Sarnowski 276*bbe6b3a7SAndreas Gohr<code> 277f8369d7dSTobias SarnowskiI think we should do it 278f8369d7dSTobias Sarnowski 279f8369d7dSTobias Sarnowski> No we shouldn't 280f8369d7dSTobias Sarnowski 281f8369d7dSTobias Sarnowski>> Well, I say we should 282f8369d7dSTobias Sarnowski 283f8369d7dSTobias Sarnowski> Really? 284f8369d7dSTobias Sarnowski 285f8369d7dSTobias Sarnowski>> Yes! 286f8369d7dSTobias Sarnowski 287f8369d7dSTobias Sarnowski>>> Then lets do it! 288*bbe6b3a7SAndreas Gohr</code> 289f8369d7dSTobias Sarnowski 290f8369d7dSTobias SarnowskiI think we should do it 291f8369d7dSTobias Sarnowski 292f8369d7dSTobias Sarnowski> No we shouldn't 293f8369d7dSTobias Sarnowski 294f8369d7dSTobias Sarnowski>> Well, I say we should 295f8369d7dSTobias Sarnowski 296f8369d7dSTobias Sarnowski> Really? 297f8369d7dSTobias Sarnowski 298f8369d7dSTobias Sarnowski>> Yes! 299f8369d7dSTobias Sarnowski 300f8369d7dSTobias Sarnowski>>> Then lets do it! 301f8369d7dSTobias Sarnowski 302f8369d7dSTobias Sarnowski===== Tables ===== 303f8369d7dSTobias Sarnowski 304f8369d7dSTobias SarnowskiDokuWiki supports a simple syntax to create tables. 305f8369d7dSTobias Sarnowski 306f8369d7dSTobias Sarnowski^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 307f8369d7dSTobias Sarnowski| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | 308f8369d7dSTobias Sarnowski| Row 2 Col 1 | some colspan (note the double pipe) || 309f8369d7dSTobias Sarnowski| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | 310f8369d7dSTobias Sarnowski 311f8369d7dSTobias SarnowskiTable rows have to start and end with a ''|'' for normal rows or a ''^'' for headers. 312f8369d7dSTobias Sarnowski 313f8369d7dSTobias Sarnowski ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 314f8369d7dSTobias Sarnowski | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | 315f8369d7dSTobias Sarnowski | Row 2 Col 1 | some colspan (note the double pipe) || 316f8369d7dSTobias Sarnowski | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | 317f8369d7dSTobias Sarnowski 318f8369d7dSTobias 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! 319f8369d7dSTobias Sarnowski 320f8369d7dSTobias SarnowskiVertical tableheaders are possible, too. 321f8369d7dSTobias Sarnowski 322f8369d7dSTobias Sarnowski| ^ Heading 1 ^ Heading 2 ^ 323f8369d7dSTobias Sarnowski^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | 324f8369d7dSTobias Sarnowski^ Heading 4 | no colspan this time | | 325f8369d7dSTobias Sarnowski^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | 326f8369d7dSTobias Sarnowski 327f8369d7dSTobias SarnowskiAs you can see, it's the cell separator before a cell which decides about the formatting: 328f8369d7dSTobias Sarnowski 329f8369d7dSTobias Sarnowski | ^ Heading 1 ^ Heading 2 ^ 330f8369d7dSTobias Sarnowski ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | 331f8369d7dSTobias Sarnowski ^ Heading 4 | no colspan this time | | 332f8369d7dSTobias Sarnowski ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | 333f8369d7dSTobias Sarnowski 334*bbe6b3a7SAndreas GohrYou can have rowspans (vertically connected cells) by adding ''%%:::%%'' into the cells below the one to which they should connect. 335f8369d7dSTobias Sarnowski 336f8369d7dSTobias Sarnowski^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 337f8369d7dSTobias Sarnowski| Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | 338f8369d7dSTobias Sarnowski| Row 2 Col 1 | ::: | Row 2 Col 3 | 339f8369d7dSTobias Sarnowski| Row 3 Col 1 | ::: | Row 2 Col 3 | 340f8369d7dSTobias Sarnowski 341f8369d7dSTobias SarnowskiApart from the rowspan syntax those cells should not contain anything else. 342f8369d7dSTobias Sarnowski 343f8369d7dSTobias Sarnowski ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 344f8369d7dSTobias Sarnowski | Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | 345f8369d7dSTobias Sarnowski | Row 2 Col 1 | ::: | Row 2 Col 3 | 346f8369d7dSTobias Sarnowski | Row 3 Col 1 | ::: | Row 2 Col 3 | 347f8369d7dSTobias Sarnowski 348f8369d7dSTobias 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. 349f8369d7dSTobias Sarnowski 350f8369d7dSTobias Sarnowski^ Table with alignment ^^^ 351f8369d7dSTobias Sarnowski| right| center |left | 352f8369d7dSTobias Sarnowski|left | right| center | 353f8369d7dSTobias Sarnowski| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | 354f8369d7dSTobias Sarnowski 355f8369d7dSTobias SarnowskiThis is how it looks in the source: 356f8369d7dSTobias Sarnowski 357f8369d7dSTobias Sarnowski ^ Table with alignment ^^^ 358f8369d7dSTobias Sarnowski | right| center |left | 359f8369d7dSTobias Sarnowski |left | right| center | 360f8369d7dSTobias Sarnowski | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | 361f8369d7dSTobias Sarnowski 362f8369d7dSTobias SarnowskiNote: Vertical alignment is not supported. 363f8369d7dSTobias Sarnowski 364f8369d7dSTobias Sarnowski===== No Formatting ===== 365f8369d7dSTobias Sarnowski 366f8369d7dSTobias 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>''. 367f8369d7dSTobias Sarnowski 368f8369d7dSTobias Sarnowski<nowiki> 369f8369d7dSTobias SarnowskiThis is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. 370f8369d7dSTobias Sarnowski</nowiki> 371f8369d7dSTobias SarnowskiThe same is true for %%//__this__ text// with a smiley ;-)%%. 372f8369d7dSTobias Sarnowski 373f8369d7dSTobias Sarnowski <nowiki> 374f8369d7dSTobias Sarnowski This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. 375f8369d7dSTobias Sarnowski </nowiki> 376f8369d7dSTobias Sarnowski The same is true for %%//__this__ text// with a smiley ;-)%%. 377f8369d7dSTobias Sarnowski 378f8369d7dSTobias Sarnowski===== Code Blocks ===== 379f8369d7dSTobias Sarnowski 380f8369d7dSTobias 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>%%''. 381f8369d7dSTobias Sarnowski 382f8369d7dSTobias Sarnowski This is text is indented by two spaces. 383f8369d7dSTobias Sarnowski 384f8369d7dSTobias Sarnowski<code> 385f8369d7dSTobias SarnowskiThis is preformatted code all spaces are preserved: like <-this 386f8369d7dSTobias Sarnowski</code> 387f8369d7dSTobias Sarnowski 388f8369d7dSTobias Sarnowski<file> 389f8369d7dSTobias SarnowskiThis is pretty much the same, but you could use it to show that you quoted a file. 390f8369d7dSTobias Sarnowski</file> 391f8369d7dSTobias Sarnowski 392f8369d7dSTobias SarnowskiThose blocks were created by this source: 393f8369d7dSTobias Sarnowski 394f8369d7dSTobias Sarnowski This is text is indented by two spaces. 395f8369d7dSTobias Sarnowski 396f8369d7dSTobias Sarnowski <code> 397f8369d7dSTobias Sarnowski This is preformatted code all spaces are preserved: like <-this 398f8369d7dSTobias Sarnowski </code> 399f8369d7dSTobias Sarnowski 400f8369d7dSTobias Sarnowski <file> 401f8369d7dSTobias Sarnowski This is pretty much the same, but you could use it to show that you quoted a file. 402f8369d7dSTobias Sarnowski </file> 403f8369d7dSTobias Sarnowski 404f8369d7dSTobias Sarnowski==== Syntax Highlighting ==== 405f8369d7dSTobias Sarnowski 406f8369d7dSTobias 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>''. 407f8369d7dSTobias Sarnowski 408f8369d7dSTobias Sarnowski<code java> 409f8369d7dSTobias Sarnowski/** 410f8369d7dSTobias Sarnowski * The HelloWorldApp class implements an application that 411f8369d7dSTobias Sarnowski * simply displays "Hello World!" to the standard output. 412f8369d7dSTobias Sarnowski */ 413f8369d7dSTobias Sarnowskiclass HelloWorldApp { 414f8369d7dSTobias Sarnowski public static void main(String[] args) { 415f8369d7dSTobias Sarnowski System.out.println("Hello World!"); //Display the string. 416f8369d7dSTobias Sarnowski } 417f8369d7dSTobias Sarnowski} 418f8369d7dSTobias Sarnowski</code> 419f8369d7dSTobias Sarnowski 420*bbe6b3a7SAndreas GohrThe following language strings are currently recognized: //4cs 6502acme 6502kickass 6502tasm 68000devpac abap actionscript3 actionscript ada aimms algol68 apache applescript apt_sources arm asm asp asymptote autoconf autohotkey autoit avisynth awk bascomavr bash basic4gl batch bf biblatex bibtex blitzbasic bnf boo caddcl cadlisp ceylon cfdg cfm chaiscript chapel cil c_loadrunner clojure c_mac cmake cobol coffeescript c cpp cpp-qt cpp-winapi csharp css cuesheet c_winapi dart dcl dcpu16 dcs delphi diff div dos dot d ecmascript eiffel email epc e erlang euphoria ezt f1 falcon fo fortran freebasic freeswitch fsharp gambas gdb genero genie gettext glsl gml gnuplot go groovy gwbasic haskell haxe hicest hq9plus html html4strict html5 icon idl ini inno intercal io ispfpanel java5 java javascript jcl j jquery julia kixtart klonec klonecpp kotlin latex lb ldif lisp llvm locobasic logtalk lolcode lotusformulas lotusscript lscript lsl2 lua m68k magiksf make mapbasic mathematica matlab mercury metapost mirc mk-61 mmix modula2 modula3 mpasm mxml mysql nagios netrexx newlisp nginx nimrod nsis oberon2 objc objeck ocaml-brief ocaml octave oobas oorexx oracle11 oracle8 oxygene oz parasail parigp pascal pcre perl6 perl per pf phix php-brief php pic16 pike pixelbender pli plsql postgresql postscript povray powerbuilder powershell proftpd progress prolog properties providex purebasic pycon pys60 python qbasic qml q racket rails rbs rebol reg rexx robots roff rpmspec rsplus ruby rust sas sass scala scheme scilab scl sdlbasic smalltalk smarty spark sparql sql sshconfig standardml stonescript swift systemverilog tclegg tcl teraterm texgraph text thinbasic tsql twig typoscript unicon upc urbi uscript vala vbnet vb vbscript vedit verilog vhdl vim visualfoxpro visualprolog whitespace whois winbatch wolfram xbasic xml xojo xorg_conf xpp yaml z80 zxbasic// 421*bbe6b3a7SAndreas Gohr 422*bbe6b3a7SAndreas GohrThere are additional [[doku>syntax_highlighting|advanced options]] available for syntax highlighting, such as highlighting lines or adding line numbers. 423f8369d7dSTobias Sarnowski 424f8369d7dSTobias Sarnowski==== Downloadable Code Blocks ==== 425f8369d7dSTobias Sarnowski 426*bbe6b3a7SAndreas GohrWhen 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: 427f8369d7dSTobias Sarnowski 428f8369d7dSTobias Sarnowski<code> 429f8369d7dSTobias Sarnowski<file php myexample.php> 430f8369d7dSTobias Sarnowski<?php echo "hello world!"; ?> 431f8369d7dSTobias Sarnowski</file> 432f8369d7dSTobias Sarnowski</code> 433f8369d7dSTobias Sarnowski 434f8369d7dSTobias Sarnowski<file php myexample.php> 435f8369d7dSTobias Sarnowski<?php echo "hello world!"; ?> 436f8369d7dSTobias Sarnowski</file> 437f8369d7dSTobias Sarnowski 438f8369d7dSTobias SarnowskiIf you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. 439f8369d7dSTobias Sarnowski 440f8369d7dSTobias Sarnowski===== RSS/ATOM Feed Aggregation ===== 441f8369d7dSTobias 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: 442f8369d7dSTobias Sarnowski 443f8369d7dSTobias Sarnowski^ Parameter ^ Description ^ 444f8369d7dSTobias Sarnowski| any number | will be used as maximum number items to show, defaults to 8 | 445f8369d7dSTobias Sarnowski| reverse | display the last items in the feed first | 446f8369d7dSTobias Sarnowski| author | show item authors names | 447f8369d7dSTobias Sarnowski| date | show item dates | 448*bbe6b3a7SAndreas Gohr| description| show the item description. All HTML tags will be stripped | 449*bbe6b3a7SAndreas Gohr| nosort | do not sort the items in the feed | 450f8369d7dSTobias Sarnowski| //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | 451f8369d7dSTobias Sarnowski 452f8369d7dSTobias 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. 453f8369d7dSTobias Sarnowski 454*bbe6b3a7SAndreas GohrBy 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''. 455*bbe6b3a7SAndreas Gohr 456f8369d7dSTobias Sarnowski**Example:** 457f8369d7dSTobias Sarnowski 458f8369d7dSTobias Sarnowski {{rss>http://slashdot.org/index.rss 5 author date 1h }} 459f8369d7dSTobias Sarnowski 460f8369d7dSTobias Sarnowski{{rss>http://slashdot.org/index.rss 5 author date 1h }} 461f8369d7dSTobias Sarnowski 462f8369d7dSTobias Sarnowski 463f8369d7dSTobias Sarnowski===== Control Macros ===== 464f8369d7dSTobias Sarnowski 465f8369d7dSTobias SarnowskiSome syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: 466f8369d7dSTobias Sarnowski 467f8369d7dSTobias Sarnowski^ Macro ^ Description | 468f8369d7dSTobias Sarnowski| %%~~NOTOC~~%% | If this macro is found on the page, no table of contents will be created | 469f8369d7dSTobias 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 | 470f8369d7dSTobias Sarnowski 471f8369d7dSTobias Sarnowski===== Syntax Plugins ===== 472f8369d7dSTobias Sarnowski 473f8369d7dSTobias 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: 474f8369d7dSTobias Sarnowski 475f8369d7dSTobias Sarnowski~~INFO:syntaxplugins~~ 476