Can Everton Jones find out how his father stole Emperor Bokassa’s diamonds and, more importantly, where he hid them; before the world and his brother get there first?
Click on the picture link in the sidebar to read an extract of my first novel, which was published by Paradise Press in August 2012.

Thursday, 27 March 2014

How to delete the html cover for a Kindle ebook

Kindle require the cover image to be linked in a very different way from the way it should be done in an epub file. I am assuming that your starting point, like mine, is a correctly formatted epub, which passes epubcheck. This epub will most likely begin with a file called something like ‘Cover.xhtml’.  The html cover will display an image, and in this example let’s call it ‘frontCover.jpg’. BOTH should already be correctly linked in the epub. BUT for conversion to Kindle you will need to DELETE the html cover file. If you do not do this you will end up with TWO covers in your Kindle e-book!

To make your life easier, when you create the ebook, rather than using ‘Cover.xhtml’ as the name for the html cover file, use ‘DELETE_ME.xhtml’, or something equally distinctive, instead. The reason for this will become apparent later.

So, to delete the html cover, first unpack the epub and open the file called content.opf using an html editor such as Komodo Edit. content.opf can be found inside the OEBPS folder in the ebook.

In essence, ALL you need to do is to delete every line in content.opf which contains the text ‘DELETE_ME’ and ALSO delete the actual html cover file: ‘DELETE_ME.xhtml’ from the ‘Text’ folder in the ebook.

Specifically, the content.opf file will contain this line in the <manifest>:



<item href="Text/DELETE_ME.xhtml" id="DELETE_ME.xhtml" media-type="application/xhtml+xml" />

DELETE this line.

note: Although the label created by Sigil: id="DELETE_ME.xhtml" is the same as the filename, it need not be. The two are logically different. Something else could be used as the label if you wish.

The <spine> will have an entry for the html cover, most likely the first item in the spine, and it should look like this:

<itemref idref="DELETE_ME.xhtml" />

DELETE this entry as well.

note: the html cover is referenced in the <spine> using the label idref="DELETE_ME.xhtml". The red text matches that in the entry in the <manifest>.

There should not be any entry in the <guide> for the html cover. If there is, delete it.

Finally, DELETE the actual file, DELETE_ME.xhtml from the ‘Text’ folder. Calling the html cover file ‘DELETE_ME.xhtml’ has made your life a LOT easier, as it identifies EXACTLY the items you need to delete.

Next Steps: In the procedure above the actual cover image file: frontCover.jpg has been carefully left behind. You are now ready to link this cover IMAGE file in the way Kindle want you to.

Index to ‘how to …’ posts:

How to ‘unpack’ an epub file to edit the contents and see what’s inside.
How to understand what is inside an epub
How to link the html table of Contents in a Kindle e-book
How to restructure the html table of contents for a Kindle
How to delete the html cover for a Kindle ebook
How to link the cover IMAGE in a Kindle e-book
How to clean up your MS Word file before your get started
How to markup an MS Word file to identify the formats before importing it into an epub
How to create a new blank e-pub using Sigil
How to import your marked-up MS Word file into your ebook using Sigil
How to create and link a CSS stylesheet in an e-book using Sigil
How to replace the markup with CSS styles in your ebook using Sigil
How to style an e-book so it works with the limited CSS styling available to Kindle e-readers
How to understand the syntax of CSS
How to style Small Caps in an e-book
How to split your ebook up into chapters using Sigil
How to sequence your e-book
How to phrase the copyright declarations etc. in an e-book
How to generate the logical table of contents using Sigil
How to understand toc.ncx in an e-book
How to generate the html table of contents in an e-pub
How to style the html table of contents using CSS
How to create an html cover for your epub using Sigil
How to present references and notes in a book
How to use Mark Up to link notes in your e-book
How to present a bibliography in a book
How to use markup to link entries in a bibliography with the notes section
How to index an e-book
How to use the tools in MS Word to create an index
How to alphabetise an index or bibliography
How to adapt the print index in your MS Word file for an e-book using markup
How to adapt cross-references in your print index for e-book and how to use markup to make the links
How to understand content.opf
How to understand and edit the Metadata of an ebook using Sigil
How to understand the manifest in content.opf
How to understand the spine and guide in content.opf
How to test your e-pub using flightCrew in Sigil
How to test your e-pub using epubcheck
How to convert an e-pub to Kindle using kindlegen

TinyURL for this post: http://tinyurl.com/llsbykm

1 comment:

  1. I'm now finding this is now fixed - and the ePub that is generated by Sigil will be converted to a Kindle book with only one single cover by KindleGen without any modifications. Have you noticed this? Or maybe I'm creating a problem for myself by being lazy and not deleting the epub cover.

    ReplyDelete

 
Twitter Bird Gadget