Quote:
Originally Posted by Jellby
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:
Yes, or, even simpler, same exact effect:
Code:
<h1>Chapter One</h1>
<p>Some text</p>
<h2 id="sec1c" title="Chapter One Contents"> </h2>
<h2 id="sec1">Section 1</h2>
<p>Some text</p>
<h2 id="sec2">Section 2</h2>
<p>Some text</p>
Which would keep him from having to mess with his ncx, if he's uncomfortable doing that. However, his replies so far have indicated that he doesn't seem to want to put any new navpoint (however created) in his NCX, at least, that was my take. He wants a solution whereby somebody clicks the h1 header in the NCX and it works, which I don't think any of us can do.
However, your solution is FAR more elegant and Steely-Eyed ePUB Pilot-worthy than mine, which is a cheat we use all the time.
Hitch