Sintaxe dos plugins adicionais

Keyboard Plugin

The keyboard plugin provides a small syntax addition in order to markup text as keyboard keys, similar to (and making use of) the existing (X)HTML tag <kbd>...</kbd>. Enclose the name of a key, or a combination of keys, separated by a dash (-), in a key tag, like this:

<key>Key</key> or <key>C-x</key>
  • The text inside the key tag is split at the occurrences of - (dash).
  • Each part is trimmed (surrounding whitespace removed) and known shortcuts or key names are substituted. E.g. C becomes Ctrl, Left becomes &larr; etc.
  • The substitutions are language specific. So, e.g. in German, C becomes Strg and Del becomes Entf. Only English and German are supported at the moment. Feel free to write additional language files and send them in for inclusion.
  • If no substitution was found, the first letter is capitalized and special HTML chars are replaced with entities.
  • The substitution table only has key aliases that begin with a capital letter. So lower letters will not be substituted, only capitalized and, for example, C-c becomes Ctrl-C
  • If you want to express the dash (-) key, use Minus.
  • If you don’t want any trimming, alias or language substitution, or capitalization, enclose your key name in single quotes.

Examples:

  • <key>C-A-del</key> to reboot. (<key>C-A-del</key>)
  • <key>C - c</key> to copy text to the clipboard. (<key>C - c</key>)
  • <key>C-x</key> to cut text and put it into the clipboard. (<key>C-x</key>)
  • <key>C-v</key> to paste text from the clipboard. (<key>C-v</key>)
  • <key>C-enter</key> to insert a page break. (<key>C-enter</key>)
  • <key>C-S-Right</key> to select from current cursor position to end of a word. (<key>C-S-Right</key>)
  • <key>C-S-Left</key> to select from current cursor position to the beginning of a word. (<key>C-S-Left</key>)
  • <key>C-PageUp</key> to go one screen page up. (<key>C-PageUp</key>)
  • <key>C-Minus</key> (<key>C-Minus</key>)
  • <key>’any key’</key> to exit. (<key>'any key'</key>)

Hilight

With this plugin the Sintaxe de formatação of DokuWiki is extended to allow hilited text (defined through a CSS class). The syntax to use this plugin is...

!!Hilited text!!

Source

This plugin allows you to include the contents of another file, with syntax highlighting, into the current page.

Syntax:

<source filename language|title>
  • filename — required, the name of the file to be included. This can either be a normal path & file name or a URI. If you wish to use file URI‘s then allow_url_fopen=On must be set in the webserver’s php.ini file (also refer to the location setting and the security warning below). If filename includes spaces it must be surrounded by a matched pair of quotes (' or ").
  • language — optional, the language string to be passed to GeSHi for syntax highlighting. This plug-in accepts the same language strings as Dokuwiki's <code> markup. If the language string is not given, the plugin will attempt to deduce the language from the file extension.
  • title — optional, a title to be displayed above the file contents. Everything after the pipe (|) is treated as the title. If not present the file name will be used, e.g. “file: filename

You can see the plugin in action here.

IndexMenu

This (no more simple ^_^) plugin allows you to insert the index of a specified namespace in your pages. It should be useful in Dokuwiki sites where pages are organized by namespaces.

samuele.netsons.org_dokuwiki_media_indexmenu1.jpg samuele.netsons.org_dokuwiki_media_indexmenu2.jpg

{{indexmenu>[namespace][#n]|[nons] [js][#theme]}}
[namespace] Namespace name from which the index starts. optional with [n] or nons; “.” is the current namespace; “..” or an empty value shows the top level namespace1).
[n] Number that specifies the max level of the tree index nodes. optional; it can be used together with nons.
nons Exclude namespaces nodes from index. It shows only the pages optional.
js New render method: The index is an expandable tree menu. Optional; without [n], all nodes are open, with it, nodes are open till n level.
[theme] Theme name for indexmenu icons when in js mode. Optional; a theme is a set of icons inside plugins/indexmenu/images/theme_name

Example that display a javascript Index tree menu with nodes open till second level:

{{indexmenu>wiki:plugins#2|js}}

Wiki theme for js option.

{{indexmenu>wiki:plugins|js#doku}}

Standard Dokuwiki index showing only pages inside wiki:plugins and lower namespaces (max two levels):

{{indexmenu>wiki:plugins#2|nons}}

iFrame

Simple:

{{url>http://www.somesite.com/somepage.html}}

Complete:

{{url>someurl [ width , height ] | alternate-text }}

  • [width,height] is optional. If only one dimension is specified, it is assumed to be height. Default values are: width - 98%, height - 400px.
  • |alternate text is optional. If not specified an empty string will be used.

See the plugin in action here.

Folded

If you want to make additional information availaible that is hidden by default, you have two options with this plugin:

Inline:

This is example ++text | with some of it only shown when you unfold it++. And after that
the text just continues to flow in the same paragraph.

Block:

This is example text.

++++ Title |

| This table | is only shown | when you unfold the block |

{{page>some other wiki page}}

++++
. Inline Block
Syntax ++title| formatted text ++ ++++title| any content ++++
HTML <span> tag <div> tag
Can contain formatting :-) :-)
Can contain block elements2) :-)
Can be used within a paragraph, table, list, etc. :-)

You can see the plugin in action here.

Doodle

This plugin can help your team to schedule meetings or making other decisions in a team. The syntax looks like this:

<doodle [id]>
^ [choice] ^ [choice] ^ ... ^
</doodle>

That means, you can simply put <doodle> tags around regular table header to get a check box table with different choices.

[id] the ID of the doodle; must be unique3); appears as title required
[choice] an option for which users can tick a checkbox whether it’s okay for them or not required

You can see this plugin in action here.

Gallery

A basic gallery can be added by selecting a NameSpaces like this:

{{gallery>namespace}}

All imagefiles in the selected namespace will be added to the image gallery if their names are spelled in lowercase. An image with big letters in its name will not be added. This is not a bug but a feature – you may hide some unwanted pics this way ;-)

You can define the wanted thumbnail size by adding its dimension as parameter:

{{gallery>namespace?150x150}}

The default is a dimension of 120×120 pixels.

You can define the number of columns as well:

{{gallery>namespace?6}}

The default number of columns is 5. If you specify a 0 no table is used instead all thumbnails are added in a sequence.

To have the filename displayed below the thumbnails add the showname parameter:

{{gallery>namespace?showname}}

If you want the files sorted in the reverse order use the reverse keyword:

{{gallery>namespace?reverse}}

If you don’t want to link to the image detail pages but directly to the image itself use the direct parameter:

{{gallery>namespace?direct}}

For fancy JavaScript based inline browsing of the images use the lightbox keyword 4). This feature implicitly sets the direct parameter.

{{gallery>namespace?lightbox}}

All params can be combined:

{{gallery>namespace?150x150&6&showname}}

You can also specify the size of lightbox images. It is done the same way as with thumbnails, except using a capital ‘X’. The default is 800×600.

{{gallery>namespace?lightbox&500X400}}

BibTeX

Markup like

<bibtex> 
@Book{BookAmbroise2004,
  author = 	 {G.J. McLachlan and  K.A. Do and  C. Ambroise},
  title = 	 {Analyzing microarray gene expression data},
  publisher = 	 {Wiley},
  url={http://www.amazon.com/exec/obidos/tg/detail/-/0471226165/qid=1128710740/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/002-9543089-9105613?v=glance&s=books&n=507846},
  year = 	 2004
}
</bibtex>

Result <bibtex> @Book{BookAmbroise2004,

author = 	 {G.J. McLachlan and  K.A. Do and  C. Ambroise},
title = 	 {Analyzing microarray gene expression data},
publisher = 	 {Wiley},
url={http://www.amazon.com/exec/obidos/tg/detail/-/0471226165/qid=1128710740/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/002-9543089-9105613?v=glance&s=books&n=507846},
year = 	 2004

} </bibtex>

Video
{{video>http://www.yourpage.com/yourmovie.avi [width,height]|Alternate text}}

The alternate text is very important because if the browser does not support the embedded video it will show the alt text as a link to the video url so that they can download it.

Skill

The skill plugin allows you to show a number of stars to represent the level of skill needed to understand and use the page content. Just write {{skill>5/7}} The /7 is not mandatory.

Graphviz-plugin

This is a quick graphviz-plugin for Dokuwiki to create diagrams and networks.

Read more about graphviz at http://www.graphviz.org/Documentation.php.

More examples at http://wiki.ioslo.net/dokuwiki/graphviz

Media

This plugin is intended to provide document management capabilities to DokuWiki. Essentially it rides on top of the regular media capabilities of DW, but with a much friendlier interface and some more usability. Users can browse and download the media directory, upload files, create directories, and lock files to indicate that they are being modified and that nobody else can upload over them. To use the plugin, on any page just enter the code:

 %%{{media}}%%

LaTeX

  • öäüß

    <latex>öäüß</latex>

  • <latex>
        \frac{3}{4 \pi}   \sqrt{4 \cdot x^2   12}\\
        \lim_{n \to \infty}
        \sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6}
        e^{i \pi} + 1 = 0 \\
    </latex>

<latex>

  \frac{3}{4 \pi}   \sqrt{4 \cdot 
1) Thanks to Chris Beetle.
2) like tables, lists, new paragraphs, included files, etc.
3) If it is not, metadata of the doodles with the same id gets mixed up, i.e. answers to choices in a previous doodle appear in the new when the choices are the same.
4) This feature is based on the Lightbox and Lightbox Plus scripts with some additions
wiki/sintaxedosplugins.txt · Modificado em: 05/08/2006 23:14