Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2010, 01:52 PM   #1
BDP1
Junior Member
BDP1 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2010
Device: Kindle
Kindle Table of Contents

Hello,
I've searched through the forum and have not been able to find a post that precisely addresses my question. I'm a beginner with the Calibre software but so far I have been able to scan several chapters of a book, port them into Word 2007, create a table of contents, save the file as an html document, successfully use Calibre to create a mobi file, and download the file to my Kindle 3. My Kindle recognizes everything, including the table of contents. The links in the TOC are active and work as desired. I even see the little tic marks on the progress line on the bottom of the pages where you can tab to the start of each chapter using the 5-way button. My question is a simple one. I have all this working correctly but the thing I cannot get to work is when I press the Kindle 'Menu' key, and then click 'Go to...', The 'Table of Contents' selection is grayed out. It would seem this would be active so I could easily tab to the TOC. Can somone give me an idea as to how to surrmount this final obstacle? Other than this small thing, everything is working perfectly.

many thanks,
Brian P
BDP1 is offline   Reply With Quote
Old 12-16-2010, 02:06 PM   #2
Coleccionista
Connoisseur
Coleccionista began at the beginning.
 
Posts: 67
Karma: 40
Join Date: Aug 2010
Device: iPad, Kindle Paperwhite
I believe you are generating an inline TOC. The true Table of Contents is metadata-based (not a page of the book) and it's defined in the toc.ncx file.

Create a Basic toc.ncx file

Search also in these forums, there have been discussions, like for example:
https://www.mobileread.com/forums/sho...56&postcount=6

Last edited by Coleccionista; 12-16-2010 at 02:11 PM. Reason: Add link to MR post
Coleccionista is offline   Reply With Quote
Advert
Old 12-16-2010, 02:11 PM   #3
janvanmaar
Addict
janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.
 
Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
I guess that you need to specifically tag your TOC items (for instance adding toc='toc_level1' atribute to every level 1 entry in the TOC) and let Calibre know about your tags in the TOC section (fill in the XPath for level 1 TOC etc) when converting to MOBI.
In addition, you may also want to check the "Do not add TOC to book" option in the MOBI output section as from your description you already have put it to the desired place in the book yourself.

Last edited by janvanmaar; 12-16-2010 at 02:14 PM.
janvanmaar is offline   Reply With Quote
Old 12-16-2010, 02:21 PM   #4
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
How did you mark Chapter headings in your Word doc?

Suppose you had styled them with the Word built-in style 'Heading 2', then when you Saved-As Webpage-filtered the Chapters would be tagged with <h2>...</h2> tags.

Then after importing the html into calibre you would run a conversion ZIP to MOBI, with conversion settings:
Convert - StructureDetection - Detect Chapters at: //h:h2
Convert - TableofContents - Level 1: //h:h2

This would create a single-level metadata TOC (in file toc.ncx) in your MOBI. Nothing at all to do with the inline one you already have.
jackie_w is offline   Reply With Quote
Old 12-16-2010, 03:29 PM   #5
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
The Kindle doesn't present the NCX table of contents directly to the user - it's only used internally by the device software to place to "navpoint" tick marks on the progress bar, and allow single-key jumping to the next or previous navpoint using the 5-way controller. The OP reports that the TOC he created works fine - that's an inline TOC, part of the book itself. He also reports that the tick marks are present in the progress bar and he can navigate to next/previous chapter using the 5-way control, so the NCX file is present and correct. What he needs is a way to tell the Kindle where in the book to find the inline TOC.

Brian - what's needed is to add an HTML bookmark to your HTML file to mark the start of the TOC (e.g. <a id="toc" />), and then a way of creating a "guide" item in the OPF file that is built into the MOBI file, pointing to that bookmark as the start of the inline TOC. That's what the Kindle needs, to be able to find the TOC. Someone else who knows Calibre better will correct me if I'm wrong, but I don't think there's any way of doing that directly in Calibre while converting HTML to MOBI.

