-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No margins on generated kepub #33
Comments
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, |
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. |
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. |
Does adding the option |
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. |
It's not about CSS, the reason is explained here: https://www.mobileread.com/forums/showthread.php?t=276477
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. |
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. |
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. |
Add a dummy title page if there isn't one already, since Kobo treats the first spine entry specially (e.g. no margins) for full-screen book covers.
Add a dummy title page if there isn't one already, since Kobo treats the first spine entry specially (e.g. no margins) for full-screen book covers.
I've implemented this option in the |
Add a dummy title page if there isn't one already, since Kobo treats the first spine entry specially (e.g. no margins) for full-screen book covers.
Add a dummy title page if there isn't one already, since Kobo treats the first spine entry specially (e.g. no margins) for full-screen book covers.
I will be releasing this later this week. |
Picture of the original epub
Picture of the converted kepub
Note that the "margin" setting has no influence on the kepub one.
Both were sideloaded to my kobo aura one. I tried with different kepubify parameters but it made no difference.
The book in question is the french translation of War and peace from project Gutenberg.
Conversion log:
Also another quick question: is
fullscreenfixes
still necessary now that removing header and footer has been officially exposed by recent firmwares?The text was updated successfully, but these errors were encountered: