2016-09-02 23:59:14 +03:00
|
|
|
# Footnotes
|
|
|
|
|
2016-12-18 15:29:03 +03:00
|
|
|
[Footnotes][1] is another extension included in the standard Markdown library.
|
2016-10-30 12:36:18 +03:00
|
|
|
As the name says, it adds the ability to add footnotes to your documentation.
|
|
|
|
|
2016-12-18 15:29:03 +03:00
|
|
|
[1]: https://pythonhosted.org/Markdown/extensions/footnotes.html
|
|
|
|
|
2016-10-30 12:36:18 +03:00
|
|
|
## Installation
|
|
|
|
|
|
|
|
Add the following lines to your `mkdocs.yml`:
|
|
|
|
|
|
|
|
``` yaml
|
|
|
|
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:
|
|
|
|
|
|
|
|
``` markdown
|
|
|
|
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
|
|
|
|
```
|
|
|
|
|
|
|
|
Result:
|
|
|
|
|
|
|
|
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
|
|
|
|
|
|
|
|
### Inserting the content
|
|
|
|
|
2017-01-12 22:15:30 +03:00
|
|
|
The footnote content is also declared with a label, which must match the label
|
2016-10-30 12:36:18 +03:00
|
|
|
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:
|
|
|
|
|
|
|
|
``` markdown
|
|
|
|
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
|
|
```
|
|
|
|
|
|
|
|
Result:
|
|
|
|
|
|
|
|
<a href="#fn:1">Jump to footnote at the bottom of the page</a>
|
|
|
|
|
2017-01-03 01:11:32 +03:00
|
|
|
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
2016-10-30 12:36:18 +03:00
|
|
|
|
|
|
|
#### 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:
|
|
|
|
|
|
|
|
``` markdown
|
|
|
|
[^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:
|
|
|
|
|
2017-01-03 01:11:32 +03:00
|
|
|
[^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.
|
2016-10-30 12:36:18 +03:00
|
|
|
|
|
|
|
<a href="#fn:2">Jump to footnote at the bottom of the page</a>
|