EZML is a simple markup language for formatting documents which can then be translated into various other markup languages, such as HTML. It is designed to be very easy to learn and to use, and yet still provide the basics needed for good looking documents.
This manual is itself written using EZML (although you are probably viewing it after conversion to HTML).
Lines up to the first blank line of an EZML document are part of the preamble of the document.
The preamble may contain fewer than three lines (followed by a blank line), in which case the author(s) and/or date may be unspecified.
Sections are defined by a line that starts with a $ (dollar sign). One dollar sign indicates a section, two dollar signs a subsection, three dollar signs a subsubsection, etc.
Paragraphs are separated by blank lines (except within code blocks; see below).
Examples:
$First Section$$A subsection
$$$The subsubsection
Inline formatting changes the style of text within the flow of the document. The following style elements are defined:
Element | Meaning | Example | Result |
---|---|---|---|
* | Bold | the *bold* word | the bold word |
_ | Italic | the _italic_ word | the italic word |
+ | Code | the +code or tt+ word | the code or tt word |
" | Quotes | the "quoted" word | the quotedword |
Different translators may translate other sequences as necessary for the target language. For example, for HTML, the characters <, >, and & must be converted, although these may appear freely in EZML.
Block formatting results in text that is set off from its surroundings. The general pattern in EZML is that the sequence <style> at the start of a line indicates a block of the given style. The block should be ended with another similar line (the slash used to close entities in HTML/XML is optional in EZML).
The following block styles are defined:
Element | Meaning |
---|---|
<center> | Center the block |
<code> | Format as program code |
<footnote> | Format as footnote |
<quotation> | Format as block quotation |
<other> | User-defined block style |
As a shorthand, a line containing only [+ is the same as starting a <code> block, and a line containing only [ is the same as starting a <quotation> block. Both of these should be closed with a line containing only ].
Note that footnotes may or may not end up as what you
might think of as a footnote
.
Blank lines do not cause paragraphs in a code block, but are just blank lines, however that gets rendered in the target language.
Examples:
<center> This text is centered. <center>
<code> public void main(String[] argv) { // Something here if (argv.length > 0) { ... } } <code>
public void main(String[] argv) { // Something here if (argv.length > 0) { ... } }
<footnote> This is a footnote. <footnote>
<quotation> This is a quotation. <quotation>
This is a quotation.
There is no need to start a list explicitly. List items are introduced simply by beginning a line with - (minus) for an unordered list and # (pound) for an ordered list. The list item continues until the next list item starts or until a blank line ends the list.
For a nested list, use multiple - or # characters to indicate the level of nesting.
Examples:
- Item 1 of unordered list - Item 2 which as you see continues on to the next line - Item 3 is the last, followed by blank
# Item 1 of ordered list # Item 2 of ordered list # Item 3 of ordered list
Here is a an unordered list with some nested unordered lists: - Item 1 - Item 2 -- Item 2.1 -- Item 2.2 - Item 3 - Item 4 -- Item 4.1 -- Item 4.2 -- Item 4.3
Here is a an unordered list with some nested unordered lists:
Here is a list with a nested ordered list - Item 1 - Item 2 ## Item 2.1 ## Item 2.2 - Item 3
Here is a list with a nested ordered list
Tables are perhaps the most complicated part of EZML, although it's really pretty simple.
Example:
= Table of Examples |Row 1, col 1|Row 1, col 2|Row 1, col 3| |Row 2, col 1|Row 2, col 2, which is quite long and continues on the next line|Row 2, col 3| |Row 3, col 1|Row 3, col 2|Row 3, col 3| =
Row 1, col 1 | Row 1, col 2 | Row 1, col 3 |
---|---|---|
Row 2, col 1 | Row 2, col 2, which is quite long and continues on the next line | Row 2, col 3 |
Row 3, col 1 | Row 3, col 2 | Row 3, col 3 |
A hyperlink is marked with two square brackets ([[). If it ends with two square brackets, then the label of the link (what you read) is the same as its referent (what it links to). Otherwise the first square bracket ends the referent and the label is the text between it and the second square bracket.
Examples:
Here is [[file.html]the file] for you to read.
Here is the file for you to read.
Here it is without a label: [[file.html]]
Here it is without a label: file.html
Lines starting with // (two slashes) are comments and are not translated into the target document. They also don't count towards the preamble, in case you were wondering.
Currently EZML can be converted into HTML. The HTML is designed to be easy to customize with a stylesheet (a default stylesheet is provided, and the output looks reasonable with no stylesheet).
XML and LaTeX would be easy to do.
Sections are automatically numbered in the current HTML output. It would be possible to do this with the stylesheet also, except that Safari does not support the necessary counter properties (as of this writing).