View Single Post
Old 08-04-2013, 02:50 AM   #19
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,557
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Since this problem is related to the NCX, it has nothing to do with <h1>, <h2> or whatever is in the HTML files. Except that the NCX can be automatically created from those tags by some editors, but that's only a convenient tool.

One could have something like:

Code:
<h1>Chapter One</h1>
<p>Some text</p>

<h2 id="sec1">Section 1</h2>
<p>Some text</p>

<h2 id="sec2">Section 2</h2>
<p>Some text</p>
From which the "default" NCX would look like this:

Code:
<navPoint id="Chap1">
  <navLabel><text>Chapter One</text></navLabel>
  <content src="Chap1.xhtml" />
  <navPoint id="Sec1">
    <navLabel><text>Section 1</text></navLabel>
    <content src="Chap1.xhtml#sec1" />
  </navPoint>
  <navPoint id="Sec2">
    <navLabel><text>Section 2</text></navLabel>
    <content src="Chap1.xhtml#sec2" />
  </navPoint>
</navPoint>
with sections 1 and 2 inside the block of chapter 1, and this is the problem. Well, nothing prevents you changing the NCX, and only that, into:

Code:
<navPoint id="Chap1">
  <navLabel><text>Chapter One</text></navLabel>
  <content src="Chap1.xhtml" />
</navPoint>
<navPoint id="Chap1c">
  <navLabel><text>Chapter One contents</text></navLabel>
  <content src="Chap1.xhtml" />
  <navPoint id="Sec1">
    <navLabel><text>Section 1</text></navLabel>
    <content src="Chap1.xhtml#sec1" />
  </navPoint>
  <navPoint id="Sec2">
    <navLabel><text>Section 2</text></navLabel>
    <content src="Chap1.xhtml#sec2" />
  </navPoint>
</navPoint>
Jellby is offline   Reply With Quote