What I'd suggest is using Mobipocket Creator first to create an initial MOBI file, during which process you can add a "toc" guide item to point to the bookmark you created in the HTML file (using the above example bookmark, you would set the "toc" guide item to point to "your_book_filename.html#toc"). Once you've done that, you can load the resulting MOBI file into Calibre, then convert MOBI > MOBI, which will add the "hidden" NCX table of contents which provides the chapter navigation points for the 5-way controller to use.

Edit to add: If you add the "toc" bookmark at the appropriate point in the Word doc, that will translate into the appropriate HTML bookmark of the same name when you save that doc to HTML. End of edit

I hope that made some sort of sense!

Last edited by DMSmillie; 12-16-2010 at 03:37 PM.
DMSmillie is offline   Reply With Quote
Advert
Old 12-16-2010, 03:45 PM   #6
BDP1
Junior Member
BDP1 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2010
Device: Kindle
Many thanks for the several suggestions. I will be taking next week off and I will attempt to implement some of the ideas. Unfortunately, I am a neophyte when it comes to HTML code so it will take some time on my part as I ascend the learning curve.
BDP1 is offline   Reply With Quote
Old 12-16-2010, 04:41 PM   #7
janvanmaar
Addict
janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.
 
Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
Perhaps a short summary of the suggestions with some notes would help you:

1. jackie_w's suggestion is the simplest - it does not require anything else from you than telling Calibre what did you use for chapter definitions in your editor (header2 in his example). However, the TOC created in this way only includes the chapter names exactly as they are in the book and thus can, generally, be different from the TOC you created before. For example, it will always create an entry "Chapter name" as in stands in the book while you may have used eg "Chapter x: Chapter Name" format. If this is ok, then you do not need to look any furher and simply use this suggestion.

2. my suggestion tries to enable your custom TOC entries simply by copying every entry to the required place in the book and giving it a special tag which you then specify to Calibre in TOC detection section, similarly as you would do with h2 tags in jackie's case. I should have mentioned that you almost certainly want to wrap the entries in <div style="visibility:hidden"> tags, otherwise they would appear in the book itself.

3. clearly, my suggestion is suboptimal since if you already have your TOC in the HTML, there should be a way to simply use that instead of reproducing it again. However, I did not know how to do that with Calibre and DMSmillie also does not know but suggests using combined Mobipocket Creator - Calibre scheme for this purpose.

Hope this helps a bit
janvanmaar is offline   Reply With Quote
Old 12-16-2010, 04:42 PM   #8
janvanmaar
Addict
janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.
 
Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
EDIT: from some reason duplication of my previous post was created so I deleted it...

Last edited by janvanmaar; 12-16-2010 at 04:47 PM.
janvanmaar is offline   Reply With Quote
Old 12-16-2010, 05:19 PM   #9
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
The thing is, janvanmaar - Peter already has a working, inline TOC (the only kind that the Kindle makes available to the user), and in creating the MOBI file with Calibre, the ncx TOC is being correctly created, since he's able to navigate using the Kindle's 5-way control. What isn't working is the Kindle's "Go To..." menu entry which, if it was working, would take the reader to the inline TOC. As far as I know, the only way to enable that to work is via a type="toc" guide item pointing to the start of the inline TOC in the HTML file.

If Peter was hand-crafting the source files to compile into the MOBI file, it would be relatively straightforward - add the HTML bookmark at the appropriate point in the HTML file, and add the appropriate item to the guide section of the OPF file to point to the location of the inline TOC in the HTML file. Then he could use Kindlegen, for example, to combine the OPF file, NCX file, HTML file and (if included) cover image into a MOBI file.

The issue here is how to get that guide item into the MOBI file so that the Kindle knows where to find the inline TOC.
DMSmillie is offline   Reply With Quote
Old 12-16-2010, 06:15 PM   #10
janvanmaar
Addict
janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.
 
Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
DMSmillie: I agree. Calibre adds that guide automatically when it is creating the TOC from the XPath definitions in the TOC section (ok, I did not check the source but I always get *both* 5-way key navigation and TOC in GoTo when creating TOC in this way). But of course, there may (should) be a better solution.

