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!
|