![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 1538394
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?
|
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,455
Karma: 239219453
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
I remove any publisher margins from standard paragraphs (not from the special ones, like letters, tables and so on).
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,117
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#4 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,722
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#5 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,117
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,455
Karma: 239219453
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
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.
|
![]() |
![]() |
![]() |
#7 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,117
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
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; } |
|
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,455
Karma: 239219453
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Quote:
Anyway, if I should encounter any weirdness in the future, I'll know where to look for the culprit. So thanks for enlightening me. |
|
![]() |
![]() |
![]() |
#9 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,117
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,455
Karma: 239219453
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#11 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,586
Karma: 14328510
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; } Code:
body * { line-height: inherit; } 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. |
![]() |
![]() |
![]() |
#12 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,455
Karma: 239219453
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
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.
|
![]() |
![]() |
![]() |
#13 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 1538394
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:
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? |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |