Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-23-2009, 07:22 PM   #1
enarchay
Zealot
enarchay began at the beginning.
 
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?
enarchay is offline   Reply With Quote
Old 05-23-2009, 07:50 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,650
Karma: 127838196
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.
JSWolf is offline   Reply With Quote
Advert
Old 05-23-2009, 08:48 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
see the remove spaces between paragraphs option
kovidgoyal is online now   Reply With Quote
Old 05-23-2009, 11:17 PM   #4
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
see the remove spaces between paragraphs option
Wouldn't that do the opposite of what I want? I want to be able to distinguish between paragraphs, by either having a space, or having the paragraphs indent.
enarchay is offline   Reply With Quote
Old 05-23-2009, 11:18 PM   #5
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Quote:
Originally Posted by JSWolf View Post
Easiest way to do so is fix the HTML to put in the indents.
That'd probably take a long time with a full length book. Is there a quicker way to do it than to go through each paragraph and indent it?
enarchay is offline   Reply With Quote
Advert
Old 05-24-2009, 12:36 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by enarchay View Post
Wouldn't that do the opposite of what I want? I want to be able to distinguish between paragraphs, by either having a space, or having the paragraphs indent.
read the help of the option, it also adds an indent
kovidgoyal is online now   Reply With Quote
Old 05-24-2009, 02:24 AM   #7
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
read the help of the option, it also adds an indent
I tried this and it still didn't add the indentation.
enarchay is offline   Reply With Quote
Old 05-24-2009, 05:49 AM   #8
enarchay
Zealot
enarchay began at the beginning.
 
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.
enarchay is offline   Reply With Quote
Old 05-24-2009, 01:48 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
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
kovidgoyal is online now   Reply With Quote
Old 05-24-2009, 02:03 PM   #10
enarchay
Zealot
enarchay began at the beginning.
 
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...
enarchay is offline   Reply With Quote
Old 05-24-2009, 03:29 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
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
kovidgoyal is online now   Reply With Quote
Old 05-24-2009, 03:54 PM   #12
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
the 0.6 release of calibre will handle documents that use div instead of p to mark paragraphs
When's it coming out?
enarchay is offline   Reply With Quote
Old 05-24-2009, 09:10 PM   #13
emellaich
Wizard
emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.
 
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>
emellaich is offline   Reply With Quote
Old 05-25-2009, 01:02 AM   #14
WayneD
Enthusiast
WayneD began at the beginning.
 
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 }
If there is no class, you can try affecting all divs, but that may do too much indenting (it may be worth a try, though):

Code:
div {text-indent: 2em }
WayneD is offline   Reply With Quote
Old 05-25-2009, 03:39 AM   #15
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
WayneD, thanks. Good idea. I'll give it a shot.
enarchay is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 12:33 PM.


MobileRead.com is a privately owned, operated and funded community.