Category Archives: book
I’ve recently published a couple of books in Kindle format on Amazon. The latest is Words Words Words: A Trilby Trench adventure. It took me a while to get the publication process to work, so I’ve jotted down my notes in case they’re useful to others.
Please be aware that these are just my own notes, and are not intended as any sort of official or fail-safe way of moving content to Amazon.
Overview of my writing and publication process
I write my books online in Google Docs. That means I can access the content from any computer at any time, no matter where in the world I happen to be, provided I’m online. Google Docs also has an offline capability, but I haven’t used it extensively.
For the conversion to Amazon Kindle format, I use straight HTML rather than a Word doc or other format. I convert the content from my Google Docs file to HTML, using a Chrome add-on: GD2md-html. Why use the add-on instead of Google Docs’s own export to HTML functionality? Because I want a single, simple HTML file that contains just the content with minimal markup.
Then I hand-craft the files for the table of contents and other metadata.
Here are my step-by-step notes, in the hope they’re useful to other people.
Step 1: Create an HTML file containing the content of your book (
My content is in Google Docs. This is the way I convert it to HTML:
- In Google Docs, make sure all chapter titles are at heading level 2.
- Convert the Google Docs content to HTML. I use the Chrome add-on GD2md-html, with its default settings for the HTML conversion.
- Save the result on your computer as an HTML file. Use any file name you like. For example,
- Open the HTML file in your favourite text editor.
- Make sure the character encoding in your editor is set to something other than UTF-8. See Amazon’s documentation. (I ran into trouble when uploading my files to Amazon because the apostrophes, ellipses, etc, were using the default character encoding for my editor, which was UTF-8. On the Mac, Latin-1 (ISO-8859-1) worked for me.)
- Optional, for better HTML semantics: Change all
- Remove the heading level 1 element that contains the title of the doc:
<h1>Remove this element containing your title</h1>
- Add an HTML
<title>element containing your title. Example:
<html> <head> <title>Put your title here</title> </head> <body> . . . </body> </html>
- Add an HTML
<body>tag directly after the
</head>tag, as shown in the example above.
- Scroll to the bottom of the doc, and add the closing
- Change all the
<h2>elements that contain your chapter titles, to include a page break element and an
idattribute, like this:
<mbp:pagebreak/> <h2 id="chapter-1">Chapter 1</h2>
<mbp:pagebreak/> <h2 id="chapter-2">Chapter 2</h2>
And so on.
- Optional: Add a welcome blurb at the top of the page, before your first chapter. Something like this:
<h2 id="welcome">Welcome!</h2> <p>Welcome to <i>Your book title</i>, the crazy adventures of a possum in a puddle.</p>
- Save the changes to
Here’s a minimalist sample for
<html> <head> <title>Put your title here</title> </head> <body> <mbp:pagebreak/> <h2 id="welcome">Welcome!</h2> <p>Welcome to <i>Your book title</i>, the crazy adventures of a possum in a puddle.</p> <mbp:pagebreak/> <h2 id="chapter-1">Chapter 1</h2> <p>Your content, including simple HTML markup such as <i>italics</i>.</p> <mbp:pagebreak/> <h2 id="chapter-2">Chapter 2</h2> <p>More content.</p> <p>THE END</p> </body> </html>
For more information, see Amazon’s guide to supported eBook formats.
Step 2: Create a table of contents file (
- Copy the example
toc.htmlcontent below, and save it with file name
toc.html, in the same directory as your HTML content file (
- Edit the file in your favourite text editor.
- In all the
your-book.htmlto the name of your HTML content file.
- In all the
hrefattributes, change the chapter IDs and chapter names if necessary, to reflect the ones you’ve used in your HTML content file.
- Add more list items to reflect all the chapters in your HTML content file.
toc.html – unfortunately, I had to paste this as an image, because WordPress won’t let me include the HTML for this file. (I tried all sorts of things, escaping characters, using HTML entities, etc, but nothing worked for this particular set of code.)
For information about the “landmarks” entry and other details, see Amazon’s guide to creating a table of contents.
Step 3: Create an OPF file (
The Open Packaging Format (OPF) file is an XML file that contains metadata describing your book.
- Copy the example OPF content below, and save it in the same directory as your HTML content file. The part of the file name must be the same as your HTML content file. So, if your content file is
your-book.htmlthen the OPF file must be
- Edit the file in your favourite editor.
- Change “Your Title” to the title of your book.
- Change “Your Name” to your name, such as “Sarah Maddox”.
- Change “Name, Your” to your name with your last name first, such as “Maddox, Sarah”.
- Change “your-book.html” to the file name of your HTML content file.
Example OPF file:
<?xml version="1.0" encoding="UTF-8"?> <package unique-identifier="uid"> <metadata> <dc-metadata xmlns:dc="http://purl.org/metadata/dublin_core" xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/" xmlns:opf="http://www.idpf.org/2007/opf"> <dc:Language>EN</dc:Language> <dc:Title>Your Title</dc:Title> <dc:Publisher>Your Name</dc:Publisher> <dc:creator opf:role="aut">Name, Your</dc:creator> </dc-metadata> <x-metadata> <output encoding="utf-8" output="text/html"/> </x-metadata> </metadata> <manifest> <item id="table-of-contents" properties="nav" href="toc.html" media-type="application/xhtml+xml"/> <item id="html" href="your-book.html" media-type="text/x-oeb1-document"/> </manifest> <spine> <itemref idref="table-of-contents"/> <itemref idref="html"/> </spine> <guide> <reference type="toc" title="Table of Contents" href="toc.html"/> <reference type="text" title="Beginning" href="toc.html"/> </guide> </package>
Step 4: Create a
toc.ncx file – not sure this is needed
I’m not sure that you need a
toc.ncx file for Amazon Kindle books. The Amazon docs seem to imply that you don’t need one. But I created one anyway, and included it in the upload of my book. I figure it may be useful for older types of devices that people may be using to read the book.
Below is an example of a
toc.ncx file. Note the two attributes that increase incrementally:
playOrder and the chapter number.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd"> <ncx version="2005-1" xml:lang="en" xmlns="http://www.daisy.org/z3986/2005/ncx/"> <head> <!-- The following four metadata items are required for all NCX documents, including those conforming to the relaxed constraints of OPS 2.0 --> <meta name="dtb:uid" content="uid"/> <!-- same as in .opf --> <meta name="dtb:depth" content="1"/> <!-- 1 or higher --> <meta name="dtb:totalPageCount" content="0"/> <!-- must be 0 --> <meta name="dtb:maxPageNumber" content="0"/> <!-- must be 0 --> </head> <docTitle> <text>Your Title</text> </docTitle> <docAuthor> <text>Name, Your</text> </docAuthor> <navMap> <navPoint class="toc" id="table" playOrder="1"> <navLabel><text>Table of Contents</text></navLabel> <content src="toc.html" /> </navPoint> <navPoint class="titlepage" id="L1T" playOrder="2"> <navLabel><text>Welcome</text></navLabel> <content src="your-book.html#welcome" /> </navPoint> <navPoint class="titlepage" id="L1T" playOrder="3"> <navLabel><text>Chapter 1</text></navLabel> <content src="your-book.html#chapter-1" /> </navPoint> <navPoint class="titlepage" id="L1T" playOrder="4"> <navLabel><text>Chapter 2</text></navLabel> <content src="your-book.html#chapter-2" /> </navPoint> </navMap> </ncx>
Step 5: Zip all the files (
Zip the following files into a zip file named something like
your-book.zip (the name of the zip file is up to you):
your-book.html(the file name is up to you, but the extension must be
toc.html(use this file name)
your-book.opf(the file name is up to you, but the extension must be
toc.ncx(use this file name)
Step 6: Upload the zip file to Amazon
- Go to Kindle Direct Publishing. Sign in, or create an account if you don’t yet have one.
- Follow the prompts to create a new ebook and supply the requested information.
- When the Upload eBook manuscript option appears, click it.
- Follow instructions to upload your zip file.
When things go wrong, the error message you get from KDP isn’t very helpful. It basically tells you that there was an error processing your file, and you should check your files.
A couple of issues I had, which may help you diagnose any problems you come across:
- Check the little things, like syntax bugs a copy/paste errors. In the book’s content file, one of the id attributes for my chapter headings was wrong. In effect, I had two headings with
id="chapter-2", and none with
id="chapter-2". KDP was happy when processing the content file alone, but gave an error as soon as I tried to hook it up to the toc.
- Character encoding is a hassle. I ran into trouble with apostrophes, ellipses, etc, because the default character encoding for my editor was UTF-8. It’s safest to set your editor to use ANSI. See Amazon’s documentation.
Hint: If things go wrong, try uploading just your HTML content file
If you can’t get your toc and OPF files to work, one trick is to first upload just your HTML content file to Amazon KDP, then download the resulting Kindle file from Amazon and adapt it.
- Go to Kindle Direct Publishing (KDP). Sign in, or create an account if you don’t yet have one.
- Follow the prompts to create a new ebook and supply the requested information.
- When the Upload eBook manuscript option appears, click it.
- Follow instructrions to upload your HTML file.
Amazon KDP takes your HTML and creates the basic set of files that it needs to make a Kindle book. You can now make use of those files. So, when the upload is finished, follow these steps to download the results as a zip file:
- Still in KDP, scroll down to the Kinde eBook Preview section and click Preview on your Kindle device. A small section open on the page.
- In the section that opens on the page, click the HTML link in the first bullet point. (The text is “Step 1: Download your converted book file: HTML or MOBI.)
- Wait for the zip file to download, then unzip it on your computer.
Now you can continue working on the files as described earlier in this post, and upload them again as a zip file. You can download and upload as often as you need.
Other useful resources
Perry Garvin has written a useful article on making a Kindle book with HTML and CSS. I follow a different procedure from the one mentioned in that post, but the description of the files, and the sample doc set are very useful.
Amazon’s KDP Jumpstart is a good entry point into the world of Kindle Direct Publishing.
The printed copy of my book has arrived! That’s a good reason to talk about publishing a paperback via Amazon’s Kindle Direct Publishing.
First, the long-awaited arrival of a printed copy of my book, A Word If You Please. I published the book on Amazon.com in Kindle and paperback formats. Being all the way down here in Australia, it was a couple of weeks before my hard copy arrived. And now, here it is:
It’s about an action hero, Trilby Trench, who also happens to be a technical writer. Does her way with words bring the danger to her or does it save her from further troubles? Only Trilby can tell you that.
Publishing a paperback on KDP
It’s been a while since I last ventured into the online tools provided by Kindle Direct Publishing. I’ve previously published two novels in Kindle format.
It was a very pleasant surprise that you can now create and publish a paperback version of your book. When I last published via Kindle Direct Publishing, only the Kindle format was available. The cost model for the paperback format is print on demand: You pay Amazon a fee for each copy that someone buys.
I loved the online cover designer. You can choose your design from a range of templates. There are different templates for Kindle ebook and paperback. Upload your image, customise the colours and fonts, and submit the design.
Only one thing didn’t work quite as expected. When you publish both a Kindle version and a paperback version of the same book, they start off as separate books on Amazon.com. It’s a good idea to get them linked, so people looking at the book online can see that both formats are available. The linking is supposed to happen automatically, based on identical title, author, and some other metadata. The auto-linkage didn’t happen for me, so I contacted the Kindle Direct Publishing help desk. They replied to my request within a few hours, and the update came through within 24 hours. Excellent service!
It’s worth spending some time reading the Kindle Direct Publishing documentation, to figure out how to upload and format your content. I decided to use straight HTML for the paperback version of my book. If you go that route, you may find this article useful: How to make an Amazon Kindle book using HTML and CSS. The author of that blog post has recently posted a disclaimer saying the post is out of date. Even so, I found the overview useful, and the downloadable set of sample files too.
I’ve recently published a fiction book, first in serial form on my own website, then as an entire book on Amazon.com. Publishing the book in serial form, chapter by chapter, was an interesting experience. It was an experiment. I wanted to see the pros and cons from an author’s point of view and from a reader’s point of view.
The book is A Word If You Please, featuring Trilby Trench and a collection of friends and foes. Trilby Trench is a technical writer who likes a bit of action. As Trilby’s friends know, adventure stalks Trilby and she stalks it right back. The serialised book is online on the Trilby Trench site (free of charge). You can also download the book from Amazon.com as a Kindle ebook (USD $3.11) and a paperback (USD $6.99).
Why serialise a book?
I’d been wondering about publishing in serial form for a while. What would it be like for me as author and for the people reading my book?
For example, would publishing the book in serial form be a good way of getting feedback from readers? In my case, the answer is yes. More people have sent me comments about this book than about the other fiction books I’ve published. The comments come in on Facebook, the Trilby Trench site, and other social media.
For an author, publishing a book chapter by chapter can be a challenge. Once you’ve published a chapter, you can’t go back and change it. That’d be breaking an unwritten contract with your readers. Actually, it’s a written contract, kind of! So, if your plot goes awry or you forgot to include something in an earlier chapter, you have to work around that. Before publishing the first chapter, you need a very good plan for the entire book. I like to have it mostly written, though not necessarily polished and complete.
This way of publishing made me think a lot about my readers.
What do readers think of the experience? Some may find it fun to have to wait for the next instalment. The suspense may increase their interest in the book. Others may find it annoying to have a break artificially imposed on them, or may lose the thread of the story. Perhaps a serialised book would stick in people’s memories longer than if they’d read it all in one go. Perhaps some people simply wait until all the chapters are available!
Where to publish a book in serial form?
I took a look at a few options for where and how to publish the book online.
Wattpad is an online community for readers and writers. If you publish your work there, you have a ready audience and a medium that’s well designed to bring authors and readers together. I wasn’t too sure that the primary Wattpad audience was right for my book. The most popular genres there are science fiction, young adult, and fantasy, and my book doesn’t fit into those categories. Also, Wattpad keeps popping up requests to log in, even if you’re a reader and not an author. I think that’s a barrier to entry for readers.
I also like the look of Inkitt. It has a clean UI, and it focuses on readers rather than authors.
After careful consideration, I decided to publish the book on my own blog or site, so that I could have more control.
One option was to publish the book on this blog (ffeathers.wordpress.com, where you’re reading this post). One the one hand, the focus of this blog is fiction as well as technical writing, so it’d be a good place for the book. On the other hand, this blog is primarily a blog, whereas I wanted a site that focused on the book rather than the blog posts. So, I needed a different layout, and I didn’t want to mess with ffeathers.
After weighing up the options, I decided to create a new website for the book. In fact, the website is for the character, Trilby Trench, as I plan to publish more than one book with Trilby as hero. Hence the site name and URL, trilbytrench.com. The site runs on WordPress, hosted by Bluehost. I’m using the Author theme, with some CSS tweaks to change font sizes (the default size was too small) and colours.
What do you think about serialised fiction?
If you have any comments from your experience as a reader of serial fiction, either my book or others, I’m keen to know what you think. What are the pros and cons of reading serialised fiction? Comments from authors would be interesting too!
The first book of my new Trilby Trench series is now available on Amazon.com as a Kindle ebook and in paperback form. Trilby Trench is an action hero who also happens to be a technical writer. She’s deft with words, analytic in thought, and skilled in everything that she’s written about. That covers a lot of ground. Things happen to Trilby, and she happens right back at them.
The book title is A Word If You Please. You can get it here:
- Amazon.com: Kindle ebook (USD $3.11) and paperback (USD $6.99)
- Online book on the Trilby Trench site (free of charge)
I first published A Word If You Please in serial form, chapter by chapter, on the Trilby Trench site. Last week I went through the very interesting process of publishing the book with Kindle Direct Publishing, both as a Kindle book and in paperback.
If you order quickly, you just may see the paperback before I do. 🙂 I’ve ordered one, but it hasn’t arrived yet. It has to make its way from the US all the way to Australia. So I have no idea what it looks like in real life, or what it feels like to hold.
If you’ve read the book and are happy to put a review on Amazon, that’d be awesome!
Have things improved, or is Trilby Trench still in a pickle? Read A Word If You Please, chapter 2 to find out!
A Word If You Please is the first book in an online fiction series about Trilby Trench, tech writer and action hero. Don’t worry if you missed chapter 1 – you can still read it and get to know Trilby Trench. See the about page on her site. You can also subscribe to updates on the site, to make sure you don’t miss out again. 🙂