skip to content
DokuWiki
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
>
Recent Changes
Media Manager
Sitemap
Trace:
Hotfix release available: 2025-05-14a "Librarian".
upgrade now!
[56.1]
(what's this?)
New release available: 2025-05-14 "Librarian".
upgrade now!
[56]
(what's this?)
Hotfix release available: 2024-02-06b "Kaos".
upgrade now!
[55.2]
(what's this?)
Hotfix release available: 2024-02-06a "Kaos".
upgrade now!
[55.1]
(what's this?)
New release available: 2024-02-06 "Kaos".
upgrade now!
[55]
(what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum".
upgrade now!
[54.2]
(what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum".
upgrade now!
[54.1]
(what's this?)
New release available: 2023-04-04 "Jack Jackrum".
upgrade now!
[54]
(what's this?)
Hotfix release available: 2022-07-31b "Igor".
upgrade now!
[53.1]
(what's this?)
Hotfix release available: 2022-07-31a "Igor".
upgrade now!
[53]
(what's this?)
New release available: 2022-07-31 "Igor".
upgrade now!
[52.2]
(what's this?)
New release candidate 2 available: rc2022-06-26 "Igor".
upgrade now!
[52.1]
(what's this?)
New release candidate available: 2022-06-26 "Igor".
upgrade now!
[52]
(what's this?)
Hotfix release available: 2020-07-29a "Hogfather".
upgrade now!
[51.4]
(what's this?)
wiki:syntax
<h1>Formatting Syntax</h1> <div class="level1"> <p> oIWIKIoDokuWikicIWIKIc 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 <a href="/wiki/doku.php?id=playground:playground" class="wikilink1" title="playground:playground" data-wiki-id="playground:playground">playground</a> page. The simpler markup is easily accessible via quickbuttons, too. </p> </div> <h2>Basic Text Formatting</h2> <div class="level2"> <p> DokuWiki supports <b>bold</b>, <em>italic</em>, <u>underlined</u> and <code>monospaced</code> texts. Of course you can <b><u><em><code>combine</code></em></u></b> all these. </p> <pre class="code">DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. Of course you can **__//''combine''//__** all these. </pre><p> </p> <p> You can use <sub>subscript</sub> and <sup>superscript</sup>, too. </p> <pre class="code">You can use <sub>subscript</sub> and <sup>superscript</sup>, too. </pre><p> </p> <p> You can mark something as <strike>deleted</strike> as well. </p> <pre class="code">You can mark something as <del>deleted</del> as well. </pre><p> </p> <p> <b>Paragraphs</b> are created from blank lines. If you want to <b>force a newline</b> without a paragraph, you can use two backslashes followed by a whitespace or the end of line. </p> <p> This is some text with some linebreaks<br/> Note that the two backslashes are only recognized at the end of a line <br/> or followed by<br/> a whitespace \\this happens without it. </p> <pre class="code">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. </pre><p> </p> <p> You should use forced newlines only if really needed. </p> </div> <h2>Links</h2> <div class="level2"> <p> DokuWiki supports multiple ways of creating links. </p> </div> <h3>External</h3> <div class="level3"> <p> External links are recognized automagically: http:<em>www.google.com or simply www.google.com - You can set the link text as well: This Link points to google. Email addresses like this one: <andi@splitbrain.org> are recognized, too. DokuWiki supports multiple ways of creating links. External links are recognized automagically: http:</em>www.google.com or simply www.google.com - You can set </p> <pre class="code">link text as well: [[http://www.google.com|This Link points to google]]. Email addresses like this one: <andi@splitbrain.org> are recognized, too. </pre><p> </p> </div> <h3>Internal</h3> <div class="level3"> <p> Internal links are created by using square brackets. You can either just give a <a href="/wiki/doku.php?id=wiki:pagename" class="wikilink2" title="wiki:pagename" rel="nofollow" data-wiki-id="wiki:pagename">pagename</a> or use an additional <a href="/wiki/doku.php?id=wiki:pagename" class="wikilink2" title="wiki:pagename" rel="nofollow" data-wiki-id="wiki:pagename">link text</a>. </p> <pre class="code">Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]]. </pre><p> </p> <p> Wiki pagenames are converted to lowercase automatically, special characters are not allowed. </p> <p> You can use <a href="/wiki/doku.php?id=some:namespaces" class="wikilink2" title="some:namespaces" rel="nofollow" data-wiki-id="some:namespaces">namespaces</a> by using a colon in the pagename. </p> <pre class="code">You can use [[some:namespaces]] by using a colon in the pagename. </pre><p> </p> <p> For details about namespaces see namespaces. </p> <p> Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to <a href="/wiki/doku.php?id=wiki:syntax#internal" class="wikilink1" title="wiki:syntax" data-wiki-id="wiki:syntax">this Section</a>. </p> <pre class="code">This links to [[syntax#internal|this Section]]. </pre><p> </p> <p> Notes: </p> <ul> <li class="level1"> Links to <a href="/wiki/doku.php?id=wiki:syntax" class="wikilink1" title="wiki:syntax" data-wiki-id="wiki:syntax">existing pages</a> are shown in a different style from <a href="/wiki/doku.php?id=wiki:nonexisting" class="wikilink2" title="wiki:nonexisting" rel="nofollow" data-wiki-id="wiki:nonexisting">nonexisting</a> ones.</li> <li class="level1"> DokuWiki does not use CamelCase to automatically create links by default, but this behavior can be enabled in the oIWIKIoconfigcIWIKIc file. Hint: If DokuWiki is a link, then it's enabled.</li> <li class="level1"> When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much.</li> </ul> </div> <h3>Interwiki</h3> <div class="level3"> <p> DokuWiki supports oIWIKIoInterwikicIWIKIc links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: oIWIKIoWikicIWIKIc. </p> <pre class="code">DokuWiki supports [[doku>oIWIKIoInterwikicIWIKIc]] links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: [[wp>oIWIKIoWikicIWIKIc]]. </pre><p> </p> </div> <h3>Windows Shares</h3> <div class="level3"> <p> Windows shares like <a href="file://///server/share" class="windows" title="\\server\share">this</a> are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate oIWIKIoIntranetcIWIKIc. </p> <pre class="code">Windows Shares like [[\\server\share|this]] are recognized, too. </pre><p> </p> <p> Notes: </p> <ul> <li class="level1"> For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone").</li> <li class="level1"> For Mozilla and Firefox it can be enabled through different workaround mentioned in the 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 <code>conf/userscript.js</code>:</li> </ul> <pre class="code">LANG.nosmblinks = ''; </pre><p> </p> </div> <h3>Image Links</h3> <div class="level3"> <p> You can also use an image to link to another internal or external page by combining the syntax for links and <a href="#images_and_other_files" title="wiki:syntax ↵" class="wikilink1">images</a> (see below) like this: </p> <pre class="code">[[http://www.php.net|{{wiki:dokuwiki-128.png}}]] </pre><p> </p> <p> dokuwiki-128.png </p> <p> Please note: The image formatting is the only formatting syntax accepted in link names. </p> <p> The whole <a href="#images_and_other_files" title="wiki:syntax ↵" class="wikilink1">image</a> and <a href="#links" title="wiki:syntax ↵" class="wikilink1">link</a> syntax is supported (including image resizing, internal and external images and URLs and interwiki links). </p> </div> <h2>Footnotes</h2> <div class="level2"> <p> You can add footnotes <sup><a href="#fn__1" id="fnt__1" class="fn_top">1)</a></sup> by using double parentheses. </p> <pre class="code">You can add footnotes ((This is a footnote)) by using double parentheses. </pre><p> </p> </div> <h2>Sectioning</h2> <div class="level2"> <p> 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 <code><nowiki>~ ~ NOTOC~ ~ </nowiki></code> in the document. </p> </div> <h3>Headline Level 3</h3> <div class="level3"> </div> <h4>Headline Level 4</h4> <div class="level4"> </div> <h5>Headline Level 5</h5> <div class="level5"> <pre class="code">==== Headline Level 3 ==== === Headline Level 4 === == Headline Level 5 == </pre><p> </p> <p> By using four or more dashes, you can make a horizontal line: </p> <hr /> </div> <h2>Images and Other Files</h2> <div class="level2"> <p> You can include external and internal images with curly brackets. Optionally you can specify the size of them. </p> <p> Real size: <a href="/wiki/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="media mediafile mf_png" title="wiki:dokuwiki-128.png (32.8 KB)">dokuwiki-128.png</a> </p> <p> Resize to given width: <a href="/wiki/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="media mediafile mf_png" title="wiki:dokuwiki-128.png (32.8 KB)">dokuwiki-128.png</a> </p> <p> Resize to given width and height<sup><a href="#fn__2" id="fnt__2" class="fn_top">2)</a></sup>: <a href="/wiki/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="media mediafile mf_png" title="wiki:dokuwiki-128.png (32.8 KB)">dokuwiki-128.png</a> </p> <p> Resized external image: <a href="/wiki/lib/exe/fetch.php?tok=31798a&media=http%3A%2F%2Fde3.php.net%2Fimages%2Fphp.gif" class="media mediafile mf_gif" title="http://de3.php.net/images/php.gif">php.gif</a> </p> <pre class="code">Real size: {{wiki:dokuwiki-128.png}} Resize to given width: {{wiki:dokuwiki-128.png?50}} Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} Resized external image: {{http://de3.php.net/images/php.gif?200x50}} </pre><p> </p> <p> By using left or right whitespaces you can choose the alignment. </p> <p> <a href="/wiki/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="media mediafile mf_png" title="wiki:dokuwiki-128.png (32.8 KB)">dokuwiki-128.png</a> </p> <p> <a href="/wiki/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="media mediafile mf_png" title="wiki:dokuwiki-128.png (32.8 KB)">dokuwiki-128.png</a> </p> <p> <a href="/wiki/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="media mediafile mf_png" title="wiki:dokuwiki-128.png (32.8 KB)">dokuwiki-128.png</a> </p> <pre class="code">{{ wiki:dokuwiki-128.png}} {{wiki:dokuwiki-128.png }} {{ wiki:dokuwiki-128.png }} </pre><p> </p> <p> Of course, you can add a title (displayed as a tooltip by most browsers), too. </p> <p> <a href="/wiki/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="media mediafile mf_png" title="wiki:dokuwiki-128.png (32.8 KB)">This is the caption</a> </p> <pre class="code">{{ wiki:dokuwiki-128.png |This is the caption}} </pre><p> </p> <p> If you specify a filename (external or internal) that is not an image (<code>gif, jpeg, png</code>), then it will be displayed as a link instead. </p> <p> For linking an image to another page see <a href="#image_links" title="wiki:syntax ↵" class="wikilink1">Image Links</a> above. </p> </div> <h2>Lists</h2> <div class="level2"> <p> Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a <code>*</code> for unordered lists or a <code>-</code> for ordered ones. </p> <ul> <li class="level1"> This is a list</li> <li class="level1 node"> The second item<ul> <li class="level2"> You may have different levels</li> </ul> </li> <li class="level1"> Another item</li> </ul> <ol> <li class="level1"> The same list but ordered</li> <li class="level1 node"> Another item<ol> <li class="level2"> Just use indention for deeper levels</li> </ol> </li> <li class="level1"> That's it</li> </ol> <pre class="code"> * This is a list * The second item * You may have different levels * Another item - The same list but ordered - Another item - Just use indention for deeper levels - That's it </pre><p> </p> <p> Also take a look at the FAQ on list items. </p> </div> <h2>Text Conversions</h2> <div class="level2"> <p> DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML. </p> <p> 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. </p> </div> <h3>Text to Image Conversions</h3> <div class="level3"> <p> DokuWiki converts commonly used oIWIKIoemoticoncIWIKIcs to their graphical equivalents. Those oIWIKIoSmileyscIWIKIc and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki: </p> <ul> <li class="level1"> 8-) <nowiki> 8-) </nowiki></li> <li class="level1"> 8-O <nowiki> 8-O </nowiki></li> <li class="level1"> :-( <nowiki> :-( </nowiki></li> <li class="level1"> :-) <nowiki> :-) </nowiki></li> <li class="level1"> =) <nowiki> =) </nowiki></li> <li class="level1"> :-/ <nowiki> :-/ </nowiki></li> <li class="level1"> :-\ <nowiki> :-\ </nowiki></li> <li class="level1"> :-? <nowiki> :-? </nowiki></li> <li class="level1"> :-D <nowiki> :-D </nowiki></li> <li class="level1"> :-P <nowiki> :-P </nowiki></li> <li class="level1"> :-O <nowiki> :-O </nowiki></li> <li class="level1"> :-X <nowiki> :-X </nowiki></li> <li class="level1"> :-| <nowiki> :-| </nowiki></li> <li class="level1"> ;-) <nowiki> ;-) </nowiki></li> <li class="level1"> ^_^ <nowiki> ^_^ </nowiki></li> <li class="level1"> :?: <nowiki> :?: </nowiki></li> <li class="level1"> :!: <nowiki> :!: </nowiki></li> <li class="level1"> LOL <nowiki> LOL </nowiki></li> <li class="level1"> FIXME <nowiki> FIXME </nowiki></li> <li class="level1"> DELETEME <nowiki> DELETEME </nowiki></li> </ul> </div> <h3>Text to HTML Conversions</h3> <div class="level3"> <p> Typography: <a href="/wiki/doku.php?id=wiki:dokuwiki" class="wikilink1" title="wiki:dokuwiki" data-wiki-id="wiki:dokuwiki">DokuWiki</a> can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. </p> <p> -> <- <-> => <= <=> >> << -- --- 640×480 (c) (tm) (r) "He thought 'It's a man's world'..." </p> <pre class="code">-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) "He thought 'It's a man's world'..." </pre><p> </p> <p> The same can be done to produce any kind of HTML, it just needs to be added to the pattern file. </p> <p> There are three exceptions which do not come from that pattern file: multiplication entity (640×480), 'single' and "double quotes". They can be turned off through a config option. </p> </div> <h2>Quoting</h2> <div class="level2"> <p> Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: </p> <pre class="code">I think we should do it > No we shouldn't >> Well, I say we should<br /> > Really? >> Yes!<br /> >>> Then lets do it!<br /> </pre><p> </p> <p> I think we should do it </p> <p> > No we shouldn't<br /> </p> <p> >> Well, I say we should<br /> </p> <p> > Really?<br /> </p> <p> >> Yes!<br /> </p> <p> >>> Then lets do it!<br /> </p> </div> <h2>Tables</h2> <div class="level2"> <p> DokuWiki supports a simple syntax to create tables. </p> <span class='np_break'> </span> <div class="table sectionedit1"><table class="inline"> <thead> <tr class="row0"> <th class="leftalign"> Heading 1 </th><th class="leftalign"> Heading 2 </th><th class="leftalign"> Heading 3 </th> </tr> </thead> <tr class="row1"> <td class="leftalign"> Row 1 Col 1 </td><td class="leftalign"> Row 1 Col 2 </td><td class="leftalign"> Row 1 Col 3 </td> </tr> <tr class="row2"> <td class="leftalign"> Row 2 Col 1 </td><td class="col1" colspan="2"> some colspan (note the double pipe) </td> </tr> <tr class="row3"> <td class="leftalign"> Row 3 Col 1 </td><td class="leftalign"> Row 3 Col 2 </td><td class="leftalign"> Row 3 Col 3 </td> </tr> </table> <span class='np_break'> </span> </div> <p> Table rows have to start and end with a <code>|</code> for normal rows or a <code>^</code> for headers. </p> <pre class="code">^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | | Row 2 Col 1 | some colspan (note the double pipe) || | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | </pre><p> </p> <p> 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! </p> <p> Vertical tableheaders are possible, too. </p> <span class='np_break'> </span> <div class="table sectionedit2"><table class="inline"> <thead> <tr class="row0"> <td class="leftalign"> </td><th class="leftalign"> Heading 1 </th><th class="leftalign"> Heading 2 </th> </tr> </thead> <tr class="row1"> <th class="leftalign"> Heading 3 </th><td class="leftalign"> Row 1 Col 2 </td><td class="leftalign"> Row 1 Col 3 </td> </tr> <tr class="row2"> <th class="leftalign"> Heading 4 </th><td class="col1"> no colspan this time </td><td class="leftalign"> </td> </tr> <tr class="row3"> <th class="leftalign"> Heading 5 </th><td class="leftalign"> Row 2 Col 2 </td><td class="leftalign"> Row 2 Col 3 </td> </tr> </table> <span class='np_break'> </span> </div> <p> As you can see, it's the cell separator before a cell which decides about the formatting: </p> <pre class="code">| ^ Heading 1 ^ Heading 2 ^ ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | ^ Heading 4 | no colspan this time | | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | </pre><p> </p> <p> You can have rowspans (vertically connected cells) by adding <code>:::</code> into the cells below the one to which they should connect. </p> <span class='np_break'> </span> <div class="table sectionedit3"><table class="inline"> <thead> <tr class="row0"> <th class="leftalign"> Heading 1 </th><th class="leftalign"> Heading 2 </th><th class="leftalign"> Heading 3 </th> </tr> </thead> <tr class="row1"> <td class="leftalign"> Row 1 Col 1 </td><td class="col1" rowspan="3"> this cell spans vertically </td><td class="leftalign"> Row 1 Col 3 </td> </tr> <tr class="row2"> <td class="leftalign"> Row 2 Col 1 </td><td class="leftalign"> Row 2 Col 3 </td> </tr> <tr class="row3"> <td class="leftalign"> Row 3 Col 1 </td><td class="leftalign"> Row 2 Col 3 </td> </tr> </table> <span class='np_break'> </span> </div> <p> Apart from the rowspan syntax those cells should not contain anything else. </p> <pre class="code">^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | | Row 2 Col 1 | ::: | Row 2 Col 3 | | Row 3 Col 1 | ::: | Row 2 Col 3 | </pre><p> </p> <p> 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. </p> <span class='np_break'> </span> <div class="table sectionedit4"><table class="inline"> <thead> <tr class="row0"> <th class="centeralign" colspan="3"> Table with alignment </th> </tr> </thead> <tr class="row1"> <td class="rightalign"> right</td><td class="centeralign"> center </td><td class="leftalign">left </td> </tr> <tr class="row2"> <td class="leftalign">left </td><td class="rightalign"> right</td><td class="centeralign"> center </td> </tr> <tr class="row3"> <td class="col0"> xxxxxxxxxxxx </td><td class="col1"> xxxxxxxxxxxx </td><td class="col2"> xxxxxxxxxxxx </td> </tr> </table> <span class='np_break'> </span> </div> <p> This is how it looks in the source: </p> <pre class="code">^ Table with alignment ^^^ | right| center |left | |left | right| center | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | </pre><p> </p> <p> Note: Vertical alignment is not supported. </p> </div> <h2>No Formatting</h2> <div class="level2"> <p> If you need to display text exactly like it is typed (without any formatting), enclose the area either with <code>< nowiki ></code> tags or even simpler, with double percent signs <code><nowiki>%%</nowiki></code>. </p> <p> <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 <nowiki>//__this__ text// with a smiley ;-)</nowiki>. </p> <pre class="code"><nowiki><nowiki> This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. </nowiki></nowiki> The same is true for <nowiki><nowiki>//__this__ text// with a smiley ;-)</nowiki></nowiki>. </pre><p> </p> </div> <h2>Code Blocks</h2> <div class="level2"> <p> You can include code blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags <code><code></code> or <code><file></code>. </p> <pre class="code">This is text is indented by two spaces. </pre><p> </p> <pre class="code">This is preformatted code all spaces are preserved: like <-this </pre><p> </p> <pre class="file">This is pretty much the same, but you could use it to show that you quoted a file. </pre><p> </p> <p> Those blocks were created by this source: </p> <pre class="code"> This is text is indented by two spaces. </pre><p> </p> <pre class="code"><code> This is preformatted code all spaces are preserved: like <-this </code> </pre><p> </p> <pre class="code"><file> This is pretty much the same, but you could use it to show that you quoted a file. </file> </pre><p> </p> </div> <h3>Syntax Highlighting</h3> <div class="level3"> <p> <a href="/wiki/doku.php?id=wiki:dokuwiki" class="wikilink1" title="wiki:dokuwiki" data-wiki-id="wiki:dokuwiki">DokuWiki</a> can highlight sourcecode, which makes it easier to read. It uses the 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><nowiki><code java></nowiki></code> or <code><nowiki><file java></nowiki></code>. </p> <pre class="code java"><span class="co3">/** * The HelloWorldApp class implements an application that * simply displays "Hello World!" to the standard output. */</span> <span class="kw1">class</span> HelloWorldApp <span class="br0">{</span> <span class="kw1">public</span> <span class="kw1">static</span> <span class="kw4">void</span> main<span class="br0">(</span><a href="http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string"><span class="kw3">String</span></a><span class="br0">[</span><span class="br0">]</span> args<span class="br0">)</span> <span class="br0">{</span> <a href="http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">(</span>"Hello World<span class="sy0">!</span>"<span class="br0">)</span><span class="sy0">;</span> <span class="co1">//Display the string.</span> <span class="br0">}</span> <span class="br0">}</span> </pre><p> </p> <p> The following language strings are currently recognized: <em>4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript-french, actionscript, actionscript3, ada, algol68, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, e, epc, ecmascript, eiffel, email, erlang, euphoria, f1, falcon, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, go, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, html5, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, objeck, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, 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, uscript, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic</em> </p> </div> <h3>Downloadable Code Blocks</h3> <div class="level3"> <p> When you use the <code><code></code> or <code><file></code> 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: </p> <pre class="code"><file php myexample.php> <?php echo "hello world!"; ?> </file> </pre><p> </p> <dl class="file"> <dt><a href="/wiki/doku.php?do=export_code&id=wiki:syntax&codeblock=6" title="Download Snippet" class="mediafile mf_php">myexample.php</a></dt> <dd><pre class="code file php">< ?php <span class="kw1">echo</span> "hello world<span class="sy0">!</span>"<span class="sy0">;</span> <span class="sy1">?></span> </pre><p> </p> </dd></dl> <p> If you don't want any highlighting but want a downloadable file, specify a dash (<code>-</code>) as the language code: <code><nowiki><code - myfile.foo></nowiki></code>. </p> </div> <h2>Embedding HTML and PHP</h2> <div class="level2"> <p> You can embed raw HTML or PHP code into your documents by using the <code><nowiki><html></nowiki></code> or <code><nowiki><php></nowiki></code> tags. (Use uppercase tags if you need to enclose block level elements.) </p> <p> HTML example: </p> <pre class="code"><html> This is some <span style="color:red;font-size:150%;">inline HTML</span> </html> <HTML> <p style="border:2px dashed red;">And this is some block HTML</p> </HTML> </pre><p> </p> <p> <html> This is some <span style="color:red;font-size:150%;">inline HTML</span> </html> <HTML> <p style="border:2px dashed red;">And this is some block HTML</p> </HTML> </p> <p> PHP example: </p> <pre class="code"><php> echo 'A logo generated by PHP:'; echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; echo '(generated inline HTML)'; </php> <PHP> echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; echo '</tr></table>'; </PHP> </pre><p> </p> <p> <php> echo 'A logo generated by PHP:'; echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; echo '(inline HTML)'; </php> <PHP> echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; echo '</tr></table>'; </PHP> </p> <p> <b>Please Note</b>: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. </p> </div> <h2>RSS/ATOM Feed Aggregation</h2> <div class="level2"> <p> <a href="/wiki/doku.php?id=wiki:dokuwiki" class="wikilink1" title="wiki:dokuwiki" data-wiki-id="wiki:dokuwiki">DokuWiki</a> can integrate data from external XML feeds. For parsing the XML feeds, 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: </p> <span class='np_break'> </span> <div class="table sectionedit5"><table class="inline"> <thead> <tr class="row0"> <th class="leftalign"> Parameter </th><th class="col1"> Description </th> </tr> </thead> <tr class="row1"> <td class="col0"> any number </td><td class="col1"> will be used as maximum number items to show, defaults to 8 </td> </tr> <tr class="row2"> <td class="leftalign"> reverse </td><td class="col1"> display the last items in the feed first </td> </tr> <tr class="row3"> <td class="leftalign"> author </td><td class="col1"> show item authors names </td> </tr> <tr class="row4"> <td class="leftalign"> date </td><td class="col1"> show item dates </td> </tr> <tr class="row5"> <td class="col0"> description</td><td class="col1"> show the item description. If HTML is disabled all tags will be stripped </td> </tr> <tr class="row6"> <td class="col0"> <em>n</em>[dhm] </td><td class="col1"> refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). </td> </tr> </table> <span class='np_break'> </span> </div> <p> The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. <a href="/wiki/doku.php?id=wiki:dokuwiki" class="wikilink1" title="wiki:dokuwiki" data-wiki-id="wiki:dokuwiki">DokuWiki</a> 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 <a href="/wiki/doku.php?id=wiki:dokuwiki" class="wikilink1" title="wiki:dokuwiki" data-wiki-id="wiki:dokuwiki">DokuWiki</a> to re-render the page if it is more than <em>refresh period</em> since the page was last rendered. </p> <p> <b>Example:</b> </p> <pre class="code">{ { rss>Feed:slashdot.org/index.rss 5 author date 1h }} </pre><p> </p> <p> { { rss>Feed:slashdot.org/index.rss 5 author date 1h }} </p> </div> <h2>Control Macros</h2> <div class="level2"> <p> Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: </p> <span class='np_break'> </span> <div class="table sectionedit6"><table class="inline"> <thead> <tr class="row0"> <th class="leftalign"> Macro </th><th class="col1"> Description </th> </tr> </thead> <tr class="row1"> <td class="leftalign"> <nowiki>~ ~ NOTOC~ ~ </nowiki> </td><td class="col1"> If this macro is found on the page, no table of contents will be created </td> </tr> <tr class="row2"> <td class="col0"> <nowiki>~ ~ NOCACHE~ ~ </nowiki> </td><td class="col1"> DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the <nowiki><php></nowiki> syntax above is used), adding this macro will force DokuWiki to rerender a page on every call </td> </tr> </table> <span class='np_break'> </span> </div> </div> <h2>Syntax Plugins</h2> <div class="level2"> <p> DokuWiki's syntax can be extended by 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: </p> ~~INFO:syntaxplugins~~ </div> <!-- EDIT{"target":"table","name":"","hid":"table5","secid":6,"range":"22687-"} --><!-- EDIT{"target":"table","name":"","hid":"table4","secid":5,"range":"21567-"} --><!-- EDIT{"target":"table","name":"","hid":"table3","secid":4,"range":"13607-"} --><!-- EDIT{"target":"table","name":"","hid":"table2","secid":3,"range":"12723-"} --><!-- EDIT{"target":"table","name":"","hid":"table1","secid":2,"range":"12005-"} --><!-- EDIT{"target":"table","name":"","hid":"table","secid":1,"range":"11254-"} --><div class="footnotes"> <div class="fn"><sup><a href="#fnt__1" id="fn__1" class="fn_bot">1)</a></sup> <div class="content">This is a footnote</div></div> <div class="fn"><sup><a href="#fnt__2" id="fn__2" class="fn_bot">2)</a></sup> <div class="content">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</div></div> </div>
[ close ]
Enable Complex Tables
Editor Height
px
Turn supplementary image paste support on
Edit summary:
Minor changes
Please fill all the letters into the box to prove you're human.
P L D T T
Please keep this field empty:
wiki/syntax.txt
· Last modified: 2013/12/08 18:12 (external edit)
Page Tools
Show page
Old revisions
Backlinks
Back to top