przejście do zawartości
Narzędzia użytkownika
Zaloguj
Narzędzia witryny
Narzędzia
Pokaż stronę
Poprzednie wersje
Odnośniki
Ostatnie zmiany
Menadżer multimediów
Indeks
Zaloguj
Ostatnie zmiany
Indeks
Ślad:
wiki:syntax
Ta strona jest tylko do odczytu. Możesz wyświetlić źródła tej strony ale nie możesz ich zmienić.
<h1>Formatting Syntax</h1> <div class="level1"> <p> <a href="http://www.dokuwiki.org/DokuWiki" class="interwiki iw_doku" title="http://www.dokuwiki.org/DokuWiki">DokuWiki</a> 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="/doku.php?id=playground:playground" class="wikilink1" title="playground:playground">playground</a> page. The simpler markup is easily accessible via <a href="http://www.dokuwiki.org/toolbar" class="interwiki iw_doku" title="http://www.dokuwiki.org/toolbar">quickbuttons</a>, 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\ Note that the two backslashes are only recognized at the end of a line<br/> or followed by\ 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: <a href="http://www.google.com" class="urlextern" title="http://www.google.com" rel="nofollow">http://www.google.com</a> or simply <a href="http://www.google.com" class="urlextern" title="http://www.google.com" rel="nofollow">www.google.com</a> - You can set the link text as well: <a href="http://www.google.com" class="urlextern" title="http://www.google.com" rel="nofollow">This Link points to google</a>. Email addresses like this one: <a href="mailto:andi@splitbrain.org" class="mail" title="andi@splitbrain.org">andi@splitbrain.org</a> are recognized, too. </p> <pre class="code">DokuWiki supports multiple ways of creating links. External links are recognized automagically: http://www.google.com or simply www.google.com - You can set link text as well: [[http://www.google.com|This Link points to google]]. Email 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="/doku.php?id=wiki:pagename" class="wikilink2" title="wiki:pagename" rel="nofollow">pagename</a> or use an additional <a href="/doku.php?id=wiki:pagename" class="wikilink2" title="wiki:pagename" rel="nofollow">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> <a href="http://www.dokuwiki.org/pagename" class="interwiki iw_doku" title="http://www.dokuwiki.org/pagename">Wiki pagenames</a> are converted to lowercase automatically, special characters are not allowed. </p> <p> You can use <a href="/doku.php?id=some:namespaces" class="wikilink2" title="some:namespaces" rel="nofollow">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 <a href="http://www.dokuwiki.org/namespaces" class="interwiki iw_doku" title="http://www.dokuwiki.org/namespaces">namespaces</a>. </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 <span class="curid"><a href="/doku.php?id=wiki:syntax#internal" class="wikilink1" title="wiki:syntax">this Section</a></span>. </p> <pre class="code">This links to [[syntax#internal|this Section]]. </pre><p> </p> <p> Notes: </p> <ul> <li class="level1"> Links to <span class="curid"><a href="/doku.php?id=wiki:syntax" class="wikilink1" title="wiki:syntax">existing pages</a></span> are shown in a different style from <a href="/doku.php?id=wiki:nonexisting" class="wikilink2" title="wiki:nonexisting" rel="nofollow">nonexisting</a> ones.</li> <li class="level1"> DokuWiki does not use <a href="http://en.wikipedia.org/wiki/CamelCase" class="interwiki iw_wp" title="http://en.wikipedia.org/wiki/CamelCase">CamelCase</a> to automatically create links by default, but this behavior can be enabled in the <a href="http://www.dokuwiki.org/config" class="interwiki iw_doku" title="http://www.dokuwiki.org/config">config</a> 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 <a href="http://www.dokuwiki.org/Interwiki" class="interwiki iw_doku" title="http://www.dokuwiki.org/Interwiki">Interwiki</a> links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: <a href="http://en.wikipedia.org/wiki/Wiki" class="interwiki iw_wp" title="http://en.wikipedia.org/wiki/Wiki">Wiki</a>. </p> <pre class="code">DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. </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 <a href="http://en.wikipedia.org/wiki/Intranet" class="interwiki iw_wp" title="http://en.wikipedia.org/wiki/Intranet">Intranet</a>. </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 <a href="http://kb.mozillazine.org/Links_to_local_pages_do_not_work" class="urlextern" title="http://kb.mozillazine.org/Links_to_local_pages_do_not_work" rel="nofollow">Mozilla Knowledge Base</a>. 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/local.protected.php</code>:</li> </ul> <pre class="code">$lang['js']['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> <a href="http://www.php.net" class="media" title="http://www.php.net" rel="nofollow"><img src="/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="media" alt="" /></a> </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><em><</em>nowiki>~ ~ NOTOC~ ~ <em><</em>/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 <a href="http://www.dokuwiki.org/images" class="interwiki iw_doku" title="http://www.dokuwiki.org/images">images</a> with curly brackets. Optionally you can specify the size of them. </p> <p> Real size: <a href="/lib/exe/detail.php?id=wiki%3Asyntax&media=wiki:dokuwiki-128.png" class="media" title="wiki:dokuwiki-128.png"><img src="/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="media" alt="" /></a> </p> <p> Resize to given width: <a href="/lib/exe/detail.php?id=wiki%3Asyntax&media=wiki:dokuwiki-128.png" class="media" title="wiki:dokuwiki-128.png"><img src="/lib/exe/fetch.php?w=50&tok=7cf681&media=wiki:dokuwiki-128.png" class="media" alt="" width="50" /></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="/lib/exe/detail.php?id=wiki%3Asyntax&media=wiki:dokuwiki-128.png" class="media" title="wiki:dokuwiki-128.png"><img src="/lib/exe/fetch.php?w=200&h=50&tok=7a5b24&media=wiki:dokuwiki-128.png" class="media" alt="" width="200" height="50" /></a> </p> <p> Resized external image: <a href="/lib/exe/fetch.php?tok=1b9f20&media=http%3A%2F%2Fde3.php.net%2Fimages%2Fphp.gif" class="media" title="http://de3.php.net/images/php.gif"><img src="/lib/exe/fetch.php?w=200&h=50&tok=fdfe85&media=http%3A%2F%2Fde3.php.net%2Fimages%2Fphp.gif" class="media" alt="" width="200" height="50" /></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="/lib/exe/detail.php?id=wiki%3Asyntax&media=wiki:dokuwiki-128.png" class="media" title="wiki:dokuwiki-128.png"><img src="/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="mediaright" alt="" /></a> </p> <p> <a href="/lib/exe/detail.php?id=wiki%3Asyntax&media=wiki:dokuwiki-128.png" class="media" title="wiki:dokuwiki-128.png"><img src="/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="medialeft" alt="" /></a> </p> <p> <a href="/lib/exe/detail.php?id=wiki%3Asyntax&media=wiki:dokuwiki-128.png" class="media" title="wiki:dokuwiki-128.png"><img src="/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="mediacenter" alt="" /></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="/lib/exe/detail.php?id=wiki%3Asyntax&media=wiki:dokuwiki-128.png" class="media" title="wiki:dokuwiki-128.png"><img src="/lib/exe/fetch.php?media=wiki:dokuwiki-128.png" class="mediacenter" title="This is the caption" alt="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"> 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"> 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 <a href="http://www.dokuwiki.org/faq%3Alists" class="interwiki iw_doku" title="http://www.dokuwiki.org/faq%3Alists">FAQ on list items</a>. </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 <a href="http://en.wikipedia.org/wiki/emoticon" class="interwiki iw_wp" title="http://en.wikipedia.org/wiki/emoticon">emoticon</a>s to their graphical equivalents. Those <a href="http://www.dokuwiki.org/Smileys" class="interwiki iw_doku" title="http://www.dokuwiki.org/Smileys">Smileys</a> and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki: </p> <ul> <li class="level1"> <img src="/lib/images/smileys/icon_cool.gif" class="icon" alt="8-)" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_cool.gif" class="icon" alt="8-)" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_eek.gif" class="icon" alt="8-O" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_eek.gif" class="icon" alt="8-O" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_sad.gif" class="icon" alt=":-(" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_sad.gif" class="icon" alt=":-(" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_smile.gif" class="icon" alt=":-)" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_smile.gif" class="icon" alt=":-)" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_smile2.gif" class="icon" alt="=)" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_smile2.gif" class="icon" alt="=)" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_doubt.gif" class="icon" alt=":-/" /> <em><</em>nowiki> :-/ <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_doubt2.gif" class="icon" alt=":-\" /> <em><</em>nowiki> :-\ <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_confused.gif" class="icon" alt=":-?" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_confused.gif" class="icon" alt=":-?" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_biggrin.gif" class="icon" alt=":-D" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_biggrin.gif" class="icon" alt=":-D" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_razz.gif" class="icon" alt=":-P" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_razz.gif" class="icon" alt=":-P" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_surprised.gif" class="icon" alt=":-O" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_surprised.gif" class="icon" alt=":-O" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_silenced.gif" class="icon" alt=":-X" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_silenced.gif" class="icon" alt=":-X" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_neutral.gif" class="icon" alt=":-|" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_neutral.gif" class="icon" alt=":-|" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_wink.gif" class="icon" alt=";-)" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_wink.gif" class="icon" alt=";-)" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_fun.gif" class="icon" alt="^_^" /> <em><</em>nowiki> ^_^ <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_question.gif" class="icon" alt=":?:" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_question.gif" class="icon" alt=":?:" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_exclaim.gif" class="icon" alt=":!:" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_exclaim.gif" class="icon" alt=":!:" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/icon_lol.gif" class="icon" alt="LOL" /> <em><</em>nowiki> <img src="/lib/images/smileys/icon_lol.gif" class="icon" alt="LOL" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/fixme.gif" class="icon" alt="FIXME" /> <em><</em>nowiki> <img src="/lib/images/smileys/fixme.gif" class="icon" alt="FIXME" /> <em><</em>/nowiki></li> <li class="level1"> <img src="/lib/images/smileys/delete.gif" class="icon" alt="DELETEME" /> <em><</em>nowiki> <img src="/lib/images/smileys/delete.gif" class="icon" alt="DELETEME" /> <em><</em>/nowiki></li> </ul> </div> <h3>Text to HTML Conversions</h3> <div class="level3"> <p> Typography: <a href="/doku.php?id=wiki:dokuwiki" class="wikilink1" title="wiki:dokuwiki">DokuWiki</a> can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. </p> <p> → <em><</em>- <em><</em>→ ⇒ <em><</em>= <em><</em>⇒ >> <em><</em>< – — 640×480 © ™ ® "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 <a href="http://www.dokuwiki.org/entities" class="interwiki iw_doku" title="http://www.dokuwiki.org/entities">pattern file</a>. </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 <a href="http://www.dokuwiki.org/config%3Atypography" class="interwiki iw_doku" title="http://www.dokuwiki.org/config%3Atypography">config option</a>. </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 > Really? >> Yes! >>> Then lets do it! </pre><p> </p> <p> I think we should do it </p> <p> > No we shouldn't </p> <p> >> Well, I say we should </p> <p> > Really? </p> <p> >> Yes! </p> <p> >>> Then lets do it! </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"><table class="inline"> <tr class="row0"> <th class="col0 leftalign"> Heading 1 </th><th class="col1 leftalign"> Heading 2 </th><th class="col2 leftalign"> Heading 3 </th> </tr> <tr class="row1"> <td class="col0 leftalign"> Row 1 Col 1 </td><td class="col1 leftalign"> Row 1 Col 2 </td><td class="col2 leftalign"> Row 1 Col 3 </td> </tr> <tr class="row2"> <td class="col0 leftalign"> Row 2 Col 1 </td><td class="col1" colspan="2"> some colspan (note the double pipe) </td> </tr> <tr class="row3"> <td class="col0 leftalign"> Row 3 Col 1 </td><td class="col1 leftalign"> Row 3 Col 2 </td><td class="col2 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"><table class="inline"> <tr class="row0"> <td class="col0 leftalign"> </td><th class="col1 leftalign"> Heading 1 </th><th class="col2 leftalign"> Heading 2 </th> </tr> <tr class="row1"> <th class="col0 leftalign"> Heading 3 </th><td class="col1 leftalign"> Row 1 Col 2 </td><td class="col2 leftalign"> Row 1 Col 3 </td> </tr> <tr class="row2"> <th class="col0 leftalign"> Heading 4 </th><td class="col1"> no colspan this time </td><td class="col2 leftalign"> </td> </tr> <tr class="row3"> <th class="col0 leftalign"> Heading 5 </th><td class="col1 leftalign"> Row 2 Col 2 </td><td class="col2 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"><table class="inline"> <tr class="row0"> <th class="col0 leftalign"> Heading 1 </th><th class="col1 leftalign"> Heading 2 </th><th class="col2 leftalign"> Heading 3 </th> </tr> <tr class="row1"> <td class="col0 leftalign"> Row 1 Col 1 </td><td class="col1" rowspan="3"> this cell spans vertically </td><td class="col2 leftalign"> Row 1 Col 3 </td> </tr> <tr class="row2"> <td class="col0 leftalign"> Row 2 Col 1 </td><td class="col1 leftalign"> Row 2 Col 3 </td> </tr> <tr class="row3"> <td class="col0 leftalign"> Row 3 Col 1 </td><td class="col1 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"><table class="inline"> <tr class="row0"> <th class="col0 centeralign" colspan="3"> Table with alignment </th> </tr> <tr class="row1"> <td class="col0 rightalign"> right</td><td class="col1 centeralign"> center </td><td class="col2 leftalign">left </td> </tr> <tr class="row2"> <td class="col0 leftalign">left </td><td class="col1 rightalign"> right</td><td class="col2 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><em><</em>nowiki><nowiki>%%'' tags or even simpler, with double percent signs ''<nowiki>%%<em><</em>/nowiki></code>. </p> <p> <em><</em>nowiki> This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. <em><</em>/nowiki> The same is true for <em><</em>/nowiki><em><u>this</u> text</em> with a smiley <img src="/lib/images/smileys/icon_wink.gif" class="icon" alt=";-)" /><em><</em>nowiki>. </p> <pre class="code"><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>. </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 ''<em><</em>/nowiki> </p> <pre class="code">%%'' or ''%%<file>%%''. This is text is indented by two spaces. <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="/doku.php?id=wiki:dokuwiki" class="wikilink1" title="wiki:dokuwiki">DokuWiki</a> can highlight sourcecode, which makes it easier to read. It uses the <a href="http://qbnz.com/highlighter/" class="urlextern" title="http://qbnz.com/highlighter/" rel="nofollow">GeSHi</a> 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><em><</em>nowiki><code java><em><</em>/nowiki></code> or <code><em><</em>nowiki><file java><em><</em>/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 ''<em><</em>nowiki><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: </p> <p> <code> <file php myexample.php> <?php echo "hello world!"; ?> </file> </code> </p> <p> <file php myexample.php> <?php echo "hello world!"; ?> </file> </p> <p> If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''<em><</em>/nowiki><code - myfile.foo><em><</em>nowiki>''. </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 ''<em><</em>/nowiki><em><</em>html><em><</em>nowiki>'' or ''<em><</em>/nowiki><em><</em>php><em><</em>nowiki>'' tags. (Use uppercase tags if you need to enclose block level elements.) </p> <p> HTML example: </p> <p> <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> </code> </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> <p> <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> </code> </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> **Please Note**: 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> [[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: </p> <span class='np_break'> </span> <div class="table"><table class="inline"> <tr class="row0"> <th class="col0 leftalign"> Parameter </th><th class="col1"> Description </th><td class="col2"></td> </tr> <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><td class="col2"></td> </tr> <tr class="row2"> <td class="col0 leftalign"> reverse </td><td class="col1"> display the last items in the feed first </td><td class="col2"></td> </tr> <tr class="row3"> <td class="col0 leftalign"> author </td><td class="col1"> show item authors names </td><td class="col2"></td> </tr> <tr class="row4"> <td class="col0 leftalign"> date </td><td class="col1"> show item dates </td><td class="col2"></td> </tr> <tr class="row5"> <td class="col0"> description</td><td class="col1"> show the item description. If [[doku>config:htmlok</td><td class="col2">HTML]] is disabled all tags will be stripped </td> </tr> <tr class="row6"> <td class="col0"> //n//[dhm] </td><td class="col1"> refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). </td><td class="col2"></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. [[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. </p> <p> **Example:** </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"><table class="inline"> <tr class="row0"> <th class="col0 leftalign"> Macro </th><th class="col1"> Description </th> </tr> <tr class="row1"> <td class="col0 leftalign"> <em><</em>/nowiki>~ ~ NOTOC~ ~ <em><</em>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"> <em><</em>/nowiki>~ ~ NOCACHE~ ~ <em><</em>nowiki> </td><td class="col1"> DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the <em><</em>/nowiki><em><</em>php>%% 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 <a href="http://www.dokuwiki.org/plugins" class="interwiki iw_doku" title="http://www.dokuwiki.org/plugins">Plugins</a>. 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> <p> ~ ~ INFO: syntaxplugins~ ~ </p> </div> <div class="footnotes"> <div class="fn"><sup><a href="#fnt__1" id="fn__1" class="fn_bot">1)</a></sup> This is a footnote</div> <div class="fn"><sup><a href="#fnt__2" id="fn__2" class="fn_bot">2)</a></sup> 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>
wiki/syntax.txt
· ostatnio zmienione: 2012/10/13 13:25 (edycja zewnętrzna)
Narzędzia strony
Pokaż stronę
Poprzednie wersje
Odnośniki
Do góry
Export to PDF