05-23-2009, 07:22 PM | #1 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
Fixing paragraphs with calibre?
I tried converting a book in HTML format to ebook format with calibre, and it looked pretty good, but the paragraphs were not indented and there was only a very small space between them. Sometimes it is hard to tell when a new paragraph begins. The original HTML book does not have indented paragraphs, but it does have a full space between them. Is there a way to ensure that calibre either indents paragraphs or puts a space between them like books usually have?
|
05-23-2009, 07:50 PM | #2 |
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
|
Easiest way to do so is fix the HTML to put in the indents.
|
Advert | |
|
05-23-2009, 08:48 PM | #3 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
see the remove spaces between paragraphs option
|
05-23-2009, 11:17 PM | #4 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
|
05-23-2009, 11:18 PM | #5 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
|
Advert | |
|
05-24-2009, 12:36 AM | #6 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
05-24-2009, 02:24 AM | #7 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
|
05-24-2009, 05:49 AM | #8 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
I've tried this with quite a few different files and it doesn't seem to work. In all cases, the paragraphs either have barely any space between them, like this:
Paragraph 1 Paragraph 2 There is no indentation, though. |
05-24-2009, 01:48 PM | #9 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
in that case paragraphs in your source file are not properly marked up with <p> tags, no real alternative to editing the HTML
|
05-24-2009, 02:03 PM | #10 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
At least with the HTML document, I think it might be because it uses div tags for paragraphs instead of actual <p> tags. Oh boy, that'd be a pain to change.
Not sure about the other documents I tried... |
05-24-2009, 03:29 PM | #11 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
the 0.6 release of calibre will handle documents that use div instead of p to mark paragraphs
|
05-24-2009, 03:54 PM | #12 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
|
05-24-2009, 09:10 PM | #13 |
Wizard
Posts: 1,101
Karma: 4388403
Join Date: Oct 2007
Device: Palm>Ebookman>IPaq>Axim>Cybook>Kndl2>IPAD>Kndl3SO>Voyager>Oasis
|
If you use an application like notepad++ (its free - FOSS) then you can open your HTML file and
Find: <div Replace <p Then Find: </div> Replace </p> throughout the entire document. Note that I am actually finding/replacing a space after the last character so that it will help discriminate what I am looking for: "<div ". If, however, your div's have no attributes then you may just want to find "<div> |
05-25-2009, 01:02 AM | #14 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Sep 2007
Device: Android phone + PRS-505
|
One thing that can be helpful is to supply a css override on the look-and-feel page. First, look at the HTML to see how paragraphs are marked. If they use something like <div class="foo">, you can add a rule to define a text-indentation for class "foo" by putting a period in front of the name:
Code:
.foo { text-indent: 2em } Code:
div {text-indent: 2em } |
05-25-2009, 03:39 AM | #15 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
WayneD, thanks. Good idea. I'll give it a shot.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fixing Up Typography | ahi | Workshop | 65 | 11-18-2013 04:35 AM |
Paragraphs between Pages and Calibre | La Nuestra | Calibre | 21 | 10-18-2010 08:03 AM |
Can't get calibre to *not* put space between paragraphs | lunixer | Calibre | 8 | 09-11-2010 10:23 PM |
Sony is fixing the Available Soon issue | JSWolf | Sony Reader | 20 | 01-07-2010 12:28 PM |
How to eliminate blank lines between paragraphs with Calibre | Mr. Goodbar | Calibre | 8 | 06-02-2008 07:39 AM |