View Single Post
Old 01-10-2014, 03:31 AM   #1
Kamikuza
Connoisseur
Kamikuza began at the beginning.
 
Posts: 62
Karma: 10
Join Date: May 2011
Location: Japan
Device: Kindle3
Inline footnotes - solved?

Stumbled across this on a book I updated to epub... and finally got it sorted today.

using sigil to edit the epub, and KindlePreview to convert to .mobi

The trick seems to be:
1. have a file called "footnotes.xhtml" (but I don't know if you can get away with just .htm or .html and I can't be bothered testing... and I'm not even sure if the name "footnotes" is vital )
2. have a link in your text (duh)

and finally, the key to getting it displayed nicely...
3. start each footnote with a link, with something in the link!*

So-ooo... here's how I like to do it...

Code:
chapter01.xhtml...
<p>It was a dark and stormy night<a href="../Text/footnotes.xhtml#fn01" id="ft01**">[1]</a> but that was just the beginning<a href="../Text_footnotes.xhtml#fn02" id="ft02">[2]</a>.</p>

and then

footnotes.xhtml...
<p><a href="../Text/chapter01.xhtml#ft01">^</a> It's always a dark and stormy night.</p>
<p><a href="../Text/chapter01.xhtml#ft02">^</a> Actually, it's the end.</p>
You'll get everything in the pop-up from each <a... to the next <a. e.g.
Code:
^ It's always a dark and stormy night.
I use the carat (^) for style but you should have something to click, in the event the device doesn't support pop-ups and as I said you gotta have something in the link.

* If you DON'T put a character in the link in the footnotes page e.g. <a href="BLAH"></a> you will NOT get a pop-up but WILL got straight to the footnotes page link... could be useful if you want to skip the pop-up...
** Seems like you can put the "id" in either the anchor tag <p> or the <a>...

I like to use ordered lists for the footnotes, so you get nice numbering and layout and yet, the pop-up is clean. Shame about needing a character in the link though... especially if you like to add "Click here to return to text" or something, cos that'll look sucky.

Well, FWIW - I hope it helps someone!
Kamikuza is offline   Reply With Quote