View Single Post
Old 05-18-2016, 01:21 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,356
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Hello Villard and welcome to MR!

I don't think Sigil has a built in function that will do that completely automatically. You will have to do some manual setup and copy/paste. However, you can minimize the amount of copy/paste by taking advantage of Sigil's TOC generator.

You'll have to prep your epub to make it work:
1) make sure your TOC is not semantically marked as the TOC (it could get overwritten)
2) You need to make sure you are using a heading tag to identify the title of each chapter/sub-chapter. (eg <h2>Chapter A</h2> <h3>Subchapter 1</h3>)
You can use regex to Search/Replace and create all those <h2> and <h3> tags. While doing that, I would add the introductory text as part of the title element of the tag like this: <h3 title="Subchapter 1: Some introductory text">Subchapter 1</h3>

When you have all that done, run Sigil's TOC generator and it will create a new Global TOC with all the correct links to the correct pages.
3) Copy/Paste from the Global TOC to create your Sub-TOC as you need.


Having said all that, I would like to remind you that one of the great benefits of an ebook is that it has built-in Navigation to each of the Chapters/sub-chapters. An html global TOC with html sub-TOCs is not strictly necessary. You should consider having a basic HTML Global TOC that provides Chapter guidance and rely on the built-in Navigation for all your sub-chapters. That will drastically reduce the amount of work.

Cheers!
Turtle91 is offline   Reply With Quote