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 03-02-2009, 12:09 PM   #1
Timoleon
Time Enough at Last
Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.
 
Timoleon's Avatar
 
Posts: 387
Karma: 1151316
Join Date: Feb 2008
Location: New England
Device: iPad 3, iPhone 5, Kindle 3, Fire, Sony PRS-350
Insert Blank Lines Between Paragraphs

Hi Kovid,

I know that one of the options in Calibre for converting files to lrf is "insert blank lines between paragraphs", which I love.

However, I don't see the same/similar thing for converting files to epub. I see "remove spacing between paragraphs", which is usually antithetical to what I want to do. My brain wants to wrap itself around an isolated paragraph, for some perverted need for clarity.

So...is there any way to get Calibre to insert blank lines between paragraphs in a conversion to epub, and if not, could this be a feature request for a future version of Calibre?

Thanks!
Timoleon is offline   Reply With Quote
Old 03-02-2009, 12:17 PM   #2
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Timoleon View Post
So...is there any way to get Calibre to insert blank lines between paragraphs in a conversion to epub, and if not, could this be a feature request for a future version of Calibre?
You can use some override CSS to achieve that. From the command-line --override-css='p { margin-top: 1.2em; }' should be about right, or using the GUI just put the same CSS (inside the single quotes) in the appropriate field.
llasram is offline   Reply With Quote
Advert
Old 03-02-2009, 12:20 PM   #3
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,514
Karma: 126422064
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Timoleon View Post
Hi Kovid,

I know that one of the options in Calibre for converting files to lrf is "insert blank lines between paragraphs", which I love.

However, I don't see the same/similar thing for converting files to epub. I see "remove spacing between paragraphs", which is usually antithetical to what I want to do. My brain wants to wrap itself around an isolated paragraph, for some perverted need for clarity.

So...is there any way to get Calibre to insert blank lines between paragraphs in a conversion to epub, and if not, could this be a feature request for a future version of Calibre?

Thanks!
You can edit the CSS of the created ePub and add in the spacing you want. Then just zip the CSS file back into the ePub and go from there.
JSWolf is offline   Reply With Quote
Old 03-02-2009, 12:30 PM   #4
Timoleon
Time Enough at Last
Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.
 
Timoleon's Avatar
 
Posts: 387
Karma: 1151316
Join Date: Feb 2008
Location: New England
Device: iPad 3, iPhone 5, Kindle 3, Fire, Sony PRS-350
Thanks, guys!

But since I'm a lazy bum, is there a way that Kovid could code this into Calibre as an option, without ripping the "pythons" out of his head?
Timoleon is offline   Reply With Quote
Old 03-02-2009, 12:42 PM   #5
peaceridge
Guru
peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.
 
peaceridge's Avatar
 
Posts: 995
Karma: 4407864
Join Date: Feb 2009
Location: North Carolina
Device: Kobo Aura1, Nexus7.2, Galaxy Tab A 8.4, Ipad Air & Mini 6
Quote:
Originally Posted by Timoleon View Post
Hi Kovid,

I know that one of the options in Calibre for converting files to lrf is "insert blank lines between paragraphs", which I love.

Where is that option? [Actually I hate the blank lines and I would like to turn it off]
peaceridge is offline   Reply With Quote
Advert
Old 03-02-2009, 02:53 PM   #6
Timoleon
Time Enough at Last
Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.
 
Timoleon's Avatar
 
Posts: 387
Karma: 1151316
Join Date: Feb 2008
Location: New England
Device: iPad 3, iPhone 5, Kindle 3, Fire, Sony PRS-350
Quote:
Originally Posted by llasram View Post
You can use some override CSS to achieve that. From the command-line --override-css='p { margin-top: 1.2em; }' should be about right, or using the GUI just put the same CSS (inside the single quotes) in the appropriate field.
Hmmm...having some issues

In the GUI epub css overide box under "Look and Feel" in Calibre, I put this:

p {
margin-top: 1.2em
}

It appears to convert ok, but when I look at the output on my PRS-505 nothing is changed; the paragraphs are still not separated. Any ideas what I might be doing incorrectly?

Thanks!
Timoleon is offline   Reply With Quote
Old 03-02-2009, 03:15 PM   #7
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,514
Karma: 126422064
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Timoleon View Post
Hmmm...having some issues

In the GUI epub css overide box under "Look and Feel" in Calibre, I put this:

p {
margin-top: 1.2em
}

It appears to convert ok, but when I look at the output on my PRS-505 nothing is changed; the paragraphs are still not separated. Any ideas what I might be doing incorrectly?

Thanks!
Try a margin-bottom: 1.2em
JSWolf is offline   Reply With Quote
Old 03-02-2009, 03:50 PM   #8
Timoleon
Time Enough at Last
Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.
 
