View Single Post
Old 12-05-2024, 05:14 PM   #1
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Split on Every Incidence of the Word Chapter

When I convert a book, I can go to Structure detection (see image) and insert the following expression in the "Detect chapters at (XPath expression" and insert this expression

//*[re:test(., "Chapter", "i")]

then go to Chapter mark: and choose pagebreak and the conversion will split the HTML at every instant of the word chapter. Making the creation of a TOC easy.

My question is when I'm in the book editor and I choose to split at multiple locations (see image). Which expression can I insert here to have the same result? Currently, after merging the files, if I see the need I will save the book and back out then convert the book to accomplish my desired results. I would much prefer to be able to insert an expression here and do the same thing.

Edit: when I cut and paste the expression above into the edit book split area I get an error. Here are the 2 most common errors.

ERROR: Unhandled exception: <b>AbortError</b>:Cannot split on the &lt;body&gt; tag

ERROR: Unhandled exception: <b>AbortError</b>:The expression //*[re:test(., "Chapter", "i")] did not match any nodes
Attached Thumbnails
Click image for larger version

Name:	configure device.jpg
Views:	176
Size:	195.9 KB
ID:	212367   Click image for larger version

Name:	Specify locations to split at.jpg
Views:	162
Size:	29.5 KB
ID:	212368  

Last edited by DoctorOhh; 12-05-2024 at 09:47 PM.
DoctorOhh is offline   Reply With Quote