[ Index ] |
|
Code source de DokuWiki 2006-11-06 |
1 ====== Formatting Syntax ====== 2 3 [[wiki: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>wiki:quickbuttons|quickbuttons]], too. 4 5 ===== Basic text formatting ===== 6 7 DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. Of course you can **__//''combine''//__** all these. 8 9 DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. 10 Of course you can **__//''combine''//__** all these. 11 12 You can use <sub>subscript</sub> and <sup>superscript</sup>, too. 13 14 You can use <sub>subscript</sub> and <sup>superscript</sup>, too. 15 16 You can mark something as <del>deleted</del> as well. 17 18 You can mark something as <del>deleted</del> as well. 19 20 **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 22 This is some text with some linebreaks\\ Note that the 23 two backslashes are only recognized at the end of a line\\ 24 or followed by\\ a whitespace \\this happens without it. 25 26 This is some text with some linebreaks\\ Note that the 27 two backslashes are only recognized at the end of a line\\ 28 or followed by\\ a whitespace \\this happens without it. 29 30 You should use forced newlines only if really needed. 31 32 ===== Links ===== 33 34 DokuWiki supports multiple ways of creating links. 35 36 ==== External ==== 37 38 External links are recognized automagically: http://www.google.com or simply www.google.com - You can set Linknames, too: [[http://www.google.com|This Link points to google]]. Email addresses like this one: <andi@splitbrain.org> are recognized, too. 39 40 DokuWiki supports multiple ways of creating links. External links are recognized 41 automagically: http://www.google.com or simply www.google.com - You can set 42 Linknames, too: [[http://www.google.com|This Link points to google]]. Email 43 addresses like this one: <andi@splitbrain.org> are recognized, too. 44 45 ==== Internal ==== 46 47 Internal links are created by using square brackets. You can either just give a [[doku>wiki:pagename]] or use an additional [[doku>wiki:pagename|Title Text]]. Wiki pagenames are converted to lowercase automatically, special characters are not allowed. 48 49 Internal links are created by using square brackets. You can either just give 50 a [[pagename]] or use an additional [[pagename|Title Text]]. Wiki pagenames 51 are converted to lowercase automatically, special chars are not allowed. 52 53 You can use [[wiki:namespaces]] by using a colon in the pagename. 54 55 You can use [[wiki:namespaces]] by using a colon in the pagename. 56 57 For details about namespaces see [[doku>wiki:namespaces]]. 58 59 Linking 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]]. 60 61 This links to [[syntax#internal|this Section]]. 62 63 Notes: 64 65 * Links to [[wiki:syntax|existing pages]] are shown in a different style from [[wiki:nonexisting]] ones. 66 * DokuWiki does not use [[wp>CamelCase]] to automatically create links by default, but this behaviour can be enabled in the [[doku>wiki:config]] file. Hint: If DokuWiki is a link, then it's enabled. 67 * When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much. 68 69 ==== Interwiki ==== 70 71 DokuWiki supports [[doku>wiki:interwiki|Interwiki]] links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. 72 73 DokuWiki supports [[doku>wiki:interwiki|Interwiki]] links. These are quick links to other Wikis. 74 For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. 75 76 ==== Windows Shares ==== 77 78 Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogenous user group like a corporate [[wp>Intranet]]. 79 80 Windows Shares like [[\\server\share|this]] are recognized, too. 81 82 Notes: 83 84 * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone"). 85 * For Mozilla and Firefox it can be enabled through the config option [[http://www.mozilla.org/quality/networking/docs/netprefs.html#file|security.checkloaduri]] but this is not recommended. 86 * See [[bug>151]] for more info. 87 88 ==== Image Links ==== 89 90 You 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: 91 92 [[http://www.php.net|{{wiki:dokuwiki-128.png}}]] 93 94 [[http://www.php.net|{{wiki:dokuwiki-128.png}}]] 95 96 Please note: The image formatting is the only formatting syntax accepted in link names. 97 98 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). 99 100 ===== Footnotes ===== 101 102 You can add footnotes ((This is a footnote)) by using double parentheses. 103 104 You can add footnotes ((This is a footnote)) by using double parentheses. 105 106 ===== Sectioning ===== 107 108 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 ''<nowiki>~~NOTOC~~</nowiki>'' in the document. 109 110 ==== Headline Level 3 ==== 111 === Headline Level 4 === 112 == Headline Level 5 == 113 114 ==== Headline Level 3 ==== 115 === Headline Level 4 === 116 == Headline Level 5 == 117 118 By using four or more dashes, you can make a horizontal line: 119 120 ---- 121 122 ===== Images and other files ===== 123 124 You can include external and internal [[doku>wiki:images]] with curly brackets. Optionally you can specify the size of them. 125 126 Real size: {{wiki:dokuwiki-128.png}} 127 128 Resize to given width: {{wiki:dokuwiki-128.png?50}} 129 130 Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} 131 132 Resized external image: {{http://de3.php.net/images/php.gif?200x50}} 133 134 Real size: {{wiki:dokuwiki-128.png}} 135 Resize to given width: {{wiki:dokuwiki-128.png?50}} 136 Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} 137 Resized external image: {{http://de3.php.net/images/php.gif?200x50}} 138 139 140 By using left or right whitespaces you can choose the alignment. 141 142 {{ wiki:dokuwiki-128.png}} 143 144 {{wiki:dokuwiki-128.png }} 145 146 {{ wiki:dokuwiki-128.png }} 147 148 {{ wiki:dokuwiki-128.png}} 149 {{wiki:dokuwiki-128.png }} 150 {{ wiki:dokuwiki-128.png }} 151 152 Of course, you can add a title (displayed as a tooltip by most browsers), too. 153 154 {{ wiki:dokuwiki-128.png |This is the caption}} 155 156 {{ wiki:dokuwiki-128.png |This is the caption}} 157 158 If you specify a filename (external or internal) that is not an image (''gif, jpeg, png''), then it will be displayed as a link instead. 159 160 For linking an image to another page see [[#Image Links]] above. 161 162 ===== Lists ===== 163 164 Dokuwiki 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. 165 166 * This is a list 167 * The second item 168 * You may have different levels 169 * Another item 170 171 - The same list but ordered 172 - Another item 173 - Just use indention for deeper levels 174 - That's it 175 176 <code> 177 * This is a list 178 * The second item 179 * You may have different levels 180 * Another item 181 182 - The same list but ordered 183 - Another item 184 - Just use indention for deeper levels 185 - That's it 186 </code> 187 188 ===== Smileys ===== 189 190 DokuWiki converts commonly used [[wp>emoticon]]s to their graphical equivalents. More smileys can be placed in the ''smiley'' directory and configured in the ''conf/smileys.conf'' file. Here is an overview of Smileys included in DokuWiki. 191 192 * 8-) %% 8-) %% 193 * 8-O %% 8-O %% 194 * :-( %% :-( %% 195 * :-) %% :-) %% 196 * =) %% =) %% 197 * :-/ %% :-/ %% 198 * :-\ %% :-\ %% 199 * :-? %% :-? %% 200 * :-D %% :-D %% 201 * :-P %% :-P %% 202 * :-O %% :-O %% 203 * :-X %% :-X %% 204 * :-| %% :-| %% 205 * ;-) %% ;-) %% 206 * ^_^ %% ^_^ %% 207 * :?: %% :?: %% 208 * :!: %% :!: %% 209 * LOL %% LOL %% 210 * FIXME %% FIXME %% 211 * DELETEME %% DELETEME %% 212 213 ===== Typography ===== 214 215 [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. 216 217 -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) 218 "He thought 'It's a man's world'..." 219 220 <code> 221 -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) 222 "He thought 'It's a man's world'..." 223 </code> 224 225 Please note: These conversions can be turned off through a [[doku>wiki:config#typography|config option]] and a [[doku>wiki:entities|pattern file]]. 226 227 ===== Quoting ===== 228 229 Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: 230 231 I think we should do it 232 233 > No we shouldn't 234 235 >> Well, I say we should 236 237 > Really? 238 239 >> Yes! 240 241 >>> Then lets do it! 242 243 I think we should do it 244 245 > No we shouldn't 246 247 >> Well, I say we should 248 249 > Really? 250 251 >> Yes! 252 253 >>> Then lets do it! 254 255 ===== Tables ===== 256 257 DokuWiki supports a simple syntax to create tables. 258 259 ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 260 | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | 261 | Row 2 Col 1 | some colspan (note the double pipe) || 262 | Row 3 Col 1 | Row 2 Col 2 | Row 2 Col 3 | 263 264 Table rows have to start and end with a ''|'' for normal rows or a ''^'' for headers. 265 266 ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ 267 | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | 268 | Row 2 Col 1 | some colspan (note the double pipe) || 269 | Row 3 Col 1 | Row 2 Col 2 | Row 2 Col 3 | 270 271 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! 272 273 Vertical tableheaders are possible, too. 274 275 | ^ Heading 1 ^ Heading 2 ^ 276 ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | 277 ^ Heading 4 | no colspan this time | | 278 ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | 279 280 As you can see, it's the cell separator before a cell which decides about the formatting: 281 282 | ^ Heading 1 ^ Heading 2 ^ 283 ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | 284 ^ Heading 4 | no colspan this time | | 285 ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | 286 287 Note: Vertical spans (rowspan) are not possible. 288 289 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. 290 291 ^ Table with alignment ^^^ 292 | right| center |left | 293 |left | right| center | 294 | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | 295 296 This is how it looks in the source: 297 298 ^ Table with alignment ^^^ 299 | right| center |left | 300 |left | right| center | 301 | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | 302 303 ===== Non-parsed Blocks ===== 304 305 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'' or ''file''. 306 307 <code> 308 This is preformatted code all spaces are preserved: like <-this 309 </code> 310 311 <file> 312 This is pretty much the same, but you could use it to show that you quoted a file. 313 </file> 314 315 To let the parser ignore an area completely (ie. do no formatting on it), enclose the area either with ''nowiki'' tags or even simpler, with double percent signs ''<nowiki>%%</nowiki>''. 316 317 <nowiki> 318 This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. 319 </nowiki> 320 321 See the source of this page to see how to use these blocks. 322 323 324 ===== Syntax Highlighting ===== 325 326 [[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 block in the previous section, but this time the name of the used language is inserted inside the tag. Eg. ''<nowiki><code java></nowiki>''. 327 328 <code java> 329 /** 330 * The HelloWorldApp class implements an application that 331 * simply displays "Hello World!" to the standard output. 332 */ 333 class HelloWorldApp { 334 public static void main(String[] args) { 335 System.out.println("Hello World!"); //Display the string. 336 } 337 } 338 </code> 339 340 The following language strings are currently recognized: //actionscript-french, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, caddcl, cadlisp, cfdg, cfm, c_mac, c, cpp, csharp, css, delphi, diff, div, dos, d, eiffel, fortran, freebasic, gml, groovy, html, idl, ini, inno, io, java5, java, javascript, latex, lisp, lua, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, perl, php-brief, php, python, qbasic, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vbnet, vb, vhdl, visualfoxpro, winbatch, xml// 341 342 ===== Embedding HTML and PHP ===== 343 344 You can embed raw HTML or PHP code into your documents by using the ''html'' or ''php'' tags like this: 345 <code> 346 <html> 347 This is some <font color="red" size="+1">HTML</font> 348 </html> 349 </code> 350 351 <html> 352 This is some <font color="red" size="+1">HTML</font> 353 </html> 354 355 <code> 356 <php> 357 echo 'A logo generated by PHP:'; 358 echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; 359 </php> 360 </code> 361 362 <php> 363 echo 'A logo generated by PHP:'; 364 echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; 365 </php> 366 367 **Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. 368 369 ===== Syntax Plugins ===== 370 371 DokuWiki's syntax can be extended by [[doku>wiki: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: 372 373 ~~INFO:syntaxplugins~~
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Apr 3 20:47:31 2007 | par Balluche grâce à PHPXref 0.7 |