Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 04-06-2011, 01:53 AM   #1
silverdezz
Junior Member
silverdezz began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2011
Device: none
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


Thanks
silverdezz is offline   Reply With Quote
Old 04-06-2011, 03:08 AM   #2
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
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.
ldolse is offline   Reply With Quote
Advert
Old 04-06-2011, 04:42 AM   #3
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
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.
Manichean is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 11:44 PM.


MobileRead.com is a privately owned, operated and funded community.