Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-30-2024, 11:18 AM   #1
euriloco
Junior Member
euriloco began at the beginning.
 
euriloco's Avatar
 
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
euriloco is offline   Reply With Quote
Old 06-30-2024, 01:01 PM   #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: 8,156
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.
KevinH is offline   Reply With Quote
Advert
Old 06-30-2024, 05:50 PM   #3
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
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.
democrite is offline   Reply With Quote
Old 06-30-2024, 06:17 PM   #4
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: 8,156
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.
KevinH is offline   Reply With Quote
Old 06-30-2024, 06:45 PM   #5
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 782
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.
Attached Thumbnails
Click image for larger version

Name:	kindle_previewer_toc_is_important.png
Views:	139
Size:	11.2 KB
ID:	209315  
BeckyEbook is offline   Reply With Quote
Advert
Old 06-30-2024, 07:21 PM   #6
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
Issue with Nested Divs in TOC on Kindle

Quote:
Originally Posted by KevinH View Post
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.

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.
democrite is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 01:32 PM.


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