View Single Post
Old 05-28-2023, 12:20 PM   #3
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: 31,083
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
First the Basics: There can only be ONE Table of contents DECLARED per EPUB book (just like, a Cover). For EPUB2, this is the NCX (with any inline, usually derived from that by using the tool the Phos referred to).

OTOH Just like cover, you can have as many (undeclared) lookalikes.

So, why not use Calibre's tools to help do the slight of hand and help build them?
The simplest is to start with Markup of the files to be included using H# (h1-h6 are available) tags on the part to be captured as this TOC pseudo-TOC entries.
This allows us to create a single indented TOC by level.
Once the NCX has all the levels, use the make inline tool to make one.

IMMEDIATLY thereafter, remove the TOC semantics from that file (you will see an icon in the Editor next to that file) so further TOC generation does not stomp this file) .

You are now free to break up (split) and/or edit this file. We made it this way because it has all the links intact to the various levels (but remember, any adjustments to the original NCX, never propagate to inline. This TOC-Index task is the near last steps to be done)
Place the results of the file splits where you want (in the book list order)
Add a near top level heading (H2-h3) to thes files so the next step can pick them up. eg <h2> Evening prayers</h2>

Now generate a NEW (NCX) TOC, but only using top levels (I believe this is H1-3). This is the final TOC, you can touch up as needed while in the TOC editor, just as normal.
theducks is online now   Reply With Quote