mkdocs-material/docs/extensions/footnotes.md
2016-10-30 10:36:18 +01:00

2.3 KiB

Footnotes

Footnotes is another extension included in the standard Markdown library. As the name says, it adds the ability to add footnotes to your documentation.

Installation

Add the following lines to your mkdocs.yml:

markdown_extensions:
  - footnotes

Usage

The markup for footnotes is similar to the standard Markdown markup for links. A reference is inserted in the text, which can then be defined at any point in the document.

Inserting the reference

The footnote reference is enclosed in square brackets and starts with a caret, followed by an arbitrary label which may contain numeric identifiers [1, 2, 3, ...] or names [Granovetter et al. 1998]. The rendered references are always consecutive superscripted numbers.

Example:

Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]

Result:

Lorem ipsum1 dolor sit amet, consectetur adipiscing elit.2

Inserting the content

The footnote content is also initiated with a label, which must match the label used for the footnote reference. It can be inserted at an arbitrary position in the document and is always rendered at the bottom of the page. Furthermore, a backlink is automatically added to the footnote reference.

on a single line

Short statements can be written on the same line.

Example:

[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Result:

Jump to footnote at the bottom of the page

on multiple lines

Paragraphs should be written on the next line. As with all Markdown blocks, the content must be indented by four spaces.

Example:

[^2]:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
    nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
    massa, nec semper lorem quam in massa.

Result:

Jump to footnote at the bottom of the page


  1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ↩︎

  2. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa. ↩︎