|  10-16-2020, 05:26 PM | #1 | 
| Junior Member  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? | 
|   |   | 
|  10-16-2020, 05:48 PM | #2 | 
| Well trained by Cats            Posts: 31,249 Karma: 61360164 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 | 
|   |   | 
| Advert | |
|  | 
|  10-16-2020, 05:58 PM | #3 | 
| Junior Member  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>
		 | 
|   |   | 
|  10-16-2020, 07:55 PM | #4 | |
| Running with scissors            Posts: 1,592 Karma: 14328510 Join Date: Nov 2019 Device: none | Quote: 
  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. | |
|   |   | 
|  10-17-2020, 12:05 AM | #5 | 
| Bibliophagist            Posts: 48,088 Karma: 174315300 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. | 
|   |   | 
| Advert | |
|  | 
|  10-18-2020, 07:57 AM | #6 | 
| Guru            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.
		 | 
|   |   | 
|  10-18-2020, 12:22 PM | #7 | 
| Running with scissors            Posts: 1,592 Karma: 14328510 Join Date: Nov 2019 Device: none | 
			
			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. | 
|   |   | 
|  10-19-2020, 08:57 AM | #8 | |
| Guru            Posts: 681 Karma: 929286 Join Date: Apr 2014 Device: PW-3, iPad, Android phone | Quote: 
 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. | |
|   |   | 
|  10-19-2020, 04:28 PM | #9 | 
| Running with scissors            Posts: 1,592 Karma: 14328510 Join Date: Nov 2019 Device: none | |
|   |   | 
|  10-20-2020, 01:16 PM | #10 | ||
| mostly an observer            Posts: 1,519 Karma: 996810 Join Date: Dec 2012 Device: Kindle | Quote: 
 Quote: 
 | ||
|   |   | 
|  10-20-2020, 04:44 PM | #11 | 
| Guru            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?
		 | 
|   |   | 
|  10-20-2020, 05:01 PM | #12 | |
| Running with scissors            Posts: 1,592 Karma: 14328510 Join Date: Nov 2019 Device: none | Quote: 
 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. | |
|   |   | 
|  11-03-2020, 03:17 AM | #13 | 
| Witchman            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.
		 | 
|   |   | 
|  11-03-2020, 06:49 AM | #14 | |
| Resident Curmudgeon            Posts: 80,740 Karma: 150249619 Join Date: Nov 2006 Location: Roslindale, Massachusetts Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 | Quote: 
 I've edited ePub 3 back to ePub 2 and the things removed didn't make one difference once I fixed the CSS. | |
|   |   | 
|  11-03-2020, 06:58 AM | #15 | 
| Grand Sorcerer            Posts: 28,880 Karma: 207000000 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.
		 | 
|   |   | 
|  | 
| 
 | 
|  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 |