11-10-2019, 08:59 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jul 2019
Device: kindle paperwhite
|
How to make the margins smaller in ePub?
Hello!
I'm quite new so I'm hoping that I'm writing this in the correct thread. My question would be: how am I able to convert my ePub into an ePub with smaller margins using Calibre? Basically, I have an ePub book on my MacBook and I'm hoping to make the margins smaller and send it to my iPad iBooks. Thank you! |
11-10-2019, 09:42 AM | #2 |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Did you set the device profile to Tablet? That does a number of things, including make the images not shrink.
An ebook is boxes within boxes (AKA the box model). So you also need to know at which nested level, the 'excessive' margins are being applied. The profile tends to affect the Body. But you could have a nest. <div <p <blockquote In addition, your device (app) may ignore the publishers (that in the book), and use its settings Or a combination. So, the basic Q: Are all the books the same? 1)device, 2) Profile anything else is the individual book Time to learn some basic CSS (ebooks don't use much above the basic stuff) |
11-10-2019, 10:48 AM | #3 | |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I know this is not the easiest thing to do right away as a novice, but it really helps to learn HTML/CSS and once you do, you will be able to do more modification to the ePub. It's a lot better then going ePub > ePub. |
|
11-14-2019, 11:43 AM | #4 |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
In the Editor, you only need to change the left and right margins for the body class (in the *.css file), which is normally "calibre," but not always. If you change the body class and then change the left and right margins in the classes for the paragraphs, you will not have the results you intended.
Another way to change any of the four margins is to use Convert. Open the preferences from the main Calibre window (ctrl-P). Click on Common Options and then click on Page Setup. Over near the bottom on the right, fill in the left and right margin lines with the values you prefer. Click Apply and then when you convert, your margins will be what you've set under Page Setup--and you won't need to edit the page_styles.css or the stylesheet.css files. Last edited by deback; 11-14-2019 at 11:47 AM. |
11-18-2019, 09:21 PM | #5 | |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
As to what needs to be changed in the ePub depends on the ePub's code. @page has to go in the CSS. Body has to have the margins set to 0. if there is a p, it has to have the margins set to 0. If there are p modifying classes, they have to have the margins changed depending on what they do. You might also want to reduce the indent and the space used for offset text. There is not a one size fits all solution. But the more you work with the HTML/CSS, the easier it will get. |
|
11-19-2019, 08:58 AM | #6 | |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
Quote:
|
|
11-19-2019, 09:46 AM | #7 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Look at the code on a book before Calibre, then look after a same format conversion. I'd much rather just touch up the CSS in an editor, than risk side effects. Yes it works. And usually it creates little to no issues. But the dust bunnies that were created if you are a lean-mean coder will drive you to tears I save the same format conversion route for those books so corrupt that neither Sigil nor the Calibre-editor can open them. Kovid has some miracle code that brings a book back from the dead pile |
|
11-19-2019, 04:54 PM | #8 |
Guru
Posts: 731
Karma: 7000000
Join Date: Aug 2017
Location: Italy
Device: Kindle Paperwhite, Kobo Elipsa, Pocketbook Color PB633, Inkpad Color
|
I seldom use that technique. Almost never. I agree with @theducks and @JSWolf: it should be avoided.
But if I have 52 hypertrophic css files in a fiction book (one for each chapter, I did not check if they are all equal but I think they are) with no particular formatting, except for titles, the time I would loose is more important than a clean work. So: Epub to Epub with "remove spaces from paragraph" and 1.5em of indentation et voilà. ps: I would like to know who is that made this horrible work. (may be the author itself). Last edited by ps67; 11-19-2019 at 05:13 PM. |
11-19-2019, 05:32 PM | #9 | |
Bibliophagist
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
A bit boring layout but that's my personal preference and the author was happy enough to pay the remainder of the bill on time when Amazon accepted the upload on the first try. |
|
11-20-2019, 11:09 AM | #10 |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
I spent a lot of time coming up with my system of using Convert to fix many things. I have many entries in the Extra CSS and Transform sections. I'm a perfectionist and a lean-mean coder, and yes, I also spend a lot of time (sometimes) manually editing CSS classes, when it's impossible to fix things running Convert. The result after I run Convert is the best looking books and most readable books I've seen anywhere, using very simple coding and a lot less time than if I had manually edited everything I wanted to change. So, the result really depends on how you have all the conversion options set up.
Last edited by deback; 11-21-2019 at 10:57 AM. |
11-20-2019, 11:14 AM | #11 |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
I never use the "remove spaces from paragraphs" option. I use the Extra CSS and Transform sections to accomplish that and to change all the indents to 1.2em. But, once in a while, I'll have to manually edit the CSS class for paragraphs to change the top and bottom margins to zero.
|
11-21-2019, 08:25 AM | #12 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The first thing I do is remove all extra XHTML files like an internal ToC, reviews, list of other books, other publisher stuff and most of the time, the embedded fonts. Then I remove all extra CSS. If it's an eub 3, I fix it so it's an ePub 2. Then I add in my own body and p classes and from there I fix up the CSS. In most cases, it's very easy to do. Check for % in the CSS and replace that with more reasonable em umong other things,
When I am done, the code is fairly clean and the ePub is smaller. |
11-21-2019, 11:16 AM | #13 |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
I remove the TOC, because I make my own when I'm done with everything else (using the TOC function--add from files--and use my macro for adding the chapter titles using the XPath). I leave in the pages for titlepage, copyright, reviews, dedication, epigraph, and other books, if they exist, because I format everything to look like the real book.
My paragraph class is simple: text. My first paragraph class is simple: ni. Chapter title is: chapter. I use different classes for each front matter page and never use the same class for all the different sections (using simple class names like, copy, desc, epi, ded, acks). I have a master CSS file that I copy/paste over the "calibre" class in the stylesheet.css file when I begin editing and formatting a book (then beautify and sort the CSS file). I have about 200 or more saved searches that I go through to find errors. I scroll through any PDF available to add paragraph breaks, italics, and sections that need formatting. I use the Reports feature to edit/fix various symbols that need to be deleted. I use the ABC spellcheck list to fix spelling errors. When editing and formatting an ePub file, my basic steps are: (1) Format all the pages. Change all current classes to my classes, remove all lines that need to be removed, and lots more. (2) Use Reports to fix errors found. (3) Use Spellcheck to fix errors found. (4) Use Saved Searches to fix errors found. (5) Scroll through the PDF to do what I said above. (6) Run modify ePub and conversion to have Calibre do its thing. (7) Create the TOC and edit it to look like I want it to look. (8) Edit the margins for the cover image and edit a few font sizes that Calibre Convert changed (only if needed, and it usually isn't necessary). |
11-21-2019, 05:58 PM | #14 |
Guru
Posts: 731
Karma: 7000000
Join Date: Aug 2017
Location: Italy
Device: Kindle Paperwhite, Kobo Elipsa, Pocketbook Color PB633, Inkpad Color
|
I remove page margins, paragraph margins in main text, give justification and indentation of 1.5em. I usually spend some minutes, no more, but sometimes I commit myself more, if the book is complex or I need to learn something (about calibre or css).
In rare occasion I remove and Create again the TOC because it is so poor that I need to change it - for example a dictionary of metric and rhetoric had no TOC for alphabetical order - but generally I don't do it. May also be that I buy a book from Kobo and I am satisfied enough with its formatting so I simply read it. And of course it also depends on how much time I have available. |
11-21-2019, 09:58 PM | #15 | |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I do delete the internal ToC as ePub doesn't need it. I go back to ePub 2 because ePub 3 (in most cases) is useless. I remove all extra XHTML files that I don't need. I fix all the extra screen space wasted in CSS. Those % are silly and I convert them to a reasonable em value. I do delete extra lines in CSS because they are in multiple classes and don't need to be there. ePub from InDesign has a number of them. But once you get used to cleaning up publisher ePub, it's pretty fast to do in most cases. I refuse to convert from PDF. The hassle just isn't worth it. |
|
Tags |
calibre, epub, margins |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Make mobis downloaded via a recipe smaller | sup | Conversion | 2 | 11-06-2018 11:55 PM |
Make the size from 200MB 400pp epub .. smaller? How? | hlk123 | Calibre | 9 | 02-09-2018 04:40 PM |
Smaller margins at kindle touch | MarkFalk | Amazon Kindle | 3 | 03-21-2016 02:03 PM |
How to make line spacing smaller | Waylander | Amazon Kindle | 1 | 11-28-2013 01:37 PM |
Can I make it smaller? | jennaclaire | Sony Reader | 6 | 01-14-2008 09:10 AM |