View Single Post
Old 02-27-2018, 06:21 AM   #6
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
@MarjaE,
the point is that this is not part of an one click solution. You need, as @deback pointed out, to tell calibre how it can find marks for possible chapter identifications. At least it needs something for identifying. It can be everything, from a format like a bold marked chapter line or a part of text, up to what ever you like to add to an existing text, e.g. as deback explained with adding "xx" or an identification like "Chapter bla bla bla" where you can use the beginning word "Chapter" as keyword for a Xpath construct within a TOC generation (as it is as part of the default set up for chapter detection). You can use those as part of the conversion process, afterwards with the TOC plugin or within the editor. These are some ways you can go for it.

There are more ways you can use depending on the source file you have. I had some months ago a huge document where in a fist view was no direct way to identify chapter headlines (no numbers, no key words and no real formats or special characters). In the end I recognize that chapter headline was introduce by a couple of line breaks followed by the chapter headline with once more some line breaks. I use this behavior for a post processing via S&R within the conversion to identify and for adding a unique chapter keyword to a chapter text what I then use for creating a TOC. All in one conversion including some general clean ups with S&R. A nice thing doing it that way is, that you can easily test the results and modify your manipulations to get a most possible clean document in a first step as you can stack these S&R actions and save and export/import them for future usage

Looking for "unique regularities". This is what helped me a lot doing this kind of stuff more efficient.

In addition to deback's explaination use the wizard for generating a valid xpath coding. It is easy to use and help a lot for learning and understanding. I made in the beginning lots of formal errors what prevent me some time for using Xpath. There is no real reason making this kind experiences too
The combination Xpath and S&R within the conversion process is handy and powerful for generating a good working basis for further fine tuning. At least for me
Divingduck is offline   Reply With Quote