TransWikia.com

Endnote formatting when using epub and kindlegen

Ebooks Asked by amoe on September 26, 2021

I try to use ePub formatting as below. This is based on the output of the pandoc tool.

<div id="chapter-two" class="section level1">
<h1>Chapter Two</h1>
<p>Chapter two has just begun.</p>
<p>Here is a footnote reference,<a href="#fn1" class="footnoteRef" id="fnref1">1</a> and another.<a href="#fn2" class="footnoteRef" id="fnref2">2</a></p>
<p>This paragraph won't be part of the note, because it isn't indented.</p>
</div>
<div class="footnotes">
<hr />
<ol>
<li id="fn1"><p>Here is the footnote.<a href="#fnref1">↩</a></p></li>
<li id="fn2"><p>Here's one with multiple blocks.</p>
<p>Subsequent paragraphs are indented to show that they belong to the previous footnote.</p>
<pre><code>{ some.code }</code></pre>
<p>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.<a href="#fnref2">↩</a></p></li>
</ol>

When I use kindlegen to produce a .mobi file, and view it on my Paperwhite, the endnote pops up, which is good. But the contents of the second endnote is also displayed, after the content of the first. It seems that the device does not realize that the first endnote has finished.

What’s the correct markup for endnotes that does not string together consecutive endnotes in this way?

One Answer

When I put pagebreak elements between the footnotes, the two-footnotes-in-one problem on my paperwhite goes away.

The footnote section of my ch001.xhtml file (generated by Kindlegen) looks like this:

<section class="footnotes">
<hr />
<ol>
<li id="fn1" epub:type="footnote"><p>Here is the text of a footnote<a href="#fnref1">↩</a></p></li>
<p style="page-break-before: always"></p>
<li id="fn2" epub:type="footnote"><p>Here is text of another footnote<a href="#fnref2">↩</a></p></li>
<p style="page-break-before: always"></p>

and so on...

Answered by dagreis on September 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP