06-22-2014, 05:40 AM | #1 |
Zealot
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? |
06-22-2014, 09:40 AM | #2 |
Handy Elephant
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.
|
06-22-2014, 10:45 AM | #3 |
Resident Curmudgeon
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
|
It could be some class like <p class="tx"> where tx is what would need to be fixed.
|
06-23-2014, 03:59 AM | #4 |
Zealot
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 |
06-23-2014, 04:11 AM | #5 | |
Resident Curmudgeon
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:
|
|
06-23-2014, 04:40 AM | #6 | |
Zealot
Posts: 129
Karma: 48786
Join Date: Oct 2010
Location: Australia - Adelaide
Device: Kindle3
|
Quote:
Last edited by Bigo2; 06-23-2014 at 05:02 AM. |
|
06-23-2014, 12:00 PM | #7 |
Resident Curmudgeon
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. |
06-23-2014, 05:25 PM | #8 |
Zealot
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...
|
06-24-2014, 04:24 AM | #9 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
|
|
06-24-2014, 06:30 AM | #10 |
Zealot
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 |
06-24-2014, 06:57 AM | #11 |
Zealot
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. |
06-24-2014, 09:00 AM | #12 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
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. |
06-24-2014, 10:29 AM | #13 | |
Well trained by Cats
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:
Code:
search: </p>\s*<br class="calibre1" />\s+(<p class="value_here">)
replace: </p> \1
(?</p>\s*)<br class="calibre1" /> |
|
06-24-2014, 11:30 AM | #14 |
Resident Curmudgeon
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
|
|
06-24-2014, 02:49 PM | #15 | |
Handy Elephant
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:
|
|
|
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 |