<!-- Generated by Nyctergatis Markup Engine, Mar 23 2013 11:18:16 -->
<html>
<body>
<h1>Markup of Nyctergatis Markup Engine</h1>
<p>Text with markup is plain text with a few character sequences
which are recognized by the markup processor and change the format of
the result. The result is styled text with titles, paragraphs with
justification, bold and italic faces, etc.</p>
<p>There are two kinds of markup constructs: blocks and inline.
Blocks are paragraphs (indented or not), headings, list items, table
cells, horizontal rules and block extensions. Inline constructs are
character styles, verbatim text and links; they are part of blocks.
Except in preformatted blocks, sequences of spaces or tabs are
replaced with single spaces.</p>
<h2>Paragraphs</h2>
<p>Paragraphs are made of lines whose first character is not one of
<tt>*#:;=</tt> nor sequence <tt>{{{</tt>, <tt>----</tt>, or
<tt>&lt;&lt;&lt;</tt>. Lines can begin with sequences <tt>**</tt> and
<tt>##</tt>.</p>
<p>Paragraphs end with blank lines or next heading, list, table,
indented paragraph, preformatted block of text, horizontal rule or
block extension. They can contain styled text, links, spans of
verbatim text, and inline extensions.</p>
<h3>Example</h3>
<pre>
This is a paragraph
written in two lines.

