Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-16-2015, 02:09 PM   #1
LucyOne
Librocubicularist
LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.
 
LucyOne's Avatar
 
Posts: 617
Karma: 11908623
Join Date: Dec 2013
Location: Germany
Device: PocketBook InkPad 3 & Touch HD 3, Kobo Clara HD, Kindle Paperwhite 5
How to remove fixed line-spacing?

I have some books that have a fixed value for line-spacing, e.g. line-height: 1.4em. Is there a way in Calibre to remove those values automatically?

I normally do EPUB to EPUB conversion to remove unwanted styles but fixed line-height remains in the stylesheet.
LucyOne is offline   Reply With Quote
Old 10-16-2015, 02:48 PM   #2
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,097
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by LucyOne View Post
I have some books that have a fixed value for line-spacing, e.g. line-height: 1.4em. Is there a way in Calibre to remove those values automatically?

I normally do EPUB to EPUB conversion to remove unwanted styles but fixed line-height remains in the stylesheet.
Under look & feel, filter style information--enter line-height--*will remove all line-height values.
see screen shot.
*I would recommend you use the editor to change the line-height's instead.
bernie
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2015-10-16 14:40:28.png
Views:	777
Size:	93.4 KB
ID:	142901  

Last edited by gbm; 10-16-2015 at 02:50 PM.
gbm is offline   Reply With Quote
Advert
Old 10-17-2015, 04:54 AM   #3
LucyOne
Librocubicularist
LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.
 
LucyOne's Avatar
 
Posts: 617
Karma: 11908623
Join Date: Dec 2013
Location: Germany
Device: PocketBook InkPad 3 & Touch HD 3, Kobo Clara HD, Kindle Paperwhite 5
Thanks a lot, I didn't know about this possibility!
LucyOne is offline   Reply With Quote
Old 10-17-2015, 04:57 AM   #4
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: 74,996
Karma: 131375774
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Actually, it would be better to use the editor to edit the CSS to remove the line height.
JSWolf is offline   Reply With Quote
Old 10-17-2015, 05:46 AM   #5
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by JSWolf View Post
Actually, it would be better to use the editor to edit the CSS to remove the line height.
Much, much better, but that does of course require a knowledge of the way that CSS works. If the OP doesn't currently have that knowledge, it is worth making the effort to acquire it. Changing the appearance of a book by editing the CSS is far more flexible than relying on Calibre's "preset" conversion options.
HarryT is offline   Reply With Quote
Advert
Old 10-17-2015, 08:09 AM   #6
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
On the other hand,if your e reader device has user friendly line height controls, there is little risk in auto stripping all those in the book, which you have to do anyway for Kobo in order to use the reader sliders
cybmole is offline   Reply With Quote
Old 10-17-2015, 08:14 AM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by cybmole View Post
On the other hand,if your e reader device has user friendly line height controls, there is little risk in auto stripping all those in the book, which you have to do anyway for Kobo in order to use the reader sliders
As long as you don't also strip the much more important "margin-top" and "margin-bottom" settings, which control paragraph spacing, that's true. You really don't want to blindly remove all those, because in any decently-formatted book they'll be different for different paragraph styles.
HarryT is offline   Reply With Quote
Old 10-17-2015, 08:32 AM   #8
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: 74,996
Karma: 131375774
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
All you do is go into the select eBook you want to edit, go into the editor, select the CSS (from the left panel under styles) and find any lines that start with Line-height: and remove them. Then quit (from the file menu) and when the dialog comes up, select Save and Quit. That's it, done. No conversion needed.
JSWolf is offline   Reply With Quote
Old 10-17-2015, 10:54 AM   #9
LucyOne
Librocubicularist
LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.LucyOne ought to be getting tired of karma fortunes by now.
 
LucyOne's Avatar
 
Posts: 617
Karma: 11908623
Join Date: Dec 2013
Location: Germany
Device: PocketBook InkPad 3 & Touch HD 3, Kobo Clara HD, Kindle Paperwhite 5
Quote:
Originally Posted by JSWolf View Post
All you do is go into the select eBook you want to edit, go into the editor, select the CSS (from the left panel under styles) and find any lines that start with Line-height: and remove them. Then quit (from the file menu) and when the dialog comes up, select Save and Quit. That's it, done. No conversion needed.
I did that with some books but it takes more time than just converting the book.
I read with CoolReader on a Pocketbook Touch Lux 2. I don't want to disable all CSS styles in the book. Usually there's no problem, but especially German publishers prefer fixed line height in Epubs and I can't disable this separately in CoolReader.
LucyOne is offline   Reply With Quote
Old 10-17-2015, 10:58 AM   #10
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: 74,996
Karma: 131375774
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
One way to make removing line-height faster is once you have loaded the eBook into the editor, select the Tools menu and then Remove unused CSS rules. That will remove all unused CSS classes and make the CSS smaller if there are any unused CSS classes. Then you can find and remove all the [B]line-height[/i] lines in the CSS.
JSWolf is offline   Reply With Quote
Old 10-17-2015, 11:16 AM   #11
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,084
Karma: 57259778
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by JSWolf View Post
Actually, it would be better to use the editor to edit the CSS to remove the line height.
Blanket removal (of anything) is almost always a poor choice (right up there with blanket Applying to every CSS class )

There are a few cases where retaining a line-height might be desired for a cleaner look.

Lines with multiple font sizes (Big or Drop letters, sub/sup, smallcaps)
Line spacing when split with a Br
Code:
<h2 class="ch">Chapter <br /> 2</h2>
theducks is offline   Reply With Quote
Old 10-17-2015, 06:05 PM   #12
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: 74,996
Karma: 131375774
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 theducks View Post
Blanket removal (of anything) is almost always a poor choice (right up there with blanket Applying to every CSS class )

There are a few cases where retaining a line-height might be desired for a cleaner look.

Lines with multiple font sizes (Big or Drop letters, sub/sup, smallcaps)
Line spacing when split with a Br
Code:
<h2 class="ch">Chapter <br /> 2</h2>
This is true. One place you do not want to remove the [b]line-height[/i] is when the first letter of a paragraph is larger then the rest of the body text. a [b]line-height[/i] of 0 should be used there to keep the entire line from moving up from the rest of the paragraph.

There could be other places, but not many (IMHO). I've removed most [b]line-height[/i] from the CSS with no detrimental effect.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Line Spacing Francois Driesen Calibre 2 08-22-2014 02:21 PM
Fixed spacing in HTML/CSS without tables ink-sniffer ePub 25 04-03-2014 03:08 AM
How to remove additional line spacing on Kindle fire Merischino Calibre 2 05-26-2012 01:24 PM
Need help with line spacing ficbot Sigil 4 05-31-2011 01:52 PM
Line spacing Ivo Kobo Reader 3 06-30-2010 12:54 PM


All times are GMT -4. The time now is 08:10 AM.


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