Monday, November 28, 2011

How to turn your Word document into a Kindle-ready file

My current project is Hild, a massive novel set in the seventh century. For the convenience of advance readers (editors, agent, publicists and so on), I want to turn the manuscript into a nifty ereader-ready file, complete with embedded map, glossary, and genealogy, which I can email to readers for sideloading to their device of choice via USB.

A plain word file is easy. Last year I found a a quick way to turn a Word doc into very sturdy .azw format. (This is Amazon's proprietary format. I use a Kindle, so the first part of this post is all about that; don't worry, I'll get to the other stuff later.) It's not elegant but it works.

Here's how I do it. First of all, because I began my keyboarding life long ago on a typewriter, and sometimes old habits die hard, I do a global search-and-replace to substitute one space for two between sentences. Then I make sure that the paragraphing is right--no line breaks between paragraphs, no extra spacing that might lead to such, etc. Then--and this is important for the quick-and-dirty-zero-coding method--I change my tab indent from .5 to .1. Then I save the Word file (.docx) as a web page (.htm).

I email the .htm file to my Kindle address and Amazon kindly flings it through the ether to land on my Kindle home page. I open it.

Here's how it looks:

Not fancy but eminently readable.

To make an .azw file that I can email as an attachment to others so they can sideload it to their own Kindles, I email the .htm file to my Free Kindle address, and Amazon kindly emails me the .azw file, which I can then forward.

So far, so simple. And very, very fast. (Really. The whole thing takes less than ten minutes.)

The difficulty comes when I try to embed graphics (map, genealogy, nifty end-of-section symbol: ✥) and tables (glossary). It should be simple: embed the pictures in the Word doc, save that as a web page, upload the whole thing. But it isn't. What I get where the big graphics should be (e.g. the map) is picture of a camera and an exclamation point. (The little graphics, i.e. symbol, are just a question mark in a box.) As the Kindle is delicate (and, y'know, mine), I don't throw it at the wall. (Yep, I exaggerated the other day. It's what writers do.)

So then I thought: Okay, you bastard, I'll just upload the graphics as separate files and send a zipped file for readers to upload to their Kindles. Ha, eat that you awkward git! I tried uploading the graphics on their own. I tried it several different ways, using different formats (I won't bore you with the details) and eventually got so cross I was driven to do what I should have done to start with: I read the instructions. (Kelley always laughs at me for not reading instructions. I know I should I just...don't. Call it a moral failing and move on-- Why, yes, that is Kelley in the background chortling mercilessly.)

So, if I'm reading the instructions correctly--which I often don't, which is why I never read the fucking things in the first place--my fastidious First Generation Kindle (yep, it really is that old) not only finds PDFs unclean (which I knew) but also won't touch .gif or .jpg or .png or .bmp or any other picture formats on the planet.

So then I tried all the same methods but this time to Kelley's Kindle, which is a third generation device. Failure.

So then I turned to Calibre. (Calibre is a free and open-source e-book library management system. As part of that management, it converts documents into and between a variety of formats, including EPUB, used by lots of ereaders such as Sony, Kobo, iBooks, and MOBI, which Amazon easily turns into its .azw format.)

Calibre won't import and convert Word documents, so I turned Hild into an RTF file (complete with graphics, tables, etc.) and tried, twice, to import/convert that. For reasons unknown it wouldn't work. Calibre suggested I try converting the document to a webpage first. So I did that. I imported. Converted to MOBI. Added metadata, commentary, a cover. Uploaded to my Amazon account. And, woo-hoo! It worked. At least for the cover and genealogy:

If you click on the picture to make it bigger, you'll see that as well as actually displaying the cover (nope, this is not the final cover; I just made that on Photoshop while waiting for one of my endless trials/conversions/uploads) it now also shows the title and author in the right place.

The genealogy can be zoomed on the Kindle, at which point it flips on its side:

However, the glossary, in tabular form, came out looking as though someone had eaten a dictionary and thrown up on my Kindle. Huh.

The saga will continue tomorrow...

This blog has moved. My blog now lives here: