Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-28-2026, 09:58 AM   #1
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 367
Karma: 518
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Generate TOC flags unused headings

I used Generate TOC to make a new table of contents using only <h1> headings (but not all of them).

When doing further editing, I noticed (for me, the first time) that all unused headings received a flag like this:

Code:
<h2 class="sigil_not_in_toc">
It looks like a CSS style page entry, but isn't.

I imagine it had some useful intention when introduced, but I don't understand what it could be. It doesn't seem to change any interface presentation when running another Generate TOC.

Doing a mass delete of these entries doesn't seem to impact on the ncx or on anything else.

Is there a setting which can be adjusted in Sigil to prevent them being written in the first place?
philja is offline   Reply With Quote
Old 05-28-2026, 10:07 AM   #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: 9,676
Karma: 6774048
Join Date: Nov 2009
Device: many
Yes, it is how Sigil notes which headings to not add to the TOC when generating it. This is how Sigil has always marked such entries during creation of a TOC from the very beginning of Sigil.

You can of course remove them after your your TOC is in final form if you want but if you change your mind you may have to again add your limit to which headings to include or not.

They are also useful when exceptions are made when editing the TOC ie. using Edit TOC and deleting an entry. When doing that, you do not want to actually delete a heading from the actual xhtml, you just want to mark it so that it is ignored when building the TOC itself.

FYI - Sigil also adds ids to headings when creating or making subheadings and detecting when changes are made.

They will not hurt anything (they are a marker class) but can be useful for styling unused headings. I add CSS to make them standout (colour red) so I can find them when editing. Sometimes I use the css to mark them as hidden.

The concept of using marker classes is quite common in javascript to allow fast selection of elements. Similar things can be done using id attributes.

If you are absolutely sure everything TOC related is final (no new files, no new headings, no heading wording changes) and you do not want to style unused headings as hidden (or greyed out, or make them visually distinct for editing), you can of course run a search and replace to remove them or use them to remove entire unused headings.

I just leave them in since they are a good way to mark headings that are unused. Note, that marking for index generation also uses marker classes.

Last edited by KevinH; 05-28-2026 at 10:21 AM.
KevinH is online now   Reply With Quote
Old 05-28-2026, 11:40 AM   #3
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 367
Karma: 518
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Thanks for the explanation, Kevin.
philja is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a TOC to create Chapter headings meghane_e Editor 7 12-09-2025 03:48 PM
"Reverse" TOC generation - generate <h> tags at TOC points. Vanguard3000 Sigil 3 06-06-2023 04:36 PM
"generate ToC from all headings" doesn't save newly created entries davidhcje Calibre 0 05-30-2021 01:19 AM
Les Miserables - TOC / Chapter Flags? gshipley Amazon Kindle 1 09-28-2009 10:07 PM


All times are GMT -4. The time now is 12:57 PM.


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