Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-17-2021, 01:58 PM   #1
DaveLessnau
Zealot
DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.
 
Posts: 124
Karma: 11396
Join Date: Sep 2013
Device: Kobo Forma
Margins: Leave as Default or Change in Calibre?

I guess this is an odd sort of question. I was running some Quality Check tests on my epubs in Calibre and noted that even though I was using Calibre's default margins (under Preferences > Common Options > Page Setup), none of my epubs were actually using them (they're using the publisher set values). I can use Modify Epub to actually use my Calibre defaults, but I'm wondering if I actually NEED to? Things seem to look fine with the publisher defaults on my Forma. Would a standard Calbre default do anything for me?
DaveLessnau is offline   Reply With Quote
Old 07-17-2021, 03:51 PM   #2
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 4,244
Karma: 172166704
Join Date: Jan 2014
Location: Estonia
Device: Kindle Oasis 3, Nook Glowlight Plus 7.8'', Kobo Libra H2O
I remove any publisher margins from standard paragraphs (not from the special ones, like letters, tables and so on).
Sirtel is offline   Reply With Quote
Advert
Old 07-17-2021, 05:33 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 14,388
Karma: 72185627
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by DaveLessnau View Post
I guess this is an odd sort of question. I was running some Quality Check tests on my epubs in Calibre and noted that even though I was using Calibre's default margins (under Preferences > Common Options > Page Setup), none of my epubs were actually using them (they're using the publisher set values). I can use Modify Epub to actually use my Calibre defaults, but I'm wondering if I actually NEED to? Things seem to look fine with the publisher defaults on my Forma. Would a standard Calbre default do anything for me?
Before sending to my ereader, I take a quick look at an epub in ADE and/orThorium and/or calibre's ebook viewer—it takes about 3 pages for an edit/don't edit decision. About half the books need minor tweaks but there are some where you wonder about the person who created the ebook. Did they have a high school student as an intern who is learning InDesign on the job. Then you have the CSS and text files that look like entries in the obfuscated C contest.

Most often, the changes I make are settings the margins from the body tag to 0 and widows and orphans to 1. That way I can control the margins and avoid the $%^&* idiots who set the margins to ~2.5cm on every side—the paperback emulation view. My preferred editor is Sigil though I also use calibre's editor since there are tasks that are easier on one than the other. For the cleanup, I have a collection of saved searches for Sigil that make it fast and easy to clean up most epubs.
DNSB is offline   Reply With Quote
Old 07-17-2021, 05:57 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 63,614
Karma: 103394323
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by DNSB View Post
Before sending to my ereader, I take a quick look at an epub in ADE and/orThorium and/or calibre's ebook viewer—it takes about 3 pages for an edit/don't edit decision. About half the books need minor tweaks but there are some where you wonder about the person who created the ebook. Did they have a high school student as an intern who is learning InDesign on the job. Then you have the CSS and text files that look like entries in the obfuscated C contest.

Most often, the changes I make are settings the margins from the body tag to 0 and widows and orphans to 1. That way I can control the margins and avoid the $%^&* idiots who set the margins to ~2.5cm on every side—the paperback emulation view. My preferred editor is Sigil though I also use calibre's editor since there are tasks that are easier on one than the other. For the cleanup, I have a collection of saved searches for Sigil that make it fast and easy to clean up most epubs.
I do remember seeing one Kindle eBook (I think self-published) where the CSS was nothing but media queries. Quite a mess.

Vellum makes more of a mess of the code then InDesign. At least with InDesign, you can sort of see some method to the madness. With Vellum, it's madness to the madness with no method.
JSWolf is offline   Reply With Quote
Old 07-17-2021, 06:23 PM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 14,388
Karma: 72185627
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by JSWolf View Post
I do remember seeing one Kindle eBook (I think self-published) where the CSS was nothing but media queries. Quite a mess.

Vellum makes more of a mess of the code then InDesign. At least with InDesign, you can sort of see some method to the madness. With Vellum, it's madness to the madness with no method.
To me, Vellum is actually quite sensible. One stylesheet for standard CSS and one for media queries. I spend about 30 minutes one day checking the media.css from 5 of my spouse's books and generated a combined file with any Kindle specific media queries/code removed and the media queries removed from the rest so only the CSS was left.

Basically, I now replace the body, p and p.subsq code in the styles.css stylesheet and copy/paste the modified dequeried code over the media.css stylesheet. Remove the unused stylesheet entries, clean up the undefined classes in the html files and run my saved search/replaces and I'm are pretty much done.

