12-27-2011, 07:27 PM | #1 |
Enthusiast
Posts: 29
Karma: 12996
Join Date: Dec 2010
Location: Dallas, TX
Device: Pocketbook Color
|
Table of contents and kindle directional pad
In the kindle, you can use the directional pad to go to the the next chapter. I've seen in various ebooks where the 'level' of the toc item, for lack of a better word, is taken into account - for instance, in a bible I own (from osnova, I think), if I'm on a book, and press the right directional key, it goes to the next book, but if I'm on a chapter, pressing the directional keys moves between chapters. I've tried to replicate this feature a couple times, but I can't - I'm making a cookbook, and have various sections - main dishes, desserts, etc - set up as chapters, with individual dishes set up as sub-chapters. I would like to be able to use the directional keys to go straight from section to section, but currently, when I use the directional keys, it goes straight from section heading to the first dish in that section. I made the book in Sigil, and then converted it to .mobi with calibre (title is H1, H3 for the main sections, and H4 for the sub-sections). When I actually go to the table of contents menu, it recognizes that the dishes are sub-chapters of the sections, so its not like the fact that there were sub-chapters just got lost in conversion. I had assumed that just making them sub-chapters would be enough, but apparently it wasn't. Is there anyone who knows how to make this work?
|
12-31-2011, 05:57 PM | #2 |
Zealot
Posts: 117
Karma: 584308
Join Date: Oct 2010
Location: San Francisco
Device: Kindle
|
The Kindle uses the toc.ncx file for this section to section movement.
You can unzip an epub file to see what one looks like and edit it for your own use. Then reference the ncx in the mobi .OPF file's manifest and spine sections: <manifest> <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml"/> . . . </manifest><spine toc="ncx"> . . . </spine>To create sublevels in the toc.ncx, write something like this (note the placement of the opening and closing tags): <navPoint id="book-1" playOrder="1"> <navLabel> <text>Book 1</text> </navLabel> <content src="filename1.html"/> <navPoint id="sub-chapter-1A" playOrder="2"> <navLabel> <text>Chapter 1A</text> </navLabel> <content src="filename2.html"/> </navPoint> <navPoint id="sub-chapter-1B" playOrder="3"> <navLabel> <text>Chapter 1B</text> </navLabel> <content src="filename3.html"/> </navPoint> </navPoint> |
Advert | |
|
12-31-2011, 06:16 PM | #3 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Only the top level of a multi-level toc will be visible as "tick marks" on the Kindle's progress bar. I do believe the directional pad will still take you to each entry in the ncx file (I'm not 100% on that) but you won't see all the marks for a multi-level toc.
So when you have 3 sections that are further divided into chapters... if you build the ncx as multi-level, you'll only see the 3 marks representing the 3 sections on the progress bar. There's no reason, however, that you can't create a flat (not nested) ncx file so all the marks will show up (since those "jump points" are the only thing the ncx is really used for). |
01-06-2012, 10:17 AM | #4 |
Enthusiast
Posts: 29
Karma: 12996
Join Date: Dec 2010
Location: Dallas, TX
Device: Pocketbook Color
|
thanks, both of y'all. That looks promising. I haven't had a chance to actually test it yet - we've had a rough week in the txgecko house - but when I do have the time to tinker with it, that looks like just what I'll need.
|
Tags |
kindle, mobi, table of contents |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle DX and PDF Table of Contents | Gideon | Amazon Kindle | 12 | 03-19-2012 06:14 PM |
Kindle ebooks missing table of contents | Jabby | Amazon Kindle | 19 | 05-13-2011 07:18 PM |
Kindle Table of Contents | BDP1 | Calibre | 15 | 12-17-2010 07:47 AM |
Kindle: how create table of contents at the bottom line? | ganymede | Calibre | 1 | 11-09-2010 01:43 AM |
Table of Contents | peterinnes | Sigil | 1 | 09-29-2010 03:03 AM |