bell notificationshomepageloginedit profileclubsdmBox

10.01% popularity   0 Reactions

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 <a id="footnote1" href='footnotes/1.html'>[1]</a>

footnotes/1.html:

Here is a footnote <a href="text.html#footnote1>[..]</a>

For Calibre's HTML to .mobi conversion, what HTML code should I write to use in-line footnotes instead of endnotes?

Thanks


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (1)

Login to follow story

More posts by @Christopher

1 Comments

Sorted by latest first Latest Oldest Best

 

@Annie

10% popularity   0 Reactions

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"
<html>
<head>
<title>HDN is the best</title>
</head>

<body>
<h1>Best of HDN</h1>
<p><sup><a id='fs-1' href='#ft-1'>[1]</a></sup> HDN is the best</p>
<p><sup><a id='fs-2' href='#ft-2'>[2]</a></sup> HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>
<p>HDN is the best</p>

<h1>Footnotes</h1><br>
<sup><a id='ft-1' href='#fs-1'>[1]</a></sup> It's true.<br>
<sup><a id='ft-2' href='#fs-2'>[2]</a></sup> It's double true.<br>

</body>
</html>

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:tempTempMiscHDN is the best.html" "E:tempTempMiscHDN is the best.mobi" --toc-threshold 0

location of ebook-convert.exe is .[Your installed Calibre folder]Calibreebook-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.


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

 

Back to top