Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-29-2025, 02:53 PM   #1
Buhaj
Groupie
Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.
 
Buhaj's Avatar
 
Posts: 163
Karma: 278068
Join Date: Dec 2014
Location: Poland
Device: Kobo Libra 2, Kindle PW3
Set footnotes to show by default

In last few books I read, I was only able to see footnotes when clicking on a hyperlink, see images 1 and 2.

I want to be able to set footnotes in such a way that they will be displayed on the same page by default. See image 3.

I have converted all ebooks with Calibre, to remove potential unnecessary formatting. In this chapter's xhtml file, the code is

Code:
<a id="footnote-226-backlink" class="footnote" href="naglowki_001_0014.xhtml#footnote-226">1</a><span class="reset">
The code on the file with the footnote content is

Code:
<div class="footnote1">
    <p class="calibre9"><a id="footnote-226" href="naglowki_001.xhtml#footnote-226-backlink" class="calibre14">1</a> Nick Miller, ‘<i class="calibre15">Why are they giving us the money?’ Behind China’s plans to ‘rescue’ a*decrepit rail link</i>, „The Sunday Morning Herald”, 20.07.2018, <a href="https://www.smh.com.au/world/europe/why-are-they-giving-us-the-money-behind-china-s-plans-to-rescue-a-decrepit-rail-link-20180606-p4zjwk.html" class="calibre14">https://www.smh.com.au/world/europe/why-are-they-giving-us-the-money-behind-china-s-plans-to-rescue-a-decrepit-rail-link-20180606-p4zjwk.html</a> (dostęp: 21.05.2022).</p>
Why are footnotes not displaying properly, and what custom code should I add to enable it (if possible)? Can it be Calibre that broke the formatting?

Also, in Calibre, I have EPUB output set to EPUB2. Shall I change it to EPUB3? I read in a post that default on-page footnotes require EPUB3, can this be true?
Attached Thumbnails
Click image for larger version

Name:	1. text.jpg
Views:	31
Size:	183.7 KB
ID:	217190   Click image for larger version

Name:	2. footnote.jpg
Views:	25
Size:	188.4 KB
ID:	217191   Click image for larger version

Name:	3. settings.jpg
Views:	29
Size:	93.0 KB
ID:	217192  

Last edited by Buhaj; 07-29-2025 at 02:55 PM. Reason: Included attachments, links were not working
Buhaj is offline   Reply With Quote
Old 07-29-2025, 04:53 PM   #2
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,758
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
I read in a post that default on-page footnotes require EPUB3, can this be true?
By default yes, you'd need for example epub:type="footnote" on your footnote content. I'm not really sure why you didn't try it already?

Enabling classic classname footnotes does implement .footnote but not .footnote1. Though which process did this classname come into existence? Converted from what to what?
Frenzie is offline   Reply With Quote
Advert
Old 07-30-2025, 01:55 PM   #3
Buhaj
Groupie
Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.
 
Buhaj's Avatar
 
Posts: 163
Karma: 278068
Join Date: Dec 2014
Location: Poland
Device: Kobo Libra 2, Kindle PW3
I compared the original ebook with one converted to EPUB 3 in Calibre. The original (EPUB 2 btw) is showing footnotes at the bottom of the page, but EPUB 3 is not. Footnote reference in text is the same across the two:

Code:
<a id="footnote-225-backlink" class="footnote" href="naglowki_001_0014.xhtml#footnote-225">2</a>
They differ in the code on the actual footnote:

Original

Code:
<div class="footnote">
    <p><a id="footnote-225" href="naglowki_001.xhtml#footnote-225-backlink">2</a> Sun Tzu, Sun Pin, Sztuka wojny, tłum. Dariusz Bakalarz, Gliwice 2021, s. 26.</p>
Converted epub

Code:
<div class="footnote1">
    <p class="calibre9"><a id="footnote-225" href="naglowki_001.xhtml#footnote-225-backlink" class="calibre14">2</a> Sun Tzu, Sun Pin, Sztuka wojny, tłum. Dariusz Bakalarz, Gliwice 2021, s. 26.</p>
Is there a way to maintain on-page footnotes with Calibre conversion?
Buhaj is offline   Reply With Quote
Old 07-30-2025, 04:36 PM   #4
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,758
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
I don't believe that can be avoided with calibre conversion, but you'd have to ask somewhere more calibre-oriented (or hope they show up here).
Frenzie is offline   Reply With Quote
Old 07-30-2025, 04:50 PM   #5
Moonbase59
Addict
Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.
 
Moonbase59's Avatar
 
Posts: 206
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
Quote:
Originally Posted by Frenzie View Post
By default yes, you'd need for example epub:type="footnote" on your footnote content.
You actually respect epub:type and values like "noteref", "footnote", "endnote" in KOReader?

That would make for one more reason to switch to EPUB3 and KOReader!

Note to others (and myself in a few years): Don’t mix up ARIA roles with epub:type—the former are for accessibility, the latter for presentation enhancement.

