Answers.Body: <p>When I put pagebreak elements between the footnotes, the two-footnotes-in-one problem on my paperwhite goes away.</p>
  
  <p>The footnote section of my <code>ch001.xhtml</code> file (generated by Kindlegen) looks like this:</p>
  
  <pre><code>&lt;section class="footnotes"&gt;
  &lt;hr /&gt;
  &lt;ol&gt;
  &lt;li id="fn1" epub:type="footnote"&gt;&lt;p&gt;Here is the text of a footnote&lt;a href="#fnref1"&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
  &lt;p style="page-break-before: always"&gt;&lt;/p&gt;
  &lt;li id="fn2" epub:type="footnote"&gt;&lt;p&gt;Here is text of another footnote&lt;a href="#fnref2"&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
  &lt;p style="page-break-before: always"&gt;&lt;/p&gt;
  
  and so on...
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-20T12:51:45.087Z
Answers.LastActivityDate: 2019-06-20T12:51:45.087Z
Answers.UserDisplayName: dagreis
Body: <p>I try to use ePub formatting as below. This is based on the output of the pandoc tool.</p>
  
  <pre><code>&lt;div id="chapter-two" class="section level1"&gt;
  &lt;h1&gt;Chapter Two&lt;/h1&gt;
  &lt;p&gt;Chapter two has just begun.&lt;/p&gt;
  &lt;p&gt;Here is a footnote reference,&lt;a href="#fn1" class="footnoteRef" id="fnref1"&gt;1&lt;/a&gt; and another.&lt;a href="#fn2" class="footnoteRef" id="fnref2"&gt;2&lt;/a&gt;&lt;/p&gt;
  &lt;p&gt;This paragraph won't be part of the note, because it isn't indented.&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class="footnotes"&gt;
  &lt;hr /&gt;
  &lt;ol&gt;
  &lt;li id="fn1"&gt;&lt;p&gt;Here is the footnote.&lt;a href="#fnref1"&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
  &lt;li id="fn2"&gt;&lt;p&gt;Here's one with multiple blocks.&lt;/p&gt;
  &lt;p&gt;Subsequent paragraphs are indented to show that they belong to the previous footnote.&lt;/p&gt;
  &lt;pre&gt;&lt;code&gt;{ some.code }&lt;/code&gt;&lt;/pre&gt;
  &lt;p&gt;The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.&lt;a href="#fnref2"&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
  &lt;/ol&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>What's the correct markup for endnotes that does not string together consecutive endnotes in this way?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-26T02:14:03.737Z
Comments.Text: 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. https://ebooks.stackexchange.com/questions/5966/footnote-as-popup-in-epub
Comments.UserDisplayName: idiotprogrammer
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-26T09:03:05.593Z
Comments.Text: @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`.
Comments.UserDisplayName: amoe
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-26T12:50:08.187Z
Comments.Text: 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.
Comments.UserDisplayName: idiotprogrammer
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-29T17:55:46.743Z
Comments.Text: 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.
Comments.UserDisplayName: amoe
Tags: <kindle><epub><kindle-paperwhite><kindlegen>
Title: Endnote formatting when using epub and kindlegen
UserDisplayName: amoe
ThreadText: # Endnote formatting when using epub and kindlegen
  
  (Asked by: username_0 on 2017-06-25)
  
  I try to use ePub formatting as below. This is based on the output of the pandoc tool.
  
  Chapter Two
  Chapter two has just begun.
  Here is a footnote reference,1 and another.2
  This paragraph won't be part of the note, because it isn't indented.
  
  
  
  
  Here is the footnote.↩
  Here's one with multiple blocks.
  Subsequent paragraphs are indented to show that they belong to the previous footnote.
  { some.code }
  The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.↩
  
  
  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?
  
  **Tags:** kindle, epub, kindle-paperwhite, kindlegen
  
  > **Comments:**
  > **username_1**: 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. https://ebooks.stackexchange.com/questions/5966/footnote-as-popup-in-epub  
  > **username_0**: @username_1 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`.  
  > **username_1**: 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.  
  > **username_0**: 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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-06-20. Score: 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:
  
  
  
  Here is the text of a footnote↩
  
  Here is text of another footnote↩
  
  
  and so on...
  
  
  ---
  
  