(note: the above isn’t my book btw – this is just a screengrab from the calibre website)
I’m done! Actually, yes. I’ve shipped my first version of the Kindle book to the client and am awaiting changes.
Sorry, but I’ve been so busy, I haven’t had time to update this page. Anyways, here is the process I’ve been working on:
- Take the book text (I was working on a non-fiction title), and covert it to Markdown.
- Run the book through a Leanpub.com conversion and you get a decent ‘epub’ file at the end.
- Hooray, this has just solved a whole bunch of HTML formatting.
- Add this epub file (it’s a book basically) to Calibre.
- Edit the book.
Now things start to get easy or complicated depending on what you’re trying to achieve. Personally, I had a whole lot of layout issues, Table of Contents, images, references etc to deal with. You may not have this issue. Either way, I’m going to document what I can recall.
Essentially Leanpub creates a pretty good epub file, but I had a lot of files which I didn’t understand in my Calibre book editor, so to figure things out, I cleaned up my (xhtml) page code and saved it all out to new (html) files in a folder on my hard drive. Calibre doesn’t allow you to work on two books at a time, so I needed to save everything out individually. Why? Because the leanpub markdown file is singular, and the .epub file it creates is singular too. Confused? Yeah, don’t worry about it. Just keep reading!
Once I’d saved out my entire book into all the separate files I figured I’d need (css, table of contents, references, etc.) I created a brand new book. This got rid of all the weird files the Leanpub import created. I created all the individual pages I needed (naming the chapters appropriately) and pasted the page content back in from my hard drive backup. This left me with a ‘clean’ version :)
Don’t forget to add in the CSS link in the HEAD tag, and you should be set for formatting your page content.
Everything from this point was pretty easy. You will obviously need to know HTML to understand how to link up internal pages if you’re building a reference section, but if not, just crack on with tweaking page content and css code.
Don’t create your own Table of Contents as the Kindle conversion will create it’s own. This caused me a lot of headache – so don’t even bother trying until you’re experienced.
On that TOC note: once all your pages are into Calibre, you ‘build’ your TOC by going to Tools > Table of contents > Edit Table of contents. Easy to use and saves a lot of hassle.
Once you’re done save everything, close the editor, highlight your book, click to edit the book Info (meta data). Here you’ll be able to set the authors, the publication date, the tags, and comment description, and more. Once done hit Save. Now click to convert the file: in the top right drop down choose .azw3 and click convert. When that is done, connect up your Kindle and add it to your main memory. Eject it when done and check it for errors.
Once you’ve made a note of them. You’ll need to go back into the original epub file and make the changes. Be careful here as if you didn’t select .azw3 from the dropdown initially, you might have created duplicates. You’ll need to select the original epub file and edit that. Opening up a converted .epub or .azw3 file to edit will show you all sorts of page code which you didn’t write. This confused me so much, I actually removed the entire (converted) book from the Calibre library and imported my original saved epub file again. This has a downside of not saving the Meta data, but for me it wasn’t too bad to add it in again.
I ended up flipping to and from these converted and original epub files a lot in order to get to a final ‘good’ .azw3 file – but it was worth it.
Need help? Got stuck? Ping me a message. Either on here or my real website.