3Pigs5-3.1.epub - Title Page and TOC


How to add a title page and a table of content page to my EPUB book?

✍: FYIcenter.com


If you want to add a title page and a table of content page to your EPUB 3.1 book, you can follow this tutorial.

1. Create a title page in an XHTML file like Title-Page.xhtml:

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <title>The Title Page</title>
<h1 style="margin-top: 100px; text-align: center">The Three Little Pigs</h1>
<h5 style="text-align: center">Cover image by Leonard Leslie Brooke</h5>
<h5 style="text-align: center">Illustration by J. Jacobs</h5>

2. Create a Table of Contents (TOC) page, Table-of-Contents.xhtml:

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <title>Table of Contents</title>
    <h3>Table of Contents</h3>
      <li><a href="/The-Opening.xhtml">The Opening</a>
      <li><a href="/First-Pig.xhtml">The First Pig</a>
      <li><a href="/Second-Pig.xhtml">The Second Pig</a>
      <li><a href="/Third-Pig.xhtml">The Third Pig</a>

3. Add a Copyright page if you want to.

4. Add Title-Page.xhtml, Table-of-Contents.xhtml and Copyright.xhtml pages to package.opf:

    <item id="Cover" href="/The-Wolf-Blows-Down-the-Straw-House.jpg" 
      media-type="image/jpeg" properties="cover-image"/>
    <item id="Navigation" href="/navigation.xhtml" 
      media-type="application/xhtml+xml" properties="nav"/>
    <item id="Cover-Page" href="/Cover-Page.xhtml" media-type="application/xhtml+xml"/>
    <item id="Title-Page" href="/Title-Page.xhtml" media-type="application/xhtml+xml"/>
    <item id="Table-of-Contents" href="/Table-of-Contents.xhtml" media-type="application/xhtml+xml"/>
    <item id="The-Opening" href="/The-Opening.xhtml" media-type="application/xhtml+xml"/>
    <item id="First-Pig" href="/First-Pig.xhtml" media-type="application/xhtml+xml"/>
    <item id="Second-Pig" href="/Second-Pig.xhtml" media-type="application/xhtml+xml"/>
    <item id="Third-Pig" href="/Third-Pig.xhtml" media-type="application/xhtml+xml"/>
    <item id="Copyright" href="/Copyright.xhtml" media-type="application/xhtml+xml"/>
    <item id="Figure-1" href="/The-Three-Little-Pigs-by-J-Jacobs.png" media-type="image/png"/>
    <itemref idref="Cover-Page"/>
    <itemref idref="Title-Page"/>
    <itemref idref="Table-of-Contents"/>
    <itemref idref="The-Opening"/>
    <itemref idref="First-Pig"/>
    <itemref idref="Second-Pig"/>
    <itemref idref="Third-Pig"/>
    <itemref idref="Copyright"/>

Note that you should not include navigation.xhtml in the "spine", because navigation.xhtml is not really part of the book content.

5. Update navigation.xhmlt to include new pages.

6. ZIP all files together to created 3Pigs5-3.1.epub.

Now open 3Pigs5-3.1.epub in Calibre and enjoy reading it:
EPUB Book with Title Page


3Pigs6-3.1.epub - XHTML pre Element

3Pigs4-3.1.epub - Cover Image and Page

EPUB 3.1 With XHTML Technologies

⇑⇑ EPUB Tutorials

2018-12-26, 1855🔥, 0💬