MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Calibre (https://www.mobileread.com/forums/forumdisplay.php?f=166)
-   -   EPub>Mobi>Kindle 3 large left margins (https://www.mobileread.com/forums/showthread.php?t=102529)

Zenthor 10-13-2010 09:51 PM

EPub>Mobi>Kindle 3 large left margins
 
Most of my EPub>Mobi>Kindle 3 files have large left margin. I have seen this problem listed in these forms, but unless I have missed a post, I do not yet see a solution. I have tried EPub>Lit>Mobi but it converted with same large left margin. I can probably convert it Rich Text and fix in MS Word, but is there an easier way?
My Calibre is 0.7.23 with output set for Kindle (not DX)
Thanks!

Moe The Cat 10-13-2010 10:07 PM

Have you set the margins in Calibre? When you are in the "Convert" dialogue window, if you click on "Page Setup", there will be a place to set "Top", "Bottom", "Left" and "Right" margins. That sets margins for the current book. You can also set this universally by clicking on "Preferences" at the top of the app and then choosing "Common Options" and then "Page Setup" again.

Zenthor 10-13-2010 10:16 PM

Yes, I tried setting Left to 1, also, both left and right to 1 but it converted the exact same way with large left margin. I saw a post by the program author where he said as long as output is set to Kindle (it is) and I use current version (I am), margin should be the same as the epub, but...its not. Google (and these forums) show its a common problem, but there does not yet seem to be a solution other then dump epup to txt and manual redo.



Quote:

Originally Posted by Moe The Cat (Post 1161349)
Have you set the margins in Calibre? When you are in the "Convert" dialogue window, if you click on "Page Setup", there will be a place to set "Top", "Bottom", "Left" and "Right" margins. That sets margins for the current book. You can also set this universally by clicking on "Preferences" at the top of the app and then choosing "Common Options" and then "Page Setup" again.


DoctorOhh 10-13-2010 10:18 PM

Quote:

Originally Posted by Zenthor (Post 1161333)
Most of my EPub>Mobi>Kindle 3 files have large left margin. I have seen this problem listed in these forms, but unless I have missed a post, I do not yet see a solution.

The solution is to edit the margins in the epub prior to conversion. You can use Sigil for this or the Tweak epub feature built into calibre ans a editor like notepad++ to adjust the margins in the css file.

JeremyR 10-31-2010 10:59 PM

Hate to bump an two week old post, but is there a tutorial or something that explains how to do this? I've recently run into this problem (with some epubs uploaded here) and have no idea just what to change in the style sheet...

I saw

li {margin-bottom: 0.25em; margin-left: 2em;}

Changed that from 2 to .25, didn't affect the end product at all. (I assumed that meant "line", but I guess I must have been wrong)

DoctorOhh 10-31-2010 11:25 PM

Quote:

Originally Posted by JeremyR (Post 1192910)
li {margin-bottom: 0.25em; margin-left: 2em;}

Changed that from 2 to .25, didn't affect the end product at all. (I assumed that meant "line", but I guess I must have been wrong)

If you want to know how to edit the margins in a epub it might be best to ask the question in the epub forum.

JeremyR 10-31-2010 11:41 PM

Yeah, but it's really a Calibre specific epub issue, though. The margins seem to look fine when the epub is viewed as an epub.

It's just when it's turned into a mobi that something goes haywire, so knowing just what to tweak in the epub to avoid this problem in Calibre seems more like a Calibre issue than epub.


At any rate, I simply deleted the style sheet and it seems to have taken care of it.

DoctorOhh 10-31-2010 11:59 PM

Quote:

Originally Posted by JeremyR (Post 1192955)
Yeah, but it's really a Calibre specific epub issue, though. The margins seem to look fine when the epub is viewed as an epub.

An epub is an epub, if you want to remove margins you need epub advice. Personally epubs with a main left and right margin of 1em doesn't look great on any ereader unless you use the smallest font the larger you scale the font the bigger the margins become. Viewed on a computer or large screen it is ok but publishers seem to think we like them.

theducks 11-01-2010 12:01 AM

Quote:

Originally Posted by dwanthny (Post 1192939)
If you want to know how to edit the margins in a epub it might be best to ask the question in the epub forum.

li with no dot applies to ALL, li (list item, numbered) tag items only.
you might look at a working EPUB with Sigil in Code view and locate the indicated selectors in the style sheets to get some idea how the nested box model affects what you see.

DoctorOhh 11-01-2010 12:05 AM

Quote:

Originally Posted by theducks (Post 1192984)
li with no dot applies to ALL, li (list item, numbered) tag items only.
you might look at a working EPUB with Sigil in Code view and locate the indicated selectors in the style sheets to get some idea how the nested box model affects what you see.

I'm not sure why you quoted me with this advice. I understand the html involved and thus have no questions on this subject.

ldolse 11-01-2010 12:22 AM

Have you made sure that your output profile is also set to Kindle? Calibre calculates the margin handling for Mobi output a bit differently when it knows the final destination is a Kindle.

speakingtohe 11-01-2010 05:12 AM

I have had no margin problems with the kindle and have converted 8000+ books for my mother's kindle 3. Of course I have not viewd all of them but a random sampling of 200+ reveals no problems.

The books I converted were 90 % in epub format for my Sony. epub is my default output. Probably doesn't make any difference but so far has worked flawlessly.
I no longer have the kindle as I sent it to my mother, but kindle for pc shows the books as fine.

Perhaps it is a kindle setting on the kindle itself?

theducks 11-01-2010 09:22 AM

Quote:

Originally Posted by dwanthny (Post 1192991)
I'm not sure why you quoted me with this advice. I understand the html involved and thus have no questions on this subject.

Me thinks a system burped? :chinscratch: The text did not match.

I would guess that you know MORE HTML than I :thumbsup:

kovidgoyal 11-01-2010 02:01 PM

A quick explanation: Left margins in the MOBI format for the kindle can only be set in 2em blocks. That is a hard limitation of the Amazon MOBI renderer. So if you have a smaller left margin in your EPUB file, say 0.5em when translated to MOBI it becomes 2em.

martijnf 11-02-2010 09:37 AM

Quote:

Originally Posted by kovidgoyal (Post 1193883)
A quick explanation: Left margins in the MOBI format for the kindle can only be set in 2em blocks. That is a hard limitation of the Amazon MOBI renderer. So if you have a smaller left margin in your EPUB file, say 0.5em when translated to MOBI it becomes 2em.

I have the same problem as the op and have been struggling the whole day to find a solution that doesn't involve editting hundreds of files manually in Sigil.

I understand what you're saying here, but is there no way to override the epub settings? The dialog in Calibre would seem to suggest that you can set the margins when exporting. Now I can understand that anything less than 2em becomes 2em, but is there no way for 0 to become 0?

Adding css to the Extra CSS of Look&Feel also doesn't seem to accomplish anything as this is just ignored in my attempts (for instance by adding p { margin-left: 0; } which doesn't even show up anywhere in the document or css after a conversion to epub, nor does it work in a conversion to mobi).

While both the Sigil and Tweak Epub solutions are great when you only have to do a few files, it becomes very tedious with large numbers.

Thanks guys!

[edit] saw in this thread that there is an upcoming feature to just dump the margin completely. That would be great so I'll just wait for that and only worry about the things I want to read now.

[/edit]


All times are GMT -4. The time now is 10:01 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.