Bara de navigare

DOC. hMARFA - PDF
DOC. hMARFE - PDF

Reguli de licenţiere

wiki:syntax

The Basics of DokuWiki

Create a page

Simply create a link from an existing page to a non-existing page, follow this link, and click on Create this page (on right menu in the default template). This is the most common and recommended way. It ensures all your pages are linked together correctly and you don't create orphans anywhere.

There are some alternative ways as well:

  • You may enter the name of a new page directly in the search field, and click the „Search“ button and can choose Create this page (on right menu in the default template) of the results page. The new page will be named after your query.
  • If you are the webmaster, you can create a .txt file inside the directory (namespace) wherein you want it to reside. The name of the file is the name of the page.
  • Of course you can also open a non-existing page by manually manipulating the URL in your Browser (The link to each pages ends with /dokuwiki.php?id=xyz where xyz is the name of the page. You can also enter a link in your browser to an unexisting page in order to create it)

Edit a page

Editing a page is done by clicking the Editeaza aceasta pagina button. This way you will see the source of the whole page. You can also click the Editeaza button at the end of each section, which will allow you to edit the source of that particular section.

The creation or editing of a page leads you to an edit window that enables you to enter wikitext. Editing a page consists in putting your text inside the edit area, and adding some markup to enhance its layout.

In order to help you in the editing process, a preview(Previzualizeaza) feature enables you to look at the formatted page before saving it.

Once your page does match your criteria, you hit the Salveaza button in order to save it. The page is then rendered into HTML, which is the standard output.

Delete a page

If you save an empty page, then DokuWiki will delete the page, and the associated pagename. (Note that the history of that page remains in data\attic.)

Page content

To the right of the page content are several icons. When the mouse pointer is moved over these icons they will expand into a menu. The menu provides the following functions:

  • Editeaza aceasta pagina – make changes to the page.
  • Versiuni vechi – shows the list of changes made to a page.
  • Legatura anterioare – shows a list of pages in your wiki that link to the current page.
  • La inceput – scrolls the page to the top.

The page sidebar contains the source of the page shown on the left side of each page. This works like a table of contents for the whole DokuWiki. View details of editing sidebar page.

Formatting Syntax

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 „Edit this page“. If you want to try something, just use the playground page. The simpler markup is easily accessible via quickbuttons, too.

Basic Text Formatting

DokuWiki supports bold, italic, underlined and monospaced texts. Of course you can combine all these.

DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts.
Of course you can **__//''combine''//__** all these.

You can use subscript and superscript, too.

You can use <sub>subscript</sub> and <sup>superscript</sup>, too.

You can mark something as deleted as well.

You can mark something as <del>deleted</del> as well.

Paragraphs are created from blank lines. If you want to force a newline without a paragraph, you can use two backslashes followed by a whitespace or the end of line.

This is some text with some linebreaks
Note that the two backslashes are only recognized at the end of a line
or followed by
a whitespace \\this happens without it.

This is some text with some linebreaks\\ Note that the
two backslashes are only recognized at the end of a line\\
or followed by\\ a whitespace \\this happens without it.

You should use forced newlines only if really needed.

Text alignment

Align Left:

#;;
This is aligned left.
#;;

Align Right:

;;#
This is aligned right.
;;#

Align Center:

;#;
This is aligned center.
;#;

Align Justify:

###
This text is justified.
###

If you want to align more than one paragraph at once just add a blank line at the beginning (see Syntax details however):

;;#

This paragraph is right-aligned.
  
And this one is, too!
;;#

DokuWiki supports multiple ways of creating links.

External

External links are recognized automagically: http://www.google.com or simply www.google.com - You can set the link text as well: This Link points to google. Email addresses like this one: andi@splitbrain.org are recognized, too.

DokuWiki supports multiple ways of creating links. External links are recognized
automagically: http://www.google.com or simply www.google.com - You can set
link text as well: [[http://www.google.com|This Link points to google]]. Email
addresses like this one: <andi@splitbrain.org> are recognized, too.

Internal

Internal links are created by using square brackets. You can either just give a pagename or use an additional link text.

Internal links are created by using square brackets. You can either just give
a [[pagename]] or use an additional [[pagename|link text]].

Wiki pagenames are converted to lowercase automatically, special characters are not allowed.

You can use namespaces by using a colon in the pagename.

You can use [[some:namespaces]] by using a colon in the pagename.

For details about namespaces see namespaces.

Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to this Section.

This links to [[syntax#internal|this Section]].

Notes:

  • Links to existing pages are shown in a different style from nonexisting ones.
  • DokuWiki does not use CamelCase to automatically create links by default, but this behavior can be enabled in the config file. Hint: If DokuWiki is a link, then it's enabled.
  • When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much.

Interwiki

DokuWiki supports Interwiki links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: Wiki.

DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis.
For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]].

Windows Shares

Windows shares like this are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate 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 different workaround mentioned in the Mozilla Knowledge Base. However, there will still be a JavaScript warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in conf/userscript.js:
LANG.nosmblinks = '';

You can also use an image to link to another internal or external page by combining the syntax for links and images (see below) like this:

[[http://www.php.net|{{wiki:dokuwiki-128.png}}]]

Please note: The image formatting is the only formatting syntax accepted in link names.

The whole image and link syntax is supported (including image resizing, internal and external images and URLs and interwiki links).

Files and images are visible inside the dokuwiki if they are copied into the folder data/media or they can be uploaded using Dokuwiki (Administrare media→Incarcare)

This is a pdf file

{{x_cola.pdf|This is a pdf file}} 

Footnotes

You can add footnotes 1) 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 headlines to structure your content. Dokuwiki automatically generates links (<a name=„…“></a>) for every headline.

Dokuwiki generates a table of contents based on the headlines. Settings to the tabel of contents can be found at Admin→Setari de configurare→Setari afisare:

  • toptoclevel: the min level of a headline which will be included in the table of contents
  • maxtoclevel: the max level of a headline which will be included in the table of contents
  • tocminheads: min number of headlines which have to be present on a page in order to a see a table of contents

For example: toptoclevel=1, maxtoclevel=4, tocminheads=3 determines that a table of contents will be shown if there are at least 3 headlines, having level>=4 and level⇐1

Headline Level 1

Headline Level 2

Headline Level 3

Headline Level 4

Headline Level 5
====== Headline Level 1 ======
===== Headline Level 2 =====
==== Headline Level 3 ====
=== Headline Level 4 ===
== Headline Level 5 ==

By using four or more dashes, you can make a horizontal line:


Images and Other Files

You can include external and internal images with curly brackets. Optionally you can specify the size of them.

Real size:

Resize to given width:

Resize to given width and height2):

Resized external image:

Real size:                        {{wiki:dokuwiki-128.png}}
Resize to given width:            {{wiki:dokuwiki-128.png?50}}
Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}
Resized external image:           {{http://de3.php.net/images/php.gif?200x50}}

By using left or right whitespaces you can choose the alignment.

{{ wiki:dokuwiki-128.png}}
{{wiki:dokuwiki-128.png }}
{{ wiki:dokuwiki-128.png }}

Of course, you can add a title (displayed as a tooltip by most browsers), too.

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 (gif, jpeg, png), then it will be displayed as a link instead.

For linking an image to another page see Image Links above.

Lists

Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a * for unordered lists or a - for ordered ones.

  • This is a list
  • The second item
    • You may have different levels
  • Another item
  1. The same list but ordered
  2. Another item
    1. Just use indention for deeper levels
  3. 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

The level of an item is determined by the number of whitespaces present before the bullet (*/-).
Level = number of whitespaces/2). So at level 1 you have to use 2 whitespaces in front of the bullet.

You can also define lists with a custom bullet. The list item will start with !!bullet!! syntax, where bullet defines the bullet for that specific item.

  • a)

    list item 1

  • b)

    list item 2

  • a/1)

    list item 4

  !!a)!! list item 1
  !!b)!! list item 2
  !! !!...
  !!a/1)!! list item 4

A bullet can be maximum 5 characters long, and it can contain one or more of the following characters:

  • a-z
  • A-Z
  • 0-9
  • .
  • /
  • )
  • whitespace

You have the possibility to define multiple line items inside a list.
You can use \\ where you want to force new line.
The other option is to duplicate the bullet symbol for the element which will contain multiple lines, so instead of using -/* → –/ and the next line of this item will begin with .. (the dots placed exactly under the –/ of the item). This option is also useful when inside an item there is a nested list, and after the nested list you want to insert some text, which will be part of the main(parent item), not the nested list's items.

For example: Multiple line items 1:

  1. item1
  2. item2
    second line of item 2
  3. item3
Multiple line items 1:
  - item1
  - item2\\ second line of item 2 
  - item3

Multiple line items 2:

  1. item1

    second line item1

  2. item2
  3. item3
Multiple line items 2:
  -- item1
  .. second line item1
  - item2
  - item3

Nested list:

  • item1
  • item2
    • item1/1
    • item1/2
  • item3

    • item3/1
    • item3/2

    item3 second line

  • item4
Nested list:
  * item1
  * item2
    * item1/1
    * item1/2
  ** item3 
    * item3/1
    * item3/2
  .. item3 second line
  * item4 

Edit Sidebar

If you want the sidebar to work as a table of contents, then you may want to create a list of the chapters.
The source of the page will look like a set of nested lists. Apart from the bullet, which in this case will be !} the syntax is exactly the same as in the case of lists (described above).

When a list item has a nested list, then by clicking on that list item the subelements of that item will be expanded. So in this case a hyperlink placed on the main list item won't work as expected.

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, but can be configured to use other HTML as well.

Text to Image Conversions

DokuWiki converts commonly used emoticons to their graphical equivalents. Those Smileys and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki:

  • 8-) 8-)
  • 8-O 8-O
  • :-( :-(
  • :-) :-)
  • =) =)
  • :-/ :-/
  • :-\ :-\
  • :-? :-?
  • :-D :-D
  • :-P :-P
  • :-O :-O
  • :-X :-X
  • :-| :-|
  • ;-) ;-)
  • ^_^ ^_^
  • :?: :?:
  • :!: :!:
  • LOL LOL
  • FIXME FIXME
  • DELETEME DELETEME

Text to HTML Conversions

Typography: DokuWiki can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.

→ ← ↔ ⇒ ⇐ ⇔ » « – — 640×480 © ™ ® „He thought 'It's a man's world'…“

-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r)
"He thought 'It's a man's world'..."

The same can be done to produce any kind of HTML, it just needs to be added to the pattern file.

There are three exceptions which do not come from that pattern file: multiplication entity (640×480), 'single' and „double quotes“. They can be turned off through a config option.

Quoting

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't

>> Well, I say we should

> Really?

>> Yes!

>>> Then lets do it!

I think we should do it

No we shouldn't
Well, I say we should
Really?
Yes!
Then lets do it!

Tables

DokuWiki supports a simple syntax to create 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 have to start and end with a | for normal rows or a ^ for headers.

^ 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, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators!

Vertical tableheaders are possible, too.

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 Col 3

As you can see, it's the cell separator before a cell which decides about 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 Col 3        |

You can have rowspans (vertically connected cells) by adding ::: into the cells below the one to which they should connect.

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 those 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 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.

Table with alignment
right center left
left right center
xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx

This is how it looks in the source:

^           Table with alignment           ^^^
|         right|    center    |left          |
|left          |         right|    center    |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |

Note: Vertical alignment is not supported.

Add background color for cells. A background color is introduced by @ and ended by :
You can use all names and color codes from HTML.

@red:Heading 1 Heading 2 Heading 3
Row 1 Col 1 Row 1 Col 2 Row 1 Col 3
Row 2 Col 1 Row 2 Col 2 Row 2 Col 3
Row 3 Col 1 Row 3 Col 2 Row 3 Col 3
^ @red: Heading 1       ^ Heading 2       ^ Heading 3          ^
| @green:Row 1 Col 1    | @:Row 1 Col 2   | Row 1 Col 3        |
| @#6495ed:Row 2 Col 1  | Row 2 Col 2     | Row 2 Col 3        |
| Row 3 Col 1           | Row 3 Col 2     | Row 3 Col 3        |

No Formatting

If you need to display text exactly like it is typed (without any formatting), enclose the area either with <nowiki> tags or even simpler, with double percent signs %%.

This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. The same is true for //__this__ text// with a smiley ;-).

<nowiki>
This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it.
</nowiki>
The same is true for %%//__this__ text// with a smiley ;-)%%.

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 <code> or <file>.

This text is indented by two spaces.
This is preformatted code all spaces are preserved: like              <-this

Those blocks were created by this source:

  This text is indented by two spaces.
<code>
This is preformatted code all spaces are preserved: like              <-this
</code>

Bookcreator plugin

1)
This is a footnote
2)
when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing
wiki/syntax.txt · Ultima modificare: 2022/05/09 00:04 (editare externă)