1
<!-- Generated by Nyctergatis Markup Engine, Mar 19 2008 00:22:07 -->
3
<h1>Markup of Nyctergatis Markup Engine</h1>
4
<p>Text with markup is plain text with a few character sequences
5
which are recognized by the markup processor and change the format of
6
the result. The result is styled text with titles, paragraphs with
7
justification, bold and italic faces, etc.</p>
8
<p>There are two kinds of markup constructs: blocks and inline.
9
Blocks are paragraphs (indented or not), headings, list items, table
10
cells, horizontal rules and block extensions. Inline constructs are
11
character styles, verbatim text and links; they are part of blocks.
12
Except in preformatted blocks, sequences of spaces or tabs are
13
replaced with single spaces.</p>
15
<p>Paragraphs are made of lines whose first character is not one of
16
<tt>*#:;=</tt> nor sequence <tt>{{{</tt>, <tt>----</tt>, or
17
<tt><<<</tt>. Lines can begin with sequences <tt>**</tt> and
19
<p>Paragraphs end with blank lines or next heading, list, table,
20
indented paragraph, preformatted block of text, horizontal rule or
21
block extension. They can contain styled text, links, spans of
22
verbatim text, and inline extensions.</p>
28
This is another paragraph.
31
<p>Indented paragraphs are paragraphs which begin with a colon.
32
Multiple colons define the level of indenting. Indented paragraphs
33
can contain styled text, links, spans of verbatim text, and inline
37
This is a normal paragraph.
39
paragraph in two lines.
40
::This is more indented.
43
<p>Headings are made of a single line beginning with an equal
44
character. The number of equal characters defines the level of title,
45
from main title (<tt>=</tt>) to sub-sub-subtitle (<tt>====</tt>).
46
Headings may end with a sequence of equal characters.</p>
51
=Another level 1 heading, without trailing equal character
56
<p>Lists are collections of items. There are three kinds of lists:
57
unnumbered lists, numbered lists, and definition lists. Lists can be
58
nested; they end with the next heading, indented paragraph, table, or
60
<p>Unnumbered lists are represented as indented paragraphs with a
61
bullet. Each item begins with a star character (<tt>*</tt>); it can
62
span multiple lines.</p>
63
<p>Numbered lists are represented as indented paragraphs with a
64
number. Items are numbered automatically with consecutive integers
65
starting at 1. Each item begins with a sharp character (<tt>#</tt>);
66
it can span multiple lines.</p>
67
<p>Definition lists are made of two kinds of items: title, typically
68
displayed in bold font, and definition, typically displayed indented.
69
Titles begin with a semicolon at the beginning of a line. Definitions
70
either follow the title, separated with a colon; or they begin on a
71
new line beginning with a colon.</p>
72
<p>List nesting can combine different kinds of lists. Sublist items
73
begin with multiple markers, the first one(s) corresponding to the
74
enclosing list(s). For instance, items of an unnumbered list nested
75
in a numbered list should start with <tt>#*</tt> at the beginning of
76
the line, without any preceding space. List markers must be used in a
77
consistent way; for example, <tt>##</tt> at the beginning of a line
78
in an unnumbered list is not interpreted as a second-level numbered
79
list item, but as monospace style (see below).</p>
82
* First item of unnumbered list.
85
*Third item without space (spaces are optional).
87
# First item of numbered list.
89
#* First item on unnumbered sublist.
91
# Thirst item of top-level numbered list.
93
; First title of definition list
94
: Definition of first item.
95
; Second title: Second definition
96
beginning on the same line.
98
Paragraph separated with a blank line.
101
<p>Tables are rectangular array of cells. They are made of one line
102
per row. Each cell begins with character <tt>|</tt>. Heading cells
103
(typically displayed in bold face) begin with <tt>|=</tt>. Rows may
104
end with a trailing <tt>|</tt>.</p>
106
<p>In the table below, the first row and the first column contain
107
headings. The very first cell is empty.</p>
109
||=First column|=Second column
110
|=First row|Cell 1,1|Cell 1,2
111
|=Second row|Cell 2,1|Cell 2,2
113
<h2>Preformatted</h2>
114
<p>Preformatted text is a block of text displayed literally,
115
including line feeds. Preformatted text is preceded with a line
116
containing <tt>{{{</tt> and is followed by a line containing
124
return 2 * x; // f(x) = 2x
128
<p>In preformatted text, lines which begin with <tt>}}}</tt>, with
129
leading spaces or not, must have an additional space which is
130
discarded in the output.</p>
131
<h2>Horizontal rules</h2>
132
<p>Horizontal rules are single lines containing four hyphens.</p>
137
Paragraph following a horizontal rule.
140
<p>Sequences <tt><<</tt> and <tt><<<</tt> are reserved
142
<h2>Character style</h2>
143
<p>Inside paragraphs, indented paragraphs, headings, list elements,
144
and table cells, the following two-character sequences toggle on or
145
off the corresponding style. It is not mandatory to nest spans of
146
styled characters between matching style sequences. Style is reset at
147
the end of text block.</p>
152
<tr><td><tt>**</tt></td>
155
<tr><td><tt>//</tt></td>
158
<tr><td><tt>##</tt></td>
161
<tr><td><tt>,,</tt> (two commas)</td>
164
<tr><td><tt>^^</tt></td>
167
<tr><td><tt>__</tt> (two underscores)</td>
171
<p>Double stars and double sharps are interpreted as the beginning of
172
list items when they are the first characters of a line in the
173
context of lists. To be interpreted as style markup, they can be
174
preceded by a space.</p>
177
This is //italic text//, **bold text**,
178
and //**bold italic text**//.
180
<h2>Escape character</h2>
181
<p>The tilde character, when followed by any character except space,
182
tab or line feed, is an escape character; it is not displayed and the
183
next character loses its special meaning, if any.</p>
186
Two stars: ~*~* or ~** or *~*; tilde: ~~.
188
<p>is rendered as "Two stars: ** or ** or **; tilde: ~."</p>
190
<p>Verbatim text is a sequence of characters enclosed between
191
<tt>{{{</tt> and <tt>}}}</tt>. After <tt>{{{</tt>, all characters are
192
output verbatim, without any markup interpreting, until the next
193
<tt>}}}</tt> or the end of text block. Multiple spaces and tabs and
194
single line feeds are still converted to single spaces, though.
195
Verbatim text is an alternative to the escape character; it is more
196
convenient for sequences of characters.</p>
199
{{{**}}} //{{{{{{xx}}}}}}//
201
<p>is rendered as "** <i>{{{xx}}}</i>".</p>
203
<p>Except in preformatted blocks, line breaks are not preserved. The
204
sequence <tt>\\</tt> forces a line break.</p>
207
The next line of this paragraph begins...\\here!
210
<p>Hypertext links (URLs) are enclosed between <tt>[[</tt> and
211
<tt>]]</tt>. The text displayed as the link is either the same as the
212
URL itself if there is no <tt>|</tt> character, or it is what follows
213
<tt>|</tt>. No markup is recognized in the URL part; what follows
214
<tt>|</tt> can contain styled text and verbatim text. Spaces
215
surrounding <tt>|</tt> are ignored.</p>
218
* Simple link: [[http://www.calerga.com]]
219
* Link with link text: [[http://www.calerga.com | Calerga]]
220
* Link with styled link text: [[http://www.calerga.com | **Calerga**]]
223
<p>Copyright Yves Piguet, 24 October 2007 May be distributed with NME
224
or cited with proper attribution.</p>