View Single Post
Old 01-24-2022, 07:06 AM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by PunkyKoopa View Post
I have been reading a couple of books on my Kobo Libra 2 and I noticed that with some books, the reading stats aren’t quite right, as the chapters progress bars seems to be duplicated. With some books, you see one bar for each chapter, all together; but with other books, it shows one bar for each chapter and an empty bar between chapters.

The index is fine and it works right and there are not blank pages between chapters. I don’t know what’s going on. It doesn’t happen with all the books. I didn’t make any changes in Calibre other than covers and metadata.

It’s a problem with the conversion process or is just related with bad book formatting? It’s a minor issue but I will like to know if I have to change something in Calibre.
That happens when the ToC reference is a fragment pointing to at the start of the chapter, rather than to a the file the chapter is in. If you have a chapter that looked like:

Code:
<body>
<h2 id="chapter1">Chapter 1</h2>
<p>It was a dark and stormy night...</p>
</body>
If the ToC entry is:
Code:
    <navPoint id="title_page" playOrder="0">
      <navLabel>
        <text>Chapter 2</text>
      </navLabel>
      <content src="OEBPS/chapter2.xhtml#chapter1"/>
    </navPoint>
You will see that. Removing the "#chapter1" from the ToC entry will fix this.

What I do depends on the book. If the code is as simple as above, then I will remove all the ids from tags and regenerate the ToC. I have had a few books recently that had an image above the chapter title. For these, I sometimes create a hidden chapter heading for the ToC generation and use styles for the displayed heading. But, sometimes I just edit the generated ToC and remove the fragments.
davidfor is offline   Reply With Quote