03-26-2011, 02:48 PM | #1 |
Enthusiast
Posts: 28
Karma: 5012
Join Date: Jul 2010
Device: Kobo (original)
|
Change Margins With Calibre
Hi all,
I've read through some threads but I still don't understand what I'm doing wrong. I have an ePub book that has left and right margins that are too wide for me. I've gone to Page Setup in Calibre and lowered the values all the way down to zero but it makes no change at all when I open the book on my Kobo. Am I doing something wrong or is there just some epub's that can't be modified? Thanks |
03-26-2011, 03:03 PM | #2 | |
Well trained by Cats
Posts: 30,360
Karma: 58053696
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Page (body) margin is the one controlled by the setting. there may be separate paragraph margins, padding, and indents. IMHO: Sigil You can look at the Code and the stylesheet entry One last thing. Margins (any of them), will not change (reduce) a Margin within an Image (a picture of a page) |
|
Advert | |
|
03-26-2011, 03:25 PM | #3 |
Enthusiast
Posts: 28
Karma: 5012
Join Date: Jul 2010
Device: Kobo (original)
|
Thanks for the quick response theducks. This is just a regular non-drm epub. There's about a half inch of margin on each side. It makes it so it's like reading a column in a magazine rather than a book. I've seen Sigil mentioned in other threads but I didn't know what it was and assumed it was some kind of inside joke or acronym or something. I googled it and I guess you are referring to the epub editor. I wouldn't know what the code or stylesheet entries are or what to change. I was just looking for an easy way to reduce the size of the margins and thought I was doing something wrong.
Thanks again |
03-26-2011, 03:47 PM | #4 |
Wizard
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
You would lose very little by downloading and installing Sigil to see if it would help you. Sigil is a WISWYG editor for ePub books, so it could provide an easy way to determine what is setting the margins (and possibly correcting them). Some people get on with Sigil and others do not
Only caveat - make sure you experiment with a copy of the epub file so that you always have the orginal to revert to if you mess things up. |
03-26-2011, 04:01 PM | #5 | |
Well trained by Cats
Posts: 30,360
Karma: 58053696
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
EPUB XHTML is not difficult (for the basic stuff most books have. Drop in at the EPUB group to see the really stuff the Gurus can do) find your text that is not optimum EPUB is boxes within boxes... all you have to do is find what controls the box that makes it go wrong. You are usually looking for a class="name" statement in the tag looking in the stylesheet, you locate: Code:
.name { stuff.; margin-left: 1in; more stuff..} if you see a "padding" value, that may affect things also (I sometimes put padding around images, so that the text does not start right against them) all you need to do is reverse engineer the nested classes (inside to outer) body div (optional) p span? (I don't think margin applies) Margin starts at the next layer OUT |
|
Advert | |
|
03-26-2011, 04:24 PM | #6 |
Enthusiast
Posts: 28
Karma: 5012
Join Date: Jul 2010
Device: Kobo (original)
|
|
03-26-2011, 04:25 PM | #7 | |
Enthusiast
Posts: 28
Karma: 5012
Join Date: Jul 2010
Device: Kobo (original)
|
Quote:
But thanks anyway! |
|
03-26-2011, 07:03 PM | #8 | ||
Grand Sorcerer
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
|
the margins could also be set in another file - this drove me crazy until I found it, but not all books use it. In Calibre, right mouse click on your book and choose Tweak ePub and then Explode ePub. If you use Windows, a Windows Explorer window will pop up. Look for a folder named OEBPS and look for a file name of page-template.xpgt in that folder. If you double-click it you will probably need to choose what to open it with - I use notepad.
Look for a line in the file like this Quote:
Quote:
I have found times when this didn't work either and then had to edit the css, but it sounds like that might be too much for you now. As if this isn't enough already |
||
03-26-2011, 07:55 PM | #9 |
Enthusiast
Posts: 28
Karma: 5012
Join Date: Jul 2010
Device: Kobo (original)
|
Thank you Purple Lady. That worked. I'm grateful to all of you who tried to help me! I will slowly learn more about this with the help of this forum. I'll try to learn how to use Sigil too. In the mean time, Purple Lady's solution is something I can understand. I'll get better as I go!
Thanks again! |
03-26-2011, 08:05 PM | #10 |
Grand Sorcerer
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
|
you're welcome Jafo. I'm glad I wrote it in a way you could understand. I hope it helps other people too because this really drove me crazy - I use a pretty large font, so anything but a really small margin doesn't leave me many words on a page.
|
03-26-2011, 10:58 PM | #11 | ||
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
1st, Sigil is a great tool and has many fine features that help fine tune any epub. That said there was a new feature added.
Quote:
Quote:
Last edited by DoctorOhh; 03-26-2011 at 11:00 PM. |
||
03-27-2011, 01:51 AM | #12 |
Grand Sorcerer
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
|
I just tried it with two different books and it didn't work. They both had the margins set in the page-template.xpgt file. I made another copy of one and edited the page-template.xpgt as above and the margins were gone after converting. The books were U is for Undertow by Sue Grafton and The Strain by Guillermo del Toro.
used Calibre 0.7.52 |
03-27-2011, 02:14 AM | #13 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
I'm guessing Kovid is examining the css. Maybe you could submit a request to add your technique for dealing with page-template.xpgt files to this new feature. |
|
03-27-2011, 02:48 AM | #14 | |
Grand Sorcerer
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
|
Quote:
So how do I submit a request? |
|
03-27-2011, 02:59 AM | #15 |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Follow these instructions.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre language change? | mago55 | Calibre | 8 | 11-16-2020 01:49 AM |
Can't seem to change epub margins | Desertway | Calibre | 7 | 01-19-2012 04:28 AM |
Calibre Look Change? | Rand Brittain | Calibre | 11 | 11-15-2010 06:41 PM |
Calibre collapses paragraph margins - why? | kiwik | Calibre | 2 | 01-08-2009 11:47 PM |
PDF scaling gets lost when margins change | dna2z | Sony Reader | 5 | 11-29-2006 10:20 PM |