Writing text
ZML's text formatting rules are designed to be as simple as possible. 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 (use the link at the bottom of this page) to see how the different formatting on this page is used.
Hyperlinks
You can create links to internal or external web pages by putting the name in brackets. External links must be a complete URL, while internal pages just need to be the name of page. 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, while this page can be linked to like this: [text formatting rules]: text formatting rules.
If you want to create a relative link, start the link with a ./ or ../ For example, suppose the page you are editing is named "folder1/folder2/foo" contains these three links: [bar], [./bar], and [../bar] -- the first will link to the page "bar" while the second to "folder1/folder2/bar" and the third to "folder1/bar".
If you want to use brackets in regular text precede the bracket with a backslash, like this: \[sic], to avoid creating a link.
Adding pictures
If you create a link to an image it will be automatically inlined. For example, this link: [example.png] creates an inlined PNG image:
. If you specify link text ([this one here|example.png]) it becomes
the ALT text for those who either can't or don't want to view images.
If you don't want the image to be inlined, use the wiki:xlink-replace link annotation:
[not inlined|wiki:xlink-replace; example.png]:
Link annotations
The above link is an example of an advanced feature called link annotations that let's you add metadata about the link, for example to describe what type of link it is or (as in this example) provide a hint as to how it should be displayed. You can even have links that leave out the URL and just have a link annotation -- in this case you are annotating the link text. For example, this annotation: [Shouldn't we say more here?|wiki:comment author='johnb';] has no link and appears as regular text:
Shouldn't we say more here?
But if you view source of the generated HTML you'll see the text is wrapped in a <span> element with a class attribute set to "wiki:comment".
A link can have any number of annotations proceeding the page name or URL, each separated by a ";". Each annotation is treated like a line of ZML markup with the exception that a ";" ends the markup line instead beginning a comment and ` strings are not allowed. Technically, the annotation portion is treated as a physical line of ZML markup -- the ";" is used in ZML markup to break a line into multiple logical lines.
Anchors
You can create a link to another part of the page by creating an anchor and linking to it. An anchor is special link that begins with & followed by its name, for example [&chapter2] or [&1]. You create links to the anchor use a link that starts with a # and matches the anchor name, e.g. [#chapter2] or [#1].
Here's a link to Footnote number 1 and another footnote 2.
Text effects
You may use bold text or italic text, by placing two underscores (__) (for bold) or two slashes (//) (for italics) before and after the text. You can create monospaced text using ^^.
Bulleted lists
Use an asterisk (*) in the first column to make bulleted lists. Use more asterisks for deeper indentation. For example:
* One * Two * Three ** Three.One
creates
- One
- Two
- Three
- Three.One
Numbered lists
Just like with bulleted lists, but use "1." instead of the asterisk. Like this:
1. One 1. Two 1. Three 11. Three.One
creates
- One
- Two
- Three
- Three.One
If you want to write the list item on multiple lines just start the following lines with a space.
- This is a single-line item.
- This is actually a multi-line item. We continue the second sentence 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 convinience.
Indentation and Definition lists
A simple way to make definition lists is to use the '+=' -construct:
- Construct
- ''Something you use to do something with''
- Starting with a ':' causes text to be indented like this (useful because remember, you can't start lines with spaces or tabs!).
- Multiple colons create greater indentation, like the '::' used here.
Block Quotes
Two or more :: alone on a line starts (or ends) a block quote, for extended quotations
Extended quotes can have:
- lists
- rules
etc.
-- anonymous
Headings
Start a line with an exclamation mark (!) to make a heading.
Sub-headings
!! makes a sub-heading, !!! a sub-sub-heading, etc. (up to 6 !s).
Preformatted text
If you want to add a block of unformatted text that doesn't follow any of these rules, start a new line in a quotation block that begins and ends with either """ or '''. If you want to preserve whitespace start the quote with p''' or p""".
here's
some text with
strange text
formatting
preservedIf you want to turn off markup escaping so you enter HTML or XML markup directly into the document start the quote with r''' or r""". (You can combine both prefixes, e.g. pr""".) For more info, see ZML Markup Rules or edit this page for an example.
Character escaping
If you want to display any of these formatting characters instead of creating the formatting precede the character with a \ e.g. here // is displayed instead starting italics text.
Line Breaks and Continuations
Occasionally you may want to create a line break without creating a new paragraph, for example in a list bullet item. Use ~~ to create a line break:
- this item is on
two lines
If you want to continue a line so the next line is combined with the first (for example, to make the "source" text more readable), just start the next line with a space.
- this bullet item breaks across two lines in the source text
Tables
You can do simple tables by using 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 | [Cocoon home|http://cocoon.apache.org/] | we continue the line here for readability
gives you the following table. Note how you can use links also inside tables.
| Heading 1 | Heading 2 |
|---|---|
| ''Gobble'' | Bar |
| Cocoon home | we continue the line here for readability |
XML/HTML Markup
You can create arbitrary XML markup using ZML's markup formatting rules. Any line that starts with a "<" is treated like ZML markup that gets translated directly into XML or HTML -- see the ZML Markup Rules for more information.
[1] Here's the footnote I mentioned.
[The other footnote] The other footnote. Note how it's name is different?

