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. :-)
|