Timoleon's Avatar
 
Posts: 387
Karma: 1151316
Join Date: Feb 2008
Location: New England
Device: iPad 3, iPhone 5, Kindle 3, Fire, Sony PRS-350
Quote:
Originally Posted by JSWolf View Post
Try a margin-bottom: 1.2em
No joy

Maybe it has something to do with the fact that it's a lit file that is being converted over by Calibre.

What I've done in the meantime is convert the lit over to plain text, add the paragraph spacing in Interparse4, suck the output back into Calibre and then convert that to epub.

There must be some simple screw-up that I'm doing with the style sheets... Kovid can you pipe in on this?
Timoleon is offline   Reply With Quote
Old 03-02-2009, 11:38 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,748
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the problem with css is that you can't really have "override rules". So there may be something in the CSS from the LIT file that is pverriding the margin setting.

Also you have to make sure that in the HTML in the LIT file <p> is actually what is used for paragraphs and not something like <br> or <DIV>
kovidgoyal is online now   Reply With Quote
Old 03-03-2009, 12:26 AM   #10
dschill
Connoisseur
dschill began at the beginning.
 
Posts: 50
Karma: 12
Join Date: Mar 2009
Device: none
great info!
dschill is offline   Reply With Quote
Old 03-03-2009, 09:51 AM   #11
Timoleon
Time Enough at Last
Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.
 
Timoleon's Avatar
 
Posts: 387
Karma: 1151316
Join Date: Feb 2008
Location: New England
Device: iPad 3, iPhone 5, Kindle 3, Fire, Sony PRS-350
Quote:
Originally Posted by kovidgoyal View Post
the problem with css is that you can't really have "override rules". So there may be something in the CSS from the LIT file that is pverriding the margin setting.

Also you have to make sure that in the HTML in the LIT file <p> is actually what is used for paragraphs and not something like <br> or <DIV>
Thanks, Kovid! The LIT files were produced by Book Designer 5.0 from various original formats. I'll bust apart the files and take a closer look...

Now for some investigation and some experimentation...I'm so glad I've got today off! It will keep my mind off the nasty cold I have and the minor surgery I'm going to have done later on this morning.
Timoleon is offline   Reply With Quote
Old 03-03-2009, 10:13 AM   #12
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
hm... since you are talking about a height measurement and not a width measurement, try your same css but use the unit "ex". "em" is the width of the letter "m" in whatever font / size you are using ; "ex" is the height of the letter x in whatever font / size you are using.

so :

p {
margin-top: 1.2ex
}

also, to check if it's working, try with some outrageous value like 5ex ; then you are sure to see a difference, and you can refine it later to find the value you like.
zelda_pinwheel is offline   Reply With Quote
Old 03-03-2009, 10:21 AM   #13
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
@zelda_pinwheel: That's definately true in traditional usage, but if you check the CSS spec it defines ems as a just a fraction of the current font-size. I proposed 1.2em as an approximation of the total line-height including leading, although there are certainly better ways with full control over the CSS.
llasram is offline   Reply With Quote
Old 03-03-2009, 10:23 AM   #14
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
hm, how odd ! why did they change that unit ? that doesn't make sense to me. as far as i know, ever since traditional printing em has been a measure of width and ex a measure of height (that's why we talk about the "x-height" of a font). now you are making me curious, i'm going to do a bit of experimentation myself.
zelda_pinwheel is offline   Reply With Quote
Old 03-22-2009, 02:43 PM   #15
Timoleon
Time Enough at Last
Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.Timoleon ought to be getting tired of karma fortunes by now.
 
Timoleon's Avatar
 
Posts: 387
Karma: 1151316
Join Date: Feb 2008
Location: New England
Device: iPad 3, iPhone 5, Kindle 3, Fire, Sony PRS-350
Exclamation Eureka!

Great news for all of you, like me, who needs to chew each paragraph separately --- the peas cannot touch the corn cannot touch the mashed potatoes:

Kovid has written me off-site and given me a simple style sheet override for Calibre's ePub output that separates each paragraph with a line/space:

{{{
p { padding-bottom; 3em; margin-bottom: 3em}
}}}

That's all there is to it --- I've tried it and it works!

Thanks, Kovid --- I must pinch myself now to make sure that I'm not dead and already in Elysium...
Timoleon 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
Lines became paragraphs after .lit to .mobi conversion Piper_ Calibre 11 09-19-2010 05:11 PM
Blank lines between paragraphs? ascherjim OpenInkpot 30 12-03-2009 12:19 AM
Removing blank lines between paragraphs? corroonb Workshop 3 08-13-2009 04:23 PM
Blank Lines vivaldirules Upload Help 55 03-02-2009 03:17 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 07:11 AM.


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