Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:syntax [2012/01/04 13:42] – [Syntax Plugins] nickwiki:syntax [2019/11/11 09:18] (current) – [Footnotes] kevinbowen
Line 1: Line 1:
 ====== Formatting Syntax ====== ====== Formatting Syntax ======
- 
 [[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing the //Edit this page// button at the top or bottom of the page. If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too. [[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing the //Edit this page// button at the top or bottom of the page. If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too.
 +
 +  * **[[syntax#Basic Text Formatting|Basic Text Formatting]]**
 +  * **[[syntax#Links|Links]]**
 +  * **[[syntax#Image Links|Image Links]]**
 +  * **[[syntax#Sectioning|Sectioning]]**
 +  * **[[syntax#Images and Other Files|Images and Other Files]]**
 +  * **[[syntax#Lists|Lists]]**
 +  * **[[syntax#Text Conversions|Text Conversions]]**
 +  * **[[syntax#Quoting|Quoting]]**
 +  * **[[syntax#Tables|Tables]]**
 +  * **[[syntax#No Formatting|No Formatting]]**
 +  * **[[syntax#Code Blocks|Code Blocks]]**
 +  * **[[syntax#Downloadable Code Blocks|Downloadable Code Blocks]]**
 +  * **[[syntax#Notes|Notes]]**
 +  * **[[syntax#GUI Sequences|Gui Sequences]]**
 +  * **[[syntax#Figures|Figures]]**
 +  * **[[syntax#Definition Lists|Definition Lists]]**
 +
 +----
 +
  
 ===== Basic Text Formatting ===== ===== Basic Text Formatting =====
Line 29: Line 48:
  
 You should use forced newlines only if really needed. You should use forced newlines only if really needed.
 +
 +----
  
 ===== Links ===== ===== Links =====
Line 99: Line 120:
  
 The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links). The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links).
 +
 +[[|Back To Top]]
 +----
  
 ===== Footnotes ===== ===== Footnotes =====
Line 106: Line 130:
   You can add footnotes ((This is a footnote)) by using double parentheses.   You can add footnotes ((This is a footnote)) by using double parentheses.
  
 +----
 ===== Sectioning ===== ===== Sectioning =====
  
Line 132: Line 157:
 Resize 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}} Resize 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}}
  
-Resized external image:           {{http://de3.php.net/images/php.gif?200x50}}+Resized external image:           {{https://www.php.net/images/php.gif?200x50}}
  
   Real size:                        {{wiki:dokuwiki-128.png}}   Real size:                        {{wiki:dokuwiki-128.png}}
   Resize to given width:            {{wiki:dokuwiki-128.png?50}}   Resize to given width:            {{wiki:dokuwiki-128.png?50}}
   Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}   Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}
-  Resized external image:           {{http://de3.php.net/images/php.gif?200x50}}+  Resized external image:           {{https://www.php.net/images/php.gif?200x50}}
  
  
Line 161: Line 186:
  
 For linking an image to another page see [[#Image Links]] above. For linking an image to another page see [[#Image Links]] above.
 +
 +[[|Back To Top]]
 +----
  
 ===== Lists ===== ===== Lists =====
Line 189: Line 217:
  
 Also take a look at the [[doku>faq:lists|FAQ on list items]]. Also take a look at the [[doku>faq:lists|FAQ on list items]].
 +
 +----
  
 ===== Text Conversions ===== ===== Text Conversions =====
Line 236: Line 266:
  
 There 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]]. There 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]].
 +
 +[[|Back To Top]]
 +----
  
 ===== Quoting ===== ===== Quoting =====
Line 264: Line 297:
  
 >>> Then lets do it! >>> Then lets do it!
 +
 +----
  
 ===== Tables ===== ===== Tables =====
Line 326: Line 361:
  
 Note: Vertical alignment is not supported. Note: Vertical alignment is not supported.
 +
 +[[|Back To Top]]
 +----
  
 ===== No Formatting ===== ===== No Formatting =====
Line 340: Line 378:
   </nowiki>   </nowiki>
   The same is true for %%//__this__ text// with a smiley ;-)%%.   The same is true for %%//__this__ text// with a smiley ;-)%%.
 +
 +----
  
 ===== Code Blocks ===== ===== Code Blocks =====
Line 367: Line 407:
   </file>   </file>
  
-==== Syntax Highlighting ==== 
- 
-[[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 is the same like in the code and file blocks in the previous section, but this time the name of the used language is inserted inside the tag. Eg. ''<nowiki><code java></nowiki>'' or ''<nowiki><file java></nowiki>''. 
- 
-<code java> 
-/** 
- * The HelloWorldApp class implements an application that 
- * simply displays "Hello World!" to the standard output. 
- */ 
-class HelloWorldApp { 
-    public static void main(String[] args) { 
-        System.out.println("Hello World!"); //Display the string. 
-    } 
-} 
-</code> 
- 
-The following language strings are currently recognized: //4cs, abap, actionscript-french, actionscript, actionscript3, ada, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, ecmascript, eiffel, email, erlang, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lisp, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, plsql, postgresql, povray, powerbuilder, powershell, progress, prolog, properties, providex, purebasic, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, z80// 
  
 ==== Downloadable Code Blocks ==== ==== Downloadable Code Blocks ====
Line 401: Line 424:
 If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''.
  
 +[[|Back To Top]]
 +----
  
-===== Embedding HTML and PHP =====+===== Notes =====
  
-You can embed raw HTML or PHP code into your documents by using the ''%%<html>%%'' or ''%%<php>%%'' tags(Use uppercase tags if you need to enclose block level elements.)+Different types of notes are supported in the wikiUsing the following format:
  
-HTML example:+  <note $type>Tip text</note>
  
-<code> +$type can be 4 valuesimportant, classic (same as using nothing), tip and warning.
-<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>+
  
-<html> +<note important>A note using **important**.</note>
-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>+
  
-PHP example:+<note classic>A note using nothing or **classic**.</note>
  
-<code> +<note tip>A note using **tip**.</note>
-<php> +
-echo '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>+
  
-<php> +<note warning>A note using **warning**.</note>
-echo '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>+
  
-**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed.+----
  
-===== RSS/ATOM Feed Aggregation ===== +===== GUI Sequences =====
-[[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:+
  
-^ Parameter  ^ Description ^ +Because of the documentation and manual targetthere is a special syntax for GUI sequences or labels on the interfaceThe same for key combinations.
-| any number | will be used as maximum number items to showdefaults to 8 | +
-| reverse    | display the last items in the feed first | +
-| author     | show item authors names | +
-| date       | show item dates | +
-| description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped | +
-| //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g12h = 12 hours)|+
  
-The refresh period defaults to 4 hoursAny 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 contentThe parameter tells [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered.+  You can open the preferences using {gui>Menu>Edit>Preferences...}  
 +  to open the dialog or press {key>Ctrl+P}If you click the 
 +  {gui>Apply} button the settings are saved. 
 +  
 +You can open the preferences using {gui>Menu>Edit>Preferences...} to open the dialog or press {key>Ctrl+P}. If you click the {gui>Apply} button the settings are saved.
  
-**Example:**+----
  
-  {{rss>http://slashdot.org/index.rss 5 author date 1h }}+===== Figures =====
  
 +To give images a description and make then distinct from the rest of the text, you can use the figure tag.
  
-===== Control Macros =====+  <figure "Actions Preferences Dialog"> 
 +  {{:xfce:xfce4-panel:actions.png?nolink&|}} 
 +  </figure>
  
-Some syntax influences how DokuWiki renders page without creating any output it selfThe following control macros are availble:+This will place the contents between the tags in table with the string between the brackets as a table comment.
  
-^ Macro           ^ Description | +<figure "Actions Preferences Dialog"> 
-%%~~NOTOC~~%%   | If this macro is found on the page, no table of contents will be created | +{{:xfce:xfce4-panel:actions.png?nolink&|}} 
-| %%~~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 |+</figure>
  
 +----
  
 +===== Definition Lists =====
 +
 +Common to describe dialogs are definition lists. The syntax to write those is as follows:
 +
 +  ? Term 1
 +  ! This is the definition of the first term.
 +  ? Term 2
 +  ! This is the definition of the second term.
 +  ? Term 3
 +  ! Maybe the 3rd term has three possible values:
 +    ? Term 3.1
 +    ! This is the definition of the first subterm.
 +    ? Term 3.2
 +    ! This is the definition of the second irst subterm.
 +    ? Term 3.3
 +    ! This is the definition of the third subterm.
 +
 +? Term 1
 +! This is the definition of the first term.
 +? Term 2
 +! This is the definition of the second term.
 +? Term 3
 +! Maybe the 3rd term has three possible values:
 +  ? Term 3.1
 +  ! This is the definition of the first subterm.
 +  ? Term 3.2
 +  ! This is the definition of the second irst subterm.
 +  ? Term 3.3
 +  ! This is the definition of the third subterm.
 +  
 +----
 +[[|Back To Top]]