Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-09-2019, 03:00 PM   #1
Chaihana Joe
Member
Chaihana Joe began at the beginning.
 
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?
Chaihana Joe is offline   Reply With Quote
Old 12-09-2019, 03:03 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
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?
KevinH is offline   Reply With Quote
Old 12-09-2019, 03:05 PM   #3
Chaihana Joe
Member
Chaihana Joe began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jan 2012
Location: UK
Device: Kindle 4, Kobo Glo, Apple devices, Android devices, PC
Quote:
Originally Posted by KevinH View Post
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?
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.
Chaihana Joe is offline   Reply With Quote
Old 12-09-2019, 03:20 PM   #4
Chaihana Joe
Member
Chaihana Joe began at the beginning.
 
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.
Chaihana Joe is offline   Reply With Quote
Old 12-09-2019, 03:20 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Sorry but things like that are why we removed BookView.
KevinH is offline   Reply With Quote
Old 12-09-2019, 03:28 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Chaihana Joe View Post
I should add that I've been in CodeView throughout.
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 03:34 PM.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question how to eliminate unwanted space in Sigil jimdays Workshop 8 03-03-2016 08:43 PM
How to remove unwanted Save-to-disk templates alexmobile Calibre 5 02-22-2012 05:54 AM
HTML to ePub: Calibre inserts unwanted tags NTG Conversion 4 10-09-2011 04:11 AM
Sigil 0.4.1 : unwanted span added by Sigil Bertrand Sigil 0 09-02-2011 05:28 AM
.mobi conversion adding unwanted left margin Skydog Conversion 3 05-01-2011 07:43 PM


All times are GMT -4. The time now is 05:39 AM.


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