Footnotes - triplecanopy/b-ber GitHub Wiki
Footnotes should be placed at the end of the markdown file where the footnote needs to be included. During build, b-ber collects the notes, puts them in a notes.xhtml file, and links them appropriately.
<!-- my-project.md -->
Here is some text.[^1] Here is some more text.[^2]
[^1]: Here is the text for footnote one.
[^2]: Here is the text for footnote two.<!-- my-project.xhtml -->
<p>Here is some text.<a epub:type="noteref" class="footnote-ref" href="notes.xhtml#fn1" id="fnref1">1</a> Here is some
more text.<a epub:type="noteref" class="footnote-ref" href="notes.xhtml#fn2" id="fnref2">2</a></p><!-- notes.xhtml -->
<ol class="footnotes">
<li class="footnote" epub:type="footnote" id="fn1">
<p>Here is the text for footnote one.<span hidden="hidden" class="hidden-backlink"><a
href="my-project.xhtml#fnref1">↵</a></span></p>
</li>
<li class="footnote" epub:type="footnote" id="fn2">
<p>Here is the text for footnote two.<span hidden="hidden" class="hidden-backlink"><a
href="my-project.xhtml#fnref2">↵</a></span></p>
</li>
</ol>Given the following markdown document,
This is a[^1] sentence
[^1]: ibid
- in
This is a[^1] sentence,[^1]is the reference - in
[^1]: ibid,[^1]:is the footnote
Footnotes rendering can be controlled by using the group_footnotes option in the config.yml. The default setting group_footnotes: false will create a new section for each chapter, and the numbering will restart at 1. group_footnotes: true will not reset the footnote counter on every chapter.
- Footnotes must be in the same document as their references.
- A
notes.xhtmlpage is automatically generated when runningbber build. - All footnotes will appear in
notes.xhtmlunder the chapter heading where their references appear. - All footnotes in
notes.xhtmlwill have a link back to their references.bber builddoes this automatically. -
notes.xhtmlwill be given the attributelinear="no"in thecontent.opf, so that it is hidden from the regular flow of an EPUB. Please note:notes.xhtmlwill appear in the regular flow of the Mobi, since Mobi does not supportlinear="no". - Clicking on a reference in a Mobi file, or an EPUB file if this behavior is supported in the reading software, will open a small modal window with the footnote.
-
notes.xhtmlshould not appear in the table of contents.