On Writing a Book With Google Docs and Amazon KDP

Published on December 20, 2013 (ā†» February 5, 2024), filed under and (RSS feed for allĀ categories).

This post is outdated.

Google Docs is okay to write short books and when making limited use of the comment feature. Amazon KDPā€™s HTML format is a technical disgrace, and Amazon needs to fix it. A few thoughts and tips on completing a book using either.

Google Docs

Docs, which seems to say ā€œdocuments, spreadsheets, and presentations created with Google Driveā€ (I struggle naming the Google product) is a great choice for these document types because itā€™s backed up online and nicely integrated into all of Google. No matter a former Googler, using Docs was absolutely my preferred choice to write the manuscript of my last book.

Doing so I believe Iā€™ve maxed out Docsā€™ capabilitiesā€”not in features, but in performance. I ran into three distinct problems:

  1. Linearly decreasing performance: The more I wrote and the more people worked with me, the slower Docs became. Yet that was only partially surprising.

  2. Lost edits: Google Docs is somewhat susceptible to network connectivity issues. On slower connections I occasionally (fortunately rarely enough not to just abort the Docs experiment) lost edits. Iā€™d write a paragraph, thereā€™s a hiccup, and only a reloadā€”losing some workā€”would help.

  3. Lost comments: Here weā€”my editor and Iā€”ran into a really strange bug. We lost a bunch of comments. Lost may not be accurate in that we saw them in the ā€œCommentsā€ menu (and had received emails, too), but they just wouldnā€™t show up in the document itself. Which is, not all of them. This cost us a lot of time and nerves because comments are most useful if you can see them in the sidebar, alongside what the commenter highlighted.

Iā€™ve shared the conclusion: If you plan to write a book with Docs do it for a shorter book (up to 100 pages), but not for longer ones, and not if you anticipate a lot of comments. Then Docs will be great as usual.

Amazon Kindle Direct Publishing (KDP)

KDP is Amazonā€™s platform to publish and sell books. It comes with its own technical standards and peculiarities. Iā€™m generally fond of KDP, but I like to share some things to watch out for and, please, for Amazon to fix.

Though KDP accepts HTML, Word, MOBI, EPUB, RTF, PDF, and plain text, none of the respective formats that a Google Docs document can be converted into (HTML, Word, RTF, PDF, and plain text) would display correctly. That includes using Google Docsā€™ formatting defaults. I donā€™t want to make this another negative for Docs nor KDP but suffice it to say that it blew the secret desire that I could write a Docs doc and, voilĆ , it worked in KDP (feature request, Docs team?). That leaves us with HTML here then, of course, a web developer Iā€™d take matters into my own hands.

There are three problems I ran into with KDP HTML, and theyā€™re all grave:

  1. Random, nonsensical HTML requirements: I could actually write a rant here that would fill a book on its own. The bottom line, only some HTML elements are allowed, and three custom ones have been introduced, of which one should be normal HTML (<mbp:section> ā†’ <section>), one dropped (<mbp:nu>), and the last one be revised (<mbp:pagebreak> to be done via CSS). Most attributes have been stripped. CSS has been cut to the stem by allowing only a very limited number of properties.

  2. Random, nonsensical encoding requirements: UTF-8 encoding is prohibited, and that is enforced in the upload process. Oneā€™s only allowed to use ISO-8859-1 with the exception of spades, clubs, hearts, up arrow, down arrow, alpha, beta, and gamma. Which is not a glyph-related restriction, however, as using entity references works fine in a good number of cases.

    The characters I found safe are at least ā€œā€œā€, ā€œā€ā€, ā€œā€˜ā€, ā€œā€™ā€, ā€œā€”ā€, and ā€œā€¦ā€, if you use the references ā€œ&ldquo;ā€, ā€œ&rdquo;ā€, ā€œ&lsquo;ā€, ā€œ&rsquo;ā€, ā€œ&mdash;ā€, and ā€œ&hellip;ā€. ā€œ&nbsp;ā€ works reliably, too.

  3. Poor documentation: The technical documentation is incomplete, inconsistent, and not very usable. It doesnā€™t list all HTML and CSS that is supported. Itā€™s inconsistent in how it presents the technical informationā€”information about CSS, for example, is only available in side notes. Itā€™s hard to find whatā€™s needed (I googled most). And thatā€™s not getting better for all the Amazon-proprietary code like standardized IDs for e.g. table of contents. *

I was very tempted to label the code requirements ridiculous. Why? To make a point as Iā€™d, at this moment, put $100 on the table that KDP was primarily the responsibility of a, and quite possibly a single one at first, software developer. And software developers are not web developers. What Amazon would benefit from is to allow all of HTML and CSS (as much as possible) as well as either free choice of encoding or UTF-8 as the standard. (Amazon, Iā€™d be in to help with this ā€ . Iā€™m sure there were reasons for some of the decisions but Iā€™m prepared to find solutions that make KDP more interoperable and easier to use.)

What that leaves us with is a lot of work for every author or their assistant to figure out what works and what doesnā€™t, and how to write code that only sucks sooo much. KDP HTML is cumbersome and time-consuming to work with.

KDP HTML Template

These were the pain points when writing a book with Docs and KDP. They may or may not help to avoid all of that pain. But hereā€™s something that can, the essence of the HTML document that I used for 100 Things:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="iso-8859-1" />
    <title>(Title)</title>
    <link rel="stylesheet" href="default.css" type="text/css" />
  </head>
  <body>
    <mbp:section></mbp:section>
    <mbp:pagebreak />
    <!-- and repeat -->
  </body>
</html>

If it resembles ā€œthe Worldā€™s best HTML templateā€ thatā€™s probably no coincidence. I like to keep things to a minimum.

* As long as Amazon doesnā€™t improve this thereā€™s actually potential to set up an improved, user-tested KDP guide, and make that a commercial success. Dealing with a number of KDP issues Iā€™ve already seen some books on KDP publishing that aim at exactly that, but theyā€™re not complete, either, and really not that good. Itā€™s sad to see how Amazon created a niche business here.

ā€  That is, Iā€™d be open to conversations. That doesnā€™t mean Iā€™m generally up for hire again, but just that there are companiesā€”Google being #1, but also including Amazonā€”Iā€™d always listen to.

Was this useful or interesting? Share (toot) this post, and support my work by learning with myĀ ebooks!

About Me

Jens Oliver Meiert, on November 9, 2024.

Iā€™m Jens (long: Jens Oliver Meiert), and Iā€™m a frontend engineering leader and tech author/publisher. Iā€™ve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, Iā€™m a contributor to several web standards, and I write and review books for Oā€™Reilly and FrontendĀ Dogma.

I love trying things, not only in web development (and engineering management), but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (Please be critical, interpret charitably, and giveĀ feedback.)