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.html | 180 +++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 98 insertions(+), 82 deletions(-) (limited to 'README.html') 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:

+
    +
  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 .,:;?! +
  5. +
+
+

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

+ +

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: -

-
    -
  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 .,:;?! -
  5. -
-

-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