Comment 3 for bug 1273559

Revision history for this message
LukeKendall (luke-zeta) wrote :

This is currently happening for me; I'm using Calibre v2.45. I'm working from a LibreOffice 5.0.3 .odt file. The chapters are numbered correctly in the TOC generated by Calibre (although it puts 2 chapters per page, then a page break, in the TOC: I think because all the Chapter headings are html H1 elements. I need to re-check, but certainly on my 1st try, the toc.ncx file has stuff like this:

<navPoint id="ujwaAQQK4di35KOrpmPFchB" playOrder="1">
      <navLabel>
        <text>Prolog 1</text>
      </navLabel>
      <content src="index_split_004.xhtml"/>
    </navPoint>
    <navPoint id="utE7axnMMjYH5AzmPYfyOp2" playOrder="2">
      <navLabel>
        <text>Part I 14</text>
      </navLabel>
      <content src="index_split_005.xhtml"/>
    </navPoint>
    <navPoint id="uyHLH5SBCmIBt42iiswSe24" playOrder="3">
      <navLabel>
        <text>Chapter 1 15</text>
      </navLabel>
      <content src="index_split_006.xhtml"/>
    </navPoint>

and the corresponding index_split_004.xhtml file, for example, has this:
<h1 class="p-p18" id="calibre_toc_2">
   <a href="index_split_075.xhtml#anchor8" class="s-t">
       <span class="s-t4">Prolog 1</span>
  </a>
  <a id="anchor9" class="s-t"></a>
  <a class="s-t"></a>
</h1>

I'm also curious as to why there are three anchors there (1st with content and an actual href link, the next two with neither): I thought maybe for the chapter name, the leaders/spacing-dots, and page no., but that wouldn't explain how the page number got embedded in the chapter name.

My Chapters are showing up as "1.", also with the text "1." as the last thing from the end of the preceding chapter. Except the Chapter style (heading 1) pages which I'm using for the Parts (there are 4), *are* correctly appearing as "Part I", "Part II" etc. Those Parts also don't have the spurious "1." inserted at the end of the previous chapter.
Note that the Part pages *do* get the spurious "1." added at the end of them, too.