Thread: Kobo Bug thread
View Single Post
Old 11-12-2020, 02:33 AM   #1312
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by compurandom View Post
Fixing it manually isn't too bad if the book is small and only has a handful of chapters, but for larger books, I look for other ways.
Which is why I suggested this compromise:

Quote:
Originally Posted by Rev. Bob View Post
Using DNSB’s example, in which all the text is in one big 1.1 MB file, try to split it into four or five pieces; you want each file to be 250K or less. So, if the book has forty chapters, try splitting at the tops of chapters 11, 21, and 31 – so click on each of those entries, use the split tool (icon located under the preview pane) to make the divisions, and the ebook navigation should square itself away automatically.
That also has the advantage, once you find one chapter header, of allowing one to, as you describe:

Quote:
Originally Posted by compurandom
spot a pattern of HTML that is used at the top of each chapter. If it's simple and unique, you can construct an xpath expression and tell calibre to split chapters there. If it's messier than that, use a global search and replace to insert something that can be easily matched with xpath and manually add/remove exceptions.
Only, I usually don’t mess with xpath. Regex usually does the job just fine.
Rev. Bob is offline   Reply With Quote