Skip to main content
Skip table of contents

STEP 6: EPUB IT

Create your base EPUB from the template in the Starter Package you downloaded in Step 4.

Getting started with the package

Reminder

Considering you successfully extracted your original book to be made accessible, by now, you should have the image and metadata reference sheets populated and suited with details required as per the book. The Mata and I folder is our template.

  1. Navigate into the Guide Package folder.
  2. Right-click on the Mata and I folder and rename it to match the title of the book want to make accessible. ("Book_X")       
  3. Click into the renamed folder, "Book_X" .
  4. Click again into the "EPUB" folder to have such a view of the files and folders inside the "EPUB" folder . 

Owning the Template

1. Replacing the images

  1. Navigate into the images folder (.../Book_X/Guide Package/Book_X/EPUB/images/) from the EPUB directory to access all the images for the the template.    

    Reminder

    You should have the images from your original book to be made accessible extracted and ready!

  2. Replace the front and back cover images with the respective images of your book to be converted.
    1. Preserve the same names for the front and back covers as cover.jpg and bcover.jpg respectively.

    2. Swap out the images in the /EPUB/images folder with your extracted images for your book maintaining the naming convention of img01, img02, img03....

NOTE: 

Image formats

Use of JPEG images recommended!

All images to reside in the /images folder.



2. Replacing the Metadata

The metadata is most basic information about the book. The book's metadata is contained in the content.opf file in .../Book_X/Guide Package/Book_X/EPUB/content.opf location.

NOTE: The <metadata></metadata> section of the content.opf file lists information about the publication. 

To replace the metadata details:

  1. Ensure you are in the location .../Book_X/Guide Package/Book_X/EPUB/

  2. Look for and open the content.opf file using the editor of you choice.
  3. Find the <metadata></metadata> section
  4. Replace the metadata  values within the appropriate metadata properties of the content.opf file to suit the information about your publication content on the last column. 

    Note

    Use the Metadata Reference Sheet you populated after extraction to quickly map and replace the metadata values in the required metadata properties of the template.

  5. Save the changes. NOTE : DO NOT close the file in the editor.

Below table is a copy of the table in the Metadata Reference Sheet


Metadata PropertiesDescription

Current Value(s) For Mata and I

Replace With Your Book’s Metadata Value(s) 

1dc:titleTitle of the publicationMata and I
2dc:identifierElement contains a single identifier associated with the given Rendition of the EPUB Publication, such as a UUID, DOI, ISBN or ISSN.N/A
3

dc:language

Language used in the publication.en-us
4dcterms:modifiedDate when the content of the publication was last modified.2018-06-26T15:30:00Z
5dc:creatorAuthor credited with the creation of the resource.Tusome Early Literacy Programme
6dc:publisherThe organization credited with publishing the resource.Tusome Early Literacy Programme
7dc:dateDate which the resource was created.2017-12-22
8meta property file-as=" "Match the dc:creator valueTusome Early Literacy Programme
9dc:sourceA related resource from which the described resource is derived.

Title : Mata and I, Publisher : Tusome Early Literacy Programme, Year : 2017, Kenya




Metadata section from an editor:

Accessibility Metadata

The accessibility metadata is very critical to enhance image and other accessibility features and thus should be maintained as per the template. The inclusion of accessibility metadata in the Schema.org collection helps persons to easily find content that meets their individual needs and preferences. 

3. Changing the OPF Manifest and Spine

The Manifest

The manifest is an unordered list of all of the files within the OEBPS/OPS/EPUB directory.  It is contained in the content.opf file in .../Book_X/Guide Package/Book_X/EPUB/ .

Each item in the manifest has three components

  1. An item ID, which you can make up, and should describe the file:

    item-id

    CODE
    <item id="cover"
  2. A reference to the actual file:

    item-id

    XML
    href="cover.xhtml"
  3. The media-type, which tells the parser what type of file it is:

    item-id

    XML
    media-type="application/xthml+xml"
  4. Media types can either be:
    • Fonts.
    • All of the XHTML pages in the book (introduction, copyright, chapters, epigraph, etc.).
    • Images.
    • Audio or video files, if applicable.
    • The (Cascading Style Sheets) CSS file.
    • The NCX file, if you’re working with the ePUB 2.0 format.
       

