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.

Sunday, 13 August 2017

How to convert an e-pub to Kindle using kindlegen

This series of blogposts has covered everything you need to know about to make an e-pub 2.0 e-book using Sigil and then convert it to kindle. I think some sort of overview is in order, as well as the crucial instructions for actually making the kindle file from the e-pub which, I now realise have not yet been published.

I am finally looking at the new kindle and e-pub formats, and will post when I have got my head around them. I will need more of the newer e-readers and some more antique models to check how this can all be done and how backward compatibility works out in practice. On the surface of it, it seems to me that there are some promising new possibilities, and some features I wanted which will remain impossible.

I think you will want an e-pub which works on all e-readers (including older epub 2.0 e-readers) and also a kindle version. You will end up with TWO e-books, an epub 2.0 e-book and a kindle e-book. However I think both should look and feel the same, as far as possible.

Maybe I should also say that these posts cover making an epub 2.0 ebook, which will work on all e-pub e-readers and a kindle e-book which works with the older kindle e-readers. Any new features in e-pub 3.0 or kindle format 8 will NOT be backwards-compatible, which is to say that an e-pub 3.0 e-book won’t work on an e-pub 2.0 e-reader and a kindle format 8 e-book won’t work on older kindles either. The methods I have described produce a perfectly acceptable e-book, and one which is formatted according to the best practice of the print book industry, adapted to take account of the e-book format and which work on all e-pub and kindle readers in existence. It is a conservative strategy, and misses out on some of the bells and whistles becoming available in the newer formats, but it will produce an e-book which can be marketed the most widely.

As I have said, you want a kindle and an e-pub which look and feel the same. And the problem at the heart of all of this is the Kindle, which will not accept certain CSS and html and will not support certain characters. So make your e-pub using CSS, html and characters which will also work on a kindle and your task is made that much simpler. See my post on CSS which works with kindle for the information about the difficulties I have identified and ways to get around them.

Amazon provide a program, called Kindlegen, which will make a kindle e-book. It uses an e-pub file as the source and chucks out a file in a format called mobipocket (with the extension .mobi). When you upload this file to the kindlestore, it is then converted to their .azw file format complete with copy protection if you want it. Both .mobi and .azw files can be loaded onto a kindle. This post covers how to do this:

Thursday, 29 October 2015

New version of Sigil


I'm reinstalling my software, following a system restore, and discovered that Sigil has moved and has been updated. The new download location is : Versions are available for all operating systems. Flightcrew, which is the error-checking epub2 validator has been converted into a plugin, and that can be downloaded as a .zip archive from here: Again, it comes in versions for all operating systems. Just select the right one for you. These links are correct at the time of writing. If the precise location of the files changes in thefuture, try deleting the final components of the path one by one to find the correct location.

Once Sigil is installed and the plugin is downloaded, run Sigil and select 'plugins/manage plugins' from the main menu:

From the dialog which loads, click the add plugin button:

From the next dialog, navigate to and then select the archive containing the flightcrew plugin (no need to unzip/extract it):

Wednesday, 19 November 2014

How to test your e-book using epubcheck

You will need to test your e-book against the industry-standard epub validation program, called epubcheck. You may well have checked it already using the tools in Sigil, called flightCrew, and that will have caught most errors. (See my post on using flightCrew to test your e-book.) And I would definitely advise you to do this first. But epubcheck is a more stringent test and may well throw up errors which flightCrew might have let through. More importantly, Apple and other resellers will run your e-pub through epubcheck and return it if there is a single error, so save yourself some heartache and make sure your e-book WILL pass.

There ARE some handy versions of epubcheck which allow you just to drag and drop the epub file onto an icon and then run it by epubcheck. BUT these are made by third parties and often do not implement the latest version of epubcheck. It is better to get the pucker, latest, official, incarnation of epubcheck directly from IDPF and then you can be sure you have a valid e-book.

How to get epubcheck:

