Footnotes

You can add footnotes to your document using the footnote macro (footnote:[]). If you plan to reference a footnote more than once, use the footnote macro with a target (footnote:id[]).

Example 1. Footnote syntax
The hail-and-rainbow protocol can be initiated at five levels:

. doublefootnote:[The double hail-and-rainbow level makes my toes tingle.] (1) (2)
. tertiary
. supernumerary
. supermassive
. apocalyptic

A bold statement!footnote:disclaimer[Opinions are my own.] (3)

Another outrageous statement.footnote:disclaimer[] (4)
1 Insert the footnote macro directly after any punctuation. Note that the footnote macro only uses a single colon (:).
2 Insert the footnote’s content within the square brackets ([]). The text may span several lines.
3 If you plan to reuse a footnote, specify a unique ID in the target position.
4 To reference an existing footnote, you only need to insert the ID in the target slot (leaving the text in the square brackets empty).

The footnotes will be numbered consecutively throughout the article.

The results of Example 1 are displayed below

The hail-and-rainbow protocol can be initiated at five levels

  1. double[1]

  2. tertiary

  3. supernumerary

  4. supermassive

  5. apocalyptic

A bold statement![2]

Another outrageous statement.[2]


1. The double hail-and-rainbow level makes my toes tingle.
2. Opinions are my own.

Externalizing a footnote

Since footnotes are defined using an inline macro, the footnote content ends up right alongside the text it’s annotating, making that text harder to read. You can solve this problem by externalizing your footnotes using document attributes.

Here’s the previous example with the footnotes defined in document attributes and inserted using attribute references. Notice you still get the benefit of seeing where the footnote is placed without all the noise.

Example 2. Externalized footnote
:fn-hail-and-rainbow: footnote:[The double hail-and-rainbow level makes my toes tingle.]
:fn-disclaimer: footnote:disclaimer[Opinions are my own.]

The hail-and-rainbow protocol can be initiated at five levels:

. double{fn-hail-and-rainbow}
. tertiary
. supernumerary
. supermassive
. apocalyptic

A bold statement!{fn-disclaimer}

Another outrageous statement.{fn-disclaimer}

This approach works since attribute references are expanded before footnotes are parsed. The redundant text in the second disclaimer footnote is simply ignored.

You could even simplify the attribute names to fn-1, fn-2, etc. if brevity is your main concern. And once in document attributes, these defintions could even be moved to an included file.

Footnotes in Headings

If you use a footnote in a heading, you’ll likely find that the footnote sequence is wrong. That’s because headings (section titles and discrete headings) get converted out of document order for the purpose of generating IDs and setting up cross references.

To resolve this problem, you must assign an explicit ID and reftext to any heading that contains a footnote. For example:

See <<heading>>.

[[heading,Heading]]
== Headingfootnote:[This is a heading with a footnote]

Not only will this prevent the footnote from being processed out of document order (and thus assigned the wrong number in the sequence), it will also prevent the footnote number from reappearing in the text of an xref.