This page describes the wiki syntax used by JSPWiki. For details about how this differs from the syntax used by Wikipedia, please see MigratingFromMediaWiki.


When you've figured out how the editor works, then you should read WikiEtiquette so that you would know how to use your newly acquired skills. The SandBox is a great place to try them out.

Quick Reference#

----       = make a horizontal ruler. Extra '-' is ignored.
\\         = force a line break

[link]     = create a hyperlink to an internal WikiPage called 'Link'.
[this is also a link] = create a hyperlink to an internal WikiPage called
             'ThisIsAlsoALink' but show the link as typed with spaces.
[a sample|link] = create a hyperlink to an internal WikiPage called
             'Link', but display the text 'a sample' to the
             user instead of 'Link'.
~NoLink    = disable link creation for the word in CamelCase.
[1]        = make a reference to a footnote numbered 1.
[#1]       = mark the footnote number 1.
[link]     = create text '[link]'.

!heading   = small heading with text 'heading'
!!heading  = medium heading with text 'heading'
!!!heading = large heading with text 'heading'

''text''   = print 'text' in italic.
__text__   = print 'text' in bold.
{{text}}   = print 'text' in monospaced font.
[text|]    = print 'text' underscored (dummy hyperlink)
* text     = make a bulleted list item with 'text'
# text     = make a numbered list item with 'text'
;term:ex   = make a definition for 'term' with the explanation 'ex'

Writing text#

You don't need to know anything about the Wiki text formatting rules to use Wiki. Just write normal text, and then use an empty line to mark a paragraph. It's just like writing an email. You can always Edit this page (look at the left sidebar) to see how the different effects on this page are used. The link can also be a direct URL starting with http:, ftp:, mailto:, https:, or news:, in which case the link points to an external entity. For example, to point at the java.sun.com home page, use [http://java.sun.com], which becomes http://java.sun.com/ or [Java home page|http://java.sun.com], which becomes Java home page. If you do not start the link with one of the above "protocols", the wiki assumes a normal link to another page in the wiki space, you need to use a letter as the first character of the page, purely numeric page names are not allowed. If you want to use square brackets ([]) in the page without creating a hyperlink, use two opening square brackets. So the text [[Example Non-Link], will appear as [Example Non-Link][Murali]. To add a new page you just create a link to it from somewhere else. After all, there isn't much point in having a page if you can't access it! You'll then see a small question mark after the page name when you return to that page. Then click on it and you have created a new page! It's allowed to use almost any kind of characters inside a WikiName, as long as they are letters or numbers. Note also that this Wiki can be configured to support standard CamelCase linking (if it's supported, the word CamelCase should be a link, if it doesn't start with '~'). It's off by default, but if your friendly administrator has turned it on, then well, CamelCase all you want =).

Footnotes#

These are a special kind of hyperlink. By using nothing but a number inside a hyperlink you create a reference to a footnote, like this [1], which creates a footnote[1]. To make the actual footnote, you just put a [#1] where you want that footnote to point at. Look below to find the footnote. You can also make a named footnote, just as if you were doing a normal hyperlink, such as [Footnote name|1] as another way of referring to the first footnote[Footnote name]. Or you can put the custom name at the footnote itself[2]. You can also do links between different Wikis without knowing the URL. Just use a link in the form [Wiki:WikiPage] and JSPWiki will create a link for you. For example, this link points to the JSPWiki TextFormatting rules. Check the SystemInfo page for more information on which Wiki links are available. If an InterWiki}) it becomes the ALT text for those who either can't or don't want to view images. The list of accepted image types depends on the Wiki. See the SystemInfo page for a list of the different image types. It is also possible to use the Image plugin to gain more control over the image placement and attributes. To force a flush after an image, use \ \ \ (that is, three consecutive backslashes instead of two).

Bulleted lists#

Use an asterisk (*) in the first column to make bulleted lists. Use more asterisks for deeper indentation. For example:
* One \\ one and a half
* Two
* Three
** Three.One
creates
  • One
    one and a half
  • Two
  • Three
    • Three.One

Numbered lists#

Just like with bulleted lists, but use a hash (#) instead of the asterisk. Like this:
# One \\ one and a half
# Two
# Three
## Three.One
creates
  1. One
    one and a half
  2. Two
  3. Three
    1. Three.One
If you want to write the list item on multiple lines, just add one or more spaces on the next line and the line will be automatically added to the previous item. For example:
* This is a single-line item.
* This is actually a multi-line item.
  We continue the second sentence on a line on a line of its own.
  We might as well do a third line while we're at it...
  Notice, however, as all these sentences get put inside a single item!
* The third line is again a single-line item for your convenience.
produces:
  • This is a single-line item.
  • This is actually a multi-line item. We continue the second sentence on a line on a line of its own. We might as well do a third line while we're at it... Notice, however, as all these sentences get put inside a single item!
  • The third line is again a single-line item for your convenience.

Definition lists and comments#

A simple way to make definition lists is to use the ';:' -construct:
;__Construct__:''Something you use to do something with''
is rendered as:
Construct
Something you use to do something with
Another nice use for the ';:' is that you can use it to comment shortly on other people's text, by having an empty 'term' in the definition, like this:
;:''Comment here.''
Which would be seen as
Comment here.

Text effects#

You may use bold text or italic text, by using two underscores (_) and two single quotes ('), respectively. If you're on a Windows computer, make sure that you are using the correct quote sign, as there is one that looks the same, but really isn't. A underscore effect can be produced by using a hyperlink to nowhere, [like this|]

Preformatted text#

If you want to add preformatted text (like code) just use three consecutive braces ({) to open a block, and three consecutive braces (}) to close a block. Edit this page for an example. ({)java.package.pseudocode.class(})

Tables#

You can do simple tables by using pipe signs ('|'). Use double pipe signs to start the heading of a table, and single pipe signs to then write the rows of the table. End with a line that is not a table. For example:
|| Heading 1 || Heading 2
| ''Gobble'' | Bar \\ foo
| [Main] | [SandBox]
gives you the following table. Note how you can use links also inside tables.
Heading 1 Heading 2
Gobble Bar
foo
Main SandBox

CSS styles#

While not in line with the keep it simple principle, CSS styles can be used inline for those special occasions when you really need to emphasize part of a page.

Conflicts#

If someone happens to edit the same page as you at the same time, JSPWiki will prevent you from doing changes and show a conflict page instead. Sorry to say, but the first one to make changes wins... A word of warning: If you use the Back button of your browser to go into the Edit page, you will almost certainly get a conflict. This is because the browser thinks it's still editing an earlier copy of the page.

Deleting pages#

This is not possible. You can, of course, remove all the links to that page, which makes it inaccessible. Or you can email the administrator, and I'll remove the page. You may also add a DELETEME link.

Adding new pages#

Create a link that points to a new (not existing) page using its WikiName. Click that new link, which should now have a question mark (?) suffix and you will get an editor for the new page. -- Asser

Aliasing a Page#

Sometimes you want any link to a wiki page to immediately traverse to a different page. This can be done using a PageAlias.

Inserting variables#

There are many possible variables you can insert on a page. The basic form is: [{$variablename}], where variablename is the name of the variable you want to insert. Note that variable names are case-insensitive - that is, "pagename" is the same as "paGeNamE" and "PageName". You can see the list of available of variables at WikiVariables.

Inserting plugins#

The basic incantation to insert a plugin looks like this: [{INSERT <plugin class> WHERE param1=value, param2=value, ...}] There is more information in JSPWikiPlugins.

JSP Wiki Styles#

Table of Contents

In addition to the simple styles represented by the WikiMarkup, JSPWiki also allows you to put in your own styles, which are defined in the jspwiki.css file. These may vary from site to site, and it is up to the site administrator to define a style.

CSS styles#

Following styles are supported by the standard jspwiki.css file:
  • %%small -- Smaller then normal font, like this
  • %%sub -- Subscript, like aij = aji
  • %%sup -- Superscript, like 23 = 8
  • %%strike -- Strike through text, like this text is hardly readable
  • %%ltr -- left-to-right text formatting
  • %%rtl -- right-to-left text formatting
  • %%commentbox -- comment box floating at the right margin
Here is a comment-box

Special block markers:#

Use %%information ... %% for informational messages
Use %%warning ... %% for warning blocks
Use %%error ... %% for error blocks
Use %%quote ... %% to quote a block of text
Use %%center ... %% to center your text

Dynamic styles#

Dynamic styles provided more advanced styling for your pages, powered by a combination of JavaScript and CSS. They can add substantial visual experience to your wikipages, though the structure of your pages and wiki markup remain unchanged. Actually, the pages are still fully accessible on browsers with JavaScript turned off.

Most of these styles are only available for v2.5.xx onwards.

  • %%collapse -- Turn ordinary lists into collapsible trees. See Collapsible List
  • %%collapsebox -- Creates a collapsible box which slides in/out vertically. See Collapsible Box
  • %%category -- Generates pop up with pages referenced by the category page. See Category Style
  • %%tip -- Generates a transparent fly-over tip with additional info. See Tip Style
  • %%graphbar -- Add horizontal or vertical graph bars to your wikipages. See GraphBars
  • %%sortable -- Turn ordinary wiki tables into sortable tables. See Sortable Tables
  • %%table-filter -- Turn ordinary wiki tables into Excel-like filtered tables. See Filtered Tables
  • %%zebra-table -- Add alternate row colors to your tables. See Zebra Table Style
  • %%columns -- Format text in multi-column news-paper format. See Multi Columns Style
  • %%tabbedSection, %%tab -- Create pages with tabular sections. See Tabbed Sections
  • %%tabbedAccordion -- Generates a tabbed section, with smooth transition effects based on accordion. See Accordion Style
  • %%accordion -- Generates vertical accordion. See Accordion Style
  • %%prettify -- Add code-coloring to a preformatted block of text. See Prettify Sourcecode
  • %%slimbox -- Generates a fancy picture viewer for all enclosed links, similar to the attachment viewer. See Slimbox
  • %%reflection -- Generates a reflection at the bottom of the image. See Reflection Style

Examples#

%%collapse#

  • The pome fruits:
    • Apples
      • Apple
      • Chokeberry
    • Pear
      • European
      • Asian
  • The stone fruits, drupes of genus Prunus:
    • Apricot
    • Cherry
    • Chokecherry
    • Plum
    • Peach

%%collapsebox#

Lorem Ipsum Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

%%category#

Clicking the category JSPWikiStyles reveals all pages linking to JSPWikiStyles

%%tip#

Hover your mouse over the Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula.
tip to see the nice tip.

%%graphbar#

Simplest for of GraphBars:

  • 20 Apples
  • 40 Oranges
  • 60 Pairs

See GraphBars for more examples.

%%sortable#

Title Author Published Edition Some IP@ Expenses
book1 zappy 25 Feb 2005 5 100.100.100.100 €500
book2 happy 25 Jan 2005 19 256.100.100.100 €1500
book3 pappy 23 Mar 2005 06 10.100.100.100 €50
book4 dappy 21 Apr 2005 199 1.100.100.100 €0.500
book5 rappy 25 Jul 2005 017 1.100.25.100 €5500
book5 rappy 23 Jan 2006 017 1.100.25.100 €5500

%%table-filter#

Title Author Published Edition Some IP@ Expenses
book1 zappy 25 Feb 2005 5 100.100.100.100 €500
book2 happy 25 Jan 2005 19 256.100.100.100 €1500
book3 pappy 23 Mar 2005 06 10.100.100.100 €50
book4 dappy 21 Apr 2005 199 1.100.100.100 €0.500
book5 rappy 25 Jul 2005 017 1.100.25.100 €5500

%%zebra-table#

column-head1 column-head2
cell-data cell data
cell-data cell data
cell-data cell data
cell-data cell data

%%columns#

Lorem Ipsum Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh.
Nullam Sodales Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque.

%%tabbedSection, %%tab #

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. Cras aliquet nibh sit amet tortor. Nam nunc.
Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque.
Cras aliquet nibh sit amet tortor. Nam nunc.

poppy.jpg

%%tabbedAccordion#

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. Cras aliquet nibh sit amet tortor. Nam nunc.
Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque.
Cras aliquet nibh sit amet tortor. Nam nunc.

poppy.jpg

%%accordion#

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. Cras aliquet nibh sit amet tortor. Nam nunc.
Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque.
Cras aliquet nibh sit amet tortor. Nam nunc.

cardiologia2.jpg(info)

%%prettify#

/**
 * the fibonacci series implemented as an Iterable.
 */
public final class Fibonacci implements Iterable<Integer> {
  /** the next and previous members of the series. */
  private int a = 1, b = 1;

  public Iterator<Integer> iterator() {
    return new Iterator<Integer>() {
      /** the series is infinite. */
      public boolean hasNext() { return true; }
      public Integer next() {
        int tmp = a;
        a += b;
        b = tmp;
        return a;
      }
      public void remove() { throw new UnsupportedOperationException(); }
    };
  }

%%slimbox#

%%reflection#


[#1] Here's the footnote I mentioned. [2-The other footnote] The other footnote. Note how its name is different?
Any ideas? Any questions?

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jpg
cardiologia2.jpg 89.0 kB 1 27-Nov-2008 11:57 Vándorló
« This page (revision-) was last changed on 27-Nov-2008 11:57 by Vándorló  

Links to Help You Succeed

Follow these links for some other helpful starting points and background information.

Participation Call

Know of related work, research, ideas or conferences?

Email us or complete the contact form. We are waiting to hear from you.

Stay Informed

Subscribe to our newsletter. Every month you recieve all the latest info, straight to your inbox.



Bookmark and Share
QR code