12-09-2019, 04:00 PM | #1 |
Member
Posts: 17
Karma: 10
Join Date: Jan 2012
Location: UK
Device: Kindle 4, Kobo Glo, Apple devices, Android devices, PC
|
Sigil adding unwanted tags on Save
I'm using Sigil for the first time and have run into a problem.
My book has sixty-odd chapters and I would like them all to start like this: <body> <p class="chapter-number">Chapter IV</p> <h2>Chapter Title</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad... Unfortunately when I save the book Sigil adds an empty paragraph before and after the <h1> tag, so that it looks like this: <body> <p class="chapter-number">Chapter IV</p> <p></p> <h2>Chapter Title</h2> <p></p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad... I imagine it's doing this for formatting reasons, but I'd prefer to use css to handle my formatting. Is there any way to prevent this behaviour? Also, should I be looking out for similar unwanted modifications on save elsewhere? |
12-09-2019, 04:03 PM | #2 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Sigil's CodeView does not add any code on Save. What version of Sigil are you using?
You are not referring to the now removed BookView are you? |
Advert | |
|
12-09-2019, 04:05 PM | #3 |
Member
Posts: 17
Karma: 10
Join Date: Jan 2012
Location: UK
Device: Kindle 4, Kobo Glo, Apple devices, Android devices, PC
|
I'm using 0.9.13 (with Book View). I like the BookView and was planning on not upgrading to a version that doesn't include it.
|
12-09-2019, 04:20 PM | #4 |
Member
Posts: 17
Karma: 10
Join Date: Jan 2012
Location: UK
Device: Kindle 4, Kobo Glo, Apple devices, Android devices, PC
|
OK, well the problem happened twice before I posted this, but since then I haven't been able to recreate it. I've done a Search and Replace to remove all the empty paragraphs and that seems to have cleared the behaviour.
I should add that I've been in CodeView throughout. |
12-09-2019, 04:20 PM | #5 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Sorry but things like that are why we removed BookView.
|
Advert | |
|
12-09-2019, 04:28 PM | #6 |
Grand Sorcerer
Posts: 28,039
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Except for when you've been in Book View, you mean? I assume you're using Book View for some sort of editing if you're refusing to upgrade to a version without it. Otherwise, there's be no reason to stick with it for pure Preview purposes. Later versions of Sigil already have Preview.
The bottom line is that even if you find a way to recreate the issue, we can't go back and time and fix your version of Sigil. The empty paragraph tags are a classic example of what happens when you hit the enter key in Book View. Nothing in Code View or any of the Code View formatting buttons (nor Sigil's save function) will add empty paragraph tags. You avoid it by never making any kind of edits in Book View. Last edited by DiapDealer; 12-09-2019 at 04:34 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question how to eliminate unwanted space in Sigil | jimdays | Workshop | 8 | 03-03-2016 09:43 PM |
How to remove unwanted Save-to-disk templates | alexmobile | Calibre | 5 | 02-22-2012 06:54 AM |
HTML to ePub: Calibre inserts unwanted tags | NTG | Conversion | 4 | 10-09-2011 05:11 AM |
Sigil 0.4.1 : unwanted span added by Sigil | Bertrand | Sigil | 0 | 09-02-2011 06:28 AM |
.mobi conversion adding unwanted left margin | Skydog | Conversion | 3 | 05-01-2011 08:43 PM |