This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:syntax [2011/09/12 15:01] andreasreiter created |
wiki:syntax [2020/07/29 11:35] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Formatting Syntax ====== | ====== Formatting Syntax ====== | ||
- | [[http:// | + | [[doku> |
- | ===== Quickbuttons ===== | + | ===== Basic Text Formatting |
- | + | ||
- | The Editing-Toolbar is based upon the one from [[wpmeta> | + | |
- | + | ||
- | Browsers without support to insert at the current cursor position will add the string to the end of the edit box. | + | |
- | + | ||
- | Most buttons have accesskeys assigned to them, too. | + | |
- | + | ||
- | ^ Button ^ Key ^ Function ^ | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | | {{http:// | + | |
- | + | ||
- | + | ||
- | ===== Basic text formatting | + | |
DokuWiki supports **bold**, //italic//, __underlined__ and '' | DokuWiki supports **bold**, //italic//, __underlined__ and '' | ||
Line 38: | Line 9: | ||
DokuWiki supports **bold**, //italic//, __underlined__ and '' | DokuWiki supports **bold**, //italic//, __underlined__ and '' | ||
Of course you can **__//'' | Of course you can **__//'' | ||
- | |||
- | You can also <color orange> | ||
- | |||
- | You can also <color orange> | ||
- | | ||
- | Following colours are available: | ||
- | * <color black> | ||
- | * <color navy> | ||
- | * <color blue> | ||
- | * <color green> | ||
- | * <color teal> | ||
- | * <color lime> | ||
- | * <color maroon> | ||
- | * <color purple> | ||
- | * <color olive> | ||
- | * <color gray> | ||
- | * <color silver> | ||
- | * <color red> | ||
- | * <color fuchsia> | ||
- | * <color yellow> | ||
- | * <color white> | ||
- | * <color orange> | ||
You can use < | You can use < | ||
Line 84: | Line 33: | ||
DokuWiki supports multiple ways of creating links. | DokuWiki supports multiple ways of creating links. | ||
- | |||
- | |||
==== External ==== | ==== External ==== | ||
- | External links are recognized automagically: | + | External links are recognized automagically: |
- | + | ||
- | External links are recognized automagically: | + | |
- | | + | |
- | | + | |
+ | DokuWiki supports multiple ways of creating links. External links are recognized | ||
+ | automagically: | ||
+ | link text as well: [[http:// | ||
+ | addresses like this one: < | ||
==== Internal ==== | ==== Internal ==== | ||
- | Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|Title Text]]. Wiki pagenames are converted to lowercase automatically, | + | Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]]. |
Internal links are created by using square brackets. You can either just give | Internal links are created by using square brackets. You can either just give | ||
- | a [[usage:pagename]] or use an additional [[usage:pagename|Title Text]]. Wiki pagenames | + | a [[pagename]] or use an additional [[pagename|link text]]. |
- | are converted to lowercase automatically, | + | |
- | You can use [[usage: | + | [[doku> |
- | | + | You can use [[some: |
- | Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to [[usage:syntax# | + | You can use [[some:namespaces]] by using a colon in the pagename. |
- | This links to [[usage: | + | For details about namespaces see [[doku> |
- | Links to [[usage:syntax|existing pages]] are shown in a different style from [[usage: | + | 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]]. |
+ | This links to [[syntax# | ||
+ | Notes: | ||
+ | * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. | ||
+ | * DokuWiki does not use [[wp> | ||
+ | * When a section' | ||
+ | ==== Interwiki ==== | ||
+ | DokuWiki supports [[doku> | ||
+ | DokuWiki supports [[doku> | ||
+ | For example this is a link to Wikipedia' | ||
+ | ==== Windows Shares ==== | ||
+ | Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate [[wp> | ||
+ | |||
+ | Windows Shares like [[\\server\share|this]] are recognized, too. | ||
+ | |||
+ | Notes: | ||
+ | |||
+ | * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone" | ||
+ | * For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http:// | ||
+ | <?php | ||
+ | /** | ||
+ | * Customization of the english language file | ||
+ | * Copy only the strings that needs to be modified | ||
+ | */ | ||
+ | $lang[' | ||
+ | </ | ||
==== Image Links ==== | ==== Image Links ==== | ||
Line 126: | Line 97: | ||
You can also use an image to link to another internal or external page by combining the syntax for links and [[# | You can also use an image to link to another internal or external page by combining the syntax for links and [[# | ||
- | [[http://www.gsi.de|{{usage:gsi_logo.png|}}]] | + | [[http://php.net|{{wiki:dokuwiki-128.png}}]] |
- | [[http://www.gsi.de|{{usage:gsi_logo.png|}}]] | + | [[http://php.net|{{wiki:dokuwiki-128.png}}]] |
Please note: The image formatting is the only formatting syntax accepted in link names. | Please note: The image formatting is the only formatting syntax accepted in link names. | ||
+ | |||
+ | The whole [[# | ||
===== Footnotes ===== | ===== Footnotes ===== | ||
Line 154: | Line 127: | ||
---- | ---- | ||
+ | ===== Media Files ===== | ||
- | ===== Images | + | You can include external |
- | You can include external and internal images with curly brackets. Optionally you can specify the size of them. | + | Real size: {{wiki: |
- | Real size: {{usage:gsi_logo.png}} | + | Resize to given width: {{wiki:dokuwiki-128.png?50}} |
- | Resize to given width: | + | Resize to given width and height((when the aspect ratio of the given width and height doesn' |
- | Resize to given width and height: {{usage:gsi_logo.png?400x50}} | + | Resized external image: {{https://secure.php.net/ |
- | Resized external image: | + | |
- | + | Resize to given width: | |
- | | + | Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} |
- | Resize to given width: | + | Resized external image: |
- | Resize to given width and height: {{usage:gsi_logo.png?400x50}} | + | |
- | Resized external image: | + | |
By using left or right whitespaces you can choose the alignment. | By using left or right whitespaces you can choose the alignment. | ||
- | {{ usage:gsi_logo.png}} | + | {{ wiki:dokuwiki-128.png}} |
- | {{usage:gsi_logo.png }} | + | {{wiki:dokuwiki-128.png }} |
- | {{ usage:gsi_logo.png }} | + | {{ wiki:dokuwiki-128.png }} |
- | {{ usage:gsi_logo.png}} | + | {{ wiki:dokuwiki-128.png}} |
- | {{usage:gsi_logo.png }} | + | {{wiki:dokuwiki-128.png }} |
- | {{ usage:gsi_logo.png }} | + | {{ wiki:dokuwiki-128.png }} |
Of course, you can add a title (displayed as a tooltip by most browsers), too. | Of course, you can add a title (displayed as a tooltip by most browsers), too. | ||
- | {{ usage:gsi_logo.png |This is the caption.}} | + | {{ wiki:dokuwiki-128.png |This is the caption}} |
- | {{ usage:gsi_logo.png |This is the caption.}} | + | {{ wiki:dokuwiki-128.png |This is the caption}} |
- | + | ||
- | If you specify a filename (external or internal) that is not an image ('' | + | |
For linking an image to another page see [[#Image Links]] above. | For linking an image to another page see [[#Image Links]] above. | ||
+ | |||
+ | ==== 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, then it will be displayed as a link instead. | ||
+ | |||
+ | By adding ''? | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | ==== Fallback Formats ==== | ||
+ | |||
+ | Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility. | ||
+ | |||
+ | For example consider this embedded mp4 video: | ||
+ | |||
+ | {{video.mp4|A funny video}} | ||
+ | |||
+ | When you upload a '' | ||
+ | |||
+ | Additionally DokuWiki supports a " | ||
===== Lists ===== | ===== Lists ===== | ||
Line 221: | Line 220: | ||
</ | </ | ||
- | ===== Smileys | + | Also take a look at the [[doku> |
+ | |||
+ | ===== Text Conversions | ||
+ | |||
+ | DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML. | ||
+ | |||
+ | The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, | ||
+ | |||
+ | ==== Text to Image Conversions | ||
- | DokuWiki converts commonly used [[wp> | + | DokuWiki converts commonly used [[wp> |
* 8-) %% 8-) %% | * 8-) %% 8-) %% | ||
Line 246: | Line 253: | ||
* DELETEME %% DELETEME %% | * DELETEME %% DELETEME %% | ||
+ | ==== Text to HTML Conversions ==== | ||
- | + | Typography: [[DokuWiki]] | |
- | ===== Typography | + | |
- | + | ||
- | Dokuwiki | + | |
-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) | -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) | ||
Line 259: | Line 264: | ||
"He thought ' | "He thought ' | ||
</ | </ | ||
+ | |||
+ | The same can be done to produce any kind of HTML, it just needs to be added to the [[doku> | ||
+ | |||
+ | There are three exceptions which do not come from that pattern file: multiplication entity (640x480), ' | ||
===== Quoting ===== | ===== Quoting ===== | ||
Line 264: | Line 273: | ||
Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: | Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: | ||
- | | + | < |
- | + | I think we should do it | |
- | > No we shouldn' | + | |
- | + | > No we shouldn' | |
- | >> Well, I say we should | + | |
- | + | >> Well, I say we should | |
- | > Really? | + | |
- | + | > Really? | |
- | >> Yes! | + | |
- | + | >> Yes! | |
- | >>> | + | |
+ | >>> | ||
+ | </ | ||
I think we should do it | I think we should do it | ||
Line 290: | Line 301: | ||
===== Tables ===== | ===== Tables ===== | ||
- | DokuWiki supports a simple syntax to create tables. | + | DokuWiki supports a simple syntax to create tables. |
^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | | | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | | ||
| Row 2 Col 1 | some colspan (note the double pipe) || | | Row 2 Col 1 | some colspan (note the double pipe) || | ||
- | | Row 3 Col 1 | Row 2 Col 2 | Row 2 Col 3 | | + | | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | |
Table rows have to start and end with a '' | Table rows have to start and end with a '' | ||
Line 302: | Line 313: | ||
| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | | | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | | ||
| Row 2 Col 1 | some colspan (note the double pipe) || | | Row 2 Col 1 | some colspan (note the double pipe) || | ||
- | | Row 3 Col 1 | Row 2 Col 2 | Row 2 Col 3 | | + | | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | |
To connect cells horizontally, | To connect cells horizontally, | ||
Line 320: | Line 331: | ||
^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ||
- | Note: Vertical | + | You can have 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 | ||
+ | |||
+ | ^ 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 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. | 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. | ||
Line 336: | Line 359: | ||
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | ||
+ | Note: Vertical alignment is not supported. | ||
- | ===== Non-parsed Blocks | + | ===== No Formatting |
- | You can include | + | If you need to display text exactly like it is typed (without any formatting), |
+ | |||
+ | < | ||
+ | This is some text which contains addresses like this: http:// | ||
+ | </ | ||
+ | The same is true for %%// | ||
+ | |||
+ | < | ||
+ | This is some text which contains addresses like this: http:// | ||
+ | </ | ||
+ | The same is true for %%// | ||
+ | |||
+ | ===== Code Blocks ===== | ||
+ | |||
+ | You can include | ||
+ | |||
+ | This is text is indented by two spaces. | ||
< | < | ||
Line 346: | Line 386: | ||
< | < | ||
- | This is pretty much the same, but you could use it to show that you quoted a file. | + | This is pretty much the same, but you could use it to show that you quoted a file. |
</ | </ | ||
- | To let the parser ignore an area completely (ie. do no formatting on it), enclose the area either with '' | + | Those blocks were created by this source: |
- | < | + | |
- | This is some text which contains addresses like this: http:// | + | |
- | </ | + | |
- | See the source of this page to see how to use these blocks. | + | < |
+ | 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 | + | ==== Syntax Highlighting ==== |
- | DokuWiki can highlight sourcecode, which makes it easier to read. It uses the [[http:// | + | [[wiki:DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http:// |
<code java> | <code java> | ||
- | /** | + | /** |
* The HelloWorldApp class implements an application that | * The HelloWorldApp class implements an application that | ||
* simply displays "Hello World!" | * simply displays "Hello World!" | ||
Line 374: | Line 417: | ||
</ | </ | ||
- | The following language strings are currently recognized: //abap actionscript-french, actionscript, | + | The following language strings are currently recognized: //4cs 6502acme 6502kickass 6502tasm 68000devpac |
+ | There are additional [[doku> | ||
- | ===== Picture Gallery ===== | + | ==== Downloadable Code Blocks |
- | A basic gallery | + | When you use the '' |
- | {{gallery>namespace}} | + | < |
+ | <file php myexample.php> | ||
+ | <?php echo "hello world!"; | ||
+ | </ | ||
+ | </code> | ||
- | All imagefiles in the selected namespace will be added to the image gallery. Note: those images need to be a valid [[pagename]], | + | <file php myexample.php> |
+ | <?php echo "hello world!"; | ||
+ | </ | ||
- | Instead of using a whole namespace of images, you can also specify a single image -- this makes most sense when combined with the lightbox mode (see below). | + | If you don't want any highlighting but want a downloadable file, specify a dash ('' |
- | {{gallery> | ||
- | The created gallery can be aligned by using whitespace (defaults to centered): | + | ===== Embedding HTML and PHP ===== |
- | {{gallery> namespace}} (right aligned) | + | You can embed raw HTML or PHP code into your documents by using the '' |
- | {{gallery> | + | |
- | {{gallery> namespace }} (centered) | + | |
- | You can define the wanted thumbnail size by adding its dimension as parameter: | + | HTML example: |
- | {{gallery>namespace? | + | < |
+ | < | ||
+ | This is some <span style=" | ||
+ | </ | ||
+ | < | ||
+ | <p style=" | ||
+ | </ | ||
+ | </code> | ||
- | The default | + | < |
+ | This is some <span style=" | ||
+ | </ | ||
+ | < | ||
+ | <p style=" | ||
+ | </ | ||
- | You can define the number of columns as well: | + | PHP example: |
- | {{gallery>namespace? | + | <code> |
- | + | <php> | |
- | The default number of columns is 5 and can be configured in the config manager. If you specify a 0 no table is used instead all thumbnails are added in a sequence. | + | echo 'The PHP version: '; |
- | + | echo phpversion(); | |
- | To have the filename displayed below the thumbnails add the '' | + | echo ' (generated inline HTML)'; |
- | + | </ | |
- | {{gallery> | + | <PHP> |
- | + | echo '<table class=" | |
- | If you want the files sorted in the reverse order use the '' | + | echo '<td>'.phpversion().'</td>'; |
- | + | echo '</tr></table>'; | |
- | | + | </ |
- | + | </code> | |
- | If you don't want to link to the image detail pages but directly to the image itself use the '' | + | |
- | + | ||
- | {{gallery>namespace? | + | |
- | + | ||
- | For fancy JavaScript based inline browsing of the images use the '' | + | |
- | + | ||
- | {{gallery>namespace? | + | |
- | + | ||
- | All params can be combined: | + | |
- | + | ||
- | {{gallery>namespace? | + | |
- | + | ||
- | You can also specify the size of lightbox images. It is done the same way as with thumbnails, except using a capital | + | |
- | + | ||
- | | + | |
- | + | ||
- | + | ||
- | IMPORTANT: When you have added your pictures they may not show up in the gallery: add '& | + | |
- | === About the Lightbox mode === | + | < |
+ | echo 'The PHP version: '; | ||
+ | echo phpversion(); | ||
+ | echo ' (inline HTML)'; | ||
+ | </ | ||
+ | < | ||
+ | echo '< | ||
+ | echo '< | ||
+ | echo '</ | ||
+ | </ | ||
- | This mode will open the clicked picture inside the current browser window without leaving the current page. You can close the picture view by clicking the little X in the upper right corner or anywhere in the picture. You can move to the next or previous image by using the arrow buttons in the lower corners. | + | **Please Note**: HTML and PHP embedding is disabled |
- | The picture is downsized if necessary to fit into the current browser window. You can enlarge it with the arrow button | + | ===== RSS/ATOM Feed Aggregation ===== |
+ | [[DokuWiki]] can integrate data from external XML feeds. For parsing | ||
- | The following keys can be used to navigate: | + | ^ Parameter |
+ | | any number | will be used as maximum number items to show, defaults to 8 | | ||
+ | | reverse | ||
+ | | author | ||
+ | | date | show item dates | | ||
+ | | description| show the item description. If [[doku> | ||
+ | | nosort | ||
+ | | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | | ||
- | ^ Key ^ Action ^ | + | The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki: |
- | | '' | + | |
- | | ''< | + | |
- | | '' | + | |
- | The Lightbox feature | + | By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the '' |
- | More info at :[[http:// | + | **Example:** |
- | Note: The feature does not use [[http://www.huddletogether.com/ | + | {{rss>http://slashdot.org/index.rss 5 author date 1h }} |
+ | {{rss> | ||
+ | ===== Control Macros ===== | ||
+ | Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: | ||
+ | ^ Macro ^ Description | | ||
+ | | %%~~NOTOC~~%% | ||
+ | | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%< | ||
+ | ===== Syntax Plugins ===== | ||
+ | DokuWiki' | ||
+ | ~~INFO: | ||