My spouse is much happier with the formatting in those epubs after the cleanup. Since the cleanup on the stylesheets and the saved searches takes just a few minutes, I'm happy as well.

Now if you were talking about the mass of undefined classes and IDs in a Vellum generated ebook, that is a bit of a head scratcher though @wrCisco's cssUndefinedClasses plugin for Sigil makes them go away in one swell foop.
DNSB is offline   Reply With Quote
Advert
Old 07-17-2021, 06:40 PM   #6
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 4,244
Karma: 172166704
Join Date: Jan 2014
Location: Estonia
Device: Kindle Oasis 3, Nook Glowlight Plus 7.8'', Kobo Libra H2O
I have had no issues whatsoever with Vellum-generated books on any of my ereaders. And I only remove the body font and change the paragraph indent (sometimes the line-spacing as well) in them. I don't bother with media queries and other crap. It can stay for all I care.
Sirtel is offline   Reply With Quote
Old 07-17-2021, 07:27 PM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 14,388
Karma: 72185627
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by Sirtel View Post
I have had no issues whatsoever with Vellum-generated books on any of my ereaders. And I only remove the body font and change the paragraph indent (sometimes the line-spacing as well) in them. I don't bother with media queries and other crap. It can stay for all I care.
Since she is reading on a Kobo using RMSDK (i.e. .epub not .kepub.epub), media queries are dysfunctional. As a trivial example, if you have a media query to display a graphics for a scene break and a fallback to display ***, you get both of them.

The body tag with it's sole content being: "font-family: Palatino, Malabar, Merriweather, "Droid Serif", serif;" is replaced since none of my ereaders have any of those fonts installed.

Sample of what I add:
Code:
body {
  display: block;
  font-size: 1em;
  line-height: 1.2;
  margin: 0 0 0 0;
  padding: 0 0 0 0;
  text-indent: 0;
  widows: 1;
  orphans: 1;
}

p {
  padding: 0.2em 0 0 0;
}

p.subsq {
  text-indent: 2.4em;
}
DNSB is offline   Reply With Quote
Old 07-17-2021, 07:37 PM   #8
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 4,244
Karma: 172166704
Join Date: Jan 2014
Location: Estonia
Device: Kindle Oasis 3, Nook Glowlight Plus 7.8'', Kobo Libra H2O
Quote:
Originally Posted by DNSB View Post
Since she is reading on a Kobo using RMSDK (i.e. .epub not .kepub.epub), media queries are dysfunctional. As a trivial example, if you have a media query to display a graphics for a scene break and a fallback to display ***, you get both of them.
I read epubs on my Kobo too, and I've never noticed any such thing. Granted, I may just have been lucky. Or perhaps I just didn't pay attention.

Anyway, if I should encounter any weirdness in the future, I'll know where to look for the culprit. So thanks for enlightening me.
Sirtel is offline   Reply With Quote
Old 07-17-2021, 10:51 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 14,388
Karma: 72185627
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by Sirtel View Post
I read epubs on my Kobo too, and I've never noticed any such thing. Granted, I may just have been lucky. Or perhaps I just didn't pay attention.

Anyway, if I should encounter any weirdness in the future, I'll know where to look for the culprit. So thanks for enlightening me.
You will find those issues on a majority of books converted from Amazon downloads but also on a fair chunk of the epubs from Kobo, Smashwords, etc. I suspect that the author is generating an epub to send to Amazon and just using the same epub for other publishers as I can see few other reasons to find Amazon specific oddities such as 'data-amznremoved=' statements in an epub.
DNSB is offline   Reply With Quote
Old 07-17-2021, 11:09 PM   #10
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 4,244
Karma: 172166704
Join Date: Jan 2014
Location: Estonia
Device: Kindle Oasis 3, Nook Glowlight Plus 7.8'', Kobo Libra H2O
Quote:
Originally Posted by DNSB View Post
You will find those issues on a majority of books converted from Amazon downloads but also on a fair chunk of the epubs from Kobo, Smashwords, etc.
I've read lots of those Vellum-generated self-pubs, but haven't encountered any glaring issues yet. As I said, perhaps I just didn't notice.

Edit: it seems that a calibre conversion nukes media queries? All the books loaded on my Libra have been converted. I just checked and I didn't see any media queries in the css of a Vellum-produced ebook, converted to epub from the original azw3. Whereas the queries exist in the original azw3 bought from Amazon.

