Answers.Body: <p>I've figured it out. To make the inline footnote works, must put the footnotes in the &quot;Footnotes&quot; section. Here is the example:</p>
  <p>I have the file: &quot;HDN is the best.html&quot;</p>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;HDN is the best&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;h1&gt;Best of HDN&lt;/h1&gt;
  &lt;p&gt;&lt;sup&gt;&lt;a id='fs-1' href='#ft-1'&gt;[1]&lt;/a&gt;&lt;/sup&gt; HDN is the best&lt;/p&gt;
  &lt;p&gt;&lt;sup&gt;&lt;a id='fs-2' href='#ft-2'&gt;[2]&lt;/a&gt;&lt;/sup&gt; HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  &lt;p&gt;HDN is the best&lt;/p&gt;
  
  &lt;h1&gt;Footnotes&lt;/h1&gt;&lt;br&gt;
  &lt;sup&gt;&lt;a id='ft-1' href='#fs-1'&gt;[1]&lt;/a&gt;&lt;/sup&gt; It's true.&lt;br&gt;
  &lt;sup&gt;&lt;a id='ft-2' href='#fs-2'&gt;[2]&lt;/a&gt;&lt;/sup&gt; It's double true.&lt;br&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>There, just convert the file &quot;HDN is the best.html&quot; and see for yourself.</p>
  <p>Now here is the tip: when you convert this file &quot;HDN is the best.html&quot; to mobi file, Calibre may count footnotes as chapters, that'd be a mess for your table of content. So you need to prevent Calibre from doing this by using the cmd (using the option <code>--toc-threshold 0</code>) instead of using UI, here is the cmd:</p>
  <pre><code>ebook-convert.exe &quot;E:\temp\TempMisc\HDN is the best.html&quot; &quot;E:\temp\TempMisc\HDN is the best.mobi&quot; --toc-threshold 0
  </code></pre>
  <p>location of ebook-convert.exe is <code>.\[Your installed Calibre folder]\Calibre\ebook-convert.exe</code></p>
  <p>Note: this tested and work on my Kindle Paperwhite (second generation), but doesn't work on Kindle app for my iPhone. But it's good enough for me because I read mainly on Kindle Paperwhite.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-21T04:19:38.190Z
Answers.Text: For further discussion, go to: https://www.mobileread.com/forums/showthread.php?t=333269
Answers.UserDisplayName: 123iamking
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-17T15:51:37.857Z
Answers.LastActivityDate: 2020-09-18T06:21:18.957Z
Answers.LastEditDate: 2020-09-18T06:21:18.957Z
Answers.UserDisplayName: 123iamking
Body: <p>I'm generating html code that I convert to <code>.mobi</code> format using Calibre.  I have implemented endnotes with backlinks as follows:</p>
  
  <p>text.html:</p>
  
  <pre><code>this is some text &lt;a id="footnote1" href='footnotes/1.html'&gt;[1]&lt;/a&gt;
  </code></pre>
  
  <p>footnotes/1.html:</p>
  
  <pre><code>Here is a footnote &lt;a href="text.html#footnote1&gt;[..]&lt;/a&gt;
  </code></pre>
  
  <p>For Calibre's HTML to <code>.mobi</code> conversion, <strong>what HTML code should I write to use in-line footnotes instead of endnotes?</strong></p>
  
  <p>Thanks</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-21T18:21:27.097Z
Comments.Text: Is there a reason every footnote is in its own separate file? Why not have all footnotes in a single file and link to the footnote like this: `href='fnfile.html#fn1'`?
Comments.UserDisplayName: Bulrush
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-22T21:52:59.960Z
Comments.Text: i'll consider it thanks.  do you know how to display inline footnotes?
Comments.UserDisplayName: Walrus the Cat
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-23T11:42:49.157Z
Comments.Text: Sorry I do not use Calibre. I write in MultiMarkdown and convert that to an EPUB.
Comments.UserDisplayName: Bulrush
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-23T18:01:47.883Z
Comments.Text: can you link a guide?
Comments.UserDisplayName: Walrus the Cat
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-25T11:10:04.630Z
Comments.Text: This is a real quick inline footnote how-to. http://pastebin.com/CvNxSJer. Once you click on the footnote in the text, it will take you to the footnote itself. Hit the browser BACK button to go back to the actual text you were reading.
Comments.UserDisplayName: Bulrush
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-26T16:02:57.190Z
Comments.Text: Thanks, but mine already does that.  I'm looking for the standard Kindle-style footnote experience.
Comments.UserDisplayName: Walrus the Cat
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-11T03:21:22.127Z
Comments.Text: Hi @WalrustheCat, I have the same problem, did you find the solution?
Comments.UserDisplayName: 123iamking
Tags: <calibre><mobi><html><footnotes>
Title: writing inline footnotes for html to mobi conversion using calibre
UserDisplayName: Walrus the Cat
ThreadText: # writing inline footnotes for html to mobi conversion using calibre
  
  (Asked by: username_0 on 2016-04-12)
  
  I'm generating html code that I convert to .mobi format using Calibre.  I have implemented endnotes with backlinks as follows:
  text.html:
  this is some text [1]
  
  footnotes/1.html:
  Here is a footnote <a href="text.html#footnote1>[..]
  
  For Calibre's HTML to .mobi conversion, what HTML code should I write to use in-line footnotes instead of endnotes?
  Thanks
  
  **Tags:** calibre, mobi, html, footnotes
  
  > **Comments:**
  > **username_1**: Is there a reason every footnote is in its own separate file? Why not have all footnotes in a single file and link to the footnote like this: `href='fnfile.html#fn1'`?  
  > **username_0**: i'll consider it thanks.  do you know how to display inline footnotes?  
  > **username_1**: Sorry I do not use Calibre. I write in MultiMarkdown and convert that to an EPUB.  
  > **username_0**: can you link a guide?  
  > **username_1**: This is a real quick inline footnote how-to. http://pastebin.com/CvNxSJer. Once you click on the footnote in the text, it will take you to the footnote itself. Hit the browser BACK button to go back to the actual text you were reading.  
  > **username_0**: Thanks, but mine already does that.  I'm looking for the standard Kindle-style footnote experience.  
  > **username_2**: Hi @WalrustheCat, I have the same problem, did you find the solution?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-09-17. Score: 2 | Accepted answer
  
  I've figured it out. To make the inline footnote works, must put the footnotes in the "Footnotes" section. Here is the example:
  I have the file: "HDN is the best.html"
  
  
      HDN is the best
  
  
  
  Best of HDN
  [1] HDN is the best
  [2] HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  HDN is the best
  
  Footnotes
  [1] It's true.
  [2] It's double true.
  
  
  
  
  There, just convert the file "HDN is the best.html" and see for yourself.
  Now here is the tip: when you convert this file "HDN is the best.html" to mobi file, Calibre may count footnotes as chapters, that'd be a mess for your table of content. So you need to prevent Calibre from doing this by using the cmd (using the option --toc-threshold 0) instead of using UI, here is the cmd:
  ebook-convert.exe "E:\temp\TempMisc\HDN is the best.html" "E:\temp\TempMisc\HDN is the best.mobi" --toc-threshold 0
  
  location of ebook-convert.exe is .\[Your installed Calibre folder]\Calibre\ebook-convert.exe
  Note: this tested and work on my Kindle Paperwhite (second generation), but doesn't work on Kindle app for my iPhone. But it's good enough for me because I read mainly on Kindle Paperwhite.
  
  > **Comments:**
  > **username_2**: For further discussion, go to: https://www.mobileread.com/forums/showthread.php?t=333269  
  
  ---
  
  