What is the clickable table of contents in an epub?

In EPUB files, the clickable Table of Contents (ToC) allows readers to navigate easily. If “(Untitled)” appears in the ToC, it’s usually because a chapter or section in the source document lacks a title, so the software fills in a placeholder.

This issue can happen in both EPUB2 and EPUB3 formats:

  • In EPUB2, the ToC structure is typically managed by a toc.ncx file.
  • In EPUB3, the ToC is managed by a toc.xhtml or nav.xhtml file in HTML format.

 

How to solve it?


To resolve this issue, you need to ensure that each chapter or section in your EPUB has a defined title and then update the navigation (ToC) files in Sigil. Here’s a step-by-step guide to achieving this.

Step-by-Step Guide to Fixing the “(Untitled)” Placeholder in Sigil

 

Step 1: Install and Open Sigil

  • If you haven’t already, download and install Sigil.
  • Open Sigil and load your EPUB file by selecting File > Open and choosing your EPUB file.

Step 2: Inspect the Table of Contents

  • After loading your EPUB, go to View > Table of Contents in Sigil’s menu. This will display the current ToC.
  • If you see any entries labeled as “(Untitled),” make a note of these. They are likely missing chapter titles or headings in the content files.

Step 3: Locate the Navigation File

In the Book Browser on the left side of Sigil, you’ll see a list of files that make up your EPUB. Look for the relevant navigation file:

  • For EPUB2: The navigation file is toc.ncx. You’ll find this under the “Text” folder in the Book Browser.

  • For EPUB3: The navigation file is typically toc.xhtml or nav.xhtml. You’ll find this file under “Text” or “Navigation.”

Step 4: Edit the Navigation File

Editing toc.ncx for EPUB2

  • Double-click toc.ncx to open it in Sigil’s editor.
  • You’ll see XML code that defines the ToC structure. Here’s a sample structure:

<navMap>

<navPoint id="chapter1" playOrder="1">

   <navLabel>

     <text>Chapter 1: Introduction</text>

   </navLabel>

   <content src="chapter1.xhtml" />

</navPoint>

<navPoint id="chapter2" playOrder="2">

   <navLabel>

     <text>(Untitled)</text> <!-- Problematic placeholder here -->

   </navLabel>

   <content src="chapter2.xhtml" />

</navPoint>

<navPoint id="chapter3" playOrder="3">

   <navLabel>

     <text>Chapter 3: Methods</text>

   </navLabel>

   <content src="chapter3.xhtml" />

</navPoint>

</navMap>

 

  • Locate the <navPoint> tags with “(Untitled)” in the <text> element.
  • Replace “(Untitled)” with the appropriate chapter title. For example:

 

<navLabel>

<text>Chapter 2: Background</text>

</navLabel>

 

  • Repeat this for any other “(Untitled)” entries.

 

Editing toc.xhtml or nav.xhtml for EPUB3

  • Double-click toc.xhtml or nav.xhtml to open it in the editor.
  • The ToC will be structured in HTML, typically in a list format. Here’s a sample structure:

 

<nav epub:type="toc">

<h1>Table of Contents</h1>

<ol>

   <li><a href="chapter1.xhtml">Chapter 1: Introduction</a></li>

   <li><a href="chapter2.xhtml">(Untitled)</a></li> <!-- Placeholder here -->

   <li><a href="chapter3.xhtml">Chapter 3: Methods</a></li>

</ol>

</nav>

 

 

 Find each <a> tag with “(Untitled)” as its text.

 Replace “(Untitled)” with the correct title. For example:

 

 

<li><a href="chapter2.xhtml">Chapter 2: Background</a></li>

 

  • Make sure each entry reflects the actual chapter titles in your EPUB.

 

Step 5: Verify Chapter Titles in Content Files

Sometimes, missing ToC entries are due to missing or improperly formatted headings in the actual content files. To ensure each section has a heading:

  • In the Book Browser, locate and open the content files (e.g., chapter1.xhtml, chapter2.xhtml) for each chapter.
  • Check that each file has a heading tag, such as <h1> or <h2>. For example:

<h1>Chapter 2: Background</h1>

If a heading is missing, add an appropriate one.

 

Step 6: Save and Validate the EPUB

  • After making all changes, save the file in Sigil by going to File > Save.
  • Preview the Table of Contents in Sigil’s Preview pane to confirm that the correct titles appear and that no “(Untitled)” placeholders remain.
  • To ensure the EPUB is fully valid, use an EPUB validator like epubcheck. This will alert you to any remaining structural issues in the file.

 

For a smoother process in Word (DOCX) click -> here.