![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 130
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? ![]() |
![]() |
![]() |
![]() |
#2 |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
|
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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,749
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
It could be some class like <p class="tx"> where tx is what would need to be fixed.
|
![]() |
![]() |
![]() |
#4 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 130
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 |
![]() |
![]() |
![]() |
#5 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,749
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 130
Karma: 48786
Join Date: Oct 2010
Location: Australia - Adelaide
Device: Kindle3
|
Quote:
Last edited by Bigo2; 06-23-2014 at 05:02 AM. |
|
![]() |
![]() |
![]() |
#7 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,749
Karma: 145864619
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. |
![]() |
![]() |
![]() |
#8 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 130
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...
|
![]() |
![]() |
![]() |
#9 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 130
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 |
![]() |
![]() |
![]() |
#11 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 130
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. |
![]() |
![]() |
![]() |
#12 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
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.
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. |
![]() |
![]() |
![]() |
#13 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,048
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() Code:
search: </p>\s*<br class="calibre1" />\s+(<p class="value_here">)
replace: </p> \1
(?</p>\s*)<br class="calibre1" /> |
|
![]() |
![]() |
![]() |
#14 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,749
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#15 | |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |