12-12-2021, 12:10 PM | #1 |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
Big margins in Kindle footnote pop-up
Hello, I've got a problem with an AZW3 file that I converted from EPUB with calibre to send to my Kindle PW1. It wasn't a well made e-book, so before conversion I opened it with calibre's editor to improve it.
Among the things I modified were the endnotes and although they look good on my pc, they have a big margin on my Paperwhite, but only in the popup view. At the end of the book, with all the notes together, they have the right spacing. This is a sample of the code I used (already converted to AZW3): Code:
<body class="calibre"> <h2 class="notes-title"><em class="calibre4">Note</em></h2> <div class="endnotes"> <div class="endnote"> <p class="note"><a href="part0002.html#note-1" id="endnote-1">1</a> Come venir sotterrato nella sabbia e rimpinzato di uova di scarabeo.</p> </div> </div> </body> Code:
.endnotes { display: block; font-size: 0.8em; margin-top: 4em } .endnote { display: block; margin-bottom: 0.5em } .note { display: block; text-indent: 0; margin: 1em 0 0.2em } Thanks for the help |
12-12-2021, 03:17 PM | #2 |
Grand Sorcerer
Posts: 6,621
Karma: 85000001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
I don’t think it is a bottom margin. It is just that the box displaying the footnote is a fixed size.
|
Advert | |
|
12-12-2021, 03:34 PM | #3 |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
That's not it, I've got other books that show the popup correctly and the box size changes, with both short and long notes (and without any margin). I will check their CSS and change my book accordingly if I don't find a solution, but as far as I can tell my method should work too
Last edited by 413Michele; 12-12-2021 at 04:46 PM. |
12-12-2021, 04:45 PM | #4 |
Grand Sorcerer
Posts: 6,621
Karma: 85000001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
You have a fairly old Kindle that cannot run the latest firmware. I suspect that the results may vary based on Kindle firmware version and file format.
I am curious to learn what you find from examining other books. |
12-12-2021, 05:20 PM | #5 |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
Ok, I did some testing in the file and half the space disappears if I remove the div container for the single note. The other half disappears if I remove the div from the following note (I had ~20 notes in the file that I didn't include in the sample code here). There may remain a very little margin, but I'm not sure.
It would seem that my Kindle's renderer doesn't like a note incapsulated in a div. Removing them would be a bit annoying since I have some notes which are made of 2 paragraphs. Now it's night time where I am, but I'll try other combinations tomorrow |
Advert | |
|
12-12-2021, 06:39 PM | #6 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
|
12-13-2021, 11:24 AM | #7 | |
Bookmaker & Cat Slave
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
12-14-2021, 07:30 AM | #8 | |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
Quote:
The original EPUB formatting was this: Code:
.endnotes { font-size: 0.8em; margin-top: 4em; } .endnote { margin-bottom: 0.5em; } .note { text-indent: 0; margin: 1em 0 0.2em } Last edited by 413Michele; 12-14-2021 at 07:34 AM. |
|
12-14-2021, 11:12 AM | #9 | |||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Code:
<p class="footnote">[1] Blah blah blah.</p> <p>Longer text in footnote 1.</p> <p class="footnote">[2] Blah blah blah.</p> Code:
p.footnote { margin-top: 1em; text-indent: 0; } Side Note: If you still insist on having each individual footnote wrapped... There's other ways of accomplishing this using the actual EPUB3 code, but it gets a little uglier (using <aside> + epub:type="footnote"). See the discussion in 2019: "Epub3 Foot- End-notes" (especially my post #39 + Doitsu's sample EPUB3 I linked to + Doitsu's post #62). Quote:
(Or start with no margin code at all, then start re-introducing them one-by-one.) It has to be some weird interaction between those. Or if it still occurs with no margins, then you know the problem lies elsewhere in the code. Quote:
(Jellby recommended them to me.) Good stuff, good stuff. Last edited by Tex2002ans; 12-14-2021 at 11:16 AM. |
|||
12-15-2021, 01:55 PM | #10 | ||
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
Ok, after a lot of testing I finally found the problem, and I can't believe what it was...
This code causes problems: Code:
<div class="endnote"> <p class="note"><a href="part0002.html#note-1" id="endnote-1">1</a> Come venir sotterrato nella sabbia e rimpinzato di uova di scarabeo.</p> </div> Code:
<div class="endnote"><p class="note"><a href="part0002.html#note-1" id="endnote-1">1</a> Come venir sotterrato nella sabbia e rimpinzato di uova di scarabeo.</p></div> Wrong. Kindle's renderer decided that the spaces and newlines between </p> and </div> are important, and they should be shown as margins. Even only adding spaces causes smaller margins to appear. I don't even know how it occurred to me to try and remove those spaces... Definitely words to live by Quote:
Quote:
Give a man a fire and he's warm for the day. But set fire to him and he's warm for the rest of his life. |
||
12-15-2021, 05:06 PM | #11 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
But it definitely isn't normal. And what happened if you removed that <div class="endnote">? And are you using anything like a "CSS reset" (like Blitz)? (For more information on why that's a horrible idea in ebooks, see the 2021 thread: "Revolutionary code? Need feedback") Quote:
Code:
<p>This is an example.<a href="#fn1" id="ft1">[1]</a></p> <hr /> <p class="footnote"><a href="#ft1" id="fn1">[1]</a> An example footnote.</p> Heuristics should also detect that simple link back/forth, so you'd get popup footnotes across many readers. That's a good one. |
||
12-17-2021, 10:33 AM | #12 | |||
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
Quote:
Quote:
Quote:
|
|||
12-17-2021, 02:02 PM | #13 | |||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
(I described a lot more details back in 2013: "A link to jump back to the original start point?". Just ignore my backwards footnote/endnote description.) Quote:
Chapter 2: Code:
<p>This is an example.<a href="../Text/endnotes.xhtml#fn2.1" id="ft2.1">[1]</a></p> Code:
<p class="footnote"><a href="../Text/Chapter02.xhtml#ft2.1" id="fn2.1">[1]</a> An example footnote.</p> So? I still don't get this argument. This was all discussed/described in the 2013 thread. Just skip your eyes right over the footnotes or press the "next page" button a few times. What the heck do you do while reading a physical book? Quote:
This is partly why EPUB3 introduced all the <aside> + epub:type="footnote" stuff. This would allow readers to set their own preferred settings. (Like, instead of popup footnotes, KOReader allows you to have a footer area that displays at the bottom of your screen.) If you don't want footnotes "in the way", then use an endnotes file. But I think advantages of footnotes >>> endnotes. Last edited by Tex2002ans; 12-17-2021 at 02:05 PM. |
|||
12-17-2021, 02:46 PM | #14 | |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
Quote:
Anyway, You gave me a lot of info to think about. I want to thank you, jhowell and Hitch for all the help you gave me (I'm not tagging as I don't know the etiquette) This forum is incredible, with its shared knowledge and the helpfulness of its members |
|
12-17-2021, 02:48 PM | #15 | ||
Bookmaker & Cat Slave
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Hitch |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issue with footnote pop-up (epub3) | carmenchu | Viewer | 5 | 01-06-2021 04:59 AM |
Paperwhite & footnote pop-ups | eFTy | Kindle Formats | 61 | 04-07-2020 05:33 PM |
How to disable(and handle) the pop-up footnote on e-ink devices? | yasteora | Kobo Developer's Corner | 0 | 05-17-2016 12:07 AM |
Footnote pop-up example | dcmst | ePub | 7 | 09-22-2014 10:33 PM |