View Single Post
Old 03-11-2024, 02:50 PM   #5
TheSmitty
Addict
TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.
 
TheSmitty's Avatar
 
Posts: 322
Karma: 1181422
Join Date: Dec 2017
Location: DFW, TX area
Device: Kindle Colorsoft, Libra Colour, Voyage, iPad Pro 11, iPad Mini 7
Quote:
Originally Posted by JSWolf View Post
In calibre under Preferences > Common options > Structure detection, the Detect chapters XPath is
Code:
//*[((name()='h1' or name()='h2') and re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class = 'chapter']
When calibre detects what it thinks is a chapter header, it splits the page at that point. So what's happening is the Kindle eBook is using headers tags for each line. Either h1 and/or h2. So calibre is splitting it as it should.

In order to fix that, you'll have to edit either the XPath or the Kindle eBook. YOu could delete the XPath code, sent the eBook to your Kobo and then put it back.
What you say makes sense. Just so I am clear, you say remove all the code from the 'Detect chapters at (XPath expression)' setting within common options of Calibre, Apply, Convert to EPub, then paste the code back, Apply?

Isn't this a problem for pretty much any ebook? Do people generally remove the code and leave it at that?

I did stumble upon the plug-in KindleUnpack. To use it after I installed it, I had to delete the epub that Calibre created, then click on the menu icon the plugin added, select AZW3 then select 'KF8 to ePub' option. This created a new epub which then when sent to the kobo, it passed through the touchextended which put a kepub on the device that looks proper. I am unsure if this plugin is considered viable.
TheSmitty is offline   Reply With Quote