en:wiki:syntax
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:wiki:syntax [2026/08/03 19:10] – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | en:wiki:syntax [2026/08/03 19:10] (current) – Automatic push translation domele | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Formatting Syntax ====== | ||
| + | |||
| + | [[doku> | ||
| + | |||
| + | ===== Basic Text Formatting ===== | ||
| + | |||
| + | DokuWiki supports **bold**, //italic//, __underlined__ and '' | ||
| + | |||
| + | DokuWiki supports **bold**, // | ||
| + | Of course you can **__//'' | ||
| + | |||
| + | Note that the formatting markers must directly enclose the text, so '' | ||
| + | |||
| + | You can use < | ||
| + | |||
| + | You can use < | ||
| + | |||
| + | You can mark something as < | ||
| + | |||
| + | You can mark something as < | ||
| + | |||
| + | **Paragraphs** are created from blank lines. If you want to **force a newline** without creating a new paragraph, you can use two backslashes followed by a space or the end of the line. | ||
| + | |||
| + | This is some text with some line breaks\\ Note that the | ||
| + | two backslashes are only recognised at the end of a line\\ | ||
| + | or when followed by\\ a space \\this happens without it. | ||
| + | |||
| + | This is some text with some line breaks\\ Note that the | ||
| + | two backslashes are only recognised at the end of a line\\ | ||
| + | or followed by\\ a whitespace \\this happens without it. | ||
| + | |||
| + | You should only use forced line breaks if absolutely necessary. | ||
| + | |||
| + | ===== Links ===== | ||
| + | |||
| + | DokuWiki supports several ways of creating links. | ||
| + | |||
| + | ==== External ==== | ||
| + | |||
| + | External links are recognised automatically: | ||
| + | |||
| + | DokuWiki supports multiple ways of creating links. External links are recognised | ||
| + | automatically: | ||
| + | the link text as well: [[http:// | ||
| + | addresses like this one: < | ||
| + | |||
| + | ==== Internal ==== | ||
| + | |||
| + | Internal links are created using square brackets. You can either simply provide a [[de: | ||
| + | |||
| + | Internal links are created using square brackets. You can either simply provide | ||
| + | a [[de: | ||
| + | |||
| + | [[doku> | ||
| + | |||
| + | You can use [[some: | ||
| + | |||
| + | You can use [[some: | ||
| + | |||
| + | For details about namespaces, see [[doku> | ||
| + | |||
| + | It is also possible to link to a specific section. Simply add the section name after a hash symbol, as is standard in HTML. This links to [[de: | ||
| + | |||
| + | This links to [[de: | ||
| + | |||
| + | Notes: | ||
| + | |||
| + | * Links to [[de: | ||
| + | * DokuWiki does not use [[wp> | ||
| + | * When a section’s heading is changed, its bookmark changes as well. So do not rely too heavily on section linking. | ||
| + | |||
| + | ==== Interwiki ==== | ||
| + | |||
| + | DokuWiki supports [[doku> | ||
| + | |||
| + | DokuWiki supports [[doku> | ||
| + | For example, this is a link to Wikipedia’s page about wikis: [[wp> | ||
| + | |||
| + | ==== Windows shares ==== | ||
| + | |||
| + | Windows shares such as [[\\server\share|this]] are recognised as well. Please note that these are only useful in a homogeneous user group such as a corporate [[wp> | ||
| + | |||
| + | Windows shares such as [[\\server\share|this]] are recognised as well. | ||
| + | |||
| + | Notes: | ||
| + | |||
| + | * For security reasons, direct browsing of Windows shares only works in Microsoft Internet Explorer by default (and only in the ‘local zone’). | ||
| + | * For Mozilla and Firefox, this can be enabled via various workarounds mentioned in the [[http:// | ||
| + | <?php | ||
| + | /** | ||
| + | * Customization of the english language file | ||
| + | * Copy only the strings that needs to be modified | ||
| + | */ | ||
| + | $lang[' | ||
| + | </ | ||
| + | |||
| + | ==== Image Links ==== | ||
| + | |||
| + | You can also use an image to link to another internal or external page by combining the syntax for links and [[de: | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | Please note: Image formatting is the only formatting syntax accepted in link names. | ||
| + | |||
| + | The entire [[de: | ||
| + | |||
| + | ===== Footnotes ===== | ||
| + | |||
| + | 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 ===== | ||
| + | |||
| + | You can use up to five different levels of headings to structure your content. If you have more than three headings, a table of contents is generated automatically — this can be disabled by including the string ''< | ||
| + | |||
| + | ==== Heading Level 3 ==== | ||
| + | === Heading Level 4 === | ||
| + | == Heading Level 5 == | ||
| + | |||
| + | ==== Heading Level 3 ==== | ||
| + | === Heading Level 4 === | ||
| + | == Heading Level 5 == | ||
| + | |||
| + | By using four or more dashes, you can create a horizontal line: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Media Files ===== | ||
| + | |||
| + | You can include external and internal [[doku> | ||
| + | |||
| + | Actual size: | ||
| + | |||
| + | Resize to a specified width: | ||
| + | |||
| + | Resize to specified width and height (if the aspect ratio of the specified width and height does not match that of the image, it will be cropped to the new ratio before resizing): {{wiki: | ||
| + | |||
| + | Resized external image: {{https:// | ||
| + | |||
| + | Actual size: | ||
| + | Resize to specified width: | ||
| + | Resize to specified width and height: {{wiki: | ||
| + | Resized external image: {{https:// | ||
| + | |||
| + | |||
| + | You can choose the alignment by using left or right whitespace. | ||
| + | |||
| + | {{ wiki: | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | {{ wiki: | ||
| + | |||
| + | {{ wiki: | ||
| + | | ||
| + | {{ wiki: | ||
| + | |||
| + | You can also set the alignment explicitly using a ''? | ||
| + | {{wiki: | ||
| + | Of course, you can add a title (displayed as a tooltip by most browsers) as well. | ||
| + | |||
| + | {{ wiki: | ||
| + | |||
| + | {{ wiki: | ||
| + | |||
| + | To link an image to another page, see [[de: | ||
| + | |||
| + | ==== Supported Media Formats ==== | ||
| + | |||
| + | DokuWiki can embed the following media formats directly. | ||
| + | |||
| + | | Image | '' | ||
| + | | Video | '' | ||
| + | | Audio | '' | ||
| + | | Flash | '' | ||
| + | |||
| + | If you specify a filename that is not a supported media format, it will be displayed as a link instead. | ||
| + | |||
| + | By adding ''? | ||
| + | |||
| + | | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | ==== Fallback Formats ==== | ||
| + | |||
| + | Unfortunately, | ||
| + | |||
| + | For example, consider this embedded MP4 video: | ||
| + | |||
| + | {{de: | ||
| + | |||
| + | When you upload a '' | ||
| + | |||
| + | Additionally, | ||
| + | ===== Lists ===== | ||
| + | DokuWiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a '' | ||
| + | |||
| + | * This is a list | ||
| + | * The second item | ||
| + | * You can have different levels | ||
| + | * Another item | ||
| + | |||
| + | - The same list, but ordered | ||
| + | - Another item | ||
| + | - Just use indentation for deeper levels | ||
| + | - That’s it | ||
| + | |||
| + | < | ||
| + | * 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 | ||
| + | </ | ||
| + | |||
| + | Also have a look at the [[doku> | ||
| + | ===== -to-text conversions ===== | ||
| + | |||
| + | DokuWiki can convert certain pre-defined characters or strings into images, other text or HTML. | ||
| + | |||
| + | The text-to-image conversion is mainly used for smileys. The text-to-HTML conversion is used for typographical replacements, | ||
| + | |||
| + | ==== Text-to-Image Conversions ==== | ||
| + | |||
| + | DokuWiki converts commonly used [[wp> | ||
| + | |||
| + | * 8-) %% 8-) %% | ||
| + | * 8-O %% 8-O %% | ||
| + | * :-( %% :-( %% | ||
| + | * :-) %% :-) %% | ||
| + | * =) %% = ) %% | ||
| + | * :-/ %% :-/ %% | ||
| + | * :-\ %% :-\ %% | ||
| + | * :-? %% :-? %% | ||
| + | * :-D %% :-D %% | ||
| + | * :-P %% :-P %% | ||
| + | * :-O %% :-O %% | ||
| + | * :-X %% :-X %% | ||
| + | * :-| %% :-| %% | ||
| + | * ;-) %% ;-) %% | ||
| + | * ^_^ %% ^_^ %% | ||
| + | * m( %% m( %% | ||
| + | * :?: %% :?: %% | ||
| + | * :!: %% :!: %% | ||
| + | * LOL %% LOL %% | ||
| + | * FIXME %% FIXME %% | ||
| + | * DELETEME %% DELETEME %% | ||
| + | |||
| + | ==== Text to HTML Conversions ==== | ||
| + | |||
| + | Typography: [[de: | ||
| + | |||
| + | -> <- < | ||
| + | "He thought ' | ||
| + | |||
| + | < | ||
| + | -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) | ||
| + | "He thought ' | ||
| + | </ | ||
| + | |||
| + | The same can be done to produce any kind of HTML; it simply needs to be added to the [[doku> | ||
| + | |||
| + | There are three exceptions that do not originate from that pattern file: the multiplication entity (640x480), ‘single’ and “double quotes”. These can be disabled via a [[doku> | ||
| + | ===== Quoting ===== | ||
| + | |||
| + | Sometimes you want to mark text to show that it is a reply or comment. You can use the following syntax: | ||
| + | |||
| + | < | ||
| + | I think we should do it | ||
| + | |||
| + | > No we shouldn' | ||
| + | |||
| + | >> Well, I say we should | ||
| + | |||
| + | > Really? | ||
| + | |||
| + | >> Yes! | ||
| + | |||
| + | >>> | ||
| + | </ | ||
| + | |||
| + | I think we should do it | ||
| + | |||
| + | > No, we shouldn’t | ||
| + | |||
| + | >> Well, I say we should | ||
| + | |||
| + | > Really? | ||
| + | |||
| + | >> Yes! | ||
| + | |||
| + | >>> | ||
| + | |||
| + | ===== Tables ===== | ||
| + | |||
| + | DokuWiki supports a simple syntax for creating tables. | ||
| + | |||
| + | ^ 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 | | ||
| + | |||
| + | Table rows must begin and end with a '' | ||
| + | |||
| + | ^ 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 | | ||
| + | |||
| + | To connect cells horizontally, | ||
| + | |||
| + | Vertical table headers are also possible. | ||
| + | |||
| + | | ^ 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, Column 3 | | ||
| + | |||
| + | As you can see, it is the cell separator preceding a cell that determines the formatting: | ||
| + | |||
| + | | ^ 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, Column 3 | | ||
| + | |||
| + | You can create rowspans (vertically connected cells) by adding '' | ||
| + | ^ 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 | | ||
| + | |||
| + | Apart from the rowspan syntax, these cells should not contain anything else. | ||
| + | |||
| + | ^ 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 | | ||
| + | |||
| + | You can also align the table contents. Simply add at least two spaces at the opposite end of your text: add two spaces on the left to align to the right, two spaces on the right to align to the left, and at least two spaces at both ends for centred text. | ||
| + | |||
| + | ^ Table with alignment | ||
| + | | | ||
| + | |left | | ||
| + | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | ||
| + | |||
| + | This is how it looks in the source: | ||
| + | |||
| + | ^ Table with alignment | ||
| + | | | ||
| + | |left | | ||
| + | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | ||
| + | |||
| + | Note: Vertical alignment is not supported. | ||
| + | |||
| + | ===== No Formatting ===== | ||
| + | |||
| + | If you need to display text exactly as it is typed (without any formatting), | ||
| + | |||
| + | < | ||
| + | This is some text which contains addresses like this: http:// | ||
| + | </ | ||
| + | The same applies to %%// | ||
| + | |||
| + | < | ||
| + | This is some text which contains addresses like this: http:// | ||
| + | </ | ||
| + | The same applies to %%// | ||
| + | ===== Code blocks ===== | ||
| + | |||
| + | You can include code blocks in your documents either by indenting them by at least two spaces (as used in the previous examples) or by using the tags '' | ||
| + | |||
| + | This is text is indented by two spaces. | ||
| + | |||
| + | < | ||
| + | This is preformatted code all spaces are preserved: like <-this | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | This is pretty much the same, but you could use it to show that you quoted a file. | ||
| + | </ | ||
| + | |||
| + | These blocks were created from this source: | ||
| + | |||
| + | This text is indented by two spaces. | ||
| + | |||
| + | < | ||
| + | This is preformatted code all spaces are preserved: like <-this | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | This is pretty much the same, but you could use it to show that you quoted a file. | ||
| + | </ | ||
| + | |||
| + | ==== Syntax Highlighting ==== | ||
| + | |||
| + | [[wiki: | ||
| + | |||
| + | <code java> | ||
| + | /** | ||
| + | * The HelloWorldApp class implements an application that | ||
| + | * simply displays "Hello World!" | ||
| + | */ | ||
| + | class HelloWorldApp { | ||
| + | public static void main(String[] args) { | ||
| + | System.out.println(" | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | The following language strings are currently recognized: //4cs 6502acme 6502kickass 6502tasm 68000devpac abap actionscript3 actionscript ada aimms algol68 apache applescript apt_sources arm asm asp asymptote autoconf autohotkey autoit avisynth awk bascomavr bash basic4gl batch bf biblatex bibtex blitzbasic bnf boo caddcl cadlisp ceylon cfdg cfm chaiscript chapel cil c_loadrunner clojure c_mac cmake cobol coffeescript c cpp cpp-qt cpp-winapi csharp css cuesheet c_winapi dart dcl dcpu16 dcs delphi diff div dos dot d ecmascript eiffel email epc e erlang euphoria ezt f1 falcon fo fortran freebasic freeswitch fsharp gambas gdb genero genie gettext glsl gml gnuplot go groovy gwbasic haskell haxe hicest hq9plus html html4strict html5 icon idl ini inno intercal io ispfpanel java5 java javascript jcl j jquery julia kixtart klonec klonecpp kotlin latex lb ldif lisp llvm locobasic logtalk lolcode lotusformulas lotusscript lscript lsl2 lua m68k magiksf make mapbasic mathematica matlab mercury metapost mirc mk-61 mmix modula2 modula3 mpasm mxml mysql nagios netrexx newlisp nginx nimrod nsis oberon2 objc objeck ocaml-brief ocaml octave oobas oorexx oracle11 oracle8 oxygene oz parasail parigp pascal pcre perl6 perl per pf phix php-brief php pic16 pike pixelbender pli plsql postgresql postscript povray powerbuilder powershell proftpd progress prolog properties providex purebasic pycon pys60 python qbasic qml q racket rails rbs rebol reg rexx robots roff rpmspec rsplus ruby rust sas sass scala scheme scilab scl sdlbasic smalltalk smarty spark sparql sql sshconfig standardml stonescript swift systemverilog tclegg tcl teraterm texgraph text thinbasic tsql twig typoscript unicon upc urbi uscript vala vbnet vb vbscript vedit verilog vhdl vim visualfoxpro visualprolog whitespace whois winbatch wolfram xbasic xml xojo xorg_conf xpp yaml z80 zxbasic// | ||
| + | |||
| + | There are additional [[doku> | ||
| + | |||
| + | ==== Downloadable Code Blocks ==== | ||
| + | |||
| + | When you use the '' | ||
| + | |||
| + | < | ||
| + | <file php myexample.php> | ||
| + | <?php echo "hello world!"; | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <file php myexample.php> | ||
| + | <?php echo "hello world!"; | ||
| + | </ | ||
| + | |||
| + | If you do not want any highlighting but would like a downloadable file, specify a dash ('' | ||
| + | |||
| + | ===== RSS/ATOM Feed Aggregation ===== | ||
| + | [[de: | ||
| + | |||
| + | ^ Parameter | ||
| + | | any number | will be used as the maximum number of items to display; defaults to 8 | | ||
| + | | reverse | ||
| + | | author | ||
| + | | date | show item dates | | ||
| + | | description| show the item description. All HTML tags will be stripped | | ||
| + | | nosort | ||
| + | | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | | ||
| + | |||
| + | The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki: | ||
| + | |||
| + | By default, the feed will be sorted by date, with the newest items first. You can sort it with the oldest items first using the '' | ||
| + | |||
| + | **Example: | ||
| + | |||
| + | {{rss> | ||
| + | |||
| + | {{rss> | ||
| + | |||
| + | |||
| + | ===== Control Macros ===== | ||
| + | |||
| + | Some syntax affects how DokuWiki renders a page without generating any output itself. The following control macros are available: | ||
| + | |||
| + | ^ Macro ^ Description | | ||
| + | | %%~~NOTOC~~%% | ||
| + | | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this may not be desired (e.g. when the %%< | ||
| + | |||
| + | ===== Syntax Plugins ===== | ||
| + | |||
| + | DokuWiki’s syntax can be extended by [[doku> | ||
| + | |||
| + | ~~INFO: | ||
