aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-01-29 20:53:53 +0000
committerJohn Ankarström <john@ankarstrom.se>2021-01-29 20:53:53 +0000
commitf0d05a6c016d9b733f3442cba533a55d7a8ed041 (patch)
tree96fac627d378d0483aef827406f741a86f201901
parent6d0164cac30774f12a8f6ab6d5db3901f8d8e615 (diff)
downloadem-f0d05a6c016d9b733f3442cba533a55d7a8ed041.tar.gz
Update README
-rw-r--r--README132
-rw-r--r--README.html170
2 files changed, 302 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..950d98a
--- /dev/null
+++ b/README
@@ -0,0 +1,132 @@
+Em is a limited hypertext markup language.
+
+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).
+
+Em takes plain-text readability seriously. You should be able to
+write em in a plain-text e-mail message without the recipient noticing.
+
+Em is implemented as a portable awk script, whose simplicity speaks
+for the benefits of em.
+
+== Syntax ==
+
+=== Block-level formatting ===
+
+*A single empty line* always marks a block break. There is
+no exception to this rule. The line is removed in the final output.
+
+All blocks support inline formatting, except headings,
+preformatted blocks and terms in definition lists.
+
+One block cannot be put within another block. For example,
+it is impossible to put a paragraph or a preformatted block
+inside a list item. If you want paragraph lists, just use paragraphs:
+
+ 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+ sed do eiusmod tempor incididunt ut labore et dolore
+ magna aliqua.
+
+ 2. Ut enim ad minim veniam, quis nostrud exercitation
+ ullamco laboris nisi ut aliquip ex ea commodo consequat.
+
+==== Headings ====
+
+Headings begin and end with the same number of equal signs:
+
+ = First-level heading =
+
+ == Second-level heading ==
+
+==== Lists ====
+
+Lists start with a single space. There are four types of lists:
+
+ - This is an unordered list
+ - With two items
+
+ 1. This is an ordered list
+ 2. With an item that spans
+ two lines
+
+ this is: a definition list
+
+ [1] This is a reference list
+ [2] With two items
+
+Unordered and ordered lists can be nested. An additional space
+at the beginning of the line increases the item level by one:
+
+ - First level
+ - Second level
+ - First level
+
+A reference list is a special type of list, unique to em. It is a
+type of footnote list, to which you can make inline referencess
+like this:
+
+ See footnote [1].
+
+There is a special type of reference list item called a *hyperlink
+reference*. It contains only a single word, without whitespace:
+
+ [1] http://example.com
+
+Hyperlink reference items are removed in the final output,
+but you can still reference them inline:
+
+ You can download the file here [1].
+
+==== Preformatted blocks ====
+
+Preformatted blocks start with a single tab:
+
+ #include <stdio.h>
+ main() { puts("Hello world!\n"); }
+
+==== Paragraphs ====
+
+Paragraphs start with no space:
+
+ This is a paragraph
+ with two lines.
+
+ This is another paragraph.
+
+=== Inline formatting ===
+
+_Italic, bold and teletype text_ is marked with the asterisk,
+the underscore and the backtick, respectively:
+
+ Example of *italic* text.
+
+The marks are only valid in certain positions:
+
+ 1. At word borders
+ 2. After an opening parenthesis
+ 3. Before any of `.,:;?!)`
+ 4. Before a closing parenthesis any of `.,:;?!`
+
+_Inline references_ are created with square brackets:
+
+ Example of an inline reference [12].
+
+They are valid in positions 1, 3 and 4.
+
+When referencing a hyperlink reference (see above),
+the reference is replaced with a link. For example:
+
+ It is available for download [1].
+
+ [1] v1.tgz
+
+translates into the following HTML:
+
+ <p>It is available for download (<a href="v1.tgz">link</a>).
+ </p>
+
+The default link text ("link") can be changed by setting
+the `linktext` environment variable.
diff --git a/README.html b/README.html
new file mode 100644
index 0000000..fca665f
--- /dev/null
+++ b/README.html
@@ -0,0 +1,170 @@
+<p>
+Em is a limited hypertext markup language.
+</p>
+<p>
+It is similar to Markdown, but it has a few key advantages:
+</p>
+<ol>
+<li value="1">It is more readable.
+</li><li value="2">It is simpler to parse.
+</li><li value="3">There is <i>not</i> more than one way to do it (sorry Larry).
+</li>
+</ol>
+<p>
+Em takes plain-text readability seriously. You should be able to
+write em in a plain-text e-mail message without the recipient noticing.
+</p>
+<p>
+Em is implemented as a portable awk script, whose simplicity speaks
+for the benefits of em.
+</p>
+<h3>Syntax</h3>
+<h3>Block-level formatting</h3>
+<p>
+<i>A single empty line</i> always marks a block break. There is
+no exception to this rule. The line is removed in the final output.
+</p>
+<p>
+All blocks support inline formatting, except headings,
+preformatted blocks and terms in definition lists.
+</p>
+<p>
+One block cannot be put within another block. For example,
+it is impossible to put a paragraph or a preformatted block
+inside a list item. If you want paragraph lists, just use paragraphs:
+</p>
+<pre>
+1. Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+sed do eiusmod tempor incididunt ut labore et dolore
+magna aliqua.
+</pre>
+<pre>
+2. Ut enim ad minim veniam, quis nostrud exercitation
+ullamco laboris nisi ut aliquip ex ea commodo consequat.
+</pre>
+<h4>Headings</h4>
+<p>
+Headings begin and end with the same number of equal signs:
+</p>
+<pre>
+= First-level heading =
+
+== Second-level heading ==
+</pre>
+<h4>Lists</h4>
+<p>
+Lists start with a single space. There are four types of lists:
+</p>
+<pre>
+<li>This is an unordered list
+ - With two items
+
+ 1. This is an ordered list
+ 2. With an item that spans
+two lines
+
+ this is: a definition list
+</li>
+</pre>
+<pre>
+<li value="1" id="ref1">This is a reference list
+ [2] With two items
+</li>
+</pre>
+<p>
+Unordered and ordered lists can be nested. An additional space
+at the beginning of the line increases the item level by one:
+</p>
+<pre>
+<li>First level
+ - Second level
+ - First level
+</li>
+</pre>
+<p>
+A reference list is a special type of list, unique to em. It is a
+type of footnote list, to which you can make inline referencess
+like this:
+</p>
+<pre>
+See footnote [<a href="#ref1">1</a>].
+</pre>
+<p>
+There is a special type of reference list item called a <i>hyperlink
+reference</i>. It contains only a single word, without whitespace:
+</p>
+<pre>
+</pre>
+<p>
+Hyperlink reference items are removed in the final output,
+but you can still reference them inline:
+</p>
+<pre>
+You can download the file here [<a href="#ref1">1</a>].
+</pre>
+<h4>Preformatted blocks</h4>
+<p>
+Preformatted blocks start with a single tab:
+</p>
+<pre>
+#include <stdio.h>
+ main() { puts("Hello world!\n"); }
+</pre>
+<h4>Paragraphs</h4>
+<p>
+Paragraphs start with no space:
+</p>
+<pre>
+This is a paragraph
+with two lines.
+</pre>
+<pre>
+This is another paragraph.
+</pre>
+<h3>Inline formatting</h3>
+<p>
+<b>Italic, bold and teletype text</b> is marked with the asterisk,
+the underscore and the backtick, respectively:
+</p>
+<pre>
+Example of <i>italic</i> text.
+</pre>
+<p>
+The marks are only valid in certain positions:
+</p>
+<ol>
+<li value="1">At word borders
+</li><li value="2">After an opening parenthesis
+</li><li value="3">Before any of <tt>.,:;?!)</tt>
+</li><li value="4">Before a closing parenthesis any of <tt>.,:;?!</tt>
+</li>
+</ol>
+<p>
+<b>Inline references</b> are created with square brackets:
+</p>
+<pre>
+Example of an inline reference [<a href="#ref12">12</a>].
+</pre>
+<p>
+They are valid in positions 1, 3 and 4.
+</p>
+<p>
+When referencing a hyperlink reference (see above),
+the reference is replaced with a link. For example:
+</p>
+<pre>
+It is available for download [<a href="#ref1">1</a>].
+
+ [1] v1.tgz
+</pre>
+<p>
+translates into the following HTML:
+</p>
+<pre>
+<p>It is available for download (<a href="v1.tgz">link</a>).
+</p>
+</pre>
+<p>
+The default link text ("link") can be changed by setting
+the <tt>linktext</tt> environment variable.
+</p>