06-30-2024, 11:18 AM | #1 |
Junior Member
Posts: 5
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Issue with Nested Divs in TOC on Kindle
Hi,
Sigil automatically generates the TOC with Tools > Table of Contents > Generate HTML from TOC. The problem is that it generates a TOC structure with nested divs. I am working with an epub that has 3 levels (h1, h2, h3) in the index, which results in the TOC having 3 nested divs. The problem I have is that Kindle only supports 2 nested divs. If I add a TOC with 3 nested divs, Kindle displays it as if they are all at the same level (h1). Is there any way to automatically generate the TOC without nesting divs? Thanks |
06-30-2024, 01:01 PM | #2 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
You can run Sigil's toc editor tool and promote, demote or delete (i.e. not include) whatever headers you want. There is also a filter for limiting to the highest level. FWIW, Technically you are ordering ol and li tags not div tags in the nav, I believe.
Last edited by KevinH; 06-30-2024 at 01:10 PM. |
06-30-2024, 05:50 PM | #3 |
Evangelist
Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
I also wish the XHTML TOC didn't use nested divs and perhaps instead CSS. Yet not sure if it's too late to change such. I generate one somewhat often as the H2 and H3 section titles can be good for navigating longer works, in place of the provided XHTML toc.
I use AppleScript with BBEdit to change such. There may be other ways. |
06-30-2024, 06:17 PM | #4 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
I believe thethe TOC the kindle processes is the ncx under epub2 and the nav.xhtml under epub3. Creating an html toc is not the same as either of those.
|
06-30-2024, 06:45 PM | #5 |
Guru
Posts: 783
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
|
I know that Sigil is an editor for EPUB files, but when preparing files for kindle TOC in HTML files is important and Amazon pays attention if it is missing.
|
06-30-2024, 07:21 PM | #6 | |
Evangelist
Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
Issue with Nested Divs in TOC on Kindle
Quote:
Yet that it seems that that was what the OP was referring to. Yet maybe such was mis-worded. Seems Kindle TOCs may only support 2 levels. Not sure if that is the issue or if also nested divs could be, yet that would be strange. Last edited by democrite; 06-30-2024 at 07:25 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Nested divs in Kindle | euriloco | Devices | 2 | 06-29-2024 11:18 AM |
Kindle -creating nested / multi level TOC menu | codys | Kindle Formats | 1 | 10-16-2018 03:26 PM |
Nested (expandable) ToC | AppleTard | Amazon Kindle | 3 | 04-02-2017 08:25 PM |
Touch Nested TOC problem with NST | lavina | Barnes & Noble NOOK | 2 | 01-30-2014 07:01 PM |
nested toc appears flattened on kindle | MrNiceGaius | Conversion | 2 | 09-19-2013 09:51 AM |