aboutsummaryrefslogtreecommitdiff
path: root/README.old
blob: 804b51359a0f6e7aa93a00add62b89014e7f88be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
== Introducing Em ==

Em is a *limited* markup language that compiles to HTML.
It is similar to Markdown, but it has a few key advantages:

 1. It is more readable.
 2. It is simpler to parse.
 3. There is *not* more than one way to do it (sorry Larry).
For any given HTML output, there is only a single possible Em input.

As was said above, Em is also more limited than Markdown,
because it values plain-text readability more than power.
Most clearly, hyperlinks cannot have arbitrary link text;
they have to be formatted in a fashion similar to how they
are included in e-mails:

	It can be downloaded here [1].
	
	[1] v1.zip

This is translated to the following HTML:

	<p>It can be downloaded here (<a href="v1.zip">link</a>).

This limitation is intentional, because there is no other readable way
of specifying what text is part of the link text.  But it should be remembered
that the purpose of Em -- and of Markdown -- is not to be a general-purpose
HTML preprocessor, but rather to be a simple, readable markup language.
In many ways, Markdown has come short of this original goal.

The name Em is an abbreviation of e-mail, because the format
could be used in a plain-text e-mail without anyone noticing.
It is also an allusion to the unit called em.

== Syntax ==

=== Block-level elements ===

Block-level elements are separated using one empty line.
This empty line is removed in the final HTML output.

Lists begin with a single space:

 - Test
 - Test
 - Test

 1. Test
 2. Test
 3. Test

 term: definition
 term: definition

Lists within lists begin with another space.  Tables, which normally start
with two spaces, cannot be put inside a list.

Tables begin with two spaces; cells are separated with tabs.
Empty cells have a single empty space.

  Column 1	Column 2		Column 3
  Test		Test			Test

Code blocks begin with a tab (or four spaces?):

	#include <stdio.h>
	main(){
		puts("Hello world!");
	}

If "paragraph lists" are wanted, then normal paragraphs should be used:

	1. This is the first point.
	Bla bla bla.
	
	2. This is the second point.
	Bla bla bla.

Headings are formatted with equal signs:

	= First-level heading =
	
	== Second-level heading ==
	
	=== Third-level heading ===

The equal signs on the right side are not optional.

A paragraph containing three hyphens signifies a horizontal rule:

	---

== Inline formatting ==

Three types of inline formatting are supported:

 b:	underline (_)
 i:	asterisk (*)
 tt:	backquote (`)

They are valid only at word borders.
One type of inline formatting cannot contain another one.

Only visual formatting (b, i, tt) is supported, not semantic (strong, em, code),
as the HTML translator cannot possibly know the semantics of the text.

Links are available only as in plain-text e-mail [1].

 [1] http://like.this.example.com/

When converting to HTML, references containing only a URL are converted
to (link), optionally localized.  References containing text are shown as footnotes.

Reference lists are a special case of lists, which is why they begin with a space.