View Single Post
Old 10-21-2009, 05:36 PM   #5
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by Zapped View Post
Thanks, user_none. I want to make sure I clearly understand your answer, so I'll paraphrase it: Despite the fact that calibre provides a "Structure Detection" section in its conversion menu, and within that Structure Detection submenu there is a long and cryptic string entitled "Detect chapters at (Xpath expression)", there is in fact no way to detect chapters in the simple text-file example I have given. I just want to make sure other folks agree with this statement, because it sure seems to me like that "Detect chapters..." string was intended to do something.
TXT files can have any arbitray "layout" there is no way to properly detect each and every one. TXT input only detects paragraphs. Everything is a paragraph. Where one starts and stops can be tuned using a number of different options. The easiest way to differentiate things like chapter headings is to explicitly mark them using markdown.

The only other way to detect chapters is for you to write a custom XPath expression for your book in question. What ever the XPath matches will be considered a chapter. The default is to check for h1 and h2 tags that have some kind of word like chapter in them. Hence the suggestion of marking it with markdown wherein your example would have the chapters detected with the default XPath expression.

Quote:
Originally Posted by Zapped View Post
Anyone have any ideas about questions (2)... Adding paragraph indents to converted ePub...
You will have to add extra css. Have a look at the Custom CSS thread here for some ideas.
user_none is offline   Reply With Quote