aboutsummaryrefslogtreecommitdiff
path: root/README.html
diff options
context:
space:
mode:
Diffstat (limited to 'README.html')
-rw-r--r--README.html59
1 files changed, 37 insertions, 22 deletions
diff --git a/README.html b/README.html
index c6fa908..efcee0b 100644
--- a/README.html
+++ b/README.html
@@ -12,19 +12,17 @@ never more than a single possible em representation.
<p>
Em values readability over expressiveness. This means that it is rather limited
in terms of what HTML it can produce. Most noticeably, only a very limited
-form of inline links are supported (see <i>Lists</i> and <i>Inline formatting</i>).
+form of inline links are supported (see <i>Hyperlinks</i> below).
</p>
<p>
Em also values consistency and predictability. As such, the syntax is rather
strict. This makes it a bit harder to learn, but much more predictable.
</p>
<p>
-Em's complete and exact syntax is defined by its implementation (<a href="../tree/README">link</a>), but a
+Em's complete and exact syntax is defined by its implementation [<a href="../tree/README">1</a>], but a
general description follows below. For longer examples, see the source
-code for this text (<a href="../tree/test.em">link</a>) or the test file (<a href="../tree/emparse">link</a>).
+code for this text [<a href="../tree/test.em">2</a>] or the test file [<a href="../tree/emparse">3</a>].
</p>
-<ol class="reflist" style="font-size: small;">
-</ol>
<p>
Em is implemented in portable awk, with an rc script to bind it together.
It is written on and for Plan 9 primarily, but the rc code can (more or less)
@@ -66,31 +64,43 @@ Example of an inline reference [1].
[1] The quick brown fox ...
</pre>
<p>
+In the final output, the inline reference becomes a link to the
+reference item later in the document:
+</p>
+<pre>
+&lt;p&gt;Example of an inline reference [&lt;a href="#ref1"&gt;1&lt;/a&gt;].
+&lt;/p&gt;
+&lt;ol class="reflist"&gt;
+&lt;li value="1" id="ref1"&gt;The quick brown fox ...
+&lt;/li&gt;
+&lt;/ol&gt;
+</pre>
+<p>
For more information about references, see <i>Reference lists</i> below.
</p>
<hr/>
<h3>Hyperlinks</h3>
<p>
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.
+reference refers to a reference containing a single link, the inline
+reference points directly to that link, rather than at the reference.
</p>
<pre>
-It is available for download [2].
+It is available for download [1].
- [2] v1.tgz
+ [1] &lt;./v1.tgz&gt;
</pre>
<p>
The above example translates to the following HTML:
</p>
<pre>
-&lt;p&gt;It is available for download (&lt;a href="v1.tgz"&gt;link&lt;/a&gt;).
+&lt;p&gt;It is available for download [&lt;a href="./v1.tgz"&gt;1&lt;/a&gt;].
&lt;/p&gt;
+&lt;ol class="reflist"&gt;
+&lt;li value="1" id="ref1"&gt;&lt;a href="./v1.tgz"&gt;./v1.tgz&lt;/a&gt;
+&lt;/li&gt;
+&lt;/ol&gt;
</pre>
-<p>
-The default link text ("link") can be changed by setting
-the <tt>linktext</tt> environment variable.
-</p>
<hr/>
<h2>Block-level formatting</h2>
<ul>
@@ -168,19 +178,16 @@ See footnote [1].
</pre>
<p>
<b>Note:</b> There is a special type of reference list item called a
-<i>hyperlink reference</i>. It contains only a single word,
-without whitespace:
+<i>hyperlink reference</i>. It contains only a single link:
</p>
<pre>
- [1] http://example.com
+ [1] &lt;http://example.com&gt;
</pre>
<p>
-Hyperlink reference items are removed in the final output,
-but you can still reference them inline:
+Hyperlink references behave just like normal references, except
+inline references to them link directly to the link rather than the
+reference item.
</p>
-<pre>
-You can download the file here [1].
-</pre>
<hr/>
<h3>Preformatted blocks</h3>
<p>
@@ -202,3 +209,11 @@ with two lines.
<pre>
This is another paragraph.
</pre>
+<hr/>
+<h2>References</h2>
+<ol class="reflist">
+<li value="1" id="ref1"><a href="../tree/README">../tree/README</a>
+</li><li value="2" id="ref2"><a href="../tree/test.em">../tree/test.em</a>
+</li><li value="3" id="ref3"><a href="../tree/emparse">../tree/emparse</a>
+</li>
+</ol>