Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-22-2014, 05:40 AM   #1
Bigo2
Zealot
Bigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchfork
 
Posts: 129
Karma: 48786
Join Date: Oct 2010
Location: Australia - Adelaide
Device: Kindle3
Spaces between paragraphs

Hi

When converting from epub to mobi I often remove spaces between paragraphs using the feature "Remove spacing between paragraphs" in "Look & Feel".

However, in some cases this does not work.

When touching the "Remove spacing between paragraphs" there is this message "Spacing removal will not work if the source does not use paragraphs <p> or <div> tags" - which is probably the reason.

So, what is the solution to this? Could you help please?
Bigo2 is offline   Reply With Quote
Old 06-22-2014, 09:40 AM   #2
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
Look at the source epub book and figure out how the spacing is done. Change it to <p> or <div> tags or remove whatever it is that takes extra space. Possibly using search and replace.
Adoby is offline   Reply With Quote
Old 06-22-2014, 10:45 AM   #3
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,970
Karma: 128903378
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 Adoby View Post
Look at the source epub book and figure out how the spacing is done. Change it to <p> or <div> tags or remove whatever it is that takes extra space. Possibly using search and replace.
It could be some class like <p class="tx"> where tx is what would need to be fixed.
JSWolf is offline   Reply With Quote
Old 06-23-2014, 03:59 AM   #4
Bigo2
Zealot
Bigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchfork
 
Posts: 129
Karma: 48786
Join Date: Oct 2010
Location: Australia - Adelaide
Device: Kindle3
Hi Adoby and JSWolf - thanks for your suggestions...
I know I can change the epub. Often I would convert it to html, edit whatever in Word, open it in Sigil and save it again as epub.

Recently I was asking how to convert an epub book which was completely in a bold font to mobi so the font would become normal.

Kovidgoyal suggested to use the Filter Style Information in the conversion dialog and filter out font-weight. And it works nicely!

For removing the spaces I thought that there would be some similar simple solution in the Look & Feel, perhaps putting something in Extra CSS or Filter Style Information…

Regards
Bigo2 is offline   Reply With Quote
Old 06-23-2014, 04:11 AM   #5
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,970
Karma: 128903378
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 Bigo2 View Post
Hi Adoby and JSWolf - thanks for your suggestions...
I know I can change the epub. Often I would convert it to html, edit whatever in Word, open it in Sigil and save it again as epub.

Recently I was asking how to convert an epub book which was completely in a bold font to mobi so the font would become normal.

Kovidgoyal suggested to use the Filter Style Information in the conversion dialog and filter out font-weight. And it works nicely!

For removing the spaces I thought that there would be some similar simple solution in the Look & Feel, perhaps putting something in Extra CSS or Filter Style Information…

Regards
What is seems that you are doing is taking these eBooks and making them harder to edit. There is no reason to convert ePub to HTML just to crap them up with Word. Leave them in ePub and use Sigil to fix what's wrong. Using Calibre to convert to fix things that are easily fixable with Sigil also also a bad idea. All you do is (very possibly) make the code that much harder to deal with.
JSWolf is offline   Reply With Quote
Old 06-23-2014, 04:40 AM   #6
Bigo2
Zealot
Bigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchfork
 
Posts: 129
Karma: 48786
Join Date: Oct 2010
Location: Australia - Adelaide
Device: Kindle3
Quote:
Originally Posted by JSWolf View Post
What is seems that you are doing is taking these eBooks and making them harder to edit. There is no reason to convert ePub to HTML just to crap them up with Word. Leave them in ePub and use Sigil to fix what's wrong. Using Calibre to convert to fix things that are easily fixable with Sigil also also a bad idea. All you do is (very possibly) make the code that much harder to deal with.
Thanks JSWolf - I believe you - I would prefer to use Sigil to remove the spaces between the paragraphs (in this case there are empty lines) but I don't know how to change the entire book easily. However, I know how to do it in Word, that's why I'm using it. In Word I am saving it as a Web Page, Filtered and then go to Sigil to be able to save it as epub...

Last edited by Bigo2; 06-23-2014 at 05:02 AM.
Bigo2 is offline   Reply With Quote
Old 06-23-2014, 12:00 PM   #7
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,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
What you are doing is adding layers of code and other junk that you don't need or even want.

Post a sample of your XML files and your CSS and maybe someone can help.
JSWolf is offline   Reply With Quote
Old 06-23-2014, 05:25 PM   #8
Bigo2
Zealot
Bigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchfork
 
