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?
Here is the footnote
.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.