Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2009, 04:25 PM   #1
Blurr
Member
Blurr began at the beginning.
 
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.
Blurr is offline   Reply With Quote
Old 12-28-2009, 07:58 PM   #2
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: 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
kovidgoyal is offline   Reply With Quote
Advert
Old 12-28-2009, 08:33 PM   #3
Blurr
Member
Blurr began at the beginning.
 
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>
Blurr is offline   Reply With Quote
Old 12-28-2009, 08:57 PM   #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: 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:
Originally Posted by Blurr View Post
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>
That's easy. get a copy of Notepad++, load all the HTML files into it. It supports tabs. Then you can do a single search/replace to remove
Code:
<p class="MsoNormal"><span class="calibre1"> </span></p>
Simple really.
JSWolf is offline   Reply With Quote
Old 12-28-2009, 10:20 PM   #5
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: 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
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

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


All times are GMT -4. The time now is 01:59 PM.


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