Last edited by Moonbase59; 07-30-2025 at 04:57 PM.
Moonbase59 is offline   Reply With Quote
Advert
Old 07-30-2025, 05:02 PM   #6
Buhaj
Groupie
Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.
 
Buhaj's Avatar
 
Posts: 163
Karma: 278068
Join Date: Dec 2014
Location: Poland
Device: Kobo Libra 2, Kindle PW3
What is a benefit from switching to EPUB 3 in conversion, particularly for KOReader consumption?

Also, how would I set a custom rule to treat the footnote as an in-page footnote? Something like this?

Code:
.footnote1 {
  -cr-hint: footnote-inpage;
  margin: 0 !important;
}

Last edited by Buhaj; 07-30-2025 at 05:38 PM.
Buhaj is offline   Reply With Quote
Old 07-30-2025, 05:30 PM   #7
Moonbase59
Addict
Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.
 
Moonbase59's Avatar
 
Posts: 206
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
I don’t use "converters" much—such things usually destroy more than repair. And of course they can’t create something from nothing (like, in EPUB2 we don’t have epub:type).

But since I also create E-Books, it would be beneficial to know that we have a "well-known" reader software that correctly supports epub:type (which only works in EPUB3).

Last edited by Moonbase59; 07-30-2025 at 05:36 PM.
Moonbase59 is offline   Reply With Quote
Old Yesterday, 07:35 AM   #8
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,758
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by Buhaj View Post
What is a benefit from switching to EPUB 3 in conversion, particularly for KOReader consumption?
That's situational. In many cases there'll be neither an advantage nor a disadvantage. But if you're losing information (like type:footnote) from an EPUB 3 by converting it to EPUB 2… well, that speaks for itself. In general I'd think no conversion whatsoever would be preferable.

Quote:
Also, how would I set a custom rule to treat the footnote as an in-page footnote? Something like this?
Correct.



@Moonbase59
Correctly depends a bit on what you expect from it. In any event, it does something we like. By default, all of type note, endnote, footnote, rearnote, doc-note, doc-endnote, doc-footnote and doc-rearnote are displayed as in-page footnotes since we can be fully confident they're intended as notes. Users can disable that behavior to have them solely act as regular links but no distinction is made. Someone who really likes endnotes could create a custom style tweak but as far as I know nobody's ever asked for such a thing, and we unanimously find the concept of endnotes even more awkward on an ereader than it already is on paper. (Besides which, in practice we have both.)

Additionally users can enable Wikipedia footnotes (ol.references > li) as well as classic classname footnotes (an assortment of classes like .footnote; .footnote1 can probably be added to it but of course we don't want to add an endless array of numbers). These aren't enabled by default because there's no guarantee they're harmless on all documents. Many of us do enable those by default nonetheless.
Frenzie is offline   Reply With Quote
Old Yesterday, 08:34 AM   #9
Buhaj
Groupie
Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.Buhaj ought to be getting tired of karma fortunes by now.
 
Buhaj's Avatar
 
Posts: 163
Karma: 278068
Join Date: Dec 2014
Location: Poland
Device: Kobo Libra 2, Kindle PW3
Quote:
Originally Posted by Frenzie View Post
But if you're losing information (like type:footnote) from an EPUB 3 by converting it to EPUB 2… well, that speaks for itself.
Interestingly, here it was the other way round - original was EPUB 2, and converted EPUB 3 was not showing foonotes.
Buhaj is offline   Reply With Quote
Old Yesterday, 09:20 AM   #10
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,758
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Yes, it lost equivalent information by changing footnote to footnote1.
Frenzie is offline   Reply With Quote
Old Yesterday, 10:39 AM   #11
Moonbase59
Addict
Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.
 
Moonbase59's Avatar
 
Posts: 206
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
Thanks @Frenzie for the explanation. Strictly spoken, I would kinda differentiate between endnotes and footnotes, but as you say, on an e-reader that’s relatively pointless. I also prefer Terry Pratchett (footnotes on the same page) over academic papers with 537 citations at the end… ;-)

Good to know we can already use the ones you mentioned! Thanks for that.
Moonbase59 is offline   Reply With Quote
Old Yesterday, 03:08 PM   #12
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,758
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
The next release will also do .footnote1 (when classic classnames are enabled): https://github.com/koreader/koreader...9094771d732e4c
Frenzie is offline   Reply With Quote
Reply

Tags
footnote, footnotes, koreader


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Set default value of a custom column laszlopanaflex Library Management 2 12-01-2018 02:54 PM
Why does Firefox keep getting set to Non-default? Darqref Lounge 2 11-27-2017 08:29 PM
Can't set Calibre as default for epub sespr Devices 5 09-24-2016 08:35 PM
Default font set? brainycat PocketBook 13 06-03-2010 03:19 AM
Set default font for LRF? daruking Calibre 15 03-03-2009 06:26 PM


All times are GMT -4. The time now is 03:20 PM.


MobileRead.com is a privately owned, operated and funded community.