Sunday, 15 December 2013

APOSTROPHIC RAGE

Dick Pountain/PC Pro/Idealog 227 05/06/2013

I've finally bitten the bullet and published my own Kindle book. I'd been thinking about it for several years, cutting out PC Pro features about how to convert into Amazon's MOBI format, but somehow never getting around to actually doing it. Editing Kevin Partner's Real World column "Online Business" over the last few months - where he describes setting up his own experimental Kindle publishing business - is what finally decided me it was something I must try, that wouldn't cost a lot of money.

I already had my content in the shape of a short book I've written called "Sampling Reality" which attempts to stitch together recent results in information theory, affective neuroscience (that is, the physiological basis of emotions) and cognitive psychology. As you can probably imagine, it's not a title likely to trouble the best-sellers list overmuch, and so far I'd only made it available via Scribd and my own website in PDF form. That meant that I already had it in a more-or-less publishable format: paginated, with chapter headings and subheads, a table of contents and a properly formatted bibliography. I'd done all that easily enough in Microsoft Word, using just two fonts - Times Roman for body and Arial for headings since you ask (I'm conservative that way, no hipster Futura or Helvetica). It looked quite nice and is quite easy to use, with working links from the contents page to chapters.

Book covers are one of Kevin's strongest recommendations: with so much stuff on Kindle you have just a fraction of a second to catch a browsing eye, so make it noticeable. I knocked up something I'm quite happy with using a montage of my own Flickr photos, and stretched it to fit in Word without needing to resort to any more sophisticated design software. Now I had a PDF with a full-colour cover, and that's what I expected to turn into a Kindle MOBI file.

I already knew, from Kevin and many other sources, that there's only one game in town for doing this conversion, a free program called Calibre written by Kovid Goyal. Calibre is hard-core multi-platform open source which you can compile yourself from github if you're that way inclined - I'm not and just downloaded a Windows version. It's far more than a file format converter, a complete content management system for your e-book collection. Its multi-platform roots show in a colourful GUI that conforms neither to Windows nor Mac guidelines, so the way it works will have you scratching your head at first. I'd already been through that hoop back in 2009 though when I discovered Calibre for converting public-domain PDF books to read on my Sony PRS-505 Reader.

Converting my PDF produced a total dog's breakfast: pagination well screwed with chapter headings halfway down pages; subheads indistinguishable from main text;  contents page spread out with one-chapter-per-page, and its links didn't work. Most intriguingly of all, every single apostrophe in the book had been replaced by a little empty box. Apart from that it was fine. I hadn't understood before that MOBI only supports one font family per document, although it does permit bold, italic and various sizes. Bye-bye to my sans headings. I generated new PDFs with altered settings to no effect, then decided to dump PDF.

Calibre can't convert DOCX files directly so I tried outputting HTML: that paginated better, but contents still didn't work and my apos were still atrophied. Tried ODT, not so good. Finally I tried good old RTF and, phew, it all looked good with subheads even in bold and a working contents list, but still *those bloody apostrophies*. I hit the forums and found one tip, from Kovid himself, which said this happens when a Kindle doesn't have a font to display a particular character. I wasn't using a real Kindle but the Kindle client running on my PC. Kovid's tip suggests setting "transliterate unicode to ascii" in one of Calibre's many config files. That didn't work but it provoked me into getting medieval on the document's ass. I search-and-replaced every single goddamned apostrophe from Unicode character 0027 to 02B9 (a slightly smarter apostrophe), which made the unicode to ascii conversion work and I finally had a publishable file that passed Kindle's vetting stage without criticism and was up on Amazon within a day. Check out the result at http://www.amazon.co.uk/-/e/B001HPO2E2. One annoying thing about the way Kindle works is that if you want to edit an already published book, you have to delete and resubmit, with the accompanying 12-hour delay: there's no interactive editing. So when I noticed that the word "Contents" now occupies page 2 all on its own, I couldn't face fixing it. I will one day, soon, and that's a promise.

No comments:

Post a Comment

CHINA SYNDROME

Dick Pountain /Idealog 357/ 08 Apr 2024 01:09 Unless you live permanently as an avatar in Second Life [does that even still exist?] then it ...