Advanced
Kindle
Formatting
by
David W. Deley
Second Edition: September 2013
DEDICATION
To my father, who always believed in me, and made this possible.
CONTENTS
- (Kindle Keyboard)
- (Kindle Touch)
Paragraph Tag
Tag
- e.g.
- Italics
- Bold
- Underline
- Strikethrough
- Centering Text
- Font Size
CONTENTS AT A GLANCE
Paragraph Tag
SECTION I:
PRELIMINARIES
* * *
CHAPTER 1
Introduction
Youre an author and you wish to publish your book on AmazonsKindle Direct Publishing (KDP) website. All you need to do is convert yourbook to Amazons Kindle file format and tailor it so it looks right on theKindle.
And theres the rub. Amazons Kindle file format is largelyundocumented. Plus the documentation available from Amazon isnt alwayscorrectsometimes its just complete nonsense.
Amazons Erroneous Documentation
For example, Amazons list of Kindle Supported HTMLTags includes tags which dont work on many Kindles, giving new meaning to the wordsupported.
Heres another example. Amazons Kindle Direct Publishing website claims, in twodifferent places, that:
Amazon Kindle Direct Publishing supports text in the'Latin-1' (ISO-8859-1) format and all characters in that character set. Theonly characters from that set not currently supported are: spades, clubs,hearts, up-arrow, down-arrow, alpha, beta, gamma.
The problems with this statement are:
- The 'Latin-1' character set referred to doesnt have characters forspades, clubs, hearts, up-arrow, down-arrow, alpha, beta, or gamma.
- Every Kindle, all the way back to the very first generation Kindle, candisplay those characters. Here, have a look:
{ }
- Kindle doesnt support the 'Latin-1' character set. Instead Kindle supportsa close relative known as CP-1252 (also known as Windows-1252 or WinLatin).
Actually, Kindle supports two different character sets:
- CP-1252 (also known as Windows-1252 or WinLatin)
- UTF-8
Which character set the Kindle uses is determined by the 2-byte Text Encodingfield in the MOBI header of the *.mobi or *.azw file. The two options are:
- 04E4 (Decimal 1252) = CP-1252
- FDE9 (Decimal 65001) = UTF-8
Kindlegen by default creates *.mobi files using the UTF-8 character set.There is a switch option, "-western", which can be added to the command lineto force build of Windows-1252 book. However, the switch doesnt work! Even if the "-western"switch is specified, and KindleGen acknowledges that it sees the "-western"switch, when you look inside the resulting .mobi file that KindleGen createsyoull see that KindleGen still sets the Text Encodingfield of the MOBI header to UTF-8 and uses UTF-8 encoding internally. Thisstarted with KindleGen version 2.3. The earlier KindleGen version 1.2 didcreate a CP-1252 encoded book if the "-western" option was specified.Ive no idea why they decided to quietly abandon CP-1252 and forceUTF-8, but thats how it is for now.
So, where does this leave the befuddled author or publisher who justwants to format their book for the Kindle e-reader? Rather confused Id say.Thats why I wrote this bookto clear up all this confusionand explain, in a simple and easy to understand way, for people who are notnecessarily experts but who are technically savvy enough to understandsomething once its clearly and correctly explained, how to properlyformat your kindle e-book and get it ready for publishing.
Kindle Bugs
In addition to Amazons erroneous documentation, the Kindle e-reader has afew bugs in it. Now a programmer such as myself will never admit to there beingbugs in one of our programs. We just rename themfeatures, at least until they get fixed, at which point werename them enhancements. But in all honesty theyrejust outright bugs, and Kindles have their share of bugs which make evencorrectly formatted text display incorrectly.
Reality is what it is. A program does what it does, and if itdoesnt do what you expected it to do then theres bound to besome disappointment. I will point out the various Kindle bugs and explain how to avoidthem.
Problems Authors and Publishers are Having
Big companies and individuals alike are having problems formattingtheir e-books. Heres a typical example of the types of problems authorsand publishers are experiencing:
An author writes his book using Microsoft Word.The book looks OK in Kindle Previewer. He publishes his book, only todiscover to his horror that in the preview of his book on Amazonswebsite, the preview text switched to bold face half way through the preview,and stayed bold for the rest of the preview. Inexplicable.
This problem was caused by the way Amazon strips out the first10% of your book for its preview, combined with the way Microsoft Wordcreates huge ugly code bloat that wasnt designed to have the first 10% ofit stripped off. Bizarre problems like this can pop up if you allow programsto format your book.
Even big publishing companies are having trouble getting their books todisplay correctly. For example, a book from a major publishing company, originallypublished in hardback, and later published in paperback, was also madeavailable in Amazons Kindle format. The Kindle version of the book had a curious tendency tosomewhat randomly change the displayed text size. I would adjust the displaytext size to a size I liked, then later Id notice the text size hadchanged. Id readjust the display text size back to the size I liked,only to later notice the text size had changed once again. This became a bitannoying after awhile. I also noticed if I followed a hyperlink to a footnotereference, and then returned to the main text, sometimes, but not always, thetext size was different.
I had a look at the books free sample (the free samples Amazonprovides are not DRM protected) and discovered the problem was the result ofthe publisher spanning each chapter of the book with a font sizespecification. Not only should you never specify a default font size for anentire chapter, you should never span any section of text longer thana few pages. Stick with formatting at the paragraph level to avoid theseseemingly mysterious problems. Ill explain why later on whenhave a look under the hood of the Kindle e-reader. (See
tagfor a complete explanation.)
So even the big companies dont always know how to formattheir e-books properly, which is unfortunate, because properly formattinga book for Amazons Kindle e-reader is easy, once you understand thesimple concepts behind HTML.