The NCX file an ePub file can specify the chapters that have the book in ePub format.
It uses the following XML syntax:
<navPoint class="chapter" id="chapter1" playOrder="1">
<navLabel><text>Chapter 1</text></navLabel>
<content src="file1.xhtml"/>
</navPoint>
My question is, can we create sub-chapters? If so, how?
I have searched Google and all I've found are very specific tools to perform these tasks. I do not want a tool, I want to know how to make sub-chapters in the NCX file.
Change the depth to the number of levels
<meta content="2" name="dtb:depth"/>
Put a navPoint inside the navPoint that must contain the sublevel. Remember to close the navPoint!
<navPoint class="chapter" id="chapter1" playOrder="1">
<navLabel><text>Chapter 1</text></navLabel>
<content src="file1.xhtml"/>
<navPoint class="subchapter" id="sub1" playOrder="2">
<navLabel><text>Subchapter 1</text></navLabel>
<content src="file2.xhtml"/>
</navPoint>
</navPoint>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With