Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-16-2020, 05:26 PM   #1
steve100
Junior Member
steve100 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2020
Device: Kindle paperwhite
Something in Sigil disturbs my tags

I'm using Sigil 1.3.0 on Windows 7 64-bit.

I seem to be going around in circles with formatting my book.
My book is organized so that it has every chapter in it's own file.
I have a working CSS stylesheet.
I am working partially from NotJohn's guide.
I have gone through and re-edited issues in all the files countless times.

But something keeps messing with my html tags.

For instance, certain operations will change:
<p><h2 id="sigil_toc_id_1">ABOUT THIS BOOK</h2></p>

to invalidate my <p> tags:
<p></p>
<h2 id="sigil_toc_id_1">ABOUT THIS BOOK</h2>
<p></p>

But whatever is doing it, does this to all the p-tags in all the chapters when it happens.
So if I have <p class="first">here's some text</p>
It will get changed to <p class="first"></p>here's some text<p></p>

I have found a few things that change all my tags:
Generate Table of Contents
Open Files
Saving Files
changing the name of a chapter file in the Book Browser column

When this happens, I have to go through my book, line by line, and change back all my tags to the way I had them. Have I missed something obvious?
steve100 is offline   Reply With Quote
Old 10-16-2020, 05:48 PM   #2
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: 30,908
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You can't nest a H2 inside a P

Your invalid code may have confused things when trying to clean the errors
theducks is offline   Reply With Quote
Advert
Old 10-16-2020, 05:58 PM   #3
steve100
Junior Member
steve100 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2020
Device: Kindle paperwhite
OK, Thanks. I didn't know that. I wonder if I have that kind of error elsewhere? <stray thought>
steve100 is offline   Reply With Quote
Old 10-16-2020, 07:55 PM   #4
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,582
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by steve100 View Post
OK, Thanks. I didn't know that. I wonder if I have that kind of error elsewhere? <stray thought>
No doubt you do.

This is the plugin that I use to verify my epubs. The title might be misleading; the plugin/wrapper may be considered simple but epubcheck is rigorous.

https://www.mobileread.com/forums/sh...d.php?t=248186

It may seem intimidating but it's not, but you'll first need to install Java before you can install that plugin. Installing Java these days is pretty brainless. Java SE 15 seems to be the latest and greatest.

Last edited by hobnail; 10-16-2020 at 08:00 PM.
hobnail is offline   Reply With Quote
Old 10-17-2020, 12:05 AM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,828
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Probably more than you want to know but you can check the HTML spec at whatwg.org, specifically 3.2.5.2.5 Phrasing content which lists those elements that can be used inside <p>...</p>.

Interesting reading if taken with a large supply of your favourite source of caffeine.
DNSB is offline   Reply With Quote
Advert
Old 10-18-2020, 07:57 AM   #6
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
What were the <p> tags around your <h2> ones intended to do? Extra spacing? You can get the same result by modifying the effect of 'h2' in your stylesheet.
exaltedwombat is offline   Reply With Quote
Old 10-18-2020, 12:22 PM   #7
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,582
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by exaltedwombat View Post
What were the <p> tags around your <h2> ones intended to do? Extra spacing? You can get the same result by modifying the effect of 'h2' in your stylesheet.
Sometimes having h tags grouped together can be helpful. In that case a div can be used around them. I use the <header> tag for that grouping but that doesn't fly with epub 2 which is one of the reasons I use epub 3. For the sake of consistency (one of the hobgoblins of my small mind) I use header tags around single h tags as well as multiple ones.

Last edited by hobnail; 10-18-2020 at 12:26 PM.
hobnail is offline   Reply With Quote
Old 10-19-2020, 08:57 AM   #8
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by hobnail View Post
I use the <header> tag for that grouping but that doesn't fly with epub 2 which is one of the reasons I use epub 3. For the sake of consistency (one of the hobgoblins of my small mind) I use header tags around single h tags as well as multiple ones.
If you run kindlegen on an epub3 with <header> tags, you get a warning for each.

Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>

Not a fatal error, and you get a usable file. But still annoying.
I don't know what would happen if you submitted such a file to Amazon to publish.

Since my small mind cannot see any need for these tags, I delete them on sight, the files are still good per epubcheck.

