StructuredText is the markup language of ZWiki. Rather than write HTML you just pretend that you are sitting at a typewriter, and the ZWiki does the rest. Wiki is about doing, so just read a little of this page and then dive into the editing. Come back to learn more.

Zeroth Lesson

You can always find out how a piece of text was formatted by looking at the text in the edit window. This is how the web was born: View > Source was our friend then, and still is with wiki.

First Lesson

Since the very point of wiki is to be quick, let's start with the minimum needed to get going.

To Make a Paragraph
Separate blocks of text by one or more blank lines to create paragraphs.
To Make Hyperlinks
Refer to other pages in the wiki by their WikiName, and refer to web pages by their full URL.

Second Lesson

If you want to format characters, then you need to use the asterisk.

To Emphasise a Phrase
Place a single asterisk either side of a phrase to emphasise the phrase.

So     *this*     becomes     this

To Bolden a Phrase
Place a pair of asterisk either side of a phrase to bolden the phrase.

So     **this**     becomes     this

Note that this effect will not stretch far --- the asterisks have to be relatively close together.

Third Lesson

To make anchor links that display text rather than the full URL write the anchor text in double quotes, a colon, and the full URL.

So     "slashdot":http://slashdot.org/     becomes     slashdot

Fourth Lesson

If you want to quote a phrase, you need to be careful. In computer languages, the single quote is commonly used to supress the usual interpretation. This is the case in StructuredText.

To Computer Language Quote a Phrase
Place a single quote either side of a phrase to quote in the computer language sense. This supresses the recognition of WikiName/s and the effects of the asterisk, and sets the result in typewriter font.

So     '**this** WikiName'     becomes     **this** WikiName

To Double Quote a Phrase
Place a pair of single quotes either side of a phrase, so that ''this'' becomes ''this''.

Use the computer language quote when you want to tell someone what to type into a page. For example, you might tell other participants to type KeyWords: KeyWordOne KeyWordTwo.

Fifth Lesson

You can make section headings by indentation. To make a section heading write the heading on a single line, and indent following paragraphs. Be consistent with your indentation --- 2 characters should be plenty. You can indent further to get subsquent heading levels. For example:

    This is a Heading

      That was a heading because it was on a single line and
      this paragraph is indented.

      This is a Subheading

        That was a sub heading because it was on a single
        line and this paragraph is further indented.  This
        pattern can go on for a while, but all that
        indenting becomes tiresome if your are not using
        GnuEmacs.

There are a few gotchas. If you are not used to indentation in programming languages this can all be a bit confusing. Apply the Zeroth Lesson, i.e., look at pages in the edit window to see examples of the indentation structure. The rule of single line headings makes some short paragraphs a little dangerous, and likewise for long headings. If you want to enter a lot of structured content consider using an ExternalEditor.

Sixth Lesson

You can make unnumbered lists, numbered lists, and definition lists by a combination of special marks and indentation. It is better to explicitly indent the body of these lists to avoid confusion. Lists can be nested.

Unnumbered List
An unnumbered list is made by starting the paragraph with an asterisk followed by a space. Subsequent lines and paragraphs should be indented. For example:
      Given that this is the preceeding paragraph.  (Note that
      it is indented to the same level as the subsequent
      asterisks.)

      * Then this is a list element in an unnumbered list.  It
        is best to indent the subsequent lines so that ...

        Paragraphs belonging to the element will be
        recognised, and so that ..

      Paragraphs not belonging to the list will also be
      recognised.
Numbered List
A numbered list is made by starting the paragraph with the numeral 0, a full stop, and a space. Subsequent lines and paragraphs should be indented. For example:
      Given that this is the preceeding paragraph.  (Note that
      it is indented to the same level as the subsequent
      numerals.)

      0. Then this is a list element in a numbered list.  It
         is best to indent the subsequent lines so that ...

         Paragraphs belonging to the element will be
         recognised, and so that ..

      Paragraphs not belonging to the list will also be
      recognised.
Definition List
A definition list (like this one) is made by starting the paragraph with the phrase to be defined, a space, a pair of dashes, and a space. Subsequent lines and paragraphs should be indented. For example:
      Given that this is the preceeding paragraph.  (Note that it is
      indented to the same level as the definition item.)

      Term to be Defined -- Then this is a list element in a
        definition list.  It is best to indent the subsequent
        lines so that ...

        Paragraphs belonging to the element will be
        recognised, and so that ..

      Paragraphs not belonging to the list will also be
      recognised.

Seventh Lesson

If you have got this far, then you might be wondering how the examples on this page were entered without being wikified. For that you need the Zeroth Lesson.

Addendum

Block Quoting
The answer to the seventh lesson is that when a paragraph finishes with a pair of colons, any subsequent paragraphs that are indented are printed as is.

For example:

      This is getting weird, since we have nested these double colon
      structures.  When will this ever end.  So::

        This is really weird.  I am now inside an example inside an
        example.  What is this, a wiki or something?

      Back to normality.

produces

This is getting weird, since we have nested these double colon structures. When will this ever end. So:

      This is really weird.  I am now inside an example inside an
      example.  What is this, a wiki or something?

Back to normality.

end of example.

Making Tables
In TheHive, we recently discovered that ASCII tables are rendered as HTML tables.

For example:

      +---------------------+--------------------+
      | This is column one  | This is column two |
      +---------------------+--------------------+
      | I think you can use | This is some stuff |
      |                     |                    |
      | blank rows          | This more stuff    |
      | as separators       |                    |
      +---------------------+--------------------+

produces

This is column one

This is column two

I think you can use

blank rows as separators

This is some stuff

This more stuff

end of example.