Footnotes
General
Footnotes are useful for adding remarks to content without distracting from the reading flow.
Metanorma AsciiDoc supports:
-
inline footnotes
-
multi-paragraph footnotes
Note
|
Typical AsciiDoc does not support multi-paragraph footnotes. |
Inline footnotes
Footnotes are added to a document using the footnote command (footnote:[]
).
The syntax is demonstrated as:
Oryza sativafootnote:[Sativa means "cultivated"], is rice that is farmed commercially.
Multi-paragraph footnotes
The multi-paragraph footnote command footnoteblock:[id]
allows for
specification of multi-paragraph content within a
footnote, through a named note block. [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v1.6.4].
The id
is the identifier of a note containing the contents of the footnote.
The following syntax is used:
... footnoteblock:[my-anchor] ... (1)
...
[[my-anchor]] (2)
[NOTE] (3)
--
Multi-paragraph footnote content.
--
-
my-anchor
indicates where the footnote’s text block is located. -
Anchor of the multi-paragraph NOTE block.
-
Defined NOTE block that provides content for the footnote.
This is a paragraph.footnoteblock:[id1] This continues the paragraph.
[[id]]
[NOTE]
--
This is
a multi-paragraph
footnote
--
Note
|
Multi-paragraph footnotes are a Metanorma AsciiDoc feature and not supported in typical AsciiDoc. |
Named footnotes and duplicate footnotes
In some cases, identical footnote content can apply to multiple places. Metanorma AsciiDoc supports named footnotes that facilitate reuse without repeated definitions.
By default, Metanorma already detects whether footnote text is reused. When the text of a footnote is repeated in two different places, the same footnote number in both places, rather than treat the repetition as a new footnote. Assignment of IDs is therefore optional.
Note
|
Duplicated footnote reuse applies to HTML and DOC outputs. |
The following syntax is used:
... footnote:{id}[text] ... (1)
... footnote:{id}[] ... (2)
-
Definition of a named footnote.
{id}
is an assigned unique ID for the footnote, andtext
the footnote content -
To reuse a named footnote, specify the ID but keep the text portion empty.
A bold statement!footnote:disclaimer[Opinions are my own.]
Another outrageous statement.footnote:disclaimer[]
Special footnotes
Table footnotes
Footnotes immediately placed after a table are considered a "table footnote", which renders the footnote at the table footer, within the table.
Table footnotes are numbered separately from normal footnotes.
Figure footnotes
Footnotes immediately placed after a figure are considered a "figure footnote", which renders the footnote at the bottom of the figure.
Figure footnotes are numbered separately from normal footnotes.
Suppressed references in figure footnotes
In some cases, the footnote reference number appears inside the image in a figure,
next to the part of the image that it is intended to explain. If that is the case,
the footnote reference number should not appear separately as text. In order to address
this case, footnotes can be specified to hide their reference number, by prefixing
the footnote text with hiddenref%
[added in https://github.com/metanorma/metanorma-standoc/releases/tag/v3.0.3].
The reference number will still appear in the footnote body.
For instance, if an image already contains footnote reference a):
───────────────▄▄───▐█ a) ───▄▄▄───▄██▄──█▀───█─▄ ─▄██▀█▌─██▄▄──▐█▀▄─▐█▀ ▐█▀▀▌───▄▀▌─▌─█─▌──▌─▌ ▌▀▄─▐──▀▄─▐▄─▐▄▐▄─▐▄─▐▄
we can footnote the image without repeating the a) with the following markup:
[figure]
====
image::evolution.png{blank}footnote:[hiddenref%A depiction of evolution]
====
This will be rendered as:
───────────────▄▄───▐█ a) ───▄▄▄───▄██▄──█▀───█─▄ ─▄██▀█▌─██▄▄──▐█▀▄─▐█▀ ▐█▀▀▌───▄▀▌─▌─█─▌──▌─▌ ▌▀▄─▐──▀▄─▐▄─▐▄▐▄─▐▄─▐▄a) A depiction of evolution
Without the hiddenref%
, the a) would be displayed twice, once inside the figure,
and once added by Metanorma.
Document title footnotes
Footnotes on document titles are recognised [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v1.6.1], but by default they are not rendered, because of how document title pages are processed separately in Metanorma via Liquid templates.
Document title footnotes are moved into
/bibdata/note[@type = "title-footnote"]
,
and are treated as document metadata, as are document titles themselves. The
location of the footnote within the title is not preserved.