The places to download software from can change, and versions update from time to time. At the time of writing, the current version of epubcheck is 3.0.1 and can be downloaded from here: If that link does not work, you might try: from where you should be able to find a link to the latest official download site. The first link took me to a page from where I found the download link for, which I clicked and saved the file to my desktop (strongly recommended).

[update 14 August 2017: follow the second link above and find the latest version: v4.0.2 which fixes an important security vulnerability.]

Once you have the .zip file, you should extract it by right-clicking on the icon and selecting ‘extract all …’ from the pop-up menu. Select the desktop as the destination of the file from the dialog and click the ‘extract’ button (Windows). If you have a Mac, just double-click on the .zip file and it should extract itself automatically. For some reason, I ended up with a folder called epubcheck-3.0.1 containing another folder with the same name:

Saturday, 15 November 2014

Indexing posts FINALLY updated!!!

I have finally (?) finished working through my posts on indexing an e-book and have just posted the update to the last one. It has been a major hassle!!! Keeping the whole of the topic in my head at the same time has been a very significant task. However it is now done and I am immensely pleased with the outcome! In these posts, I take a print index and re-structure it for e-books, using links instead of page references. This requires some significant style choices. I have generated TWO models: one which uses the style of the print index as a guide and slots the links into the places where the page references were (which I have called RUN-ON) and another in which the links are dropped down onto a line of their own and set out fully (a FULLY SET-OUT style). This is in my opinion much more elegant and better suited to e-books. Along the way I was astonished to find that all the differences between Chicago and Oxford style vanished, along with the punctuation in the index. It functions entirely visually, with the level of the indent representing the relationship between one item and the next. The links thenselves can be constructed using markup in your original file and then made good in your e-book using find and replace in Sigil. Of course it is far from a trivial exercise, as anything connected with indexing is always going to be a major headache (well, it will be if you want to get it right!). As this mammoth series of posts nears an end, I am posting to draw attention to my finished contribution to indexing e-books and am actively seeking comments/discussion of the topic. If you have an opinion, please comment on the posts or/and contact me via the contact box in the right-hand sidebar.

The indexing posts begin with: How to index an e-book, which gives an overview of how to present an index, and then I go on in: How to use the tools in MS Word to create an index to explain how to use the tools built in to MS Word to do this. Alphabetising an index is far from as simple as it may sound, and so I have had to devote an entire post to the topic, which is here: How to alphabetise an index or bibliography. Then there are the key posts on How to adapt the print index in your MS Word file for an e-book using markup and How to adapt cross-references in your print index for e-book and how to use markup to make the links. These set out the styles I have developed and how to implement them using markup in your MS Word file and find and replace using Sigil in your e-book.

Wednesday, 12 November 2014

How to test your e-pub using flightCrew in Sigil

Once you have a completed epub e-book, you need to test it.


If there are any errors, they are usually because of careless typing mistakes. After all, Sigil won’t let you close your file unless the html is syntactically correct. Unfortunately, this does NOT necessarily mean your html achieves what you intended! Sigil does its best to understand what you meant, but isn’t clairvoyant. If it mends your html it will produce valid html code, but this might not display as you want it to. Careful proofing is always necesary, and I strongly recommend against clicking the ‘correct automatically’ option which Sigil offers when it finds a mistake. Go back and find the mistake and correct it manually.

So I’m assuming you have already proofed your e-book and corrected the styling and made sure there are no obvious mistakes. For instance you will need to check that italic and boldface render correctly and that any links for indexes, footnotes etc. work properly.

One possible pitfall is if your <span> tags do not close properly. The <span> tag in html just identifies a section of the text and allows you to label or format it. I have used <span> tags for the labels which links jump to and also for italic and small caps. You might have an opening <span class="italicText">, or <span class="smallCaps"> or <span id="x3"> tag, for exampe. BUT the closing </span> tag looks the same for each. Both Sigil AND the e-reader will assume that a closing </span> tag closes the <span> which immediately preceeds it. IF your closing tags are in the wrong place the results will be unpredicatble. For instance:

