10-17-2011, 05:37 PM | #1 |
Enthusiast
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. :-) |
10-17-2011, 06:19 PM | #2 |
Enthusiast
Posts: 41
Karma: 3948942
Join Date: Jan 2011
Device: Kindle 3
|
In the end I fixed it on my own. The newest Sigil had some nice TOC features which allowed me to sort it all out. Will post the .mobi I created. It is rather lovely.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
RegEx Help needed | ghostyjack | Sigil | 14 | 11-02-2011 10:22 AM |
tips/tricks needed; ToC questions from a new Kindle publisher | SEI Publications | Kindle Developer's Corner | 3 | 01-25-2011 08:05 AM |
Chapter detection when only digits - regex needed | Perkin | Calibre | 15 | 09-20-2010 06:25 PM |
RegEx REPLACEMENT: Help needed! | LARdT | Sigil | 12 | 01-04-2010 07:25 PM |
Regex help needed | gandor62 | Calibre | 2 | 11-04-2009 10:27 AM |