|04-06-2011, 01:53 AM||#1|
Join Date: Feb 2011
Convert Chapter (One, Two, Three...etc)
I want to try convert chapters (One, Two, Three...etc) from pdf to epub...
I try using heuristic function but it doesn't work
I wonder what code i should input in
detect chapter (xpath) ---this is the default one-----
//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part|prologue|epilogue\s+', 'i')) or @class = 'chapter']
what code i can write so in the future...it will detect chapters that start with One, Two, Three...etc
|04-06-2011, 03:08 AM||#2|
Join Date: Apr 2009
Device: PRS-650, iPhone
Heuristics has a number of patterns for common headings, but it only handles chapter headings like you're describing if the headings are all in capitals - e.g. ONE, TWO, THREE, etc. If they're a mix of uppercase/lowercase characters then it's basically indistinguishable from lines of poetry and other random unpunctuated text that can appear in a book. Right now heuristics should still insert page breaks at each of those points, which should make it easier to do final edits in Sigil.
Last edited by ldolse; 04-06-2011 at 04:45 AM.
|04-06-2011, 04:42 AM||#3|
Join Date: Feb 2008
Device: Cybook Gen3
As for what code to put there, that depends on how chapters are marked in the book (as in what XHTML code is used to represent a chapter heading). There's a tutorial available in the FAQ, but without actual code samples from the book, we won't be able to help you with that.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Ebook chapter titles: with or without chapter number?||amoroso||Writers' Corner||16||06-14-2011 06:35 AM|
|PRC with no chapter marks. Best way add them and convert for Kindle mobi?||neonbible||Calibre||0||10-19-2010 08:01 AM|
|Next Chapter skips to End in last chapter?||JoGoCo||Kobo Reader||5||07-13-2010 09:23 PM|
|Chapter 31 - 0||Turt99||Kobo Reader||2||05-12-2010 09:27 AM|
|K2 v K1: Chapter-to-chapter missing from some books?||Starhawk||Amazon Kindle||4||03-10-2009 06:27 PM|