10-04-2022, 12:47 PM | #1 |
Addict
Posts: 207
Karma: 340434
Join Date: Dec 2020
Location: Israel
Device: Kobo Libra H2O
|
Footnote inconsistency
I started reading Susanna Clarke's Jonathan Strange & Mr Norrell (kepub, sideloaded) which contains plenty of footnotes of all shapes and sizes. There is rhyme, written in short lines and stanzas. Most are prose, ranging in size from one liners to several pages long, broken up into paragraphs.
The experience of reading them is a bit odd. Most cause a footnote pop-up to appear. A few, however, send the reader to the footnote "chapter" of the book, where in order to return to the book location I need to use the breadcrumb thing at the bottom of the screen. All the footnote pop-ups seem to ignore the paragraph marks and all css styling and show up as a left justified wall of text, yes even the poems, which is pretty terrible. Also, when the content of the pop-up footnote is long, which is pretty common, there's a scroll bar you can use all sorts of gestures to move to the next/previous pate of the footnote, but if I use the physical buttons on my Libra H2O it flips the pages of the book underneath(!) the footnote page, which is very strange. None of this seems to be the book's fault, as far as I could see, using Calibre's built-in editor. Seems to me like a glaring omission on Kobo's part. Or am I missing something? The reader is a bit out of reach at the moment and I'm pretty lazy but I promise I'll post some screenshots of all of this. |
10-04-2022, 01:23 PM | #2 | ||||
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Quote:
Quote:
Quote:
|
||||
Advert | |
|
10-04-2022, 02:01 PM | #3 |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
I've pretty much given up on Kobo's footnotes. If I could even get the same behavior with the same footnote structures, that might be acceptable. But, I really don't know what to expect from any given footnote. I've opened a Issue on that very github site jackie_w linked to:
https://github.com/kobolabs/epub-spec/issues/59 I've written them emails to their support page. I've even commented in some of the bug/wishlist threads here just in case anyone from Kobo ever popped by. No responses from them. That github page doesn't look like it's even been visited by anyone Kobo-related in 7 months (to update the readme). The last time an Issue was closed was over 2 years ago. |
10-05-2022, 04:20 AM | #4 |
Addict
Posts: 207
Karma: 340434
Join Date: Dec 2020
Location: Israel
Device: Kobo Libra H2O
|
Thank you, guys, for your inputs. Indeed, there are no epub:type="footnote" (or should I use "endnote" instead? does it matter?). That may explain why some of the footnotes (they're all collected at the end of the book in one html file, so they're endnotes, aren't they?) don't pop-up.
As for the other stuff - that's somewhat disappointing. As promised, I attached a couple of screenshots demonstrating how bad plain-text footnotes pop-ups can turn out to be. Now I wonder how best to fix this pop-up inconsistency. Here's the html snippet for the footnote in the screenshots, for example: Code:
<a id="ich03fn1" class="calibre7"></a><a class="calibre7" href="part0078.html#ch03fn1"><span class="super"><sup class="calibre10">1</sup></span></a> Code:
<a id="ich03fn1" class="calibre7"></a><a class="calibre7" href="part0078.html#ch03fn1"><span epub:type="endnote" class="super"><sup class="calibre10">1</sup></span></a> Code:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb"> <head> <title>Jonathan Strange & Mr Norrell</title> <link rel="stylesheet" type="text/css" href="../stylesheet.css"/> <link rel="stylesheet" type="text/css" href="../page_styles.css"/> </head> <body epub:type="endnotes" id="2ACBS0-520bab1f111e4f78ab5684198175d09c" class="calibre" > <h2 class="h" id="calibre_pb_0"><a id="foot" class="calibre3"></a><a class="calibre3" href="part0003.html#foot">Notes</a></h2> <h3 class="h2">1 The library at Hurtfew</h3> <p class="footnote"><a id="ch01fn1" class="calibre7"></a><a class="calibre7" href="part0006.html#ich01fn1">1</a> <em class="calibre2">The History and Practice of English Magic</em>, by Jonathan Strange, vol. I, chap. 2, pub. John Murray, London, 1816.</p> Last edited by Colonel Cathcart; 10-05-2022 at 06:07 AM. |
10-05-2022, 10:31 AM | #5 |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
I am not an expert in this. I just dabble. But, the first thing is that I'm pretty sure the epub:type attribute is only for epub3. So, in that book, go to the content.opf file and check that it says version="3.0" up at the top. If not, don't use epub:type attributes (or convert it with Tools > Upgrade Book Internals -- but that will limit where you can use the book to readers supporting epub3).
Next, if you use epub:type attributes, you'll need to add the "http://www.idpf.org/2007/ops" namespace to the files where they are used. So, if you use epub:type in a file, the html line near the top will have to look something like: Code:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en-US" xml:lang="en-US"> As to where the epub:type attributes go, there should be a "noteref" in the <a> element where you refer to the footnote and a "footnote" or "endnote" in the block where the actual footnote is. So, working with what you posted, I'd say the source of the footnote should start with: Code:
<a id="ich03fn1" class="calibre7"></a><a class="calibre7" href="part0078.html#ch03fn1" epub:type="noteref">... Code:
<p class="footnote" epub:type="footnote">... Footnote is at: https://www.w3.org/TR/epub-ssv/#footnote Noteref is at the bottom of this section: https://www.w3.org/TR/epub-ssv/#links I've never used the endnote tag, so even if I've got an endnote "chapter" at the end of the book, I still use the footnote tag in each footnote. As to the structure of the footnotes I see in what you posted, I'm not very happy with that. But, outside of esthetics, I don't think it'll make much difference and I doubt you'll want to re-do the footnotes. But, for reference, up where the footnote is called (in the text of the document), my footnote call looks like: Code:
<a id="fn1" href="#fn1a" epub:type="noteref"><sup>n</sup></a>...</p> I use <aside> tags to block off the actual footnote text, but I'm pretty sure any other type of block (<p>, <div>) will do. In my case, they look like: Code:
<aside id="fn1a" class="footnote" epub:type="footnote"> <p><a href="#fn1"><sup>n</sup></a>.thenote.</p> </aside> Then an <a> tag with the return address of the calling source which is applied to a superscripted note number (and its closing </a>). Then, the actual note. And, finally, the closing <aside> (or whatever) tag. A couple of totally extraneous comments. First, the id attached to the <body> in what you posted starts with a digit. I'm pretty sure they can't start with a digit and Calibre will complain about that. Run, Tools > Check Book to confirm that. I'm pretty sure the Calibre editor will find and fix that. Second, I'm not sure how the forum mods will react to those screenshots of the actual book text. I'd think that one tiny bit of text would fall under fair use. But, they might complain. |
Advert | |
|
10-05-2022, 11:08 AM | #6 |
Addict
Posts: 207
Karma: 340434
Join Date: Dec 2020
Location: Israel
Device: Kobo Libra H2O
|
Thank you, enuddleyarbl. Yes, noteref, not footnote. I looked at the w3 page before but the lack of examples and knowledge on my part led to my confusion. Was also wondering about epub2/epub3 and how to tell what my book version was (epub2, unfortunately) - thank you for clearing that up as well.
|
10-05-2022, 12:22 PM | #7 | |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
The epub2 shouldn't be a problem. From what I've read, I believe that as long as the footnotes have their "there and back again" ids and hrefs, and the actual footnote text is less than 5,000 characters long, then the reader should be smart enough to pop up the footnote windows.
EDIT: Here are the actual popup requirements from that Kobo page jackie_w referenced: Quote:
The epub:type attributes are just supposed to make things more sure. If the popup doesn't happen, you should theoretically be able to just follow the links both ways. But, as you've found out, footnotes on Kobos don't always seem to do what they're supposed to do. Last edited by enuddleyarbl; 10-05-2022 at 04:19 PM. |
|
10-05-2022, 12:28 PM | #8 |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Oops. I just noticed my href= tags in what I posted earlier are for ids local to that file. If there aren't too many footnotes, I usually pull them up so that the actual footnote is just below the paragraph where they're called. So, I can get away with href="#fnnumber". If your actual footnotes are in another file/chapter, then your hrefs should look like href="filename#fnnumber". Once you start typing after the initial quote mark, the Calibre editor should just pop up likely candidates that you can click on with your mouse.
|
10-05-2022, 12:36 PM | #9 |
Addict
Posts: 207
Karma: 340434
Join Date: Dec 2020
Location: Israel
Device: Kobo Libra H2O
|
No worries, I think I get it. Yes, my intention is just to sort out the issue of some pop-up footnotes not popping up.
Footnotes are in abundance in this rather large tome of a book, so I'll probably resort to some clever global search&replace to make all those changes after converting to epub3. Oh, a couple of question I forgot to ask: I convert to kepub. I think this will be the 1st epub3 -> kepub I do. all those epub:type="..." thingies will survive the conversion, right? Lastly, Calibre can handle multiple formats for the same book. So can I keep the original and the modified version in my library under the same entry, right? When I send the book to the device, which one will it pick (and convert) to kepub? Last edited by Colonel Cathcart; 10-05-2022 at 12:42 PM. |
10-05-2022, 12:50 PM | #10 |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
I grabbed a copy of "Jonathan Strange and Mr Norrell" from my library via Overdrive and, off-hand, except for what they've done with footnotes on the chapter names (it's just something new to me), it looks like most things should be fine with it.
I can see some of the footnotes are long, so they might not get a popup. But, they do all have to/from id/hrefs, so navigating should work simply as links. I see some of the poems you mentioned and I worry about them. They do have formatting classes applied to the lines, but each line is a <p> and the initial link to the footnote is also a <p> and I'm pretty sure that first line is where the footnote officially ends. So, I'd guess that the popup for that will only show the first line. Of course, since I've seen the footnote text in the popup windows just continue on until an <hr/> or new chapter mark (instead of ending with the closing footnote block tag), I could very well be wrong about that. I think I'd try changing the first <p> there to a <div> and including all the poem <p> lines inside the <div></div> pair. |
10-05-2022, 01:22 PM | #11 |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Scanning the book on my Forma and looking at some of the footnotes, I don't think you'll be able to fix things. There are a lot of long footnotes which won't spawn a popup. You'll just have to use the links to move back and forth. With my limited knowledge, I don't think the poems in footnotes will be fixable. Even with wrapping them in divs, they come up in the popup unformatted with all the lines strung together. I don't think the popup window handles non-basic formatting. It's basically going to just dump the text in the popup. I wonder if there's a way to force the popup window to NOT pop up and just use a link?
EDIT: And, oddly, the poem looks just fine in the popup window that the Calibre Viewer uses on my PC. Last edited by enuddleyarbl; 10-05-2022 at 01:24 PM. |
10-05-2022, 02:06 PM | #12 |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
My next suggestion was to go to the KOReader subforum, install KOReader:
https://www.mobileread.com/forums/sh...d.php?t=314220 (see the 2nd post in that thread), and see if the footnotes look better there. I don't use KOReader (I don't appear smart enough to figure it out), but I tried it and I can't even get footnotes to open (too persnickety). But, you could try it and see how your experience is. |
10-05-2022, 02:44 PM | #13 |
Addict
Posts: 207
Karma: 340434
Join Date: Dec 2020
Location: Israel
Device: Kobo Libra H2O
|
Thank you, again, enuddleyarbl for going above and beyond. Grand sorcerer jackie_w (clearly, a theoretical magician, not a practical one)* already pointed out that footnotes are plain text. Probably no way around that. I'm not ready to go the KOReader path yet.
* Read the book, it'll make sense. |
10-05-2022, 03:18 PM | #14 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Well, yes, obviously! If I was a practical magician I would have already waved my magic wand to make pop-up footnotes support pretty, styled HTML. Your wish would have been my command.
|
10-06-2022, 03:46 AM | #15 | |
Guru
Posts: 962
Karma: 3475832
Join Date: May 2012
Location: France
Device: Elipsa, Sage
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A minor inconsistency in page navigation? | Berzelius | Calibre | 2 | 12-28-2019 05:21 PM |
Sick of Kindle inconsistency | Oxford-eBooks | Kindle Formats | 25 | 12-26-2017 10:06 AM |
Footnotes Indent inconsistency | wDr | Workshop | 9 | 12-18-2016 06:16 PM |
Aura Inconsistency between metadata in Calibre and on device | MariaS | Kobo Reader | 5 | 08-30-2014 06:53 AM |