![]() |
#1 |
Member
![]() Posts: 19
Karma: 10
Join Date: Apr 2012
Device: Kindle Fire, iPad 2
|
Generating a Table of Contents
I am creating ebooks from scratch. I have figured out how to set the cover image, create a NCX and have even added a Linked HTML TOC at the beginning of my book. The problem I am running in to is that when I am viewing my book in the Kindle Previewer and I select the Table of Contents button I get the error "Missing Table of Contents, Your book is currently missing a TOC, which allows easy navigation in Kindle books......" Same goes for the Kindle Fire, when I select the TOC button there is no TOC. Does anyone have any insight on how to do this? Maybe a guide. I am not sure if I am suppose to add a TOC to the .opf or where exactly. Any help would be greatly appreciated.
Last edited by ebookn00b; 04-02-2012 at 09:59 AM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,371
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It sounds like you're doing everything except indentifying your Linked HTML TOC in the guide section of the opf file.
Code:
<guide> <reference href="Text/your_html_file.html#anchor_name" title="Table of Contents" type="toc" /> . . . </guide> Code:
<reference href="Text/your_html_TOC.html" title="Table of Contents" type="toc" /> |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
|
<div id="toc" />
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,371
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#5 |
A Thirsty Mind
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 92
Karma: 2546
Join Date: May 2011
Location: Lubec, Maine
Device: Kindle Fire, iPad, iPhone
|
As far as I know, if you have a built-in TOC in your html file, you have to link it within MobiPocket in the Guide feature. Be sure and bookmark your Table of Contents header name=TOC. Then the line in the Guide will read 'MyBook.html#TOC' This is a pretty elemental way of doing it, so I apologize to all the expert html guys out there, but its worked for me for more than 100 books.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Mar 2012
Device: kindle
|
I converted a gnu software manual to mobi format. I generate a toc.html and and a toc.ncx. There isn't much difference between them as to contents. The format and the layout is quite different!
If I use the kindle previewer and press the ncx button I get to see a tree structure with collapsible items. However on the kindle 3 it is just the html TOC. How do I get to the ncx data on the kindle 3 |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Mar 2012
Device: kindle
|
I got it using the 5-way button left and right moves you through the ncx points!
How ever i have for a "node" for the GNU GENERAL PUBLIC LICENSE and it has 4 "points" 1) Preamble, 2)TERMS AND CONDITION, 3)END OF TERMS AND CONDITIOND, 4) How to apply ..... using the right cusor key I get to the "node" GNU GENERAL PUBLIC LICENSE. the next right cursor key get me to 1. The Concepts of Bison. I would have expected that it gets me to Preamble. I do have depth set to 3 in the ncx file. Does the kindle 3 only use level 1? Rene |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,371
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Mar 2012
Device: kindle
|
Well, it is used. once you are in the chapter e.g. your on 3.1 then right arrow will take you to 3.2, 3.3 etc and left arrow will take you back
|
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,371
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Right. I remember hearing about that functionality. But I believe only the highest level will appear as "markers" on the progress bar (for those device that still utilize it).
|
![]() |
![]() |
![]() |
#11 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Mar 2012
Device: kindle
|
Ncx toc solved. Now html toc
I just checked it. The markers are level one. Once you are at level two left and right stays on level two. You get out of level two by a next/previous page. Well handy to know. I adjust my script to generate 2 levels in the ncx file.
Now I wonder how my toc.html gets nicely indented I expected something like 1 Makefiles 1.1 Rules 1.2 Recursive but I get1 Makefiles 1.1 Rules 1.2 Recursive Do i need special markup I did Code:
<div> <a href="#l1">Makefiles</a> <div> <a href="#l1-1">Rules</a></div> <div> <a href="#l1-2">Recursive</a></div> </div> |
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 19
Karma: 10
Join Date: Apr 2012
Device: Kindle Fire, iPad 2
|
My TOC is at the start of my epubs HTML file. Here is the code for it.
<div class="toc"> <p class="No-Paragraph-Style"><span class="story">Table of Contents</span></p> <p class="What-is-Leadership-"><a href="#toc_marker-1">What is Leadership?</a></p> <p class="The-Be--Know--Do-Leadership-Philosophy"><a href="#toc_marker-2">The Be, Know, Do Leadership Philosophy</a></p> <p class="Levels-of-Army-Leadership"><a href="#toc_marker-3">Levels of Army Leadership</a></p> <p class="Leadership-Versus-Management"><a href="#toc_marker-4">Leadership Versus Management</a></p> <p class="The-Cadet-Command-Leadership-Development-Program"><a href="#toc_marker-5">The Cadet Command Leadership Development Program</a></p> </div> I tried to enter the following code into the OPF to get the TOC button in the KindleFire menu to actually show the TOC but I had no luck. Any suggestions? <guide> <reference href="Text/Leadership_SEC_1.html" title="Table of Contents" type="toc" /> </guide> |
![]() |
![]() |
![]() |
#13 |
Member
![]() Posts: 19
Karma: 10
Join Date: Apr 2012
Device: Kindle Fire, iPad 2
|
Nevermind. I got it the Kindle UI Table of Contents button to jump to the TOC by adding the following code to my OPF.
<guide> <reference type="toc" title="Table of Contents" href="Leadership_SEC_1.html"/> </guide> |
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
good catch. It is also a good idea to assign an id="toc" to the top entry in your example.
|
![]() |
![]() |
![]() |
#15 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Mar 2012
Device: kindle
|
I didn't had a problem generating a toc. I had difficulty in indenting the toc at level 2.
But there is someone on the internet who explains that with a littlebit The solution was to add a style file and 2 definitions toc1 toc2 and it worked! |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Please, help with Table of Contents | fe0642 | Conversion | 3 | 08-09-2011 12:23 PM |
Table of Contents | taraboom11 | Sigil | 20 | 04-30-2011 11:18 AM |
Generating a rough "table of contents" | Vanguard3000 | Calibre | 5 | 01-09-2011 10:31 PM |
Table of Contents not generating | Amalthia | Calibre | 2 | 12-19-2010 08:15 PM |
How to: table of contents | wizzofoz | Sigil | 1 | 10-08-2009 08:22 AM |