Last edited by Sirtel; 07-17-2021 at 11:45 PM.
Sirtel is offline   Reply With Quote
Old 07-17-2021, 11:58 PM   #11
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,157
Karma: 12389826
Join Date: Nov 2019
Device: none
In that Common options, Page setup I have the output profile set to Tablet and the Input profile set to Default profile. The margins are all set to 0 pt. When I get a book from amazon, after converting it to epub in calibre I use a big sledge hammer and in sigil remove the class on all of the body p tags, and also the class on the body tag. If all of the body p tags also have a span tag inside the p tag then I use sigil's Tag Mechanic plugin to remove those. Then I add some override css at the bottom of their css file, which includes
Code:
body {
  font-size: 100%;
  border: 0;
  margin: 0;
  padding: 0;
  width: auto;
}

p {
  font-size: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  text-indent: 2em;
}
Under Look & feel, Styling I've added those lines as well as
Code:
body * {
  line-height: inherit;
}
At the bottom I've checked all of the boxes for "style information you want completely removed".

My goal is to have all books look the same with respect to font size, margins, and line spacing.

Last edited by hobnail; 07-18-2021 at 12:08 AM.
hobnail is offline   Reply With Quote
Old 07-18-2021, 12:23 AM   #12
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 4,244
Karma: 172166704
Join Date: Jan 2014
Location: Estonia
Device: Kindle Oasis 3, Nook Glowlight Plus 7.8'', Kobo Libra H2O
Quote:
Originally Posted by hobnail View Post

My goal is to have all books look the same with respect to font size, margins, and line spacing.
That's my goal as well. But I don't use "the sledgehammer approach". That would throw out the child along with the bathwater. Instead I edit every book in the calibre editor (I've never used Sigil) by hand, so to speak. And I use conversion only to get rid of the hyphenation and widows/orphans information, not for other things.
Sirtel is offline   Reply With Quote
Old 07-18-2021, 11:32 AM   #13
DaveLessnau
Zealot
DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.DaveLessnau can tame squirrels without the assistance of a chair or a whip.
 
Posts: 124
Karma: 11396
Join Date: Sep 2013
Device: Kobo Forma
Interesting information here. It gives me some pointers as to what's going on and what to expect, but it's beyond my knowledge. Without having to modify CSS files in my books, I'm looking at what the Quality Check plugin in Calibre is reporting and wondering about the results if I use the Modify ePub plugin.

What I'm seeing if I do the following in Quality Check:

Check ePub Style > Check CSS Book Margins

is that every book in my library gives:

"Margins are defined in pts but don't match calibre preferences"

Currently, in Calibre, my Default Profile margins at Preferences > Conversion > Common Options > Page Setup > Input Profile are set to 5.0 pt all around

If I use Quality Check's "Check Inline @page Margins," it says none of my books have this.

Looking at the comments here, I'm pretty sure nothing bad will happen if I use the Modify ePub "HTML & Styles" > "Modify @page and body margin styles:"

Quote:
An ePub that has not been converted by yourself in calibre may have body or @page styles with margins set to values that differ from your desired defaults. You can set your calibre conversion defaults using Preferences -> Conversion -> Common Options -> Page Setup. If you set negative values then this option will remove the margin attributes from the ePub , and if a CSS file is now empty then it will be removed from the ePub completely. Otherwise it will write whatever default value you have specified into a new @page style in each CSS file. Note it does not currently support changing named body styles.

Use this option to remove @page and body margin values and if your calibre defaults are non-negative then rewrite into an @page style.
to set all my books' margins to my current Calibre default. It also looks like all will be fine if I change that default to 0 all around and do the same. Though I wonder if the text gets smashed against the edge of the screen with 0 margins or does the Forma automatically put some kind of spacing in there?

Does anyone know if using negative Calibre defaults along with that Modify ePub option to "remove the margin attributes from the ePub" entirely by "remove[ing] @page and body margin values" will be a good thing or a bad thing?
DaveLessnau is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Portable - change default library jesuita Calibre 16 03-26-2021 03:18 PM
How-To Change Default Reader App Associated With Calibre Frank W Calibre 13 02-01-2018 09:24 PM
Convert EPUB to DOCX [Change Default Margins] Lassox Conversion 3 04-12-2017 10:03 PM
Change default margins on Kindle PW2 meloni Kindle Developer's Corner 3 05-28-2014 08:23 AM
Change Margins With Calibre Jafo Conversion 19 04-19-2011 08:39 PM


All times are GMT -4. The time now is 07:52 AM.


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