Comments (10)
It's not about CSS, the reason is explained here: https://www.mobileread.com/forums/showthread.php?t=276477
The KePub reader assumes that the first HTML file of the book is a cover page and automatically displays it in a special full-screen mode that is only suitable for images. If the publisher has included other material in the first HTML file after the cover, then that gets displayed full-screen too.
If you know how to do it then editing the book and splitting it into seperate files so that the first HTML file contains nothing but the cover image should fix the problem, or if the book doesn't have a proper cover page then using Calibre to add one is usually faily easy. Otherwise siideload the book as an ePub instead, as the ePub reader doesn't have this problem.
(Although if the publisher has combined the cover with other material into one file, then chances are they will have done the same thing in other parts of the book such as including multiple chapters in one file, and that can cause other problems with things like TOC and reading stats.)
I can confirm that the chapters included in the second html file and later were displayed fine in the kepubified ebook. I was able to get the initial chapters displayed correctly as well, by simply moving them to the second html file. There is probably a more elegant solution; I am not very familiar with the epub format yet. The cover still did not appear correctly, but then the original Gutenberg epubs did not display the correct cover on Kobo either.
I don't know if this fix would possible to do easily with kepubify (perhaps just adding a dummy html file at the start would work?), if not, kepubify will just have to have the disclaimer that it can only kepubify epubs that already obey the kepub constraints.
Or maybe, since Gutenberg epubs are popular and only they seem to have this issue, maybe kepubify or another tool can include a fix specifically for them, perhaps fixing the cover issue as well, if anybody is interested in implementing that.
from kepubify.
I had a look at some Gutenberg ebooks, and it seems their 0.5em margin on the body has a more specific CSS selector (body and a class) than the kepubify margin selector (just body).
Kepubs require a base margin of 0 for it to display properly, and I need to have a look at the margin overriding to see if I need to do more than make the kepubify selector more specific (html>body).
To fix this temporarily, you can remove the margin from the CSS in the epub.
from kepubify.
I've decided that a workaround for this is in-scope for kepubify, since it's a limitation imposed by the KEPUB format.
I will implement this for kepubify v4, which I'm planning to release sometime in the next week or two.
from kepubify.
That looks quite unusual. I'm going to look at the epub later this week and try and figure out why it does this in the kepub reader.
And no, --fullscreenfixes
is not necessary anymore, as it seems to have been fixed. There's no harm leaving it on though.
from kepubify.
Thanks for the info! I'd rather not add too many book specific workarounds to kepubify (and I'm trying to avoid adding ones to fix malformed epubs), but this seems to be one I could do.
I'll probably add an option to add a dummy cover page if the first page in the flow is more than a certain number of words or elements. Adding it will be simple enough, as all I'd need to do is add the doc to the manifest items and add the page to the beginning of the spine in the package document. In fact, I could probably do it using regexps if I needed to (kepubify tries to avoid touching the structure as much as possible), because I only need to insert an element directly after the start tag of each.
from kepubify.
I've implemented this option in the pgaskin/rewrite-conversion-code
branch. If you want to test this before I release v4, you can build kepubify from that branch.
from kepubify.
I have the same issue, version 2.3.1 installed with brew on MacOS 10.14.3, Aura H2O v2, Software version 4.12.12111. Converted epub from (http://www.gutenberg.org/ebooks/31)
The left margin goes to the very edge, it overflows the right edge when justifying, and margin settings have no effect.
from kepubify.
Does adding the option --css "body {margin: 0 !important}"
fix this issue?
from kepubify.
I tried it for http://www.gutenberg.org/ebooks/863 and http://www.gutenberg.org/ebooks/31 and it did not work for either. I had previously tried deleting several margin settings manually inside the epub CSS, also with no luck, but I wasn't sure if I was hitting the right places.
from kepubify.
I will be releasing this later this week.
from kepubify.
Related Issues (20)
- covergen: Unsupported device model with Kobo Libra2
- KepubifyError: convert EPUB: read source EPUB: parse OPF package: xml: unsupported version "1.1"; only version 1.0 is supported HOT 1
- Feature request: Compile for ARMV6 HOT 1
- Feature Request: Improved kobospan algorithm
- Feature Request: Specify an encoding with command line arguments HOT 2
- UTF-8 conversion issue with particular input HOT 3
- Feature Request: Add cover if missing from cover.jpg file (Calibre)
- Kepubify Mac does not work HOT 3
- Quotation Marks & Apostrophe's rendering incorrectly after kepubify conversion HOT 2
- Converted ebook from AO3 is very unstable HOT 1
- Illustrator problem with converted kepub
- Whitespace characters
- Bookmark function unavailable on full screen images HOT 6
- Custom CSS not working in web interface HOT 3
- installation of kepubify on Kobo device
- Web version - No download button?
- Book which generates erroneous kepubs
- What tag/class does kepubify need to recognize an endnote? HOT 2
- An kepub which does not want to import into my kobo clara hd HOT 1
- headings get hyphenated with current hyphenation.css
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kepubify.