View Single Post
Old 09-20-2021, 11:40 PM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by gryzor2327 View Post
Hi,

I am quite new into the business of producing ebooks, so I apologize in advance if my questions are going to be obvious or naive.

I have a history of producing PDF books, from latex. If that matters, I produce books in french, which are translations of brilliant volumes written in english in the past. My production is licensed under by-nc-sa (non-commercial) and my production is available for free.

I generate pdf with "pdflatex".
Now I have started focusing on generating ebooks (.ebook and .mobi). As I already have a number of source documents in latex, I am keeping this (and scripting where needed) so that the same source produces both pdf and ebook formats.

I have been using pandoc to generate .epub files. And I use calibre's "ebook-convert" utility to produce .mobi from the .epub I have.

I must say the general quality of the production is "good enough' from my profane eyes. But there are things I do not understand, and now here are my questions.

- When I open a epub book I have generated (with pandoc, based on latex source) with calibre, the rendering is just excellent. For instance, clicking a footnote opens a kind of popup, the footnote text ends with a "back link" to go back to where I was before following the footnote link. Also, I see no weird page numbers in the output.

- On the opposite, when I open the very same epub book I have generated with my mobile device (this is Kobo Aura), the rendering is not that excellent. It is generally good, I can scroll, etc. But following a footnote just drives me to its text, without a backlink. Also, some page numbers appear which seem to be fixed.

I don't undertand why the rendering is so different between calibre and the device itself. I don't know where to start in order to enhance the rendering on mobile device.
To answer the last point first, the rendering is different for all ereader devices and apps. The specs about what should be done are not strong. Each developer decides exactly what to do and is heavily influenced by the libraries they use. For example, the calibre view uses a (from memory) Chrome based renderer and hence inherits a lot of layout based rules from that. On your Kobo device, epubs are rendered with the Adobe RMSDK, so the layout is from that. You will get similar rendering from other devices that use the RMSDK. And ADE will be fairly similar.

For footnotes, it has always been fun. If this is an ePub 2, then the RMSDK does not support them at all. They are just links to another part of the book. The ereader may have support to return to where you came from (the Kobo should have a "Back to page x" link when you display the menu bars). Other ereaders or apps are using heuristics (i.e. taking a guess) to determine if a link is a footnote. The calibre view is definitely doing that. If you put the epub on your Kobo as a kepub (for testing, just use ".kepub.epub" as the extension on the device), it does support footnotes in a very similar way to the calibre viewer. Again, it uses heuristics to decide and doesn't always get it right.

For epub3, there is support for footnotes. The calibre viewer and the Kobo kepub renderer supports them. I have no idea if anything else does.

I can't comment on Kindles and the formats they support. I don't use them and, as much as possible, let those who do offer suggestions.

Edit:

I didn't actually look at the supplied example. I have now and I see it is an epub 3. It has the appropriate tags/attributes for footnotes. Testing on one of my Kobo device as both epub and kepub gave me the expected results - for epub the footnotes are treated as simple links, for kepub there is a popup. For the epub, there is a backlink in the code. But, the character used was one not in the font I was using to read the book and was not displayed. When I font that did have something, though not the character that was displayed by the calibre viewer, the back link worked.

Last edited by davidfor; 09-21-2021 at 12:17 AM.
davidfor is offline   Reply With Quote