📄 wiki-syntax.html
字号:
>>> Then lets do it!</pre><p> I think we should do it </p><blockquote><div class="no"> No we shouldn’t</div></blockquote><blockquote><div class="no"><blockquote><div class="no"> Well, I say we should</div></blockquote></div></blockquote><blockquote><div class="no"> Really?</div></blockquote><blockquote><div class="no"><blockquote><div class="no"> Yes!</div></blockquote></div></blockquote><blockquote><div class="no"><blockquote><div class="no"><blockquote><div class="no"> Then lets do it!</div></blockquote></div></blockquote></div></blockquote></div><!-- SECTION [9177-9549] --><h2><a name="tables" id="tables">Tables</a></h2><div class="level2"><p> DokuWiki supports a simple syntax to create tables. </p><table class="inline"> <tr> <th class="leftalign"> Heading 1 </th><th class="leftalign"> Heading 2 </th><th class="leftalign"> Heading 3 </th> </tr> <tr> <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> <td class="leftalign"> Row 2 Col 1 </td><td colspan="2"> some colspan (note the double pipe) </td> </tr> <tr> <td class="leftalign"> Row 3 Col 1 </td><td class="leftalign"> Row 2 Col 2 </td><td class="leftalign"> Row 2 Col 3 </td> </tr></table><br /><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 2 Col 2 | Row 2 Col 3 |</pre><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><table class="inline"> <tr> <td class="rightalign"> </td><th class="leftalign"> Heading 1 </th><th class="leftalign"> Heading 2 </th> </tr> <tr> <th class="leftalign"> Heading 3 </th><td class="leftalign"> Row 1 Col 2 </td><td class="leftalign"> Row 1 Col 3 </td> </tr> <tr> <th class="leftalign"> Heading 4 </th><td> no colspan this time </td><td class="rightalign"> </td> </tr> <tr> <th class="leftalign"> Heading 5 </th><td class="leftalign"> Row 2 Col 2 </td><td class="leftalign"> Row 2 Col 3 </td> </tr></table><br /><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> Note: Vertical spans (rowspan) are not possible.</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><table class="inline"> <tr> <th class="centeralign" colspan="3"> Table with alignment </th> </tr> <tr> <td class="rightalign"> right</td><td class="centeralign"> center </td><td class="leftalign">left </td> </tr> <tr> <td class="leftalign">left </td><td class="rightalign"> right</td><td class="centeralign"> center </td> </tr> <tr> <td> xxxxxxxxxxxx </td><td> xxxxxxxxxxxx </td><td> xxxxxxxxxxxx </td> </tr></table><br /><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></div><!-- SECTION [9550-11681] --><h2><a name="nonparsed_blocks" id="nonparsed_blocks">Nonparsed Blocks</a></h2><div class="level2"><p> You can include non parsed 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 preformatted code all spaces are preserved: like <-this</pre><pre class="file">This is pretty much the same, but you could use it to show that you quoted a file. </pre><p>To let the parser ignore an area completely (ie. do no formatting on it), enclose the area either with <code>nowiki</code> tags or even simpler, with double percent signs <code>%%</code>.</p><p>This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it.</p><p>See the source of this page to see how to use these blocks.</p></div><!-- SECTION [11682-12487] --><h2><a name="syntax_highlighting" id="syntax_highlighting">Syntax Highlighting</a></h2><div class="level2"><p> <a href="wiki-dokuwiki.html" class="wikilink1" title="wiki-dokuwiki.html">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 is the same like in the code block in the previous section, but this time the name of the used language is inserted inside the tag. Eg. <code><code java></code>.</p><pre class="code java"><span class="coMULTI">/** * The HelloWorldApp class implements an application that * simply displays "Hello World!" to the standard output. */</span><span class="kw2">class</span> HelloWorldApp <span class="br0">{</span> <span class="kw2">public</span> <span class="kw2">static</span> <span class="kw4">void</span> main<span class="br0">(</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&bntl=1"><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?q=allinurl%3ASystem+java.sun.com&bntl=1"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">(</span><span class="st0">"Hello World!"</span><span class="br0">)</span>; <span class="co1">//Display the string.</span> <span class="br0">}</span><span class="br0">}</span></pre><p>The following language strings are currently recognized: <em>actionscript, ada, apache, asm, asp, bash, caddcl, cadlisp, c, c_mac, cpp, csharp, css, delphi, html4strict, java, javascript, lisp, lua, mpasm, nsis, objc, oobas, oracle8, pascal, perl, php-brief, php, python, qbasic, smarty, sql, vb, vbnet, visualfoxpro, xml</em></p></div><!-- SECTION [12488-13513] --><h2><a name="embedding_html_and_php" id="embedding_html_and_php">Embedding HTML and PHP</a></h2><div class="level2"><p> You can embed raw <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Hypertext Preprocessor">PHP</acronym> code into your documents by using the <code>html</code> or <code>php</code> tags like this: </p><pre class="code"><html>This is some <font color="red" size="+1">HTML</font></html></pre><pre class="file">This is some <font color="red" size="+1">HTML</font></pre><pre class="code"><php>echo 'A logo generated by PHP:';echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />';</php></pre><pre class="file">echo 'A logo generated by PHP:';echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />';</pre><p><strong>Please Note</strong>: <acronym title="HyperText Markup Language">HTML</acronym> and <acronym title="Hypertext Preprocessor">PHP</acronym> embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed.</p></div><!-- SECTION [13514-14244] --><h2><a name="embedding_plots" id="embedding_plots">Embedding Plots</a></h2><div class="level2"><p> GNUPLOT plotting can also be displayed</p><pre class="code"><plot>plot [-20:20] sin(x)/x</plot></pre><p> </p><pre class="code"><plot>unset arrowunset labelset gridsplot x**2+y**2, x**2-y**2</plot></pre><p> </p></div><!-- SECTION [14245-] --><div class="footnotes"><div class="fn"><a href="#fnt__1" id="fn__1" name="fn__1" class="fn_bot">1)</a> This is a footnote</div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -