XWiki Syntax

In addition to these special wiki syntaxes XWiki allows any HTML to be inserted in a page so if there no wiki syntax for what you wish to achieve, consider using HTML.

Titles

Example Result
1 Title 1
1.1 Title 2
1.1.1 Title 3
1.1.1.1 Title 4
1.1.1.1.1 Title 5
1.1.1.1.1.1 Title 6

Title 1

Title 2

Title 3

Title 4

Title 5

Title 6

Paragraphs

Example Result
Here is a paragraph.
This text continues the same paragraph.

This paragraph is a new one.

This paragraph is another new one.

This paragraph is displayed\\
on two lines.
Here is a paragraph. This text continues the same paragraph.

This paragraph is a new one.

This paragraph is another new one.

This paragraph is displayed
on two lines.

Lists

Bulleted Lists

Example Result
* Item 1
** Item 2
*** Item 3
* Item 4
  • Item 1
    • Item 2
      • Item 3
  • Item 4

Numbered Lists

Example Result
1. Item 1
11. Item 2
111. Item 3
1. Item 4

1. Item 1
1*. Item 2
1*. Item 3
1. Item 4

a. Alphabetical enumerated list
a. Alphabetical enumerated list

A. Uppercase alphabetical enumerated list
A. Uppercase alphabetical enumerated list

i. Roman enumerated list
i. Roman enumerated list

I. Uppercase roman enumerated list
I. Uppercase roman enumerated list

g. Greek enumerated list
g. Greek enumerated list

h. Hirigana (jap.) enumerated list
h. Hirigana (jap.) enumerated list

k. Katakana (jap.) enumerated list
k. Katakana (jap.) enumerated list
  1. Item 1
    1. Item 2
      1. Item 3
  2. Item 4
  1. Item 1
    • Item 2
    • Item 3
  2. Item 4
  1. Alphabetical enumerated list
  2. Alphabetical enumerated list
  1. Uppercase alphabetical enumerated list
  2. Uppercase alphabetical enumerated list
  1. Roman enumerated list
  2. Roman enumerated list
  1. Uppercase roman enumerated list
  2. Uppercase roman enumerated list
  1. Greek enumerated list
  2. Greek enumerated list
  1. Hirigana (jap.) enumerated list
  2. Hirigana (jap.) enumerated list
  1. Katakana (jap.) enumerated list
  2. Katakana (jap.) enumerated list

Definition Lists

Example Result
<dl>
  <dt>Term</dt>
  <dd>Definition</dd>
</dl>
Term
Definition

Text Styles

Example Result
a *bold* word

an __underlined__ word

~~text in italics~~

--striked text--

<tt>text in monospace font</tt>

Text in a <sup>superscript</sup> format

Text in a <sub>subscript</sub> format

{quote:http://www.xwiki.org}
Here is some text with a quote
{quote}
a bold word

an underlined word

text in italics

striked text

text in monospace font

Text in a superscript format

Text in a subscript format

Here is some text with a quote Source

Horizontal Line

Example Result
----

The full format of a link is

(alias[|>])(link)(@interWikiAlias)([|>]target)
  • alias: An optional string which will be displayed to the user as the link name when rendered. Example: "My Page".
  • link: The full link reference using the following syntax:
    (virtualWikiAlias:)(space.)(reference)(?queryString)(#anchor)
  • Note that either the link or the alias must be specified.
    • virtualWikiAlias: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: "mywiki".
    • space: An optional Wiki Space name. If not space is specified the current space is used. Example: "Main".
    • reference: The link reference. This can be either a URI in the form protocol:path (example: "http://xwiki.org", "mailto:john@smith.com") or a wiki page name (example: "WebHome").
    • queryString: An optional query string for specifying parameters that will be used in the rendered URL. Example: "mydata1=5&mydata2=Hello".
    • anchor: An optional anchor name pointing to an anchor defined in the referenced link. Note that in XWiki anchors are automatically created for titles. Example: "TableOfContentAnchor".
  • interWikiAlias: An optional Inter Wiki alias as defined in the InterWiki Map (see the Admin Guide). Example: "wikipedia"
  • target: An optional string corresponding to the HTML target attribute for a HTML a link element. This element is used when rendering the link. It defaults to opening the link in the current page. Examples: "_self", "_blank"

Example Result
[WebHome] (uses current space)
[home>WebHome] (uses current space)
[Main.WebHome]
[home|Main.WebHome]
[home>Main.WebHome>_blank]
Web Home (uses current space)
home (uses current space)
Web Home
home
home

Example Result
http://www.xwiki.org
[http://www.xwiki.org]
[XWiki>http://www.xwiki.org]
http://www.xwiki.org
http://www.xwiki.org
XWiki

Tables

The syntax for tables allows to easily create content in table format. It even allows to make some simple calculations on the content!

Example Result
{table}
Title 1 | Title 2
Word 1 | Word 2
{table}

{table}
Category | Sales (K?)
Category 1 | 100
Category 2 | 50
Category 3 | 50
Total | =sum(B2:B4)
{table}
Title 1 Title 2
Word 1 Word 2
Category Sales (K?)
Category 1 100
Category 2 50
Category 3 50
Total 200

Images

The {image} macro is used to display attachments as images. Check the Image macro reference guide for all options.

Example Result
{image:img.png}

{image:img.png|30}

{image:img.png| |20}

{image:img.png|30|20}
img.png

img.png

img.png

img.png

Escaping Text

Escaping a single character

Example Result
This is not a \[link\]
#set (\$var = "something")
This is not a [link]
#set (\$var = "something")

Escaping wiki syntax rendering

The {pre}{/pre} macro prevents wiki syntax and Radeox macro rendering but preserves HTML rendering and preserces execution of Groovy/Velocity scripts.

Example Result
{pre}
No *bold rendering* in wiki syntax.
{/pre}
No *bold rendering* in wiki syntax.

Escaping everything

The {code}{code} macro prevents wiki syntax rendering, HTML rendering and Groovy/Velocity rendering. Check the Code macro reference guide for all options.

Example Result
{code}
No <strong>bold rendering</strong> in HTML.
No *bold rendering in* wiki syntax.
{code}
No <strong>bold rendering</strong> in HTML.
No *bold rendering in* wiki syntax.

Boxes

Boxes are a nice way to improve on the visual presentation and highlight important elements. The reference documentation for the macros shown below can be found here:

Example Result
#info("This is an information panel")

#warning("This is a warning panel")

#error("This is an error panel")

#startfloatingbox()
Some content in a floating box
#endfloatingbox()
This is a floating box displayed on the right.

#floatingbox("Some content in a floating box")
This is also a floating box displayed on the right.

{style:type=div|border=1px solid red|background-color=grey|width=300px|height=300px|color=red}
This is some content...
{style}
This is an information panel
Warning: This is a warning panel
Error: This is an error panel


Some content in a floating box
This is a floating box displayed on the right.

Some content in a floating box
This is also a floating box displayed on the right.

This is some content…

Other Macros

XWiki boasts a lot of other very useful macros.

Make sure to check also our Code Zone as we also have Plugins, Code Snippets, Applications and Extensions.
Version 2.1 last modified by Administrator on 15/04/2008 at 15:08

Attachments 1

Image
img.png 1.2
PostedBy: Administrator on 15/04/2008 (959 bytes )
Website Top
Send Me Mail!:
   g42website4 AT g42.org
My Encyclopaedia Blog

Creator: Administrator on 2008/02/20 12:36
Copyright 2004-2007 (c) XPertNet and Contributing Authors
1.3.2.9174