View Single Post
Old 10-17-2011, 05:37 PM   #1
lyric
Enthusiast
lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.lyric ought to be getting tired of karma fortunes by now.
 
Posts: 41
Karma: 3948942
Join Date: Jan 2011
Device: Kindle 3
Creating Proper TOC in Kindle - regex help needed

Hi all,

It's that old chestnut again. I am tearing my hair out trying to convert the David Copperfield .epub on this site to a modern .mobi correctly formatted with <h2> tags and a Kindle-friendly TOC which creates proper chapter marks.

The current markup for chapter headings is of the form:

<span class="calibre7 bold">I. I Am Born</span>

I want to convert these to proper h2 tags, so that Calibre's excellent TOC generation can kick in.

I have been struggling to find the correct Xpath for "Detect Chapters" to achieve this, and am failing miserably. Can one of the XPath pros here help me?

I'd do it manually, but there are over 50 chapters!

I promise to upload my finished version to the MobileRead library for Kindle-users of the future. :-)
lyric is offline   Reply With Quote