From 019d605894b903b483248a119d75691c46f5724d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20Ankarstr=C3=B6m?=
Date: Sat, 30 Jan 2021 17:36:49 +0000
Subject: Update README
---
README | 164 +++++++++++++++++++++++++++++++-----------------------
README.html | 180 +++++++++++++++++++++++++++++++++---------------------------
2 files changed, 192 insertions(+), 152 deletions(-)
diff --git a/README b/README
index 1f6e238..c57618a 100644
--- a/README
+++ b/README
@@ -17,39 +17,78 @@ For examples, see the source code for this text [a] or the test file [b].
[a] ../tree/README
[b] ../tree/test.em
-== Implementation ==
-
Em is implemented in portable awk, with an rc script to bind it together.
The rc script can (more or less) trivially be translated to POSIX shell,
but the work has not been done yet.
-== Syntax ==
-
Em's complete and exact syntax is defined by its implementation [c],
-but this section contains a general description.
+but a general description follows below.
[c] ../tree/emparse
-=== 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.
+== Inline formatting ==
-All blocks support inline formatting, except headings,
-preformatted blocks and terms in definition lists.
+=== Font style ===
-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:
+Italic, bold and teletype text is marked with the asterisk,
+the underscore and the backtick, respectively:
+
+ Example of *italic text*, _bold text_ and `teletype text`.
+
+The marks are only valid in certain positions:
+
+ 1. At word borders
+ 2. At the beginning of a word after an opening parenthesis
+ 3. At the end of a word before any of `.,:;?!)`
+ 4. At the end of a word before a closing parenthesis followed by any of `.,:;?!`
+
+---
+
+=== Inline references ===
+
+Inline references are created with square brackets:
+
+ Example of an inline reference [1].
+
+ [1] The quick brown fox ...
+
+For more information about references, see *Reference lists* below.
+
+---
+
+=== Hyperlinks ===
+
+Hyperlinks are a special case of inline references. When an inline
+reference refers to a reference containing only a web address,
+the inline reference is replaced with a hyperlink to that address.
+
+ It is available for download [a].
+
+ [a] v1.tgz
+
+The above example translates to the following HTML:
+
+ It is available for download (link).
+
+
+The default link text ("link") can be changed by setting
+the `linktext` environment variable.
- 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.
+== Block-level formatting ==
+
+ - _A single empty line 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.
-==== Headings ====
+=== Headings ===
Headings begin and end with the same number of equal signs:
@@ -57,37 +96,53 @@ Headings begin and end with the same number of equal signs:
== Second-level heading ==
-==== Lists ====
+---
-Lists start with a single space. There are four types of lists:
+=== Lists ===
+
+__All lists start with a single space__, followed by some marker.
+
+_Unordered lists_ are created with `- `:
- This is an unordered list
- With two items
+
+_Ordered lists_ are created with `n. `:
1. This is an ordered list
2. With an item that spans
two lines
-
- this is: a definition list
+
+_Definition lists_ are created with `term: `:
+
+ dinosaur: an animal
+
+_Reference lists_ are created with `[n]. `:
[1] This is a reference list
[2] With two items
-Unordered and ordered lists can be nested. An additional space
+==== Nesting ====
+
+Unordered and ordered lists can be nested. _An additional space_
at the beginning of the line increases the item level by one:
- - First level
+ 1. First level
- Second level
- - First level
+ 2. First level
+
+==== Reference lists ====
-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:
+A reference list is a special type of list. It is a type of footnote list,
+to which you can make inline references:
See footnote [1].
+
+ [1] The quick brown fox ...
-There is a special type of reference list item called a *hyperlink
-reference*. It contains only a single word, without whitespace:
+_Note:_ 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
@@ -96,53 +151,22 @@ but you can still reference them inline:
You can download the file here [1].
-==== Preformatted blocks ====
+---
+
+=== Preformatted blocks ===
-Preformatted blocks start with a single tab:
+__Preformatted blocks start with a single tab:__
#include
main() { puts("Hello world!\n"); }
-==== Paragraphs ====
+---
+
+=== Paragraphs ===
-Paragraphs start with no space:
+__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. At the beginning of a word after an opening parenthesis
- 3. At the end of a word before any of `.,:;?!)`
- 4. At the end of a word before a closing parenthesis followed by 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:
-
- It is available for download (link).
-
-
-The default link text ("link") can be changed by setting
-the `linktext` environment variable.
diff --git a/README.html b/README.html
index f0c5676..576b50d 100644
--- a/README.html
+++ b/README.html
@@ -22,43 +22,86 @@ For examples, see the source code for this text (link
-Implementation
Em is implemented in portable awk, with an rc script to bind it together.
The rc script can (more or less) trivially be translated to POSIX shell,
but the work has not been done yet.
-Syntax
Em's complete and exact syntax is defined by its implementation (link),
-but this section contains a general description.
+but a general description follows below.
-Block-level formatting
+
+Inline formatting
+Font style
-A single empty line always marks a block break. There is
-no exception to this rule. The line is removed in the final output.
+Italic, bold and teletype text is marked with the asterisk,
+the underscore and the backtick, respectively:
+
+Example of *italic text*, _bold text_ and `teletype text`.
+
-All blocks support inline formatting, except headings,
-preformatted blocks and terms in definition lists.
+The marks are only valid in certain positions:
+
+- At word borders
+
- At the beginning of a word after an opening parenthesis
+
- At the end of a word before any of .,:;?!)
+
- At the end of a word before a closing parenthesis followed by any of .,:;?!
+
+
+
+Inline references
-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:
+Inline references are created with square brackets:
-1. Lorem ipsum dolor sit amet, consectetur adipiscing elit,
-sed do eiusmod tempor incididunt ut labore et dolore
-magna aliqua.
+Example of an inline reference [1].
+
+ [1] The quick brown fox ...
+
+For more information about references, see Reference lists below.
+
+
+Hyperlinks
+
+Hyperlinks are a special case of inline references. When an inline
+reference refers to a reference containing only a web address,
+the inline reference is replaced with a hyperlink to that address.
+
-2. Ut enim ad minim veniam, quis nostrud exercitation
-ullamco laboris nisi ut aliquip ex ea commodo consequat.
+It is available for download [a].
+
+ [a] v1.tgz
-Headings
+
+The above example translates to 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.
+
+
+Block-level formatting
+
+- A single empty line 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.
+
+
+Headings
Headings begin and end with the same number of equal signs:
@@ -67,44 +110,62 @@ Headings begin and end with the same number of equal signs:
== Second-level heading ==
-Lists
+
+Lists
+
+_All lists start with a single space_, followed by some marker.
+
-Lists start with a single space. There are four types of lists:
+Unordered lists are created with - :
- This is an unordered list
- With two items
+
+
+Ordered lists are created with n. :
- 1. This is an ordered list
- 2. With an item that spans
+1. This is an ordered list
+2. With an item that spans
two lines
-
- this is: a definition list
+
+
+Definition lists are created with term: :
+
+
+ dinosaur: an animal
+
+Reference lists are created with [n]. :
+
[1] This is a reference list
[2] With two items
+Nesting
-Unordered and ordered lists can be nested. An additional space
+Unordered and ordered lists can be nested. An additional space
at the beginning of the line increases the item level by one:
- - First level
+ 1. First level
- Second level
- - First level
+ 2. First level
+Reference lists
-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:
+A reference list is a special type of list. It is a type of footnote list,
+to which you can make inline references:
See footnote [1].
+
+ [1] The quick brown fox ...
-There is a special type of reference list item called a hyperlink
-reference. It contains only a single word, without whitespace:
+Note: 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
@@ -116,17 +177,19 @@ but you can still reference them inline:
You can download the file here [1].
-Preformatted blocks
+
+Preformatted blocks
-Preformatted blocks start with a single tab:
+_Preformatted blocks start with a single tab:_
#include <stdio.h>
main() { puts("Hello world!\n"); }
-Paragraphs
+
+Paragraphs
-Paragraphs start with no space:
+_Paragraphs start with no space:_
This is a paragraph
@@ -135,50 +198,3 @@ 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:
-
-
-- At word borders
-
- At the beginning of a word after an opening parenthesis
-
- At the end of a word before any of .,:;?!)
-
- At the end of a word before a closing parenthesis followed by 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.
-
--
cgit v1.2.3