![]() |
#1 |
Zealot
![]() Posts: 137
Karma: 61
Join Date: Jun 2006
Location: Gijón, Spain
Device: Kindle 3G+WiFi & Galaxy Note
|
![]()
I am having problems forcing Calibre not to overwrite my formatting.
Let's say I format a HTML file inside MS Word. I am aware that MS Word includes lots and lots of garbage in the code, but I know many tricks in Word that I am unable to replicate in serious HTML editors. Let's say I define a heading as having no indent and the main text body as having indent in most cases, but not always. The main text body has no paragraph spacing in the HTML code, either. I enter this file into Calibre and convert it into ePUB. With the "Remove spacing between paragraphs" option disabled, Calibre adds paragraph spacing even though the HTML formatting does not mention any such thing. OK. I enable "Remove spacing between paragraphs" and I am forced to enter a value for "Indent size" (0 means no indentation, rather than "do not touch the indent"). The resulting ePUB has no paragraph spacing, but the same indent size for every paragraph. For the record, I am just mentioning ePUB here because it is easier to see the resulting code, but my intention is to convert to MOBI. The same problems happen with ePUB and MOBI, anyway. The Amazon kindlegen utility respects the HTML code, but I prefer Calibre because it adds the TOC info and the cover for me. How do I force Calibre to honour the HTML format which specifies spacing and indent for every paragraph? Attachments (within the ZIP): adventures.htm > Source HTML file with Word 2010 garbage HTML code adventures_checked.epub > Output ePUB with the "Remove spacing between paragraphs" disabled and "0 pt" as indent size adventures_unchecked.epub > Output ePUB with the "Remove spacing between paragraphs" disabled Last edited by lordvetinari2; 11-22-2010 at 09:56 AM. Reason: Solved! |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Try saving your Word file as Webpage-filtered. This will remove a lot of the excess baggage in the HTML file.
Then reimport to Calibre and convert with 'Remove spacing between paras' unchecked. For your info, the problem with the original HTML seems to be the MS tags Code:
<o:p></o:p> Nevertheless, saving as Webpage-filtered will not create the excess MS-specific tags and so should avoid the problem. |
![]() |
![]() |
![]() |
#3 | |
Zealot
![]() Posts: 137
Karma: 61
Join Date: Jun 2006
Location: Gijón, Spain
Device: Kindle 3G+WiFi & Galaxy Note
|
Quote:
I knew about the "Webpage, filtered", and I use it regularly. For some reason, I saved this file as Webpage instead. ![]() |
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Glad to help
![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Paragraph spacing | Banks | ePub | 2 | 08-09-2012 05:24 PM |
Paragraph spacing | jhempel24 | Calibre | 5 | 08-24-2010 12:14 AM |
Questions about <p> and <div> and paragraph spacing | droople | Sigil | 7 | 08-14-2010 12:03 PM |
Changing paragraph spacing in DRMed epub? | salty-horse | ePub | 4 | 09-15-2009 06:48 AM |
Paragraph spacing when creating eBooks? | gwynevans | Workshop | 21 | 04-24-2009 11:01 AM |