1

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?

4
  • By popup, I assume you mean the "aside" element? I just checked and noticed that the ASIDE HTML element is supported on KF8?! (that's news to me!) Shouldn't you be using that element then in your code? Also, this question might help. ebooks.stackexchange.com/questions/5966/… Jun 26, 2017 at 2:14
  • @idiotprogrammer On the Paperwhite, when you activate an endnote reference, a small box pops up from the bottom of the screen displaying the text of the endnote. That's the behaviour I want to get for the text Here is the footnote.
    – amoe
    Jun 26, 2017 at 9:03
  • You should try using the ASIDE element -- that is the EPUB way to solve the problem. (I am so curious that I will try it myself -- although I don't have a Paperwhite to try it out on). Or are you creating the popup just with css? I seem to recall another case where someone who tried what you were trying experienced the same thing happening; that is why I am not optimistic. Jun 26, 2017 at 12:50
  • I wasn't using CSS. Using aside doesn't work -- it will just jump to the relevant endnote in this case, without activating the popup at all. Would be interested to know if there's a known solution to this.
    – amoe
    Jun 29, 2017 at 17:55

1 Answer 1

0

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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.