View Single Post
Old 05-20-2010, 10:05 AM   #1
Corey.Langner
Junior Member
Corey.Langner began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2009
Device: Kindle 2
[Old Thread] calibre detects chapters, doesn't add to TOC

I have a .lit ebook that I want to convert to .mobi to read on my Kindle. The .lit ebook has 27 chapters, all of which show up in the TOC.

I have attempted to convert using both version 0.6.52 & 0.6.53 on Windows XP (service pack 3).

My .mobi output has "pagebreaks" and / or "rulers" at each chapter as would be expected. When I view the .mobi file, the chapters are perfectly detected.

I have looked at the four debug folders. calibre is correctly breaking the ebook into 28 distinct .htm files (named 000 throught 027). Each of these .htm files starts with <h1>Chapter X</h1> and contains the text of that chapter and that chapter only. The 000 .htm file appears to contain the TOC information.

However, I cannot get a TOC to generate to save my life. I have tried a number of combinations of xPath expressions in both the "Detect Chapters" box and the "Level 1 TOC" box.

I currently am using an xPath expression that says: //*[re:test(., "CHAPTER", "i")] for structure detection. I have tried copying that directly into the "Level 1 TOC" box with no success. I have tried //h:h1, and even //* but I cannot get it to create a TOC.

Any ideas?
Corey.Langner is offline   Reply With Quote