]> Lady’s Gitweb - LesML/blobdiff - README.markdown
Improve/adjust note/sectioning elements
[LesML] / README.markdown
index ac2d0dc5b89facc1fbea5275baed244f33140145..99ff8badb8b838699e8e8ba0928287fbd636050c 100644 (file)
@@ -60,7 +60,8 @@ The lines, minus this leading, are then re‐analysed.
 Bracketed paragraphs which end quotes are treated as captions
   (`<html:figcaption>`); otherwise, they are footers (`<html:footer>`).
 
-Non·empty paragraphs are classified as follows :⁠—
+Non·empty paragraphs (which, to be clear, may still result in empty
+  `<html:p>` elements) are classified as follows :⁠—
 
 - If the paragraph consists of only the following section‐break
     characters, plus any amount of white·space, then it is
@@ -113,9 +114,9 @@ Non·empty paragraphs are classified as follows :⁠—
 - Otherwise, the paragraph is ordinary.
 
 After this classification, each ordinary paragraph is further
-  classified by type based on its first character (which is must be
-  followed by white·space, a pilcrow, or else the only thing on the
-  line) :⁠—
+  classified by type based on its first character (which must be
+  followed by white·space or a pilcrow, or else be the only thing on
+  the line) :⁠—
 
 - If the paragraph is preformatted, it is an ordinary paragraph.
 
@@ -132,52 +133,70 @@ After this classification, each ordinary paragraph is further
     (`<html:h4>`).
 
 - If the paragraph begins with `•` or `🔢`, it is a primary unordered
-    or ordered list item (`<html:li class="unordered" data-level="1">`
-    or `<html:li class="ordered" data-level="1">`).
+    or ordered list item (`<html:li class="unordered" aria-level="1">`
+    or `<html:li class="ordered" aria-level="1">`).
 
 - If the paragraph begins with `◦` or `🔠`, it is a secondary unordered
-    or ordered list item (`<html:li class="unordered" data-level="2">`
-    or `<html:li class="ordered" data-level="2">`).
+    or ordered list item (`<html:li class="unordered" aria-level="2">`
+    or `<html:li class="ordered" aria-level="2">`).
   Secondary list items are considered to be nested inside of primary
     list items which precede them.
 
 - If the paragraph begins with `▪` or `🔡`, it is a tertiary unordered
-    or ordered list item (`<html:li class="unordered" data-level="3">`
-    or `<html:li class="ordered" data-level="3">`).
+    or ordered list item (`<html:li class="unordered" aria-level="3">`
+    or `<html:li class="ordered" aria-level="3">`).
   Tertiary list items are considered to be nested inside of primary
     and secondary list items which precede them.
 
 - If the paragraph begins with `⁃` or `🔣`, it is a quaternary
     unordered or ordered list item
-    (`<html:li class="unordered" data-level="4">` or
-    `<html:li class="ordered" data-level="4">`).
+    (`<html:li class="unordered" aria-level="4">` or
+    `<html:li class="ordered" aria-level="4">`).
   Quaternary list items are considered to be nested inside of primary,
     secondary, and tertiary list items which precede them.
 
 - If the paragraph begins with `※`, it is an ordinary note
-    (`<html:div role="note" class="note">`).
+    (`<html:section role="note" class="note">`).
 
 - If the paragraph begins with `☡`, it is a cautionary note
-    (`<html:div role="note" class="caution">`).
-
-- If the paragraph begins with `🛈`, it is an informative note
-    (`<html:div role="note" class="info">`).
+    (`<html:section role="note" class="caution">`).
 
 - If the paragraph begins with `⯑`, it is a questioning note
-    (`<html:div role="note" class="query">`).
+    (`<html:section role="note" class="query">`).
+
+- If the paragraph begins with `@`, it is an abstract
+    (`<html:section role="doc-abstract">`).
+
+- If the paragraph begins with `🛈`, it is a (informative) tip
+    (`<html:section role="doc-tip">`).
+
+- If the paragraph begins with `⚠︎`, it is a (warning) notice
+    (`<html:section role="doc-notice">`).
 
-- If the paragraph begins with `⚠︎`, it is a warning note
-    (`<html:div role="note" class="warn">`).
+- If the paragraph begins with `^`, it is a footnote
+    (`<html:li class="ordered footnote" aria-level="1">`).
+  Footnotes are ignored unless their first paragraph has an i·d
+    (specified with `¶`) which is referenced by one or more footnote
+    references.
+  Footnotes are treated as level 1 ordered list items, so they can
+    contain nested lists.
+
+  Footnotes are removed from the normal document flow and placed in a
+    footer (`<html:section role="doc-endnotes">`) in order of first
+    reference.
+  It is recommended that the i·d¦s you choose are kept stable, so that
+    links to footnotes do not break.
 
 - If the paragraph begins with `#`, it is a comment.
   Comments produce X·M·L comment nodes and can be used to break up list
     items into separate lists.
 
 - If the paragraph begins with `⋯`, it is a continuation paragraph.
-  Continuation paragraphs may be used to continue a preceding div or
-    list item.
-  If there is no such preceding div or list item, they will attach to
-    adjacent heading elements to form heading groups (`<html:hgroup>`).
+  Continuation paragraphs may be used to continue a preceding note,
+    footnote, or list item.
+  If there is no such preceding note, footnote, or list item, they will
+    attach to adjacent heading elements to form heading groups
+    (`<html:hgroup>`).
   Otherwise, they will be treated as ordinary paragraphs.
 
 - Otherwise, it is an ordinary paragraph.
@@ -189,6 +208,17 @@ The characters following the `¶` give the identifier for the paragraph,
 This may be suffixed with a language tag beginning with `@` and
   terminated with `$`.
 
+When a paragraph produces an `<html:p>` element “wrapped in” another
+  kind of element (e·g, a blockquote, section, or list item), the
+  identifier and language of the first paragraph are applied to the
+  wrapping element.
+If the first paragraph has no other contents, it is deleted.
+To apply the identifier or language to the `<html:p>` element itself,
+  and not its wrapper, one can simply make the first paragraph empty
+  (using a literal `¶` with no other contents).
+This paragraph will be dropped, but the following paragraphs will still
+  be processed as non·initial.
+
 The remaining characters in a paragraph form its contents.
 Markup within paragraphs is delimited with·out exception by pairs of
   characters, with the following precedence :⁠—
@@ -242,14 +272,21 @@ Markup within paragraphs is delimited with·out exception by pairs of
 
 - The characters `⹐` and `⹑` indicate emphasis (`<html:em>`).
 
+- The characters `^` and `.` indicate a footnote reference
+    (`<html:a role="doc-noteref">`).
+  The characters between these sigils must match the i·d of the first
+    paragraph of some footnote in the same document.
+
 Once the tree is built as above, it is remediated into its final form
   by the following steps :⁠—
 
 - Continuation paragraphs are joined with the preceding list items or
-    divs.
+    sections.
 
 - List items of a higher level are nested in preceding list items, when
     present.
+  List items of a level greater than 1 can also be nested in preceding
+    sections (notes, abstracts, ⁊·c…).
 
 - Successive list items of the same level and class are joined into
     a single list.
This page took 0.36537 seconds and 4 git commands to generate.