There was nothing wrong with the Table Of Contents itself. I’d created one in Microsoft Word and it had been correctly built into my Kindle eBook. It listed all my chapters and when I clicked a chapter entry, it took the reader to that chapter.
The thing that wasn’t working was the Kindle’s built-in navigation to the Table Of Contents (from its ‘Go’ menu which is accessed in various ways according to whether you are using a hardware or software Kindle Reader). Every time I clicked this option I saw this error message...
I spent a couple of days trying to find and fix this problem. I searched numerous web sites and forums and found many explanations, most of which were either incomplete, incomprehensible, vague or just plain wrong. Anyway, I eventually found the solution and in this article I’ll explain all the steps you need to take in order to add a fully functional Table Of Contents.
Create The Table Of ContentsFirst, you need to generate hyperlinked Table Of Contents. I am going to assume you will do this using Microsoft Word. If you’ve never made a Table Of Contents in Word before, the easiest way to do so is to format all your chapter headings as an outline. You can see the Outline structure either by selecting View/Outline or (as I prefer) by displaying the Document Map, View/Document Map.
Make your Novel Title the root of the Outline (press SHIFT+ALT+Left Arrow) or select the Heading1 Style from the Home toolstrip. For each chapter, either select Heading 2 or indent one level (press SHIFT+ALT+Right Arrow). The end result should be that you have your novel Title shown as the ‘root’ at the top and the left-most level in the Document map and the chapters each indented one level below that.
When you want to generate your Table of Contents, go to a blank area, typically close to the front of the book and select References/Table Of Contents/Insert Table Of Contents.
Set Show Levels to 2 (or 3 if you have more levels in your outline) and turn off page numbers since Kindle books don’t have fixed page numbering. You can also click the Options button to tailor which styles are used to create TOC entries if necessary. When you’ve finished, click OK and Word will insert the Table Of Contents.
You may need to delete items that you don’t want there – for example, the root item (the name of your novel).
In order that Kindle can find your Table Of Contents you also need to insert a bookmark called “toc”. To do that, position your cursor immediately before your Table Of Contents and select Insert/Bookmark. Enter toc and click Add. You should also add a start bookmark at this stage. Position your cursor at the logical start of your book (that is, before the first paragraph of chapter 1), select Insert/Bookmark. Enter start and click Add.
Now save your text as filtered HTML, as explained in my last Blog post. You are now ready to generate your book using the Mobipocket Creator, the basics of which were also explained in my previous post.
Create Your Kindle Document
In summary this is what you need to do:
Step One – Import Your Document
1) You’ve already saved your Word document in Web Page, Filtered HTML format. Let’s assume this file is called MyNovel.html and it’s in the C:\KindleDocs directory.
2) Load Mobipocket Creator.
3) Click Import From Existing File/HTML document.
4) Click Browse to Choose A File. Pick your file – for example, C:\KindleDocs\MyNovel.html.
5) Select a folder into which you want to place your finished publication. Again you may browse to this. Let’s assume the Publication folder is: C:\KindleDocs\Publish
6) Click Import
Mobipocket Creator should now confirm that your file has been imported.
IMPORTANT: At this point you should have two important directories – your Source Directory (containing your original documents) and your Publication Directory (containing files created or copied by Mobipocket Creator).
In my example, my Source Directory is: C:\KindleDocs
My Publication Directory is C:\KindleDocs\Publish
Mobipocket Creator will make subdirectories beneath the Publication Directory and in one of these subdirectories there will be a copy of the original HTML file. For example in my case this is in: C:\KindleDocs\Publish\MyNovel.
Now, to make the TOC and Start links operational, I have to add some ‘Guides’ which refer to the bookmarks in my HTML file.
Step Two - Add 'Guides'
1) Click View/Guide in Mobipocket Creator
2) Click New Guide Item
3) Select Type/toc
4) Add a Filename and a toc link following a hash (#) character.
To do this, click Browse and browse to the COPY of the html file under your Publication Directory – e.g. : C:\KindleDocs\Publish\MyNovel\MyNovel.html. DO NOT browse to the original html file (e.g. : C:\KindleDocs\ MyNovel.html)!
Now edit the file name by appending #toc
The full entry in the File Name should now be the file name itself plus #toc – for example, MyNovel.html#toc
5) Add a start link in the same way. i.e. Click New Guide Item. Select Type/start and browse and edit the file name by addng #start at the end. The text in the file name field should be something like: MyNovel.html#start
6) Click Update
Step Three- Add Cover Image
If you have a cover image add this now.
1) Click View/Cover Image
2) Click Add Cover Image
3) Browse to your Cover image (suggested format JPG, 800x600).
4) Click Open then Click Update.
Step Four - Create Your PublicationYou are now ready to generate the finished publication.
Click the Build icon at the top of the screen. Then click the Build button.
If there are any errors or warnings, review these now. If, for example, you added Guides to your original HTML file (in the Source directory) rather than to the one that Mobipocket Creator copied into your Publication directory, you will see Link errors. Guides must be applied to the HTML file in the Publication directory only.
Your publication is now created as a file ending with ‘.prc’ in your Publication directory. Load this into a Kindle Reader or the Kindle Previewer as explained in my last Blog entry. You should now be able to click the Go menu and select Cover, Beginning or Table of Contents to go immediately to your cover image, the text marked with the ‘start’ bookmark and the Table Of Contents marked with the ‘toc’ bookmark.
The proof of the pudding is in the Publishing. I’ve just published my Kindle book on Amazon and if you’d like to verify that my Table Of Contents is full functional, I’d be delighted if you would buy a copy. Naturally, I’d be even more delighted if you then read the book! ;-)