Artifact 8bee0450ee49096dcf934465b537bedca2ba81af5ae7d8897e4f76b40dc41d8c:
- File test/markdown-test3.md — part of check-in [92516ced8b] at 2022-02-17 22:09:07 on branch markdown-footnotes — If a footnote's text starts with a token of the special form then use this token to derive a set of CSS classes that are added to that footnote and its references. This enables users to style elements of a particular footnote provided that the administrator provisioned and documented some special CSS classes in a custum skin. Default skin does not provide any of such special classes which makes this feature an "opt-in". (user: george size: 5384)
Markdown Footnotes Test Document
This document should help with testing of footnotes support that
is introduced by the "markdown-footnotes" branch.
It might look pretty misformatted unless rendered by the proper Fossil
executable that incorporates the abovementioned branch.1
That is also a humble attempt to explore the robustness of the Markdown parser.
So please excuse for the mess in the source code of this document.
By no means the normal use of footnotes should look that scarry.
Developers are invited to add test cases here2. It is suggested that the more simple is a test case the earlier it should appear in this document.3
A footnote's label should be case insensitive4, it is whitespace-savvy and can even contain newlines.5
A labeled footnote may be referenced several times6.
A footnote's text should support Markdown markup7.
Another reference6 to the preveously used footnote.
Inline footnotes are supported.8
If undefined label is used9 then red "misref" is emited instead of
a numeric marker.misref
This can be overridden by the skin though.
The refenrence at the end of this sentence is the sole reason of
rendering of lost210.lost1 and
If several labeled footnote definitions have the same equal label then texts from all these definitions are joined.11
Several references should be recognized as several distinct numbers.126
If markup is ambigous between a span-bounded footnote and a "free-standing" footnote followed by another footnote then interpret as the later case. This facilitates the usage in the usual case when several footnotes are refenrenced at the end of a phrase.13614misref
It is possible to provide a list of classes for a particular footnote and all its references. This is achieved by prepending a footnote's text with a special token that starts with dot and ends with colon.15 This feature is "opt-in": there is nothing wrong in starting a footnote's text with a token of that form while not defining any corresponding classes in the stylesheet.16
Footnotes
- ^ Footnotes is a Fossil' extention of Markdown. Your other tools may have limited support for these.
- ^ History of test/markdown-test3.md
- ^ So that simple cases are processed even if a glitch happens for more tricky cases.
- ^ And also tolerate whitespaces.
- ^ But at a footnote's definition it should still be written within square brackets on a single line.
- ^ a b c d Each letter on the left is a back-reference to the place of use. Highlighted back-reference indicates a place from which navigation occurred17.
- ^ E.g. emphasis, and so on. BTW, this note may not have a backreference to the "stray".
- ^
These may be usefull for adding
smallcomments. - ^ For example due to a typo.
- ^ This note was defined in the middle of the document. It references its previous18 and the forthcoming17 siblings.
- ^
- This came from the begining of the document.
- And that came from the end of the document.
- ^ There should be an interval between numbers.
- ^ Which is common in the scientific publications.
- ^ All these four should be parsed as "free-standing" footnotes
- ^
.alpha-Numeric123.EXAMPLE:
This token defines a dot-separated list of CSS classes
which are added to that particular footnote and also to the
corresponding reference(s). Hypens ('-') are also allowed.
Classes from the token are tranformed to lowercase and are prepended
with
"fn-upc-"to avoid collisions. - ^ .unused.classes: In that case text of the footnote just looks like as if no special processing occured.
- ^ a b c This note was defined at the end of the document. It defines an inline note.19
- ^ This note was defined at the begining of the document.
- ^ This is inline note defined inside of a labeled note17.
- ^ a b Misreference
-
[^
i am strayed]This should be presented **verbatim** (without any [markup][^]) in the end of the footnotes. Default skin renders label in red font and the main text in gray. Other styling may also apply. -
[^
another stray]Just to verify the correctness of ordering and styling.