<span class="italicText">an example of <span class="boldFace">a mistake</span> you might make</span>

will render like this:

an example of a mistake you might make.

In this example, the <span> tags overlap, generating bold and italic in the intersection.

Any error like this will NOT be picked up by Sigil. You will have to look for this or other similar errors and correct them manually. Hopefully, if you have placed the markup in the correct places and made the replacements in the correct sequence there should not be any errors of this type.

Once your file has been proofed, you will then need to use the built-in tools in Sigil, called ‘flightCrew’, to check it. To use them, just click the green ‘tick’ button in the toolbar:

The results of the validation are displayed at the bottom of the main Sigil window. Hopefully you will see this:

[added: 29 Oct. 2015: The new version of Sigil implements Flightcrew as a plugin, which you need to install and configure properly. I explain how to do this here.]

If there are errors, then you will need to track them down and correct them. Sigil will just report on what it finds, and ONE error frequently generates TWO error messages, which can be offputting. To generate some examples, I went back to a working e-pub and made a number of deliberate mistakes:

Wednesday, 5 November 2014

How to understand the spine and guide in content.opf

Content.opf is the most important part of an e-book. This is my final post about this file, covering the <spine> and <guide> portions. The <manifest> is detailed here, the <metadata> is covered in this post (including how to use the metadata editor in Sigil) and the sequence begins with an overview here.

The spine is found between the opening <spine> tag and the closing </spine> tags in content.opf.

Entering the ncx table of contents in the spine:

Firstly, note the opening <spine> tag:

<spine toc="ncx">

The ncx table of contents MUST be referenced in the opening spine tag exactly as shown above, using the spine toc attribute. Like all other items in the spine the ncx table of contents is referenced in the spine by the id assigned to it in the <manifest>. In this case Sigil by default uses an id="ncx". I can see no logical reason in the specification why that particular id should be mandatory and I would have thought any other id would do, provided it matches in the opening <spine > tag and in the <manifest>. However I cannot see any good reason for NOT using it either. Sigil does it this way automatically and it works and follows the example in the specification, so why change it? See here in my earlier post about the <manifest> for more information about how Sigil labels the ncx.

Syntax of the Spine:

The spine part of content.opf is essentially just a list of the items in the e-book which are to be displayed in order. Each item in the spine is referenced by the id given to the item in the manifest. So a typical spine would look like this:

Saturday, 1 November 2014

How to understand the manifest in content.opf

Content.opf is the most important part of your e-book. This post covers what you will find between the opening <manifest> and closing </manifest> tags in content.opf. Earlier posts cover understanding content.opf and understanding and editing the <metadata> in content.opf. I will go on to explain the remainder of this file: the <spine> and <guide> sections.

Each line of content.opf between the <manifest> tags refers to the various different parts of the e-book. Each distinct item within the e-book must be listed in the manifest (with the important exception of content.opf which should NOT be included). Sigil will create a valid entry in the manifest for you for each item as you add it to the e-book. However you WILL need to make some manual changes to the manifest when linking your html table of contents and cover image for kindle, so it is important that you understand how it is constructed.

Syntax of an item tag:

The manifest consists of a series of <item /> tags. One for each … well … item in the e-book. Note that these tags have no closing tag, instead each tag is closed by the ‘ />’ at the end (the space matters). Here is an example:

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

This is the entry which Sigil has created automatically for the blank first chapter of the e-book. The first thing in the tag is href="Text/Section0001.xhtml". This is the URL of the item, and tells the e-book reader where to find the file. In this case the filename is Section0001.xhtml and the path from content.opf to the file is ‘Text/’. (The ‘Text’ folder is in the same place as content.opf and the path tells the e-reader to look in that folder to find the file.) It might be helpful to include an image of the contents of the OEBPS folder at this point:

Twitter Bird Gadget