User Tools

Site Tools


usage:syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
usage:syntax [2008/04/15 12:52]
wkunert
usage:syntax [2008/05/15 13:41]
wkunert rewritten colour section.
Line 1: Line 1:
 ====== Formatting Syntax ====== ====== Formatting Syntax ======
  
-[[http://wiki.splitbrain.org/wiki:dokuwiki|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 bottom of the page. If you want to try something, just use the [[usage:sandbox|sandbox]] page. The simpler markup is easily accessible via [[usage:syntax#quickbuttons|quickbuttons]], too.+[[http://wiki.splitbrain.org/wiki:dokuwiki|Dokuwiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains <del>all</del> most 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 bottom of the page. If you want to try something, just use the [[usage:sandbox|sandbox]] page. The simpler markup is easily accessible via [[usage:syntax#quickbuttons|quickbuttons]], too. 
 + 
 +===== Quickbuttons ===== 
 + 
 +The Editing-Toolbar is based upon the one from [[wpmeta>MediaWiki]]. It becomes visible above the editbox automatically if your Browser is capable of the **//needed//** JavaScript. They work pretty much like the formatting buttons in your favourite word processor. In Mozilla and IE you can select a word and press a button to format theselected word. If you **click without** a //selection//, it inserts sample text at the cursor. 
 + 
 +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://wiki.splitbrain.org/lib/images/toolbar/bold.png?nolink}}      ''**b**''  | bold formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/italic.png?nolink}}    ''**i**''  | italic formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/underline.png?nolink}}  |  ''**u**''  | underlined formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/strike.png?nolink}}    ''**d**''  | strikethrough formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h1.png?nolink}}    ''**1**''  | size 1 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h2.png?nolink}}    ''**2**''  | size 2 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h3.png?nolink}}    ''**3**''  | size 3 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h4.png?nolink}}    ''**4**''  | size 4 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h5.png?nolink}}    ''**5**''  | size 5 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/link.png?nolink}}      ''**l**''  | link formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/linkextern.png?nolink}}  |           | external link formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/ol.png?nolink}}               | ordered list item | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/ul.png?nolink}}  |           | unordered list item | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/hr.png?nolink}}               | horizontal rule | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/image.png?nolink}}    |           | Media Selection | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/smiley.png?nolink}}      |  | smiley picker | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/chars.png?nolink}}      |  | character picker | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/sig.png?nolink}}      |  ''**y**''  | signature (only when logged in)| 
  
 ===== Basic text formatting ===== ===== Basic text formatting =====
Line 9: Line 38:
   DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts.   DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts.
   Of course you can **__//''combine''//__** all these.   Of course you can **__//''combine''//__** all these.
 +
 +You can also <color orange>colourise</color> your text.
 +
 +  You can also <color orange>colourise</color> your text.
 +  
 +Following colours are available:
 +  * <color black>black</color>
 +  * <color navy>navy</color>
 +  * <color blue>blue</color>
 +  * <color green>green</color>
 +  * <color teal>teal</color>
 +  * <color lime>aqua</color>
 +  * <color maroon>maroon</color>
 +  * <color purple>purple</color>
 +  * <color olive>olive</color>
 +  * <color gray>gray</color>
 +  * <color silver>silver</color>
 +  * <color red>red</color>
 +  * <color fuchsia>fuchsia</color>
 +  * <color yellow>yellow</color>
 +  * <color white>white</color> (white)
 +  * <color orange>orange</color>
  
 You can use <sub>subscript</sub> and <sup>superscript</sup>, too. You can use <sub>subscript</sub> and <sup>superscript</sup>, too.
Line 67: Line 118:
  
  
-==== Windows Shares ==== 
  
-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]]. 
  
-  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 the config option [[http://www.mozilla.org/quality/networking/docs/netprefs.html#file|security.checkloaduri]] but this is not recommended. 
-  * See [[dokubug>151]] for more info. 
  
 ==== Image Links ==== ==== Image Links ====
Line 83: Line 126:
 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: 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:
  
-  [[http://www.php.net|{{wiki:dokuwiki-128.png}}]]+  [[http://www.gsi.de|{{usage:gsi_logo.png|}}]]
  
-[[http://www.php.net|{{wiki:dokuwiki-128.png}}]]+[[http://www.gsi.de|{{usage:gsi_logo.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 [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links). 
  
 ===== Footnotes ===== ===== Footnotes =====
Line 112: Line 153:
  
 ---- ----
 +
  
 ===== Images and other files ===== ===== Images and other files =====
  
-You can include external and internal [[doku>wiki:images]] with curly brackets. Optionally you can specify the size of them.+You can include external and internal images with curly brackets. Optionally you can specify the size of them.
  
-Real size:                        {{wiki:dokuwiki-128.png}}+Real size:                        {{usage:gsi_logo.png}}
  
-Resize to given width:            {{wiki:dokuwiki-128.png?50}}+Resize to given width:            {{usage:gsi_logo.png?50}}
  
-Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}+Resize to given width and height: {{usage:gsi_logo.png?400x50}}
  
-Resized external image:           {{http://de3.php.net/images/php.gif?200x50}}+Resized external image:           {{http://www-bd-new.gsi.de/dokuwiki/lib/tpl/arctic/images/gsi-sd-logo.png?100}}
  
-  Real size:                        {{wiki:dokuwiki-128.png}} +  Real size:                        {{usage:gsi_logo.png}} 
-  Resize to given width:            {{wiki:dokuwiki-128.png?50}} +  Resize to given width:            {{usage:gsi_logo.png?50}} 
-  Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} +  Resize to given width and height: {{usage:gsi_logo.png?400x50}} 
-  Resized external image:           {{http://de3.php.net/images/php.gif?200x50}}+  Resized external image:           {{http://www-bd-new.gsi.de/dokuwiki/lib/tpl/arctic/images/gsi-sd-logo.png?50}}
  
  
 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 (''gif, jpeg, png''), then it will be displayed as a link instead. 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.
Line 203: Line 245:
   * FIXME %%  FIXME %%   * FIXME %%  FIXME %%
   * DELETEME %% DELETEME %%   * DELETEME %% DELETEME %%
 +
 +
  
 ===== Typography ===== ===== Typography =====
  
-[[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.+Dokuwiki can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.
  
 -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r)
Line 215: Line 259:
 "He thought 'It's a man's world'..." "He thought 'It's a man's world'..."
 </code> </code>
- 
-Please note: These conversions can be turned off through a [[doku>wiki:config#typography|config option]] and a [[doku>wiki:entities|pattern file]]. 
  
 ===== Quoting ===== ===== Quoting =====
Line 293: Line 335:
   |left          |         right|    center    |   |left          |         right|    center    |
   | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |   | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
 +
  
 ===== Non-parsed Blocks ===== ===== Non-parsed Blocks =====
Line 309: Line 352:
  
 <nowiki> <nowiki>
-This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it.+This is some text which contains addresses like this: http://www.gsi.de and **formatting**, but nothing is done with it.
 </nowiki> </nowiki>
  
 See the source of this page to see how to use these blocks. See the source of this page to see how to use these blocks.
 +
  
 ===== Syntax Highlighting ===== ===== Syntax Highlighting =====
  
-[[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>''.+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>''.
  
 <code java> <code java>
Line 333: Line 377:
  
  
-===== RSS/ATOM Feed Aggregation ===== 
-[[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: 
  
-^ Parameter  ^ Description ^ 
-| any number | will be used as maximum number items to show, defaults to 8 | 
-| reverse    | display the last items in the feed first | 
-| author     | show item authors names | 
-| date       | show item dates | 
-| description| show the item description. If [[doku>wiki:config#htmlok|HTML]] is disabled all tags will be stripped | 
-| //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. [[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 [[DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered. 
- 
-**Example:** 
- 
-  {{rss>http://slashdot.org/index.rss 5 author date 1h }} 
- 
-{{rss>http://slashdot.org/index.rss 5 author date 1h }} 
- 
- 
-===== Embedding HTML and PHP ===== 
- 
-You can embed raw HTML or PHP code into your documents by using the ''html'' or ''php'' tags like this: 
-<code> 
-<html> 
-This is some <span style="color:red;font-size:150%;">inline HTML</span> 
-</html> 
-<HTML> 
-<p style="border:2px dashed red;">And this is some block HTML</p> 
-</HTML> 
-</code> 
- 
-<html> 
-This is some <span style="color:red;font-size:150%;">inline HTML</span> 
-</html> 
-<HTML> 
-<p style="border:2px dashed red;">And this is some block HTML</p> 
-</HTML> 
- 
-<code> 
-<php> 
-echo 'A logo generated by PHP:'; 
-echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; 
-echo '(generated inline HTML)'; 
-</php> 
-<PHP> 
-echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 
-echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; 
-echo '</tr></table>'; 
-</PHP> 
-</code> 
  
-<php> 
-echo 'A logo generated by PHP:'; 
-echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; 
-echo '(inline HTML)'; 
-</php> 
-<PHP> 
-echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 
-echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; 
-echo '</tr></table>'; 
-</PHP> 
  
-**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. 
  
-===== 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~~%%   | If this macro is found on the page, no table of contents will be created | 
-| %%~~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 | 
  
-===== Syntax Plugins ===== 
  
-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: 
  
-~~INFO:syntaxplugins~~ 
  
usage/syntax.txt · Last modified: 2011/09/09 14:53 by andreasreiter