View Single Post
Old 08-04-2011, 02:58 PM   #9
Tearin de Hairou
Junior Member
Tearin de Hairou began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Aug 2011
Device: Kindle
Sorry, misunderstood. I've found that if I leave Calibre's 'Convert books' dialogue, in the section 'Structure detection', with the path 'Detect chapters at (XPath expression):' field filled in automatically like this:
Code:
//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part|prologue|epilogue\s+', 'i')) or @class = 'chapter']
and with the same 'Structure detection' section's field 'Insert page breaks before (XPath expression): filled in automatically like this:
Code:
//*[name()='h1' or name()='h2']
and with the 'Table of Contents' section filled in (by me) like this:
Code:
//h:p[re:test(@class, "chapter", "i")]
then the result when I ok that dialogue and save the book is that this seems to work.

However, I haven't yet worked out how to get the paragraphs to sit close together like a normal book; there's vast leading between them. Is there any way to open a .mobi file and look at it, so I could look into one that *does* work and see what they've done?
Tearin de Hairou is offline   Reply With Quote