Last edited by janvanmaar; 12-16-2010 at 06:19 PM.
janvanmaar is offline   Reply With Quote
Old 12-16-2010, 06:41 PM   #11
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Aha! That was the bit of info I was missing (also got it in parallel with your reply here, from KovidGoyal in response to the question I asked in a separate post). Thanks janvanmaar!

Looks like, when using Calibre to create the MOBI file, that's the only way of getting that marker to the location of the inline TOC.

Brian - if you're happy to let Calibre create another TOC at the end of the book based on your section/chapter headings, that one will be marked in such a way that the Kindle will be able to identify it as the TOC, and the Kindle's "Go To... Table of Contents" menu link will point to it.

Last edited by DMSmillie; 12-16-2010 at 06:44 PM. Reason: typo
DMSmillie is offline   Reply With Quote
Old 12-16-2010, 08:05 PM   #12
janvanmaar
Addict
janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.
 
Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
Quote:
Brian - if you're happy to let Calibre create another TOC at the end of the book based on your section/chapter headings, that one will be marked in such a way that the Kindle will be able to identify it as the TOC, and the Kindle's "Go To... Table of Contents" menu link will point to it.
Indeed, this is exactly what jackie_w suggested. The thing I mentioned is just a modification of this when you create your own toc tags throughout the book, which will be hidden and typically located just before the actual section/chapter headings (in general wherever you like have them to point to). Calibre will then build the TOC from the custom tags instead of from just the section/chapter headers.
Plus, the "Do not add TOC to book" option in the MOBI output section can be used to supress adding another TOC to the end of the book which I guess Brian may want in his case.
janvanmaar is offline   Reply With Quote
Old 12-17-2010, 12:40 AM   #13
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Quote:
Originally Posted by janvanmaar View Post
Indeed, this is exactly what jackie_w suggested. The thing I mentioned is just a modification of this when you create your own toc tags throughout the book, which will be hidden and typically located just before the actual section/chapter headings (in general wherever you like have them to point to). Calibre will then build the TOC from the custom tags instead of from just the section/chapter headers.
Plus, the "Do not add TOC to book" option in the MOBI output section can be used to supress adding another TOC to the end of the book which I guess Brian may want in his case.
But... Jackie is talking about the creation of the NCX toc, which is clearly already working fine.

And... if you tick "Do not add TOC to book", then you won't get the addition of the guide item in the MOBI file which tells the Kindle where to find an inline TOC.

See https://www.mobileread.com/forums/sho...d.php?t=111600
DMSmillie is offline   Reply With Quote
Old 12-17-2010, 05:58 AM   #14
janvanmaar
Addict
janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.
 
Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
Quote:
But... Jackie is talking about the creation of the NCX toc, which is clearly already working fine.
It would do both...
Quote:
And... if you tick "Do not add TOC to book", then you won't get the addition of the guide item in the MOBI file which tells the Kindle where to find an inline TOC.
Yes, you right here! My mistake, I misunderstood this option. Good to know!
janvanmaar is offline   Reply With Quote
Old 12-17-2010, 07:36 AM   #15
BDP1
Junior Member
BDP1 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2010
Device: Kindle
Wow, you folks are certainly generous with your suggestions. I hope I can do them credit in figuring this out.

many thanks again,
Brian
BDP1 is offline   Reply With Quote
Reply

Tags
kindle, toc


Forum Jump

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: how create table of contents at the bottom line? ganymede Calibre 1 11-09-2010 01:43 AM
Help with my Table of Contents Skylinefranc Calibre 0 03-19-2010 12:55 AM
How to: table of contents wizzofoz Sigil 1 10-08-2009 08:22 AM
Creator Table of Contents Nate the great Kindle Formats 5 07-10-2008 05:55 AM


All times are GMT -4. The time now is 07:27 PM.


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