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, 03: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, 06: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: 43,852
Karma: 22666666
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 online now   Reply With Quote
Advert
Old 12-28-2009, 07: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, 07: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: 73,957
Karma: 128903250
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, 09: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: 43,852
Karma: 22666666
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 online now   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 03:08 PM
Sigil 1.6 - deleting blank line very slow lol Sigil 2 12-24-2009 11:54 AM
Random differences in blank line conversion in ePub HarryT Calibre 14 08-13-2009 03:31 AM
Getting rid of battery status line colonel Sony Reader Dev Corner 7 04-22-2009 10:12 AM
Getting rid of line breaks with Bookdesigner Ned Workshop 16 11-01-2008 05:37 PM


All times are GMT -4. The time now is 12:27 AM.


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