Tuesday, July 21, 2015

All about e-publishing

What I know about publishing e-books through Amazon's KDP platform (updated August 2015):

Helpful forums

Amazon maintains the Kindle Publishing forum that I visit often, and where I and others will answer  formatting questions. And there's an especially good Kindle Formats forum on MobileRead dot com. And of course Ask the Community on the Kindle support pages, though it's heavy on disgruntled people and bad advice.

MS Word

I prefer to work in html and upload an epub (see below) because it gives me complete control over the book. There's a learning curve, but the same is true of any method of submitting books to the KDP. However, the Amazon software does a fair job of converting *.doc files, if you are religious about using Styles. (The more recent your version of Word, the better it works. Word 2000 is terrible; Word 2013 isn't bad.) If you're determined to go this route, here are some free resources:

Shauna Kelly on using Word (Basic Concepts, Styles, and Tips for Using Styles)
Tech Republic advanced formatting tips
Amazon's simplified guidebook
Mark Coker's Smashwords guide
JT Bigtoad's rules for formatting Word
Tips for Formatting Your Book Correctly in Microsoft Word

And for transitioning from Word to html:
Joshua Tallent: Html Basics for Kindle
Guido Henkel: Take Pride in Your Formatting

And whatever you do, PREVIEW that book after it has converted (Step 7 in the publishing process). The downloadable Kindle Previewer gives the best results. Download it and your converted mobi file, and check it in all the available emulations.


I have settled on a single book file, style sheet, and format across all retailers. That requires me to build an epub. This is more challenging than Word, html, or mobi format, because epubs must be validated in order to get on the iBookstore. This is my system (subject to change, as always):

1) For a variety of reason, I generally wind up with my book in the form of a Word document. To turn it into a workable html file, I run the it through word2cleanhtml.com on the web, a free service. (This also works for an Open Office file: just save it as in Microsoft Word 1997/2000/XP format.)

2) I then paste the html file into a template I have previously created. It contains the basic framework of a web page and a link to my standard style sheet. Clean up the word2cleanhtml file as needed (it's not 100 percent accurate) and validate the result at http://validator.w3.org/ -- vital for building an epub, and a good idea for uploading to the KDP. Though the KDP conversion is fairly forgiving, as applied to the e-ink Kindles, good html has become more necesssary with the advent of the Fire and especially for the Look Inside preview.

3) I open the html in Sigil (a free download) and break it into chapters (epub devices prefer mutiple files to one large file). I use the Semantics and Metadata tools to build the OPF and NCX files, and I validate the result at http://validator.idpf.org/ -- vital for the iBookstore.

The resulting epub will work on the KDP, on Barnes & Noble, on Kobo, and (through Lulu) will pass muster at the iBookstore.

If all else fails