To make changes in the Manifest section:

  1. Ensure the content.opf file is still open for editing using the editor of your choice.
  2. Move to the manifest section within the following tags <manifest></manifest>.
  3. Add any necessary media type using the syntax below: 

    item-id

    XML
    <item id="cover" href="images/cover.jpg" media-type="image/jpeg"/>
  4. Save the changes to the file. DO NOT close the file in the editor.

Manifest section

XML
<manifest>

    <item id="font01" href="fonts/GillSansMt-Schlbk.ttf" media-type="application/vnd.ms-opentype"/>
    <item id="font02" href="fonts/GillSansMt-SchlbkBold.ttf" media-type="application/vnd.ms-opentype"/>
	<item id="font03" href="fonts/OpenDyslexic3-Regular.ttf" media-type="application/vnd.ms-opentype"/>
    
    <item id="Cover" href="cover.xhtml" media-type="application/xhtml+xml"/>
    <item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
    <item id="ch01" href="ch01.xhtml" media-type="application/xhtml+xml"/>
    <item id="Bcover" href="bcover.xhtml" media-type="application/xhtml+xml"/>

    <item id="cover-image" href="images/cover.jpg" media-type="image/jpeg" properties="cover-image"/>
    <item id="image201" href="images/img01.jpg" media-type="image/jpeg"/>
    <item id="image202" href="images/img02.jpg" media-type="image/jpeg"/>
    <item id="image203" href="images/img03.jpg" media-type="image/jpeg"/>
    <item id="image204" href="images/img04.jpg" media-type="image/jpeg"/>
    <item id="image205" href="images/img05.jpg" media-type="image/jpeg"/>
    <item id="image206" href="images/img06.jpg" media-type="image/jpeg"/>
    <item id="image207" href="images/img07.jpg" media-type="image/jpeg"/>
    <item id="image208" href="images/img08.jpg" media-type="image/jpeg"/>
    <item id="iBcover" href="images/bcover.jpg" media-type="image/jpeg"/>

    <item id="css" href="stylesheet.css" media-type="text/css"/>
    <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>

  </manifest>




The Spine

The spine is an ordered list of all of the contents of the book. It uses the item IDs you created in the manifest. Each item gets an item ref, and use the item id that you created in the manifest for the id ref.

Match the item's id in the spine for every item in the manifest section using the editor, save the changes and close the file.

Spine section

XML
<spine toc="ncx">
    <itemref idref="Cover"/>
    <itemref idref="nav"/>
    <itemref idref="ch01"/>
    <itemref idref="Bcover"/>
  </spine>




4. Chapters

To make changes to the chapter content:

  1. Navigate to .../Book_X/Guide Package/Book_X/EPUB/ch01.xhtml 
  2. Open ch01.xhtml file with the editor.
  3.  Rename the chapter title within the <title></title> tags found at the top.
  4. Transcribe the texts into the chapter's <p></p> tags, replacing the content with that available in the book to be made

Adding a chapter

  • Create a new HTML file anywhere, preferably beside the other XHTML files. To avoid basic errors, it’s better to copy one of the existing chapters and modify it as needed.
  • Inside the package file, under the manifest list, add a new item similar to any of the other existing chapters in the list (the order does not matter). Enter the new path of the chapter into the href attribute. The path must be relative to the package file. Also, enter a unique ID to the id property.
  • Under the spine list, add a new item as such: <itemref idref=”YOUR_UNIQUE_ID”/>. Here order does matter. So make sure you’ve placed it before and after the appropriate items.


Removing a chapter

  • Find the chapter that you want to remove. Finding it will require you to open them one by one, as the package file does not describe the content. But the order in the spine should give you a hint. If the chapter is one of the last chapters, then look near the bottom of the spine list. You get the point.
  • Remove: the document file, the spine item, and the manifest item. Missing any one of these will give you an EPUB validation check error.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.