10-16-2015, 03:09 PM | #1 |
Librocubicularist
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. |
10-16-2015, 03:48 PM | #2 | |
Wizard
Posts: 2,141
Karma: 8796706
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
|
Quote:
see screen shot. *I would recommend you use the editor to change the line-height's instead. bernie Last edited by gbm; 10-16-2015 at 03:50 PM. |
|
Advert | |
|
10-17-2015, 05:54 AM | #3 |
Librocubicularist
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!
|
10-17-2015, 05:57 AM | #4 |
Resident Curmudgeon
Posts: 77,160
Karma: 138591138
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.
|
10-17-2015, 06:46 AM | #5 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
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.
|
Advert | |
|
10-17-2015, 09:09 AM | #6 |
Wizard
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
|
10-17-2015, 09:14 AM | #7 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
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.
|
10-17-2015, 09:32 AM | #8 |
Resident Curmudgeon
Posts: 77,160
Karma: 138591138
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.
|
10-17-2015, 11:54 AM | #9 | |
Librocubicularist
Posts: 617
Karma: 11908623
Join Date: Dec 2013
Location: Germany
Device: PocketBook InkPad 3 & Touch HD 3, Kobo Clara HD, Kindle Paperwhite 5
|
Quote:
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. |
|
10-17-2015, 11:58 AM | #10 |
Resident Curmudgeon
Posts: 77,160
Karma: 138591138
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.
|
10-17-2015, 12:16 PM | #11 | |
Well trained by Cats
Posts: 30,542
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
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> |
|
10-17-2015, 07:05 PM | #12 | |
Resident Curmudgeon
Posts: 77,160
Karma: 138591138
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
There could be other places, but not many (IMHO). I've removed most [b]line-height[/i] from the CSS with no detrimental effect. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Line Spacing | Francois Driesen | Calibre | 2 | 08-22-2014 03:21 PM |
Fixed spacing in HTML/CSS without tables | ink-sniffer | ePub | 25 | 04-03-2014 04:08 AM |
How to remove additional line spacing on Kindle fire | Merischino | Calibre | 2 | 05-26-2012 02:24 PM |
Need help with line spacing | ficbot | Sigil | 4 | 05-31-2011 02:52 PM |
Line spacing | Ivo | Kobo Reader | 3 | 06-30-2010 01:54 PM |