For those of you wishing to create Kindle books based on html, consider adding a table of contents to your book.
Step 1:
Establish references within the document:
<a name="1">Chapter 1</a>Use the anchor tag (<a> and </a>) using name with a # in front to create a reference point for Chapter 1 within a document.
Step 2:
Create a link to the newly created reference.
<a href="#1">Chapter 1</a>Use the anchor tag, but this time you with href and a # before the name of the reference.
Step 3:
Now that you have links and references, you can create an internal table of contents:
<a name="#Contents">Contents</a>Steps 1-3 will allow you to create a table of contents at the beginning of the document, but will not show up when selecting "menu".
<a href="#1">Chapter 1</a>
<a href="#1">Chapter 2</a>
To add this feature, there is just one more step required:
Step 4:
Copy the table of contents and add a "toc" reference.
<div name="toc"> and </div name="toc">The final outcome should look like this:
<div name="toc">For a finishing touch, you can add a page break with the following code:
<a name="#Contents">Contents</a>
<a href="#1">Chapter 1</a>
<a href="#1">Chapter 2</a>
</div name="toc">
<a name="#Contents">Contents</a>
<a href="#1">Chapter 1</a>
<a href="#1">Chapter 2</a>
<p style="page-break-before: always;"></p>
No comments:
Post a Comment