![]() |
#1 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2016
Device: ibooks
|
Collapsible TOC?
Hi, i'm creating an eBook based off of a 1300 page daily devotional. that being said, it has a massive table of contents with each day of the year being a link. This TOC is developed from indesign so it's already linked and ready. the issue is, when viewing it in an eReader, the TOC is expanded by default, so it takes 5 minutes to swipe through all the of the table of contents to get to the next part of the eBook. i have created an extra entry of each month, and moved each of the 30/31 days of each month inside that monthly "folder". problem is, it's all still completely expanded by default. when i view the TOC in the viewer, and tell it to collapse, it looks perfect. just 12 options, and you can expand each month to see each day. after i save it, it expands again automatically...I hope this makes sense. Is there an HTML code that will cause the TOC to be collapsed by default? If not, is there other software that will? thank you!
|
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,883
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
No, the code just "Nests.' Indent.
Remember EPUB2, NCX is the 'real' TOC for devices, since you want it to start 'collapsed': Make the NCX entry point to a page (XHTML) that is the 'Contents for that sections Start. Those items (links) will never be in the NCX ![]() Generate a overall HTML TOC page (from the nested monster NCX). Split it into 'Sections' and move those to the beginning (location in the file list) of their respective places. rename the files for clarity eg TOC02, TOC03... and Insert an top level Chapter (number) title at the beginning, that will be picked up by the TOC Generator tool in the next step ie <h1>Section x Contents </h1> now regenerate the NCX, but restrict (the pulldown is at the bottom) to only the top levels assigned to the Sections TOC : h1 Doing it in this order, lets Sigil do the tedious, "get the links correct" part ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Just organize and display the TOCs in a meaningful way, and the user can figure it out from there (skipping to a given year/month/day). This is what sample code for an HTML TOC might be: Spoiler:
and use CSS to tweak the look: Spoiler:
I have attached a sample EPUB. Side Note: If you are interested in both massive EPUBs, I wouldn't mind giving links if you wanted to see how those work on your devices. (One book is organized Year - Volume.Issue - ~650 articles, and the other is Year - ~970 articles.) I think the TOCs work perfectly. Quote:
Is this what you are talking about in the sidebar of Sigil? Quote:
If such a large TOC bothers you, maybe it might be best to just limit the TOC.NCX to Year/Month. (This can be done in Sigil using Tools - Table of Contents - Edit Table of Contents...). Personally? I would just leave it how it is. Anyone who thinks the TOC.NCX is too cumbersome would be able to use the HTML TOC instead, where they might be able to navigate slightly easier depending on their device. Last edited by Tex2002ans; 10-22-2016 at 06:37 AM. |
|||
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2016
Device: ibooks
|
Thanks for the replies everyone...
I'm having an odd issue with this though, if i can figure out how to attach an image with this i'll show you, but i have about 1000 TOC entries that are linked and work correctly. but when i go to "generate TOC", there's nothing there. just a blank window. i'm not sure why it's linked...but it's not linked? i have no clue. this is the one thing with Sigil that's blowing my mind. i feel so limited with this.
|
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,883
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The tool does not work from the HTML TOC
It uses the Headings (h#) as section title and anchors h1 h2 to generate the nesth3 Warning: The Generate HTML TOC then uses the NCX This will REPLACE any declared Table of Content (semantic) |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2016
Device: ibooks
|
so if i'm understanding you correctly, although this would be a long process, could i attach an H1 command to all 12 months(causing them to collapse?), then H2 to each day of the month, then H3 to the title under each day of the month, and so on? that would help it understand? i'll do whatever i need to do to make sure it's right.
|
![]() |
![]() |
![]() |
#7 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Spoiler:
It won't be able to automatically generate a TOC for you if you have code using <p>s and <div>s like this (I ripped this out of one of the latest InDesign EPUBs I worked on): Spoiler:
Quote:
We might be able to salvage something meaningful and better using Regex + digging into the nitty gritty. Mind sharing this EPUB on the board? Or if it is copyrighted, would you mind putting the EPUB on a filesharing site (Google Drive, etc. etc.) and sending me a link via PM? Side Note: I also can't see much of a reason WHY this specific book would need a TOC nested four deep (Month -> Month Day# -> Title -> Bible). Are there multiple sermons per day, or multiple Bibles under each day? I think it would be better organized by condensing the Month Day# + Title... and maybe the Bible in there too. Original: - January -- January 1 --- Say Goodbye to the Past and Hello to the Future! ---- —Philippians 3:13 Potential #1: - January -- January 1: Say Goodbye to the Past and Hello to the Future! --- —Philippians 3:13 Potential #2: - January -- January 1: Say Goodbye to the Past and Hello to the Future! (Philippians 3:13) Last edited by Tex2002ans; 10-22-2016 at 10:08 PM. |
||
![]() |
![]() |
![]() |
#8 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,883
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You might be able to do a creative REGEX (or use the toolbag plugin) to replace all TAG instances of
<p class="foo"> with <h3> and you can tick the box to optionally keep the class assigned also ![]() |
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Not necessarily. The automated tool uses the heading tags, but it is not the only way. In fact, if you go to the 'edit TOC' option via the menu, you can add/remove/change all kinds of TOC entries. Not only from headers, but from all kinds of links, including p and div tags.
|
![]() |
![]() |
![]() |
Tags |
table of contents, toc |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting Problems with Collapsible TOC on Paperwhite | Siavahda | Amazon Kindle | 2 | 07-21-2015 03:04 PM |
Multiple HTML files w/ TOC to MOBI, not added in order listed in TOC | dysfunction | Conversion | 3 | 01-03-2014 12:40 AM |
Collapsible TOC - possible? | lockheed | Amazon Kindle | 12 | 10-12-2012 01:48 PM |
Collapsible TOC in pdf files | md02439 | iRex | 3 | 11-05-2011 05:08 PM |