This is another paragraph.
</pre>
<h2>Indenting</h2>
<p>Indented paragraphs are paragraphs which begin with a colon.
Multiple colons define the level of indenting. Indented paragraphs
can contain styled text, links, spans of verbatim text, and inline
extensions.</p>
<h3>Example</h3>
<pre>
This is a normal paragraph.
:This is an indented
paragraph in two lines.
::This is more indented.
</pre>
<h2>Headings</h2>
<p>Headings are made of a single line beginning with an equal
character. The number of equal characters defines the level of title,
from main title (<tt>=</tt>) to sub-sub-subtitle (<tt>====</tt>).
Headings may end with a sequence of equal characters.</p>
<h3>Examples</h3>
<pre>
=Level 1 heading=
Paragraph
=Another level 1 heading, without trailing equal character
==Level 2 heading==
===Level 3 heading===
</pre>
<h2>Lists</h2>
<p>Lists are collections of items. There are three kinds of lists:
unnumbered lists, numbered lists, and definition lists. Lists can be
nested; they end with the next heading, indented paragraph, table, or
blank line.</p>
<p>Unnumbered lists are represented as indented paragraphs with a
bullet. Each item begins with a star character (<tt>*</tt>); it can
span multiple lines.</p>
<p>Numbered lists are represented as indented paragraphs with a
number. Items are numbered automatically with consecutive integers
starting at 1. Each item begins with a sharp character (<tt>#</tt>);
it can span multiple lines.</p>
<p>Definition lists are made of two kinds of items: title, typically
displayed in bold font, and definition, typically displayed indented.
Titles begin with a semicolon at the beginning of a line. Definitions
either follow the title, separated with a colon; or they begin on a
new line beginning with a colon.</p>
<p>List nesting can combine different kinds of lists. Sublist items
begin with multiple markers, the first one(s) corresponding to the
enclosing list(s). For instance, items of an unnumbered list nested
in a numbered list should start with <tt>#*</tt> at the beginning of
the line, without any preceding space. List markers must be used in a
consistent way; for example, <tt>##</tt> at the beginning of a line
in an unnumbered list is not interpreted as a second-level numbered
list item, but as monospace style (see below). Definitions in
definition lists always follow a single colon.</p>
<h3>Examples</h3>
<pre>
* First item of unnumbered list.
* Second
item, in two lines.
*Third item without space (spaces are optional).

# First item of numbered list.
# Second item.
#* First item on unnumbered sublist.
#* Second item.
# Thirst item of top-level numbered list.

; First title of definition list
: Definition of first item.
; Second title: Second definition
beginning on the same line.

Paragraph separated with a blank line.
</pre>
<h2>Tables</h2>
<p>Tables are rectangular array of cells. They are made of one line
per row. Each cell begins with character <tt>|</tt>. Heading cells
(typically displayed in bold face) begin with <tt>|=</tt>. Rows may
end with a trailing <tt>|</tt>.</p>
<h3>Example</h3>
<p>In the table below, the first row and the first column contain
headings. The very first cell is empty.</p>
<pre>
||=First column|=Second column
|=First row|Cell 1,1|Cell 1,2
|=Second row|Cell 2,1|Cell 2,2
</pre>
<h2>Preformatted</h2>
<p>Preformatted text is a block of text displayed literally,
including line feeds. Preformatted text is preceded with a line
containing <tt>{{{</tt> and is followed by a line containing
<tt>}}}</tt>.</p>
<h3>Example</h3>
<pre>
This is some C code:
{{{
double f(double x)
{
  return 2 * x;  // f(x) = 2x
}
}}}
</pre>
<p>In preformatted text, lines which begin with <tt>}}}</tt>, with
leading spaces or not, must have an additional space which is
discarded in the output.</p>
<h2>Horizontal rules</h2>
<p>Horizontal rules are single lines containing four hyphens.</p>
<h3>Example</h3>
<pre>
Paragraph.
----
Paragraph following a horizontal rule.
</pre>
<h2>Extensions</h2>
<p>Sequences <tt>&lt;&lt;</tt> and <tt>&lt;&lt;&lt;</tt> are reserved
for extensions.</p>
<h2>Character style</h2>
<p>Inside paragraphs, indented paragraphs, headings, list elements,
and table cells, the following two-character sequences toggle on or
off the corresponding style. It is not mandatory to nest spans of
styled characters between matching style sequences. Style is reset at
the end of text block.</p>
<table>
<tr><th>Markup</th>
<th>Style</th>
</tr>
<tr><td><tt>**</tt></td>
<td>Bold</td>
</tr>
<tr><td><tt>//</tt></td>
<td>Italic</td>
</tr>
<tr><td><tt>##</tt></td>
<td>Monospace</td>
</tr>
<tr><td><tt>,,</tt> (two commas)</td>
<td>Subscript</td>
</tr>
<tr><td><tt>^^</tt></td>
<td>Superscript</td>
</tr>
<tr><td><tt>__</tt> (two underscores)</td>
<td>Underlined</td>
</tr>
</table>
<p>Double stars and double sharps are interpreted as the beginning
of list items when they are the first characters of a line in the
context of lists. To be interpreted as style markup, they can be
preceded by a space.</p>
<h3>Example</h3>
<pre>
This is //italic text//, **bold text**,
and //**bold italic text**//.
</pre>
<h2>Escape character</h2>
<p>The tilde character, when followed by any character except space,
tab or line feed, is an escape character; it is not displayed and the
next character loses its special meaning, if any.</p>
<h3>Example</h3>
<pre>
Two stars: ~*~* or ~** or *~*; tilde: ~~.
</pre>
<p>is rendered as &quot;Two stars: ** or ** or **; tilde: ~.&quot;</p>
<h2>Verbatim</h2>
<p>Verbatim text is a sequence of characters enclosed between
<tt>{{{</tt> and <tt>}}}</tt>. After <tt>{{{</tt>, all characters are
output verbatim, without any markup interpreting, until the next
<tt>}}}</tt> or the end of text block. Multiple spaces and tabs and
single line feeds are still converted to single spaces, though.
Verbatim text is an alternative to the escape character; it is more
convenient for sequences of characters.</p>
<h3>Example</h3>
<pre>
{{{**}}} //{{{{{{xx}}}}}}//
</pre>
<p>is rendered as &quot;** <i>{{{xx}}}</i>&quot;.</p>
<h2>Line break</h2>
<p>Except in preformatted blocks, line breaks are not preserved. The
sequence <tt>\\</tt> forces a line break.</p>
<h3>Example</h3>
<pre>
The next line of this paragraph begins...\\here!
</pre>
<h2>Links</h2>
<p>Hypertext links (URLs) are enclosed between <tt>[[</tt> and
<tt>]]</tt>. The text displayed as the link is either the same as the
URL itself if there is no <tt>|</tt> character, or it is what follows
<tt>|</tt>. No markup is recognized in the URL part; what follows
<tt>|</tt> can contain styled text and verbatim text. Spaces
surrounding <tt>|</tt> are ignored.</p>
<h3>Examples</h3>
<pre>
* Simple link: [[http://www.calerga.com]]
* Link with link text: [[http://www.calerga.com | Calerga]]
* Link with styled link text: [[http://www.calerga.com | **Calerga**]]
</pre>
<hr />
<p>Copyright Yves Piguet, 24 October 2007. May be distributed with
NME or cited with proper attribution.</p>
</body>
</html>
