01-21-2012, 12:33 AM | #1 |
Junior Member
Posts: 5
Karma: 472332
Join Date: Jul 2010
Device: iPhone
|
Can't get rid of   "paragraphs" when converting
I'm having a rather frustrating problem converting a few HTML ebooks I have. I'm converting them to ePub, but this happens with almost any format I convert to.
The problem I'm having is that the converted ePub has triple-spacing between each paragraph. I checked the source HTML file and discovered the cause: each paragraph has an extra "spacing" paragraph containing only one non-breaking space ( ). The spacing paragraphs are all identical: Code:
<p style='margin:0mm;margin-bottom:.0001pt;text-indent:36.0pt'><span style='font-size:14.0pt;font-family:"Calibri","sans-serif"'> </span></p> Code:
<p .*>\s*</span></p> Oh, and using the "remove spacing between paragraphs" option does nothing, before someone suggests it. |
01-21-2012, 06:34 PM | #2 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Most likely the is being converted to the Unicode character it represents. \s will not match this. Try copying and pasting the character from the book viewer into the regex.
|
01-21-2012, 10:15 PM | #3 |
creator of calibre
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Do not look at the source html, that is not what the search and replace rules run on, use the wizard in calibre to look at the actual html that the rules run on.
|
01-23-2012, 11:20 PM | #4 |
Junior Member
Posts: 5
Karma: 472332
Join Date: Jul 2010
Device: iPhone
|
I have. Like I said, when I test my regex the wizard finds all of the paragraphs just fine, but on conversion it misses every last one. This is true even if I use the unicode version of the non-breaking space (i.e. cut-paste from character viewer).
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use Calibre to get rid of "real" page information | lunixer | Calibre | 2 | 08-29-2011 07:07 PM |
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" | therealjoeblow | Calibre | 15 | 07-25-2011 03:14 PM |
How to get rid of the "Why not start with your first post today ... " reminder? (n/t) | Marshal Kilgore | Introduce Yourself | 11 | 07-24-2009 02:28 PM |
Question - Does iLiab have the "search" & "annotation, highlighting" features? | HiSoC8Y | iRex | 5 | 07-01-2009 04:37 PM |
Mobiperl lost when converting to mobi | Jellby | Kindle Formats | 19 | 08-26-2008 03:10 PM |