Last edited by AlanHK; 10-19-2020 at 09:01 AM.
AlanHK is offline   Reply With Quote
Old 10-19-2020, 04:28 PM   #9
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,582
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by AlanHK View Post
Since my small mind cannot see any need for these tags, I delete them on sight, the files are still good per epubcheck.
Kill those pesky buggers!
hobnail is offline   Reply With Quote
Old 10-20-2020, 01:16 PM   #10
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
I use the <header> tag for that grouping but that doesn't fly with epub 2 which is one of the reasons I use epub 3
Interesting, thanks!

Quote:
I don't know what would happen if you submitted such a file to Amazon to publish.
Amazon/KDP doesn't use epubcheck, so if looks okay in the KDP online preview, I suspect it would sail through.
Notjohn is offline   Reply With Quote
Old 10-20-2020, 04:44 PM   #11
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
I'm still intrigued why you would WANT an extra tag round a h1? What does it do?
exaltedwombat is offline   Reply With Quote
Old 10-20-2020, 05:01 PM   #12
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,582
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by exaltedwombat View Post
I'm still intrigued why you would WANT an extra tag round a h1? What does it do?
I suppose it could depend upon what you consider header material. For example, some books have a quote after the chapter title, or a few lines of a poem. Those I put inside the header tag along with the h2. I use it so that I get consistent spacing after the stuff at the top of the page. If you want to go buck wild with semantic tags there are also article, main, section, and others. For example download an epub 3 book from standardebooks.org; Ivanhoe is a good example. (They now call them Advanced epub, they used to call them epub3.)

https://standardebooks.org/ebooks/walter-scott/ivanhoe

https://www.w3schools.com/tags/tag_header.asp

Last edited by hobnail; 10-20-2020 at 05:23 PM.
hobnail is offline   Reply With Quote
Old 11-03-2020, 03:17 AM   #13
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@steve999...Just run the Sigil plugin called CustomCleanerPlus. The plugin cleans up the code and will remove any dross or redundant code. It will also remove all instances of "<p></p>" from the epub html in one hit. You can download and install this Sigil plugin from here.
slowsmile is offline   Reply With Quote
Old 11-03-2020, 06:49 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: 79,136
Karma: 144284184
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 hobnail View Post
I suppose it could depend upon what you consider header material. For example, some books have a quote after the chapter title, or a few lines of a poem. Those I put inside the header tag along with the h2. I use it so that I get consistent spacing after the stuff at the top of the page. If you want to go buck wild with semantic tags there are also article, main, section, and others. For example download an epub 3 book from standardebooks.org; Ivanhoe is a good example. (They now call them Advanced epub, they used to call them epub3.)

https://standardebooks.org/ebooks/walter-scott/ivanhoe

https://www.w3schools.com/tags/tag_header.asp
But in ePub 2, I've never had an inconsistent chapter header/sub-header/quote/etc. You just make sure the CSS is correct. You don't need <header>. Just make sure <h2> is set in CSS for the chapter header is correct in CSS and that whatever classes you need to style the text before the main text is correct. Again, no need for <header>. What does <header> actually do that you cannot do in CSS with <h2>?

I've edited ePub 3 back to ePub 2 and the things removed didn't make one difference once I fixed the CSS.
JSWolf is offline   Reply With Quote
Old 11-03-2020, 06:58 AM   #15
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: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Again, Jon. Your penchant for constantly poo-pooing all things EPUB3 at every turn is not welcome in the Sigil area. Stop it, or stay out. Those are your choices.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil adding unwanted tags on Save Chaihana Joe Sigil 5 12-09-2019 03:28 PM
Using Sigil's Metadata Editor to tag ebooks with 'Collection' tags Afrosheen Sigil 17 05-14-2013 07:40 AM
Can I use custom xhtml tags in Sigil? Doitsu Sigil 2 09-21-2012 07:51 AM
Possible to escape characters in CSS tags in Sigil? GrannyGrump Sigil 7 03-13-2012 06:56 AM
Sigil adds spaces between HTML tags, creating strange characters chezjim Sigil 10 06-10-2011 04:00 AM


All times are GMT -4. The time now is 11:20 AM.


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