xref: /dokuwiki/_test/data/pages/wiki/syntax.txt (revision f8369d7d6e37248d6523fdac6e1d760fca4f1b52)
1*f8369d7dSTobias Sarnowski====== Formatting Syntax ======
2*f8369d7dSTobias Sarnowski
3*f8369d7dSTobias Sarnowski[[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.
4*f8369d7dSTobias Sarnowski
5*f8369d7dSTobias Sarnowski===== Basic Text Formatting =====
6*f8369d7dSTobias Sarnowski
7*f8369d7dSTobias SarnowskiDokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. Of course you can **__//''combine''//__** all these.
8*f8369d7dSTobias Sarnowski
9*f8369d7dSTobias Sarnowski  DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts.
10*f8369d7dSTobias Sarnowski  Of course you can **__//''combine''//__** all these.
11*f8369d7dSTobias Sarnowski
12*f8369d7dSTobias SarnowskiYou can use <sub>subscript</sub> and <sup>superscript</sup>, too.
13*f8369d7dSTobias Sarnowski
14*f8369d7dSTobias Sarnowski  You can use <sub>subscript</sub> and <sup>superscript</sup>, too.
15*f8369d7dSTobias Sarnowski
16*f8369d7dSTobias SarnowskiYou can mark something as <del>deleted</del> as well.
17*f8369d7dSTobias Sarnowski
18*f8369d7dSTobias Sarnowski  You can mark something as <del>deleted</del> as well.
19*f8369d7dSTobias Sarnowski
20*f8369d7dSTobias 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.
21*f8369d7dSTobias Sarnowski
22*f8369d7dSTobias SarnowskiThis is some text with some linebreaks\\ Note that the
23*f8369d7dSTobias Sarnowskitwo backslashes are only recognized at the end of a line\\
24*f8369d7dSTobias Sarnowskior followed by\\ a whitespace \\this happens without it.
25*f8369d7dSTobias Sarnowski
26*f8369d7dSTobias Sarnowski  This is some text with some linebreaks\\ Note that the
27*f8369d7dSTobias Sarnowski  two backslashes are only recognized at the end of a line\\
28*f8369d7dSTobias Sarnowski  or followed by\\ a whitespace \\this happens without it.
29*f8369d7dSTobias Sarnowski
30*f8369d7dSTobias SarnowskiYou should use forced newlines only if really needed.
31*f8369d7dSTobias Sarnowski
32*f8369d7dSTobias Sarnowski===== Links =====
33*f8369d7dSTobias Sarnowski
34*f8369d7dSTobias SarnowskiDokuWiki supports multiple ways of creating links.
35*f8369d7dSTobias Sarnowski
36*f8369d7dSTobias Sarnowski==== External ====
37*f8369d7dSTobias Sarnowski
38*f8369d7dSTobias 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.
39*f8369d7dSTobias Sarnowski
40*f8369d7dSTobias Sarnowski  DokuWiki supports multiple ways of creating links. External links are recognized
41*f8369d7dSTobias Sarnowski  automagically: http://www.google.com or simply www.google.com - You can set
42*f8369d7dSTobias Sarnowski  link text as well: [[http://www.google.com|This Link points to google]]. Email
43*f8369d7dSTobias Sarnowski  addresses like this one: <andi@splitbrain.org> are recognized, too.
44*f8369d7dSTobias Sarnowski
45*f8369d7dSTobias Sarnowski==== Internal ====
46*f8369d7dSTobias Sarnowski
47*f8369d7dSTobias SarnowskiInternal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]].
48*f8369d7dSTobias Sarnowski
49*f8369d7dSTobias Sarnowski  Internal links are created by using square brackets. You can either just give
50*f8369d7dSTobias Sarnowski  a [[pagename]] or use an additional [[pagename|link text]].
51*f8369d7dSTobias Sarnowski
52*f8369d7dSTobias Sarnowski[[doku>pagename|Wiki pagenames]] are converted to lowercase automatically, special characters are not allowed.
53*f8369d7dSTobias Sarnowski
54*f8369d7dSTobias SarnowskiYou can use [[some:namespaces]] by using a colon in the pagename.
55*f8369d7dSTobias Sarnowski
56*f8369d7dSTobias Sarnowski  You can use [[some:namespaces]] by using a colon in the pagename.
57*f8369d7dSTobias Sarnowski
58*f8369d7dSTobias SarnowskiFor details about namespaces see [[doku>namespaces]].
59*f8369d7dSTobias Sarnowski
60*f8369d7dSTobias 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]].
61*f8369d7dSTobias Sarnowski
62*f8369d7dSTobias Sarnowski  This links to [[syntax#internal|this Section]].
63*f8369d7dSTobias Sarnowski
64*f8369d7dSTobias SarnowskiNotes:
65*f8369d7dSTobias Sarnowski
66*f8369d7dSTobias Sarnowski  * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones.
67*f8369d7dSTobias 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.
68*f8369d7dSTobias Sarnowski  * When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much.
69*f8369d7dSTobias Sarnowski
70*f8369d7dSTobias Sarnowski==== Interwiki ====
71*f8369d7dSTobias Sarnowski
72*f8369d7dSTobias 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]].
73*f8369d7dSTobias Sarnowski
74*f8369d7dSTobias Sarnowski  DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis.
75*f8369d7dSTobias Sarnowski  For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]].
76*f8369d7dSTobias Sarnowski
77*f8369d7dSTobias Sarnowski==== Windows Shares ====
78*f8369d7dSTobias Sarnowski
79*f8369d7dSTobias 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]].
80*f8369d7dSTobias Sarnowski
81*f8369d7dSTobias Sarnowski  Windows Shares like [[\\server\share|this]] are recognized, too.
82*f8369d7dSTobias Sarnowski
83*f8369d7dSTobias SarnowskiNotes:
84*f8369d7dSTobias Sarnowski
85*f8369d7dSTobias Sarnowski  * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone").
86*f8369d7dSTobias Sarnowski  * 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/local.protected.php'':
87*f8369d7dSTobias Sarnowski
88*f8369d7dSTobias Sarnowski  $lang['js']['nosmblinks'] = '';
89*f8369d7dSTobias Sarnowski
90*f8369d7dSTobias Sarnowski==== Image Links ====
91*f8369d7dSTobias Sarnowski
92*f8369d7dSTobias 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:
93*f8369d7dSTobias Sarnowski
94*f8369d7dSTobias Sarnowski  [[http://www.php.net|{{wiki:dokuwiki-128.png}}]]
95*f8369d7dSTobias Sarnowski
96*f8369d7dSTobias Sarnowski[[http://www.php.net|{{wiki:dokuwiki-128.png}}]]
97*f8369d7dSTobias Sarnowski
98*f8369d7dSTobias SarnowskiPlease note: The image formatting is the only formatting syntax accepted in link names.
99*f8369d7dSTobias Sarnowski
100*f8369d7dSTobias 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).
101*f8369d7dSTobias Sarnowski
102*f8369d7dSTobias Sarnowski===== Footnotes =====
103*f8369d7dSTobias Sarnowski
104*f8369d7dSTobias SarnowskiYou can add footnotes ((This is a footnote)) by using double parentheses.
105*f8369d7dSTobias Sarnowski
106*f8369d7dSTobias Sarnowski  You can add footnotes ((This is a footnote)) by using double parentheses.
107*f8369d7dSTobias Sarnowski
108*f8369d7dSTobias Sarnowski===== Sectioning =====
109*f8369d7dSTobias Sarnowski
110*f8369d7dSTobias 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.
111*f8369d7dSTobias Sarnowski
112*f8369d7dSTobias Sarnowski==== Headline Level 3 ====
113*f8369d7dSTobias Sarnowski=== Headline Level 4 ===
114*f8369d7dSTobias Sarnowski== Headline Level 5 ==
115*f8369d7dSTobias Sarnowski
116*f8369d7dSTobias Sarnowski  ==== Headline Level 3 ====
117*f8369d7dSTobias Sarnowski  === Headline Level 4 ===
118*f8369d7dSTobias Sarnowski  == Headline Level 5 ==
119*f8369d7dSTobias Sarnowski
120*f8369d7dSTobias SarnowskiBy using four or more dashes, you can make a horizontal line:
121*f8369d7dSTobias Sarnowski
122*f8369d7dSTobias Sarnowski----
123*f8369d7dSTobias Sarnowski
124*f8369d7dSTobias Sarnowski===== Images and Other Files =====
125*f8369d7dSTobias Sarnowski
126*f8369d7dSTobias SarnowskiYou can include external and internal [[doku>images]] with curly brackets. Optionally you can specify the size of them.
127*f8369d7dSTobias Sarnowski
128*f8369d7dSTobias SarnowskiReal size:                        {{wiki:dokuwiki-128.png}}
129*f8369d7dSTobias Sarnowski
130*f8369d7dSTobias SarnowskiResize to given width:            {{wiki:dokuwiki-128.png?50}}
131*f8369d7dSTobias Sarnowski
132*f8369d7dSTobias 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}}
133*f8369d7dSTobias Sarnowski
134*f8369d7dSTobias SarnowskiResized external image:           {{http://de3.php.net/images/php.gif?200x50}}
135*f8369d7dSTobias Sarnowski
136*f8369d7dSTobias Sarnowski  Real size:                        {{wiki:dokuwiki-128.png}}
137*f8369d7dSTobias Sarnowski  Resize to given width:            {{wiki:dokuwiki-128.png?50}}
138*f8369d7dSTobias Sarnowski  Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}
139*f8369d7dSTobias Sarnowski  Resized external image:           {{http://de3.php.net/images/php.gif?200x50}}
140*f8369d7dSTobias Sarnowski
141*f8369d7dSTobias Sarnowski
142*f8369d7dSTobias SarnowskiBy using left or right whitespaces you can choose the alignment.
143*f8369d7dSTobias Sarnowski
144*f8369d7dSTobias Sarnowski{{ wiki:dokuwiki-128.png}}
145*f8369d7dSTobias Sarnowski
146*f8369d7dSTobias Sarnowski{{wiki:dokuwiki-128.png }}
147*f8369d7dSTobias Sarnowski
148*f8369d7dSTobias Sarnowski{{ wiki:dokuwiki-128.png }}
149*f8369d7dSTobias Sarnowski
150*f8369d7dSTobias Sarnowski  {{ wiki:dokuwiki-128.png}}
151*f8369d7dSTobias Sarnowski  {{wiki:dokuwiki-128.png }}
152*f8369d7dSTobias Sarnowski  {{ wiki:dokuwiki-128.png }}
153*f8369d7dSTobias Sarnowski
154*f8369d7dSTobias SarnowskiOf course, you can add a title (displayed as a tooltip by most browsers), too.
155*f8369d7dSTobias Sarnowski
156*f8369d7dSTobias Sarnowski{{ wiki:dokuwiki-128.png |This is the caption}}
157*f8369d7dSTobias Sarnowski
158*f8369d7dSTobias Sarnowski  {{ wiki:dokuwiki-128.png |This is the caption}}
159*f8369d7dSTobias Sarnowski
160*f8369d7dSTobias SarnowskiIf you specify a filename (external or internal) that is not an image (''gif, jpeg, png''), then it will be displayed as a link instead.
161*f8369d7dSTobias Sarnowski
162*f8369d7dSTobias SarnowskiFor linking an image to another page see [[#Image Links]] above.
163*f8369d7dSTobias Sarnowski
164*f8369d7dSTobias Sarnowski===== Lists =====
165*f8369d7dSTobias Sarnowski
166*f8369d7dSTobias 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.
167*f8369d7dSTobias Sarnowski
168*f8369d7dSTobias Sarnowski  * This is a list
169*f8369d7dSTobias Sarnowski  * The second item
170*f8369d7dSTobias Sarnowski    * You may have different levels
171*f8369d7dSTobias Sarnowski  * Another item
172*f8369d7dSTobias Sarnowski
173*f8369d7dSTobias Sarnowski  - The same list but ordered
174*f8369d7dSTobias Sarnowski  - Another item
175*f8369d7dSTobias Sarnowski    - Just use indention for deeper levels
176*f8369d7dSTobias Sarnowski  - That's it
177*f8369d7dSTobias Sarnowski
178*f8369d7dSTobias Sarnowski<code>
179*f8369d7dSTobias Sarnowski  * This is a list
180*f8369d7dSTobias Sarnowski  * The second item
181*f8369d7dSTobias Sarnowski    * You may have different levels
182*f8369d7dSTobias Sarnowski  * Another item
183*f8369d7dSTobias Sarnowski
184*f8369d7dSTobias Sarnowski  - The same list but ordered
185*f8369d7dSTobias Sarnowski  - Another item
186*f8369d7dSTobias Sarnowski    - Just use indention for deeper levels
187*f8369d7dSTobias Sarnowski  - That's it
188*f8369d7dSTobias Sarnowski</code>
189*f8369d7dSTobias Sarnowski
190*f8369d7dSTobias SarnowskiAlso take a look at the [[doku>faq:lists|FAQ on list items]].
191*f8369d7dSTobias Sarnowski
192*f8369d7dSTobias Sarnowski===== Text Conversions =====
193*f8369d7dSTobias Sarnowski
194*f8369d7dSTobias SarnowskiDokuWiki can convert certain pre-defined characters or strings into images or other text or HTML.
195*f8369d7dSTobias Sarnowski
196*f8369d7dSTobias 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.
197*f8369d7dSTobias Sarnowski
198*f8369d7dSTobias Sarnowski==== Text to Image Conversions ====
199*f8369d7dSTobias Sarnowski
200*f8369d7dSTobias 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:
201*f8369d7dSTobias Sarnowski
202*f8369d7dSTobias Sarnowski  * 8-) %%  8-)  %%
203*f8369d7dSTobias Sarnowski  * 8-O %%  8-O  %%
204*f8369d7dSTobias Sarnowski  * :-( %%  :-(  %%
205*f8369d7dSTobias Sarnowski  * :-) %%  :-)  %%
206*f8369d7dSTobias Sarnowski  * =)  %%  =)   %%
207*f8369d7dSTobias Sarnowski  * :-/ %%  :-/  %%
208*f8369d7dSTobias Sarnowski  * :-\ %%  :-\  %%
209*f8369d7dSTobias Sarnowski  * :-? %%  :-?  %%
210*f8369d7dSTobias Sarnowski  * :-D %%  :-D  %%
211*f8369d7dSTobias Sarnowski  * :-P %%  :-P  %%
212*f8369d7dSTobias Sarnowski  * :-O %%  :-O  %%
213*f8369d7dSTobias Sarnowski  * :-X %%  :-X  %%
214*f8369d7dSTobias Sarnowski  * :-| %%  :-|  %%
215*f8369d7dSTobias Sarnowski  * ;-) %%  ;-)  %%
216*f8369d7dSTobias Sarnowski  * ^_^ %%  ^_^  %%
217*f8369d7dSTobias Sarnowski  * :?: %%  :?:  %%
218*f8369d7dSTobias Sarnowski  * :!: %%  :!:  %%
219*f8369d7dSTobias Sarnowski  * LOL %%  LOL  %%
220*f8369d7dSTobias Sarnowski  * FIXME %%  FIXME %%
221*f8369d7dSTobias Sarnowski  * DELETEME %% DELETEME %%
222*f8369d7dSTobias Sarnowski
223*f8369d7dSTobias Sarnowski==== Text to HTML Conversions ====
224*f8369d7dSTobias Sarnowski
225*f8369d7dSTobias SarnowskiTypography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.
226*f8369d7dSTobias Sarnowski
227*f8369d7dSTobias Sarnowski-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r)
228*f8369d7dSTobias Sarnowski"He thought 'It's a man's world'..."
229*f8369d7dSTobias Sarnowski
230*f8369d7dSTobias Sarnowski<code>
231*f8369d7dSTobias Sarnowski-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r)
232*f8369d7dSTobias Sarnowski"He thought 'It's a man's world'..."
233*f8369d7dSTobias Sarnowski</code>
234*f8369d7dSTobias Sarnowski
235*f8369d7dSTobias SarnowskiThe same can be done to produce any kind of HTML, it just needs to be added to the [[doku>entities|pattern file]].
236*f8369d7dSTobias Sarnowski
237*f8369d7dSTobias 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]].
238*f8369d7dSTobias Sarnowski
239*f8369d7dSTobias Sarnowski===== Quoting =====
240*f8369d7dSTobias Sarnowski
241*f8369d7dSTobias SarnowskiSome times you want to mark some text to show it's a reply or comment. You can use the following syntax:
242*f8369d7dSTobias Sarnowski
243*f8369d7dSTobias Sarnowski  I think we should do it
244*f8369d7dSTobias Sarnowski
245*f8369d7dSTobias Sarnowski  > No we shouldn't
246*f8369d7dSTobias Sarnowski
247*f8369d7dSTobias Sarnowski  >> Well, I say we should
248*f8369d7dSTobias Sarnowski
249*f8369d7dSTobias Sarnowski  > Really?
250*f8369d7dSTobias Sarnowski
251*f8369d7dSTobias Sarnowski  >> Yes!
252*f8369d7dSTobias Sarnowski
253*f8369d7dSTobias Sarnowski  >>> Then lets do it!
254*f8369d7dSTobias Sarnowski
255*f8369d7dSTobias SarnowskiI think we should do it
256*f8369d7dSTobias Sarnowski
257*f8369d7dSTobias Sarnowski> No we shouldn't
258*f8369d7dSTobias Sarnowski
259*f8369d7dSTobias Sarnowski>> Well, I say we should
260*f8369d7dSTobias Sarnowski
261*f8369d7dSTobias Sarnowski> Really?
262*f8369d7dSTobias Sarnowski
263*f8369d7dSTobias Sarnowski>> Yes!
264*f8369d7dSTobias Sarnowski
265*f8369d7dSTobias Sarnowski>>> Then lets do it!
266*f8369d7dSTobias Sarnowski
267*f8369d7dSTobias Sarnowski===== Tables =====
268*f8369d7dSTobias Sarnowski
269*f8369d7dSTobias SarnowskiDokuWiki supports a simple syntax to create tables.
270*f8369d7dSTobias Sarnowski
271*f8369d7dSTobias Sarnowski^ Heading 1      ^ Heading 2       ^ Heading 3          ^
272*f8369d7dSTobias Sarnowski| Row 1 Col 1    | Row 1 Col 2     | Row 1 Col 3        |
273*f8369d7dSTobias Sarnowski| Row 2 Col 1    | some colspan (note the double pipe) ||
274*f8369d7dSTobias Sarnowski| Row 3 Col 1    | Row 3 Col 2     | Row 3 Col 3        |
275*f8369d7dSTobias Sarnowski
276*f8369d7dSTobias SarnowskiTable rows have to start and end with a ''|'' for normal rows or a ''^'' for headers.
277*f8369d7dSTobias Sarnowski
278*f8369d7dSTobias Sarnowski  ^ Heading 1      ^ Heading 2       ^ Heading 3          ^
279*f8369d7dSTobias Sarnowski  | Row 1 Col 1    | Row 1 Col 2     | Row 1 Col 3        |
280*f8369d7dSTobias Sarnowski  | Row 2 Col 1    | some colspan (note the double pipe) ||
281*f8369d7dSTobias Sarnowski  | Row 3 Col 1    | Row 3 Col 2     | Row 3 Col 3        |
282*f8369d7dSTobias Sarnowski
283*f8369d7dSTobias 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!
284*f8369d7dSTobias Sarnowski
285*f8369d7dSTobias SarnowskiVertical tableheaders are possible, too.
286*f8369d7dSTobias Sarnowski
287*f8369d7dSTobias Sarnowski|              ^ Heading 1            ^ Heading 2          ^
288*f8369d7dSTobias Sarnowski^ Heading 3    | Row 1 Col 2          | Row 1 Col 3        |
289*f8369d7dSTobias Sarnowski^ Heading 4    | no colspan this time |                    |
290*f8369d7dSTobias Sarnowski^ Heading 5    | Row 2 Col 2          | Row 2 Col 3        |
291*f8369d7dSTobias Sarnowski
292*f8369d7dSTobias SarnowskiAs you can see, it's the cell separator before a cell which decides about the formatting:
293*f8369d7dSTobias Sarnowski
294*f8369d7dSTobias Sarnowski  |              ^ Heading 1            ^ Heading 2          ^
295*f8369d7dSTobias Sarnowski  ^ Heading 3    | Row 1 Col 2          | Row 1 Col 3        |
296*f8369d7dSTobias Sarnowski  ^ Heading 4    | no colspan this time |                    |
297*f8369d7dSTobias Sarnowski  ^ Heading 5    | Row 2 Col 2          | Row 2 Col 3        |
298*f8369d7dSTobias Sarnowski
299*f8369d7dSTobias SarnowskiYou can have rowspans (vertically connected cells) by adding '':::'' into the cells below the one to which they should connect.
300*f8369d7dSTobias Sarnowski
301*f8369d7dSTobias Sarnowski^ Heading 1      ^ Heading 2                  ^ Heading 3          ^
302*f8369d7dSTobias Sarnowski| Row 1 Col 1    | this cell spans vertically | Row 1 Col 3        |
303*f8369d7dSTobias Sarnowski| Row 2 Col 1    | :::                        | Row 2 Col 3        |
304*f8369d7dSTobias Sarnowski| Row 3 Col 1    | :::                        | Row 2 Col 3        |
305*f8369d7dSTobias Sarnowski
306*f8369d7dSTobias SarnowskiApart from the rowspan syntax those cells should not contain anything else.
307*f8369d7dSTobias Sarnowski
308*f8369d7dSTobias Sarnowski  ^ Heading 1      ^ Heading 2                  ^ Heading 3          ^
309*f8369d7dSTobias Sarnowski  | Row 1 Col 1    | this cell spans vertically | Row 1 Col 3        |
310*f8369d7dSTobias Sarnowski  | Row 2 Col 1    | :::                        | Row 2 Col 3        |
311*f8369d7dSTobias Sarnowski  | Row 3 Col 1    | :::                        | Row 2 Col 3        |
312*f8369d7dSTobias Sarnowski
313*f8369d7dSTobias 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.
314*f8369d7dSTobias Sarnowski
315*f8369d7dSTobias Sarnowski^           Table with alignment           ^^^
316*f8369d7dSTobias Sarnowski|         right|    center    |left          |
317*f8369d7dSTobias Sarnowski|left          |         right|    center    |
318*f8369d7dSTobias Sarnowski| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
319*f8369d7dSTobias Sarnowski
320*f8369d7dSTobias SarnowskiThis is how it looks in the source:
321*f8369d7dSTobias Sarnowski
322*f8369d7dSTobias Sarnowski  ^           Table with alignment           ^^^
323*f8369d7dSTobias Sarnowski  |         right|    center    |left          |
324*f8369d7dSTobias Sarnowski  |left          |         right|    center    |
325*f8369d7dSTobias Sarnowski  | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
326*f8369d7dSTobias Sarnowski
327*f8369d7dSTobias SarnowskiNote: Vertical alignment is not supported.
328*f8369d7dSTobias Sarnowski
329*f8369d7dSTobias Sarnowski===== No Formatting =====
330*f8369d7dSTobias Sarnowski
331*f8369d7dSTobias 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>''.
332*f8369d7dSTobias Sarnowski
333*f8369d7dSTobias Sarnowski<nowiki>
334*f8369d7dSTobias SarnowskiThis is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it.
335*f8369d7dSTobias Sarnowski</nowiki>
336*f8369d7dSTobias SarnowskiThe same is true for %%//__this__ text// with a smiley ;-)%%.
337*f8369d7dSTobias Sarnowski
338*f8369d7dSTobias Sarnowski  <nowiki>
339*f8369d7dSTobias Sarnowski  This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it.
340*f8369d7dSTobias Sarnowski  </nowiki>
341*f8369d7dSTobias Sarnowski  The same is true for %%//__this__ text// with a smiley ;-)%%.
342*f8369d7dSTobias Sarnowski
343*f8369d7dSTobias Sarnowski===== Code Blocks =====
344*f8369d7dSTobias Sarnowski
345*f8369d7dSTobias 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>%%''.
346*f8369d7dSTobias Sarnowski
347*f8369d7dSTobias Sarnowski  This is text is indented by two spaces.
348*f8369d7dSTobias Sarnowski
349*f8369d7dSTobias Sarnowski<code>
350*f8369d7dSTobias SarnowskiThis is preformatted code all spaces are preserved: like              <-this
351*f8369d7dSTobias Sarnowski</code>
352*f8369d7dSTobias Sarnowski
353*f8369d7dSTobias Sarnowski<file>
354*f8369d7dSTobias SarnowskiThis is pretty much the same, but you could use it to show that you quoted a file.
355*f8369d7dSTobias Sarnowski</file>
356*f8369d7dSTobias Sarnowski
357*f8369d7dSTobias SarnowskiThose blocks were created by this source:
358*f8369d7dSTobias Sarnowski
359*f8369d7dSTobias Sarnowski    This is text is indented by two spaces.
360*f8369d7dSTobias Sarnowski
361*f8369d7dSTobias Sarnowski  <code>
362*f8369d7dSTobias Sarnowski  This is preformatted code all spaces are preserved: like              <-this
363*f8369d7dSTobias Sarnowski  </code>
364*f8369d7dSTobias Sarnowski
365*f8369d7dSTobias Sarnowski  <file>
366*f8369d7dSTobias Sarnowski  This is pretty much the same, but you could use it to show that you quoted a file.
367*f8369d7dSTobias Sarnowski  </file>
368*f8369d7dSTobias Sarnowski
369*f8369d7dSTobias Sarnowski==== Syntax Highlighting ====
370*f8369d7dSTobias Sarnowski
371*f8369d7dSTobias 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>''.
372*f8369d7dSTobias Sarnowski
373*f8369d7dSTobias Sarnowski<code java>
374*f8369d7dSTobias Sarnowski/**
375*f8369d7dSTobias Sarnowski * The HelloWorldApp class implements an application that
376*f8369d7dSTobias Sarnowski * simply displays "Hello World!" to the standard output.
377*f8369d7dSTobias Sarnowski */
378*f8369d7dSTobias Sarnowskiclass HelloWorldApp {
379*f8369d7dSTobias Sarnowski    public static void main(String[] args) {
380*f8369d7dSTobias Sarnowski        System.out.println("Hello World!"); //Display the string.
381*f8369d7dSTobias Sarnowski    }
382*f8369d7dSTobias Sarnowski}
383*f8369d7dSTobias Sarnowski</code>
384*f8369d7dSTobias Sarnowski
385*f8369d7dSTobias SarnowskiThe 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//
386*f8369d7dSTobias Sarnowski
387*f8369d7dSTobias Sarnowski==== Downloadable Code Blocks ====
388*f8369d7dSTobias Sarnowski
389*f8369d7dSTobias SarnowskiWhen you use the ''%%<code>%%'' or ''%%<file>%%'' syntax as above, you might want to make the shown code available for download as well. You can to this by specifying a file name after language code like this:
390*f8369d7dSTobias Sarnowski
391*f8369d7dSTobias Sarnowski<code>
392*f8369d7dSTobias Sarnowski<file php myexample.php>
393*f8369d7dSTobias Sarnowski<?php echo "hello world!"; ?>
394*f8369d7dSTobias Sarnowski</file>
395*f8369d7dSTobias Sarnowski</code>
396*f8369d7dSTobias Sarnowski
397*f8369d7dSTobias Sarnowski<file php myexample.php>
398*f8369d7dSTobias Sarnowski<?php echo "hello world!"; ?>
399*f8369d7dSTobias Sarnowski</file>
400*f8369d7dSTobias Sarnowski
401*f8369d7dSTobias SarnowskiIf you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''.
402*f8369d7dSTobias Sarnowski
403*f8369d7dSTobias Sarnowski
404*f8369d7dSTobias Sarnowski===== Embedding HTML and PHP =====
405*f8369d7dSTobias Sarnowski
406*f8369d7dSTobias SarnowskiYou 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.)
407*f8369d7dSTobias Sarnowski
408*f8369d7dSTobias SarnowskiHTML example:
409*f8369d7dSTobias Sarnowski
410*f8369d7dSTobias Sarnowski<code>
411*f8369d7dSTobias Sarnowski<html>
412*f8369d7dSTobias SarnowskiThis is some <span style="color:red;font-size:150%;">inline HTML</span>
413*f8369d7dSTobias Sarnowski</html>
414*f8369d7dSTobias Sarnowski<HTML>
415*f8369d7dSTobias Sarnowski<p style="border:2px dashed red;">And this is some block HTML</p>
416*f8369d7dSTobias Sarnowski</HTML>
417*f8369d7dSTobias Sarnowski</code>
418*f8369d7dSTobias Sarnowski
419*f8369d7dSTobias Sarnowski<html>
420*f8369d7dSTobias SarnowskiThis is some <span style="color:red;font-size:150%;">inline HTML</span>
421*f8369d7dSTobias Sarnowski</html>
422*f8369d7dSTobias Sarnowski<HTML>
423*f8369d7dSTobias Sarnowski<p style="border:2px dashed red;">And this is some block HTML</p>
424*f8369d7dSTobias Sarnowski</HTML>
425*f8369d7dSTobias Sarnowski
426*f8369d7dSTobias SarnowskiPHP example:
427*f8369d7dSTobias Sarnowski
428*f8369d7dSTobias Sarnowski<code>
429*f8369d7dSTobias Sarnowski<php>
430*f8369d7dSTobias Sarnowskiecho 'A logo generated by PHP:';
431*f8369d7dSTobias Sarnowskiecho '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />';
432*f8369d7dSTobias Sarnowskiecho '(generated inline HTML)';
433*f8369d7dSTobias Sarnowski</php>
434*f8369d7dSTobias Sarnowski<PHP>
435*f8369d7dSTobias Sarnowskiecho '<table class="inline"><tr><td>The same, but inside a block level element:</td>';
436*f8369d7dSTobias Sarnowskiecho '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>';
437*f8369d7dSTobias Sarnowskiecho '</tr></table>';
438*f8369d7dSTobias Sarnowski</PHP>
439*f8369d7dSTobias Sarnowski</code>
440*f8369d7dSTobias Sarnowski
441*f8369d7dSTobias Sarnowski<php>
442*f8369d7dSTobias Sarnowskiecho 'A logo generated by PHP:';
443*f8369d7dSTobias Sarnowskiecho '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />';
444*f8369d7dSTobias Sarnowskiecho '(inline HTML)';
445*f8369d7dSTobias Sarnowski</php>
446*f8369d7dSTobias Sarnowski<PHP>
447*f8369d7dSTobias Sarnowskiecho '<table class="inline"><tr><td>The same, but inside a block level element:</td>';
448*f8369d7dSTobias Sarnowskiecho '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>';
449*f8369d7dSTobias Sarnowskiecho '</tr></table>';
450*f8369d7dSTobias Sarnowski</PHP>
451*f8369d7dSTobias Sarnowski
452*f8369d7dSTobias Sarnowski**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed.
453*f8369d7dSTobias Sarnowski
454*f8369d7dSTobias Sarnowski===== RSS/ATOM Feed Aggregation =====
455*f8369d7dSTobias 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:
456*f8369d7dSTobias Sarnowski
457*f8369d7dSTobias Sarnowski^ Parameter  ^ Description ^
458*f8369d7dSTobias Sarnowski| any number | will be used as maximum number items to show, defaults to 8 |
459*f8369d7dSTobias Sarnowski| reverse    | display the last items in the feed first |
460*f8369d7dSTobias Sarnowski| author     | show item authors names |
461*f8369d7dSTobias Sarnowski| date       | show item dates |
462*f8369d7dSTobias Sarnowski| description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped |
463*f8369d7dSTobias Sarnowski| //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). |
464*f8369d7dSTobias Sarnowski
465*f8369d7dSTobias 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.
466*f8369d7dSTobias Sarnowski
467*f8369d7dSTobias Sarnowski**Example:**
468*f8369d7dSTobias Sarnowski
469*f8369d7dSTobias Sarnowski  {{rss>http://slashdot.org/index.rss 5 author date 1h }}
470*f8369d7dSTobias Sarnowski
471*f8369d7dSTobias Sarnowski{{rss>http://slashdot.org/index.rss 5 author date 1h }}
472*f8369d7dSTobias Sarnowski
473*f8369d7dSTobias Sarnowski
474*f8369d7dSTobias Sarnowski===== Control Macros =====
475*f8369d7dSTobias Sarnowski
476*f8369d7dSTobias SarnowskiSome syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble:
477*f8369d7dSTobias Sarnowski
478*f8369d7dSTobias Sarnowski^ Macro           ^ Description |
479*f8369d7dSTobias Sarnowski| %%~~NOTOC~~%%   | If this macro is found on the page, no table of contents will be created |
480*f8369d7dSTobias 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 |
481*f8369d7dSTobias Sarnowski
482*f8369d7dSTobias Sarnowski===== Syntax Plugins =====
483*f8369d7dSTobias Sarnowski
484*f8369d7dSTobias 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:
485*f8369d7dSTobias Sarnowski
486*f8369d7dSTobias Sarnowski~~INFO:syntaxplugins~~
487