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>:

Thursday, 20 March 2014

How to restructure the html table of contents for Kindle

The html table of contents in your ebook needs to be formatted in a rather odd way if it is to be accepted by kindlegen. In essence, in a normal page of html the <p> tags will enclose the <a> tags like this:


In the Kindle in the html table of contents these tags need to be the other way around so that the <a> tags enclose the <p> tags, like this:


But let’s look at this in a bit more detail:

Thursday, 13 March 2014

How to link the html table of Contents in a Kindle e-book

A valid epub ebook which passes epubcheck will already contain a logical table of contents. This is a file called ‘toc.ncx’. (I will link to a future post on how Sigil generates this here.) You will find this in the OEBPS folder. (See here to understand the structure of the OEBPS.) It will already be correctly linked in the <manifest> and <spine> sections of the content.opf file. You don’t need to do anything to these entries. Kindle will, however, ignore the ncx table of contents, even though the Kindle needs the file. You should have created a chapter near the front of the e-book containing hyperlinks to the various other chapters and perhaps sections within chapters. This is the html table of contents. There are important details about the way the hyperlinks are coded for them to work properly in Kindle ebooks, and I have devoted an entire post to how to do this. (Click here to read this post.) Once the links in the html table of contents have been restructured for Kindle, you need to link the html table of contents to the ‘table of contents’ button on the Kindle. If you do not do this the button will be greyed-out and the reader will not be able to use the button to jump to the table of contents.

To link the html table of contents, first unpack the epub and open the content.opf file using an html editor such as Komodo Edit. Scan down the entries in the <manifest> section of content.opf and find the entry for the html table of contents. Mine was called ‘Index.xhtml’. The entry for Index.xhtml in the <manifest> looked like this:

Friday, 7 March 2014

How to understand what is inside an epub

You can open an epub using Sigil and explore the contents. When it opens, if the ‘book browser’ isn’t visible, select ‘book browser’ from the ‘view’ menu:
If the book browser opens in a separate window, just click and drag it to ‘dock’ it on the left:
Twitter Bird Gadget