![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: May 2012
Device: Nook Touch
|
![]()
First of all, I'm extremely new to both Calibre and the epub format, so please be patient with my ignorance. Also, I tried searching for this in the forums, but didn't find it. (Likely because I didn't know enough to know what to search for.)
I have some EPubs that have a blank line in between each and every paragraph. I do not like this. How can I fix these epubs so that I don't have all of this useless white space on my tiny reader screen? Can I do it with Calibre? Do I need to install something like Sigil to do it? Is this something I can do by extracting the contents of the epub and editing with a text editor? Thank you. Last edited by PortMan; 05-03-2012 at 01:57 PM. Reason: incorrect title |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,257
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If the ePub has DRM, you'll need to remove the DRM first. Go find Apprentice Alf via Google and learn how.
If the ePub is without DRM, you can use Tweak ePub from within Calibre and use a good text editor like Notepad++ (Windows) to edit the CSS to fix the problem. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: May 2012
Device: Nook Touch
|
OK, I've done that, and opened the *.css files for two different books. Could you look at them and tell me what I need to add/remove/change to make it display without the blank lines?
The first one has multiple *.css files for each sub-book in it, but they're all the same, and look like this: Code:
.verseNumber { font-size:large; margin: 15px 15px 15px 15px; } ul { list-style-type:none; } Code:
@namespace h "http://www.w3.org/1999/xhtml"; .MsoNormal { display: block; font-family: Calibri; font-size: 0.85714em; line-height: 1.2; margin-bottom: 0.0001pt; margin-left: 0; margin-right: 0; margin-top: 0; text-align: center } .MsoNormal1 { display: block; font-family: Calibri; font-size: 0.85714em; line-height: 1.2; margin-bottom: 0.0001pt; margin-left: 0; margin-right: 0; margin-top: 0 } .MsoNormal2 { display: block; font-family: Calibri; font-size: 0.85714em; line-height: 1.2; margin-bottom: 0.0001pt; margin-left: 0; margin-right: 0; margin-top: 0; text-indent: 0.5in } .Section { display: block; page: Section1 } .SpellE { line-height: 1.2 } .calibre { display: block; font-size: 0.875em; line-height: 1.2; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0 } .calibre1 { color: inherit; cursor: inherit; text-decoration: inherit } .calibre2 { font-weight: bolder } .calibre3 { font-size: 1.33333em; line-height: 1.2 } .calibre4 { display: block; line-height: 1.2 } .calibre5 { font-style: italic; line-height: 1.2 } .calibre6 { font-style: italic } |
![]() |
![]() |
![]() |
#4 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,257
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What does the code in the XML look like for the normal paragraphs?
Also, remove all the line-height: 1.2. |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: May 2012
Device: Nook Touch
|
Are you asking for the XML from the first book or the 2nd?
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
The easiest way to do it is to do an "ePub to ePub" conversion in Calibre and, in the conversion options dialogue, go to the "Look and Feel" page and check the "Remove spacing between paragraphs" box.
This won't work in 100% of cases, but it does work for the vast majority of books. |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: May 2012
Device: Nook Touch
|
The epub to epub conversion, after a little bit of fiddling around, worked! Thank you!
Now that it's modified in my library, what do I need to do to get the updated version onto my Nook touch? |
![]() |
![]() |
![]() |
#8 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,257
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
ePub > ePub doesn't always work well. IMHO, it's better to learn to edit the code.
|
![]() |
![]() |
![]() |
#9 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
|
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: May 2012
Device: Nook Touch
|
|
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
Quote:
The "Remove spacing between paragraphs" doesn't work when the source uses Line Feed rather than Paragraph markers. I find it easiest to fix these by converting to RTF, search/replace Line Feeds to Paragraphs in Open Office or Word, save as ODT or RTF, then add that back to calibre and convert to ePub using the "Remove spacing between paragraphs" box. Here's a question related to avoiding all that work on the LF exceptions: Is there an easy way to replace the HTML tags for LF (whatever they are) with the HTML tags for Paragraph (whatever they are), using search/replace regular expressions during the first conversion? Last edited by unboggling; 05-06-2012 at 09:07 PM. |
|
![]() |
![]() |
![]() |
#12 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,916
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() There is no LF or CR-LF tag in HTML There is a <p> tag, or a <div> tag. Either of those could contain a <br /> tag (forces to a new line). Code:
<p> Now Is the time for all Good Men</p> Code:
<p>Now is the time for all Good Men</p> |
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
theducks, thanks. I'll look at the code the next time I see one of those problem formats.
|
![]() |
![]() |
![]() |
#14 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,257
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
body { font-family: serif; widows: 0; orphans: 0; margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; text-align: justify } Last edited by JSWolf; 05-07-2012 at 02:28 AM. |
|
![]() |
![]() |
![]() |
#15 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,257
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
For the code for the paragraphs that went with the CSS code. Please post both in another message.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Do not remove paragraph spaces in Kindle output module | andrewdru | Conversion | 15 | 08-29-2011 11:29 AM |
WTB: Ability to change indent without ticking 'remove spaces between lines' | gweminence | Calibre | 9 | 08-27-2011 09:05 AM |
expression to remove double spacing between paragraphs | ktj | Calibre | 4 | 07-26-2011 02:38 PM |
How can I remove spaces from folder and file names? | jusmee | Calibre | 1 | 11-06-2009 10:36 PM |
Anyway to remove paragraph spaces in pdb files? | twister | Other formats | 3 | 03-12-2009 09:36 PM |