If you're ready to move on from Word, but html and Sigil terrify you, there are three purpose-built word processors that will help you advance: Jutoh, Scrivener, and Atlantis Word Processor. Each costs about $40 and has a trial version, each will give you some control over formatting, and each will create an epub you can upload to the KDP or any other e-tailer. From my limited experience with these softwares, I would be inclined to favor Jutoh.


  1. Question about item 3) I open the html in Sigil (a free download) and break it into chapters (epub devices prefer mutiple files to one large file). I use the Semantics and Metadata tools to build the OPF and NCX files, and I validate the result at http://validator.idpf.org/ -- vital for the iBookstore.

    I've just published a book using your html template as a starting point (after writing the original in Word). First, thanks so much for sharing the clean html framework. It loaded up to KDP, including images via a zipped file without a snag.

    One thing I noted was the TOC format. When I viewed the pre-pub mobi KDP created, the TOC was accessed by clicking the link just below the Cover and Begininning links. This action jumped me to the actual TOC in the ebook. So far so good.

    Then I tried tweaking things by creating an EPUB using the free Kindle Previewer and uploading that to replace the html-images-zip file. Again, everything looked great. BUT, there's always a but, the TOC now shows up in the left window, chapter titles and all. It looks great, so where's the BUT?

    Here it is. The Enhanced Typesetting feature on Amazon (including Bookerly font and smarter hyphenation) is NOT enabled in the published ebook. Is this because an EPUB-based input uses multiple files? Is there a work around to have both a great looking, professional TOC and Enhanced Typesetting?

    1. You did well! Let me think about your question a bit. I'm not sure that Bookerly etc is available on all devices / all publications.

    2. Okay, I haven't checked all my e-books, but I've looked at a fair sample, including one that was published five years ago. All of them have Enhanced Typesetting enabled -- and all, I assure you, have working TOCs. You can check out the one on my Guide, at ASIN B00BK9TN4E (the first four entries work, up to Step 2, which starts beyond where the free sample ends). But note that I upload an epub built (and validated) in Sigil, a free & powerful software that I strongly recommend.

    3. Good to hear. I guess all I have to do is wait for the Amazonians to add the code to my book files. Hope they don't mess up anything. I've heard some negative stories about changes made that affect the layout (aside from ET) without notifying the author.

    4. Well, no "code" will be added to your book. But it may well be that you can only see the Enhanced Typesetting option on a published book. It is to answer questions like this that I try to be the first person to buy each book of mine from the Amazon store. (You also get a nice bump in the ratings, to something like 250,000, tee hee. And you get some or most of your money back in the form of a royalty.)

  2. Hi and great thanks for your helpful articles! I'm working on a Mac and using Pages (v5.6) and am trying to publish my first eBook, which will have a combination of text and images. I've been reading and researching over the 3+ years of compiling this material and am worried about getting this into the proper ePub format (and I'm not even confident I'm understanding yet all of what's involved). I'm currently only aiming to publish through Amazon. Would the main information and advice you have still apply and am I going to make a mess doing this on Pages vs Word? Thanks for any help!

    1. Mac has its challenges, and Pages later than 4 is likewise challenging. A professional formatter posted this advice on the Kindle publishing forum:

      "The major problem is Pages 5.5 itself. It simply is not a very good word processor, being barely any more powerful than Google Docs. The one it replaced, Pages 4.3, was the business, but it is no longer produced.

      "Switching to the vastly more powerful Open Office (or its near identical twin Libre Office) won't cost you a penny, but do it properly. Save the book as Plain Text. This will strip out all the formatting, apart from the returns, leaving you just with the words. Paste this into a blank Open Office document. You will have to put all the formatting back in, but it will be worth it because it will an uncorrupted Open Office document now, which you can then save as Html and open in Sigil (a free download). Sigil, in turn, will provide you with a proper ToC and convert it to ePub."

      An author said this:

      "You can download the free Open Office for your Mac, and with a tiny bit of playing about, you can get your Pages document into it with styles intact. All you need to do when it comes time to export your work from Pages is make all the text in the document the Garamond font (for some reason this exports styles okay when other fonts won't) then save as a Microsoft Word .doc. Then open the Word .doc in Open Office, save the file again as HTML, and voila! It's all exported perfectly from styles to page breaks to chapter markers. "

      Yet another:

      "The best way to achieve it in Pages is to use Apple's free download, 'ePub Best Practices'. This is a sample document containing all the styles and embedded Html codes required for ePub. It also contains a table of contents generator. Write your book in Pages, as normal. When it is ready, paste it into Best Practices, then go through it, making sure that headings etc. are all in the correct styles. That should provide you with your ePub for upload. My experience of it, however, was that it resulted in headings that were far too large for a Kindle, so I don't recommend it.

      "What I do recommend is switching your word processor. Word is available for the Mac, of course, as are Open and Libre Office. Best of all, in my opinion, is Nisus Writer Pro, which is a Mac-only word processor. It isn't free, but it is not as expensive as Word and it has all the features that you are ever likely to need. Besides that, it offers you a no obligation free trial first, so there is no risk of losing your money on something you will never use. Like most word processors, its table of contents generator is for printed books, so it directs you to a specific page. For Kindle, export it as ePub, then feed that through Sigil (a free download).."

      Good luck! -- NJ

  3. I just want to say thanks. I'm working from Scrivener and outputting to their epub format. But I can take that into Sigil and have control over things like you show.

    I would never have known how to do that without finding a random response you made to someone in the KDP forum. I picked up your book and it's really opened my mind.

    I haven't published anything this way, yet, but I'm about to re-format and re-launch some things and I'm definitely going to give this approach a shot. Thanks so much!

  4. Thanks for this clear exposition of html codes used to format an ebook. I've had one recurring question for the last couple years. I use Guido Henkel's guide, which is very good. I format my manuscript using html in Notepad ++ and it looks fine.

    At present it starts each chapter at the top of the page. I can leave line-spaces after that first line of text, but I can't leave line-spaces at the top to set off the chapter title. What I want is to leave 4 line-spaces at the top, then have the Chapter title, then leave 4 more line-spaces below the title, then start the first paragraph. How do I format for the line-spaces at the start of a chapter? If I enter
    at the top it doesn't create any spaces.

    Thanks so much if you can help with this!

  5. My H2 style will do that. I only call for a margin-top of 1 em, but you can increase that if you like. I think it's a mistake to push the heading too far down the page. You might try 2 spaces at top, 1 em at bottom, like this:

    h2 {
    font-size: 150%;
    text-indent: 0em;
    font-style: italic;

  6. Hi NotJohn,

    I asked you a question about poetry formatting a year ago and you were really helpful so I thought I would see if you knew anything about this. I have redone my poetry in sigil so that I can use their secondary toc features and have created a hanging indent that works perfectly on all the old model kindles, and reads correctly in mobi form. However the look inside feature refuses to show the hanging indent. Info on the forums seems confused as to whether it is possible to have a hanging indent that displays correctly on the look inside. When I send the preview to any of my devices it displays perfectly, so it is just the computer look inside feature that poses a problem. Ideally I want readers to be able to see an accurate representation of my poetry if they click on the look inside, but if this is impossible to achieve I don't want to waste any more time trying. Do you have any insights on this? I know its a really specific issue, but thought I would ask just in case you've come across this before. I would be so grateful if you could advise! Lisa

    1. Look Inside is much improved over what it was a year ago, but it still has "issues." A hanging indent is supposed to work like this, but I've never tried it on text that appears in LITB:

      Hanging indents will work in both KF6 an KF8 if you use a media query in CSS something like:

      @media amzn-kf8
      p.hang { text-indent:-36; margin-left:36;}

      and use the following code in the body of the HTML file:

      [p class="hang" width="-36">Your text here.[/p]

      The negative text-indent works in CSS for Kindle 2 (and later KF6 devices) but only without the margin-left attribute. With Amazon's latest epublishing tools this coding produces cut-off text in KF8 (you need that pesky margin-left).

      (I use square brackets instead of angled brackets because of the limitations of this blog software.)


English only. No links. Keep it clean.