Source

moin-2.0-#184fix / docs / user / rest.rst

ReST (ReStructured Text) Markup

Features currently not working with moin's ReST parser are marked with RSTTODO.

Headings

Rather than imposing a fixed number and order of section title adornment styles, the order enforced will be the order as encountered. The first style encountered will be an outermost title (like HTML H1), the second style will be a subtitle, the third will be a subsubtitle, and so on.

Markup:

Level 1
=======

**Intentionally not rendered as level 1 so it doesn't interfere with Sphinx's indexing**

Level 2
=======

Level 3
-------

Level 4
*******

Level 5
:::::::

Level 6
+++++++

Result:

Level 1

Intentionally not rendered as level 1 so it doesn't interfere with Sphinx's indexing

Level 2

Level 3

Level 4

Level 5
Level 6

Notes The underline below the title must at least be equal to the length of the title itself.

Text formatting

The following is a table of inline markup that can be used to format text in Moin.

Markup Result
**Bold Text** Bold text
*Italic* Italic
``Inline Literals`` Inline Literals

Images

Markup:

.. image:: example.png

Result:

example.png

Note RSTTODO everything after an image markup is shown as a comment in moin2.

Blockquotes and Indentations

Every additional space before the first word in a line will add an indent before the line.

Markup:

indented text
 text indented for the 2nd level

Result:

indented text
text indented for the 2nd level

Markup:

This is an ordinary paragraph, introducing a block quote.

  "It is my business to know things.  That is my trade."

  -- Sherlock Holmes

Result:

This is an ordinary paragraph, introducing a block quote.

"It is my business to know things. That is my trade."

—Sherlock Holmes

Notes
  • A block quote may end with an attribution: a text block beginning with "--", "---", or a true em-dash, flush left within the block quote.
  • RSTTODO the attribution does not work in moin2.

Lists

Unordered Lists

Markup:

- item 1

- item 2

 - item 2.1

  - item 2.1.1

- item 3

Result:

  • item 1
  • item 2
  • item 2.1
  • item 2.1.1
  • item 3

Ordered Lists

Markup:

1. item 1

   1. item 1.1
   #. item 1.2

#. item 2

Result:

  1. item 1
    1. item 1.1
    2. item 1.2
  2. item 2
Notes:
  • Ordered lists can be automatically enumerated using the # character as demonstrated above. Note that the first item of an ordered list auto-enumerated in this fashion must use explicit numbering notation (e.g. 1.) in order to select the enumeration sequence type (e.g. Roman numerals, Arabic numerals, etc.), initial number (for lists which do not start at "1") and formatting type (e.g. 1. or (1) or 1)). More information on enumerated lists can be found in the reStructuredText documentation.
  • One or more blank lines are required before and after reStructuredText lists.

Definition Lists

Markup:

term 1
 Definition 1.

term 2 : classifier
 Definition 2.

term 3 : classifier one : classifier two
 Definition 3.

Result:

term 1
Definition 1.
term 2 : classifier
Definition 2.
term 3 : classifier one : classifier two
Definition 3.

Tables

Simple Tables

Easy markup for tables consisting of two rows. This syntax can have no more than two rows.

Markup:

======= ======= =======
 A       B       C
======= ======= =======
 1       2       3
======= ======= =======

Result:

A B C
1 2 3

Markup:

======= ======= =======
      foo         Bar
--------------- -------
 A       B       C
======= ======= =======
 1       2       3
======= ======= =======

Result:

foo Bar
A B C
1 2 3

Note RSTTODO the foo-bar syntax to group header does not work.

Grid Tables

Complex tables can have any number of rows or columns. They are made by |, +, - and =.

Markup:

+----------------+---------------+
| A              |               |
+----------------+ D             |
| B              |               |
+----------------+---------------+
| C                              |
+--------------------------------+

Result:

A D
B
C

Note RSTTODO C does not extend fully up to the end of D.

Admonitions

Admonitions are used as a caution/notification block.

Markup:

.. note:: This is a paragraph

Result:

Note

This is a paragraph

Comments

Comments are not shown on the page but depending on the output formatter they might be included as HTML comments (<!-- -->).

Markup:

.. This is a comment
..
 _so: is this!
..
 [and] this!
..
 this:: too!
..
 |even| this:: !

Result:

Note RSTTODO comment markup does not work in moin2.

Literals Blocks

Literal blocks are used to show text as-it-is. i.e no markup processing is done within a literal block. A minimum (1) indentation is required for the text block to be recognized as a literal block.

Markup:

Paragraph with a space between succeeding two colons ::

 Literal block

Result:

Paragraph with a space between succeeding two colons

Literal block

Markup:

Paragraph with no space between succeeding two colons::

 Literal block

Result:

Paragraph with no space between succeeding two colons:

Literal block
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.