View Single Post
Old 11-16-2012, 02:17 PM   #2
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,869
Karma: 4630362
Join Date: Dec 2010
Device: Kindle PW2
When you convert PDFs to .mobi the actual TOC information usually gets lost and needs to be re-created from scratch. I'd recommend converting the PDF to html or epub first. Then have a look at the html code that the chapter headings are enclosed in.

If all headings have a unique style (e.g. <p class="calibre77">Heading</p>), you might be able to get a TOC by specifying a regular expression in Calibre using the XPath wizard(s). (Preferences > Common Options > Table of Contents)

Alternatively you could open the .html or .ePub file with Sigil, and replace all heading <p>/</p> tags with <h3>/</h3> tags and have Sigil automatically generate a TOC. If it looks OK, you can generate an HTML TOC, save the file and compile it with Kindlegen or convert it with Calibre.

If you have more questions, post them in the Calibre, Sigil or Mobi forums.
Doitsu is offline   Reply With Quote