06-09-2014, 10:53 AM | #1 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jun 2014
Device: Kindle
|
problems with indented text when converting to MOBI
Hi All,
Did some searching of the forum, but couldn't find anything relevant. I have an OpenOffice.org document that I am trying to convert to ebook formats. I am doing it using Calibre. Documents is correctly exported to EPUB (or at least it is converted in a way that satisfies me, taking into account I have about two hours experience only). Problem is with conversion to MOBI. Part of the document contains indented text that tries to simulate forum discussion, with headers and quotes. Something like Code:
What he saw on the screen was: John wrote: in the answer to Borek's post: Problem is with conversion to MOBI. Part of the document contains indented text that tries to simulate forum discussion, with headers and quotes. Don't use MOBI. Unfortunately, in MOBI these indents become so large, "Problem is with conversion..." is shifted right way too far, so any longer text becomes barely readable (split between many lines containing just a word or two), something like: Code:
What he saw on the screen was: John wrote: in the answer to Borek's post: Problem is with conversion to MOBI. Part of the document contains indented text that tries to simulate forum discussion, with headers and quotes. Don't use MOBI. Last edited by Borek; 06-09-2014 at 06:17 PM. |
06-09-2014, 11:33 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
How do you define the indent in the ePUB file? How does the code look like?
|
06-09-2014, 06:16 PM | #3 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jun 2014
Device: Kindle
|
I am not editing EPUB files. What I did was I added *.odt (native OPenOffice.org file) to the Calibre library and told Calibre to convert it directly to MOBI and EPUB (and AZW3). Indents in the *.odt are defined using paragraph styles.
Generated EBPUB and AZW3 - when checked with Calibre - look OK. MOBI looks bad (both when checked with Calibre and when sent to my Kindle through Amazon). |
06-09-2014, 07:23 PM | #4 | |
Resident Curmudgeon
Posts: 73,994
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
06-10-2014, 04:19 AM | #5 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
|
|
06-10-2014, 05:06 AM | #6 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jun 2014
Device: Kindle
|
Did some testing and I think I know where the problem is.
Looks like Calibre generated MOBI (or perhaps MOBI in general) doesn't like margins (and presumably other measurements as well) given in cm. I have manually edited stylesheet in EPUB and replaced all margins given as 0.5cm, 1cm, 1.5cm by 0.5em, 1em, 1.5em and so on - and the conversion result was close to what I expected. Sure, em and cm are not the same thing, but that was the simplest way of testing the idea. Unfortunately, living where I live and using local Windows version it would be quite difficult to not use cm. I have a gut feeling cm were treated as inches previously, which was why these margins looked so large. Looks like the conversion will be much more time consuming than expected :/ |
06-10-2014, 06:43 AM | #7 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Margins should (almost) always be best set in relative measurements like em instead of fixed like cm, pt or px. As screen sizes differ, fixed sizes can cause a headache soon. Imagine reading a book on a phone which has margins of a cm... Not much room for text anymore.
The same applies to font sizes. |
06-10-2014, 10:51 AM | #8 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jun 2014
Device: Kindle
|
Technically you are right - unfortunately, most text editors I am aware of are printer oriented and they use cm/inch measurements only. ATM I have to work with ODT documents whether I like it, or not.
|
06-10-2014, 12:37 PM | #9 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
That is why a text editor/word processor is not always the best source for an e-book. It is fine to create the text, but for the e-book manual adjustment is required. A printed document is something different than a electronic document.
|
06-10-2014, 03:18 PM | #10 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
06-11-2014, 03:23 PM | #11 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
DiapDealer published two days ago a script that converts cm to em directly within EPUB CSS stylesheets using Calibre.
More about it here https://www.mobileread.com/forums/sho...6&postcount=30 It works both with condensed and "beautified" (classic) stylesheets. However, it does not convert values written in shorthand and leave them untouched. Of course, still experimental. Exemple with px in the screenshot for shorthand illustration. Number four (lowest one) should be OK however. Last edited by roger64; 06-11-2014 at 03:30 PM. |
06-11-2014, 03:40 PM | #12 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jun 2014
Device: Kindle
|
Thanks for the info.
So far I managed to convert ODT to EPUB, then I manually edited EPUB - having some experience with CSS/HTML definitely helped. After that EPUB -> MOBI works OK. It happens a single style sheet will work for all documents I have to deal right now. I will need a more flexible solution, but not soon. |
06-12-2014, 04:44 PM | #13 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
If you are looking for the golden fleece of epubs it will be a while. It is all still rough around the edges and the manufacturer gang can't or won't shoot in the same direction. Look up discussions on the nook about it barfing badly if you put too many size changes in one line!, as a terrible example.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems converting rtf to mobi | Pierdzioszek | Conversion | 3 | 04-09-2012 03:04 PM |
Two problems converting ePub to mobi | AlexBell | Conversion | 3 | 05-26-2011 04:38 AM |
Missing text while converting PDF to mobi | jhkaplan | Calibre | 1 | 12-12-2010 08:54 PM |
.epub hyperlinks, centered and non indented text. | Xabache | ePub | 2 | 09-13-2010 01:11 PM |
Problems with converting pdf to mobi | Holger | Calibre | 1 | 08-27-2010 11:41 PM |