Sometimes in nonfiction writing, we need to add footnotes. We can easily add footnotes using AsciiDoc plain text.

AsciiDoc is nice because it frees the author from having to worry about a numbering scheme for footnotes. AsciiDoctor renders the footnote number references automatically.

Footnotes Used Only One Time

Let’s look at a footnote example in AsciiDoc.

footnote:[Your footnote text goes here.]

It is okay if your footnote text spans multiple lines.

How to Add Footnotes
  1. Add the key word "footnote".

  2. Add a colon ":".

  3. Add square brackets.

  4. Type your footnote text into the square brackets.

  5. Render your AsciiDoc to HTML if you’d like to see that the footnote rendered as you expected.

  6. Look at the bottom of the page on PDFs or at the end of the book in HTML to find your footnote text.

Here is a correct footnote example.[1] Follow the footnote reference to confirm it works.

Here is an incorrect footnote example.footnote[An example footnote only] where I forgot to use the colon after the footnote keyword.

If you combine the key word, the colon, and the square brackets, it works every time.

See [footnoteProblems] for an example of how to recover from a typical mistake.

Footnotes Used Multiple Times

Sometimes you need to use a footnote that may be referenced multiple times. To avoid the rendering app from adding the same note over and over in the footnotes section, AsciiDoc provides a way that when a reference must be repeated the footnote indicator can be repeated in the text without repeating the footnote itself.

Tip
Consult your style guide to determine how many pages of content can go by before the first reference is too far away and a new footnote better serves the reader.

Let’s say I’m using a bullet list where I need to provide attribution to two different list items. Here is how I could do that in AsciiDoc.

* list item so and so footnoteref:[Washington, Used by permission from John T. Washington.] (1)
* list item thus and thus
* list item next
* list item next after that footnoteref:[Washington] (2)
  1. The first time uses the footnoteref key word, and it uses a code you make up and a comma separator before your footnote content.

  2. The second or more times also uses the footnoteref key word, but it only shows the code you made up in the first instance.

Caution
The code you make up for multiple footnotes must match each time you reference the initial footnote.
Caution
When using multiple footnotes, the first instance must include the footnote content. If later you add another instance above the one with the content (see callout 1 in the preceding example), then you have to move the full multiple footnote to a location before the other multiple references.

For example, the wrong way is shown in the following example.

* My new list item added after the other footnotes footnoteref:[Washington] (1)
* list item so and so footnoteref:[Washington, Used by permission from John T. Washington.] (2)
* list item thus and thus
* list item next
* list item next after that footnoteref:[Washington] (3)
  1. The multiple footnote reference I added later is now broken because it is before the first use with the footnote content in line 2.

  2. This full multiple footnote instance has to come before all the other references.

  3. This instance will still work because it is below the full version in line 2.


1. An example footnote only
Image

Line By Line

Here a Little, There a Little, Layer by Layer.

Back to Overview