This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:syntax [2011/09/09 14:56] andreasreiter removed |
wiki:syntax [2011/09/12 15:01] andreasreiter created |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Formatting Syntax ====== | ====== Formatting Syntax ====== | ||
- | [[doku> | + | [[http:// |
- | ===== Basic Text Formatting | + | ===== Quickbuttons ===== |
+ | |||
+ | 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 9: | Line 38: | ||
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 33: | Line 84: | ||
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|link text]]. | + | 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 | Internal links are created by using square brackets. You can either just give | ||
- | a [[pagename]] or use an additional [[pagename|link text]]. | + | a [[usage:pagename]] or use an additional [[usage:pagename|Title Text]]. Wiki pagenames |
+ | are converted to lowercase automatically, | ||
- | [[doku> | + | You can use [[usage: |
- | You can use [[some: | + | |
- | You can use [[some:namespaces]] by using a colon in the pagename. | + | 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# |
- | For details about namespaces see [[doku> | + | This links to [[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]]. | + | Links to [[usage:syntax|existing pages]] are shown in a different style from [[usage: |
- | 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:// | ||
- | |||
- | $lang[' | ||
==== Image Links ==== | ==== Image Links ==== | ||
Line 92: | Line 126: | ||
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:// | + | [[http:// |
- | [[http:// | + | [[http:// |
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 122: | Line 154: | ||
---- | ---- | ||
- | ===== Images and Other Files ===== | ||
- | You can include external | + | ===== Images |
- | Real size: {{wiki: | + | You can include external and internal images with curly brackets. Optionally you can specify the size of them. |
- | Resize to given width: {{wiki:dokuwiki-128.png?50}} | + | Real size: {{usage:gsi_logo.png}} |
- | Resize to given width and height((when the aspect ratio of the given width and height doesn' | + | Resize to given width: |
- | Resized external image: | + | Resize to given width and height: {{usage:gsi_logo.png?400x50}} |
- | | + | Resized external image: |
- | Resize to given width: | + | |
- | Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} | + | |
- | Resized external image: | + | Resize to given width: |
+ | 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. | ||
- | {{ 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 }} | + | {{ usage:gsi_logo.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. | ||
- | {{ wiki:dokuwiki-128.png |This is the caption}} | + | {{ usage:gsi_logo.png |This is the caption.}} |
- | {{ wiki:dokuwiki-128.png |This is the caption}} | + | {{ usage:gsi_logo.png |This is the caption.}} |
If you specify a filename (external or internal) that is not an image ('' | If you specify a filename (external or internal) that is not an image ('' | ||
Line 188: | Line 221: | ||
</ | </ | ||
- | Also take a look at the [[doku> | + | ===== Smileys ===== |
- | ===== Text Conversions ===== | + | DokuWiki converts commonly used [[wp> |
- | + | ||
- | 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> | + | |
* 8-) %% 8-) %% | * 8-) %% 8-) %% | ||
Line 221: | Line 246: | ||
* DELETEME %% DELETEME %% | * DELETEME %% DELETEME %% | ||
- | ==== Text to HTML Conversions ==== | ||
- | Typography: [[DokuWiki]] | + | |
+ | ===== Typography | ||
+ | |||
+ | Dokuwiki | ||
-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) | -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) | ||
Line 232: | Line 259: | ||
"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 267: | Line 290: | ||
===== 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 3 Col 2 | Row 3 Col 3 | | + | | Row 3 Col 1 | Row 2 Col 2 | Row 2 Col 3 | |
Table rows have to start and end with a '' | Table rows have to start and end with a '' | ||
Line 279: | Line 302: | ||
| 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 3 Col 2 | Row 3 Col 3 | | + | | Row 3 Col 1 | Row 2 Col 2 | Row 2 Col 3 | |
To connect cells horizontally, | To connect cells horizontally, | ||
Line 297: | Line 320: | ||
^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ||
- | You can have rowspans (vertically connected cells) by adding '' | + | Note: Vertical |
- | + | ||
- | ^ 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 325: | Line 336: | ||
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | ||
- | Note: Vertical alignment is not supported. | ||
- | |||
- | ===== No Formatting ===== | ||
- | |||
- | 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 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 '' | + | ===== Non-parsed Blocks ===== |
- | This is text is indented | + | You can include non-parsed blocks into your documents |
< | < | ||
Line 352: | Line 346: | ||
< | < | ||
- | 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. |
</ | </ | ||
- | Those blocks were created by this source: | + | To let the parser ignore an area completely (ie. do no formatting on it), enclose the area either with '' |
- | | + | < |
+ | 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 |
- | [[wiki:DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http:// | + | 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 383: | Line 374: | ||
</ | </ | ||
- | The following language strings are currently recognized: //4cs, abap, actionscript-french, | + | The following language strings are currently recognized: //abap actionscript-french, |
- | ==== Downloadable Code Blocks ==== | ||
- | When you use the '' | + | ===== Picture Gallery ===== |
- | < | + | A basic gallery can be added by selecting a [[namespace]] like this: |
- | <file php myexample.php> | + | |
- | <?php echo "hello world!"; | + | |
- | </ | + | |
- | </ | + | |
- | <file php myexample.php> | + | {{gallery>namespace}} |
- | <?php echo "hello world!"; | + | |
- | </file> | + | |
- | If you don't want any highlighting but want a downloadable file, specify a dash ('' | + | All imagefiles in the selected namespace will be added to the image gallery. Note: those images need to be a valid [[pagename]], |
+ | 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). | ||
- | ===== Embedding HTML and PHP ===== | + | {{gallery> |
- | You can embed raw HTML or PHP code into your documents | + | The created gallery |
- | HTML example: | + | {{gallery> |
+ | {{gallery> | ||
+ | {{gallery> | ||
- | < | + | You can define the wanted thumbnail |
- | < | + | |
- | This is some <span style=" | + | |
- | </ | + | |
- | < | + | |
- | <p style=" | + | |
- | </ | + | |
- | </ | + | |
- | < | + | {{gallery>namespace? |
- | This is some <span style=" | + | |
- | </ | + | |
- | < | + | |
- | <p style=" | + | |
- | </HTML> | + | |
- | PHP example: | + | The default is a dimension of 120x120 pixels. |
- | < | + | You can define the number of columns as well: |
- | <php> | + | |
- | echo 'A logo generated by PHP:'; | + | {{gallery>namespace? |
- | echo '<img src="' | + | |
- | echo '(generated inline HTML)'; | + | 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. |
- | </ | + | |
- | <PHP> | + | To have the filename displayed below the thumbnails add the '' |
- | echo '<table class=" | + | |
- | echo '< | + | {{gallery>namespace? |
- | echo '</tr></table>'; | + | |
- | </ | + | If you want the files sorted in the reverse order use the '' |
- | </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 === | ||
- | < | + | This mode will open the clicked picture |
- | echo 'A logo generated by PHP:'; | + | |
- | echo '< | + | |
- | echo ' | + | |
- | </ | + | |
- | < | + | |
- | echo '< | + | |
- | echo '< | + | |
- | echo '</ | + | |
- | </ | + | |
- | **Please Note**: HTML and PHP embedding | + | The picture |
- | ===== RSS/ATOM Feed Aggregation ===== | + | The following keys can be used to navigate: |
- | [[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http:// | + | |
- | ^ Parameter | + | ^ Key ^ Action |
- | | any number | + | | '' |
- | | reverse | + | | ''< |
- | | author | + | | '' |
- | | date | show item dates | | + | |
- | | description| show the item description. If [[doku> | + | |
- | | //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 | + | The Lightbox feature |
- | **Example:** | + | More info at :[[http:// |
- | {{rss>http://slashdot.org/index.rss 5 author date 1h }} | + | Note: The feature does not use [[http://www.huddletogether.com/ |
- | {{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: | ||