View Single Post
Old 07-04-2015, 10:04 PM   #5
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by elstoc View Post
Hi, I wonder if anyone can help me. I have a kobo H2O that I use to read epubs. On some of my books when I bring up the Table of Contents, there is a tick mark next to the chapter I'm currently reading. However, this doesn't seem to work on all of them. On some, the tick mark stubbornly remains on the first chapter heading and doesn't advance when I move to a subsequent chapter. The chapter links work correctly; Sigil and the Calibre book editor don't show any issues with the ToC; I'm using a flattened (non-heirarchical) ToC.

Does anyone have any ideas how I can format my Table of Contents such that my Kobo always knows which chapter I'm currently reading?
For epubs the order of the entries in the NCX file must exactly match the order of the entries in the spine of the OPF file. If the order is different then the problem you describe occurs.

(For epubs it is okay if there are extra or missing entries in the NCX, as long as the entries that are there appear in the same order they appear in the spine. Kepubs have stricter requirements.)

Often the problem seems to be caused by the publisher moving something like the copyright or author biography fom the front of the book to the back in the NCX but forgetting to move it to match in the spine.


Edit: Here are sections from the OPF and NCX files from this book which exhibits the problem you describe when sideloaded as an epub. Note that the authorbiography appears at the back of the book in the OPF spine, but at the front of the book in the NCX:

content.opf:
Spoiler:
Code:
<spine toc="ncx">
  <itemref idref="body_00_cover" linear="no"/>
  <itemref idref="body_04_title"/>
  <itemref idref="body_24_contents"/>
  <itemref idref="body_06_chap1"/>
  <itemref idref="body_07_chap2"/>

[...]

  <itemref idref="body_20_chap15"/>
  <itemref idref="body_21_chap16"/>
  <itemref idref="body_22_authorsnote"/>
  <itemref idref="body_23_notes"/>
  <itemref idref="body_01_testimonials"/>
  <itemref idref="body_02_authorbiography"/>
  <itemref idref="body_03_otherbooks"/>
  <itemref idref="Advert"/>
  <itemref idref="body_05_copyright"/>
</spine>


toc.ncx:
Spoiler:
Code:
<navMap> 
    <navPoint class="" playOrder="0" id="navPoint-1">
      <navLabel><text>Cover</text></navLabel>
      <content src="html/00_cover.html"></content> 
    </navPoint>
  
    <navPoint class="" playOrder="0" id="navPoint-2">
      <navLabel><text>Title page</text></navLabel>
      <content src="html/04_title.html"></content> 
    </navPoint>
  
    <navPoint class="" playOrder="0" id="navPoint-3">
      <navLabel><text>Author biography</text></navLabel>
      <content src="html/02_authorbiography.html"></content> 
    </navPoint>
  
    <navPoint class="" playOrder="0" id="navPoint-4">
      <navLabel><text>Contents</text></navLabel>
      <content src="html/24_contents.html"></content> 

[...]

Last edited by GeoffR; 07-04-2015 at 10:45 PM. Reason: Added example
GeoffR is offline   Reply With Quote