Missing table of contents in ePub to Kindle conversion
I am using iWork Pages to export an ePub file which I am converting to Kindle format using Kindlegen. Everything works pretty much fine, except the table of contents.
In the Kindle Previewer, the ToC shows up when I click NCX View, but if I click the ToC button, I get an error message saying that the ToC is missing.
I have been bashing my brain out all day trying to solve this problem. I have read dozens of posts about it. Most solutions seem to suggest editing the ePub file with Sigil to insert a named anchor "in the HTML file". Unfortunately, Pages creates a separate html file for each chapter, so I can't see where I should insert the named anchor.
I have used Sigil to look at toc.ncx and content.opf. Both files seem to contain everything they should. I have verified the ePub file and there doesn't seem to be anything wrong with it.
I am familiar with HTML, and editing isn't a problem.
I have an older version of Microsoft Word that cannot create a filtered HTML file, so this is not an option for me.
I have even tried using Calibre to make the conversion from epub to mobi. While this works, and creates the ToC, it results in bizarre word breaks when I upload the file to Amazon.
Any ideas? This is driving me nuts.
Mac Pro, Mac OS X (10.7.2)