12-28-2009, 04:25 PM | #1 |
Member
Posts: 11
Karma: 10
Join Date: Dec 2009
Device: none
|
get rid of blank line html code
Is there a way to have calibre filter out, or simply not create, blank line code such as
<p class="MsoNormal"><span class="calibre1"> </span></p> The remove blank lines option is checked. I've used the replace function in Sigil to do it, but Sigil always deletes my TOC info when I save the file. Converting the file again in Calibre from epub to epub after saving with Sigil doesn't bring back the TOC for some reason either. I know I could edit each file in the epub, but I'm trying not to have to change 30 or so files. Any help would be appreciated. |
12-28-2009, 07:58 PM | #2 |
creator of calibre
Posts: 44,526
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That blank line is coming from the input file. If the blanks lines in the input file have a particular tag structure you can use extra css to remove them like this
p.MsoNormal {display:none} This will of course remove all paragraphs that have class MsoNormal, which is why you need the extra structure |
Advert | |
|
12-28-2009, 08:33 PM | #3 |
Member
Posts: 11
Karma: 10
Join Date: Dec 2009
Device: none
|
Sorry, I don't quite understand. I get the tag.class part of the line, but how do I get more specific in the removal. All of the paragraphs are msonormal class. Here's an example of one of the problem files.
<p class="MsoNormal"><span class="calibre1"> </span></p> <p class="MsoNormal"><span class="calibre1">"That's the story," she said, finishing her tale.</span></p> <p class="MsoNormal"><span class="calibre1"> </span></p> <p class="MsoNormal"><span class="calibre1">"Well done. Conclusion."</span></p> <p class="MsoNormal"><span class="calibre1"> </span></p> |
12-28-2009, 08:57 PM | #4 | |
Resident Curmudgeon
Posts: 76,368
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
<p class="MsoNormal"><span class="calibre1"> </span></p> |
|
12-28-2009, 10:20 PM | #5 |
creator of calibre
Posts: 44,526
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look at the input file not the calibre generated HTML. There is a brief description of how to look at the html from the input file in the conversion section of the calibre user manual
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HTML to PDF, blank pages after each chapter | ibarro | Calibre | 5 | 08-02-2010 04:08 PM |
Sigil 1.6 - deleting blank line very slow | lol | Sigil | 2 | 12-24-2009 12:54 PM |
Random differences in blank line conversion in ePub | HarryT | Calibre | 14 | 08-13-2009 04:31 AM |
Getting rid of battery status line | colonel | Sony Reader Dev Corner | 7 | 04-22-2009 11:12 AM |
Getting rid of line breaks with Bookdesigner | Ned | Workshop | 16 | 11-01-2008 06:37 PM |