Adventures in Kindling

This weekend, I decided to spend a little time formatting one of my books (Dragon Stones, natch) for the Amazon Kindle.  The Kindle, of course, is an e-book reader notable for its built-in “Whispernet” wireless client, which allows the user to shop and buy books and have them delivered directly to the device without ever having to connect it to a computer.  I got a Kindle 2 for my birthday this year and it quickly became my preferred way to read books.  But this isn’t a post about the Kindle, it’s a post about creating Kindle content.

If you have electronic rights to a book in Amazon’s catalog, you have the ability to start selling it in the Kindle store via a link on the book’s listing.  This link takes you to the “Digital Text Platform” section of Amazon.com, where you can enter your book’s information and then upload a file to be converted into a Kindle HTML document.  (This will all look pretty familiar to anyone who has used one of the modern online self-publishing services such as Lulu.)  Yes, HTML — the Kindle is, essentially, displaying web pages.  More on that shortly.

I uploaded the PDF version of Dragon Stones as my source file, and the Amazon.com converted did a respectable job turning it into Kindle HTML.  It stripped out the page headers and footers, including the page numbering, page numbers not really being meaningful on a device where you can grow and shrink the font size as you read.  The converted document was certainly readable in the “Kindle preview” on the DTP page.  Does this mean that you can take your book, upload it, and publish it to the Kindle without knowing any HTML?  Ummm, not so much.

The HTML conversion, while good, is not perfect, which is why Amazon recommends that you review the file and why you have the ability to download it and edit the HTML, then upload it again.  In particular, I noticed and fixed a couple of irregularities introduced by the conversion:

  • Some font sizes were rendered either too small or too large
  • Some text alignments were not respected; in particular, a section at the beginning that contained centered text was rendered left-justified instead.  This appears to be due to (alert:  impending geeky digression ensues) how the Amazon converter applies CSS classes to paragraphs; it created a large number of CSS paragraph tags (“<p>”) that included text alignment instructions with the “!important” modifier, causing it to override the “center” instruction on the block of text in question.  The solution I went with was to remove the class declaration from the “<p>” tags in question.
  • Page breaks were removed.  This is a big one.  HTML doesn’t natively support page breaks (after all, a continuously scrolling document, which is what a web page is, doesn’t have “page breaks” per se), so it might seem to make sense that the converter ignores them.  Fortunately, the Kindle supports a nonstandard page break instruction tag (“<mbp:pagebreak />”). This tag is your friend; use it.  Otherwise your reader is going to find that “CHAPTER TWO” starts a few lines underneath the last paragraph of “CHAPTER ONE”, which, while it will not make your book unreadable, does make it look a little sloppy, not to mention confusing.  (Side note:  This is a Mobipocket tag.  It doesn’t appear that the Kindle officially supports all Mobipocket tags, but it supports some of them, at least.)
  • It treated “<br>” tags as open-ended.  Technically they are, because to close a tag, you need the slash before the greater than sign (“<br />”).  However, some HTML editors don’t add this slash.  I’ve never seen a browser treat “<br>” as open-ended, but the Kindle evidently does.  I discovered this because my own HTML editor is one that doesn’t put the slash in, and for some reason a “<br>” tag in my document had gotten a style associated with it, like so:  “<br style=’text-style:italic;’>”.  This was causing the entire page after the “<br>” to be rendered italicized.  It took me a little while to track down the source of this formatting issue, simply because I wasn’t looking for “<br>” tags with style declarations in them.  As soon as I spotted one, though, I knew I had found the culprit.  Removing the style declaration fixed the unwanted italicizing.

In addition to these changes, I did some additional minor cleanup in a few spots where I didn’t like how the text had rendered, and changed the title in the HTML header which, interestingly, was “Long Before Dawn“.  I’m pretty sure it was getting this from the OpenOffice.org document style, which I must have created while working on Long Before Dawn.

Once I was finished, I uploaded the HTML file to replace the one that Amazon.com had created out of the PDF.  Already being in the required format, it was passed through apparently unmodified, and I was completely happy with how it rendered in the Kindle preview; so I clicked “publish”.  Does that mean that you can now buy Dragon Stones for your Kindle for the low, low price of $4.99?  Nope:

Publishing Dragon Stones. Your book is currently under review by the Kindle Operations team as we are trying to improve the Kindle customer experience. Please check back in 5 business days to see if your book was published to the store. This will not affect any titles you are currently selling in the store, but uploading updates to existing titles will take longer to process

Drat.  I was hoping to have a link for you today.  Oh well, check back next week.

I doubt Amazon is conducting an editorial review of the content; most likely they are reviewing the format to make sure the presentation is satisfactory.  If I’m correct, this is another reason to download your file, review it, and make whatever changes are necessary to fix page breaks, fonts, etc.  Although HTML can be edited with any text editor, there are also a number of WYSIWYG editors available, including some free ones.  A good one to start with is Nvu or the Nvu fork KompoZer, which is the editor I’m currently using.  Another good choice is the Composer component of SeaMonkey.

That’s it for my Adventures in Kindling for this week.  Don’t forget to vote in the scene-of-the-month poll!

Advertisements

5 Comments

  1. Great cover for your Kindle 2I purchased my first Kindle(version 2.0) nearly two months ago and am truly loving it. What I didn’t get when I purchased it was a cover to keep it from getting banged up when I carry it all over the place. After a rather lengthy selection process, I picked the Mivizu
    leather book cover because it looked the best, is designed for the Kindle to slide inside, and it includes a book light. Now that I’ve had it for a few weeks I can’t imagine living without it. And I even encouraged my wife to buy one for her Kindlewhich she received as a birthday present. Mine’s black, here’s is green, and we both love them. It’s a great cover!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s