Posts: 129
Karma: 48786
Join Date: Oct 2010
Location: Australia - Adelaide
Device: Kindle3
Thanks JSWolf - I am going to find out how to edit it in Sigil or Calibre Edit Book so I don't have to use the Word...
Bigo2 is offline   Reply With Quote
Old 06-24-2014, 04:24 AM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Bigo2 View Post
For removing the spaces I thought that there would be some similar simple solution in the Look & Feel, perhaps putting something in Extra CSS or Filter Style Information…
When converting try the Delete blank lines between paragraphs option under Heuristic processing.

Attached Thumbnails
Click image for larger version

Name:	heuristic.jpg
Views:	227
Size:	206.1 KB
ID:	124570  
DoctorOhh is offline   Reply With Quote
Old 06-24-2014, 06:30 AM   #10
Bigo2
Zealot
Bigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchfork
 
Posts: 129
Karma: 48786
Join Date: Oct 2010
Location: Australia - Adelaide
Device: Kindle3
Hi DoctorOhh - it does not work...

When checking this epub in Sigil, I have found that after every paragraph instead </p>, there is </p><br class="calibre1" />

So I used find and replace and after some time I was able to fix it all. I know I could've use Repace All, but I wanted to make sure not loosing something I did not want.

Thanks
Bigo2 is offline   Reply With Quote
Old 06-24-2014, 06:57 AM   #11
Bigo2
Zealot
Bigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchforkBigo2 can load mercury with a pitchfork
 
Posts: 129
Karma: 48786
Join Date: Oct 2010
Location: Australia - Adelaide
Device: Kindle3
One more question:

When converting to mobi I like to indent the first line of the paragraph. I am setting the Indent size (about 0.2) in Look and Feel, but it is only available together with the Remove spacing between paragraphs. But this removes all the spacing, even between the sections...
So, is there some other way how to set the Ident?

Last edited by Bigo2; 06-24-2014 at 07:01 AM.
Bigo2 is offline   Reply With Quote
Old 06-24-2014, 09:00 AM   #12
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Bigo2 View Post
Hi DoctorOhh - it does not work...
It doesn't work on <br> but as the tool tip explains it does work when the space between paragraphs is created by blank paragraphs.

Quote:
Originally Posted by Bigo2 View Post
So, is there some other way how to set the Ident?
I don't know if this can be done automatically. If needed I usually edit the css in the editor to accomplish the change in indent.
DoctorOhh is offline   Reply With Quote
Old 06-24-2014, 10:29 AM   #13
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Bigo2 View Post
Hi DoctorOhh - it does not work...

When checking this epub in Sigil, I have found that after every paragraph instead </p>, there is </p><br class="calibre1" />

So I used find and replace and after some time I was able to fix it all. I know I could've use Repace All, but I wanted to make sure not loosing something I did not want.

Thanks
That construct is a forced break (after a paragraph ends . I thought BR's had to be inside a block element?)

Code:
search: </p>\s*<br class="calibre1" />\s+(<p class="value_here">)

replace: </p> \1
You might get away with just removing just a BR if it follows a </p>
(?</p>\s*)<br class="calibre1" />
theducks is offline   Reply With Quote
Old 06-24-2014, 11:30 AM   #14
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,970
Karma: 128903378
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 DoctorOhh View Post
When converting try the Delete blank lines between paragraphs option under Heuristic processing.
That sometimes removes section breaks as well. Better off doing it via the code/CSS.
JSWolf is offline   Reply With Quote
Old 06-24-2014, 02:49 PM   #15
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
Quote:
Originally Posted by Bigo2 View Post
Hi DoctorOhh - it does not work...

When checking this epub in Sigil, I have found that after every paragraph instead </p>, there is </p><br class="calibre1" />

So I used find and replace and after some time I was able to fix it all. I know I could've use Repace All, but I wanted to make sure not loosing something I did not want.

Thanks
Well done!
Adoby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS to indent paragraphs and remove spaces Alda Sigil 7 06-20-2014 05:36 AM
Removing spaces between paragraphs Skydog Calibre 12 02-20-2013 08:52 PM
Spaces between Paragraphs in FBReader? luqmaninbmore PocketBook 2 03-10-2010 09:09 AM
Huge Spaces Between Paragraphs diremommy Calibre 0 12-29-2009 06:30 PM
Mobi -> LRF, huge spaces between paragraphs Djehuty Calibre 3 04-22-2009 12:06 PM


All times are GMT -4. The time now is 06:44 PM.


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