View Single Post
Old 01-26-2025, 02:01 PM   #1
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,258
Karma: 105299897
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Snag if class="chapter"

Occasionally I convert an azw3 or epub and on viewing each paragraph is a new page.

It's caused by the person/program doing original formatting choosing to name the regular body style paragraph
<p class="chapter">some stuff</p>

Just use Calibre editor to rename the class to something like "p-indent"

Is there a way in any of the default conversion settings to detect this and automatically rename the class?

The default Structure detection is normally useful
Detect chapters at (X-Path expression)
Code:
//*[((name()='h1' or name()='h2') and re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class = 'chapter']
That splits the file as the only 100% reliable way to have a new page (in all formats) is a new file.
Quoth is offline   Reply With Quote