View Single Post
Old 02-20-2017, 06:28 AM   #7
a.o.advena
Junior Member
a.o.advena began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2017
Device: none
Quote:
Originally Posted by davidfor View Post
Is it the same class for all the paragraphs you want to split on? Or does the number in "P-Chapter_20_Number" change? Is that "20" actually the chapter number?
The classes are all the same. The "_20_" is what Calibre or LibreOffice (not sure which) substitutes for the space that is in the style's name.

Quote:
Originally Posted by davidfor View Post
I think the following should do it:

Code:
//*[re:test(@class, "P-Chapter", "i")]
And as you had to different classes in the first post, it would be:

Code:
//*[re:test(@class, "P-Chapter|P-Section", "i")]
Yes, that's the ticket. Perticularly the second one as it captures both the chapter and section breaks. (For others who may use this later - I still had to do a little manual tweaking of the TOC, but this took care of breaking everything up into separate files that could then be arraigned in the TOC.)

Thanks for your help.
a.o.advena is offline   Reply With Quote