eBook formatting

In addition to having trouble figuring out how to make my first cover, uploading Henchmen to Amazon proved to be a baffling ordeal.  Amazon’s instructions consisted of converting my Word to doc to filtered HTML and uploading it.  It worked but it lost some of my formatting and there was an image at the beginning of the book that disappeared.

I’m a little wiser and more experienced now, so let me give you a little primer on some formatting and getting things ready to go.  When your book is done and you’re ready to push the button the actual upload to Amazon is pretty straightforward.  Getting the ebook to that point can be a little more involved, but isn’t overly difficult.  Be ready to take some time, have backups of your book, and do some trial and error.

You’ll need some software, all of which is free (except the word processors, those range from free to a whole damn lot of money for MS Word).  Some of these links may be dead, but they all worked as of this writing.  I’m assuming you already have some sort of word processor, but there are some other tools that will come in handy.

  • Calibre: This is an ebook converter that can convert from and to almost any format on the planet.  I use it covert from .docx to .epub for upload.
  • Sigil: This will let you crack open an epub and edit the HTML inside of it.  It’s great for tweaking the little things that Word messes up.
  • Kindlegen: Convert .epub files to .mobi files.  This is basically the system Amazon uses on their server side to convert to their version of .mobi so it’s invaluable for seeing what the final product will look like.  Kindlegen is a command-line tool so make sure you’re comfortable with that.  If not, you can use Kindle Previewer to accomplish the same thing.
  • Kindle Previewer: Uses KindleGen in the background to compile to Amazon’s .mobi and let you see how it will look.  It’s great for fnding the little issues you weren’t expecting and you can even copy the created .mobi file to various devices to see how they’ll look.

On the off chance that you’re looking for a decent tool to actually write your book in, there are a whack of them out there.  I use Word 2010 but that’s just because I happen to have a copy of it.  OpenOffice is a great (and free!) alternative.  I’m not as familiar with the quirks of OpenOffice so I’ll write a story in it later and report back.  I know some people who swear by Scrivener, but I haven’t found as much use for it.  Again, I’ve got a copy so I’ll try to create something in it and report back.

So, to clean this mess up a bit, there’s a process that I follow that seems to work well for me.

  1. Write the story or book in Word.  I do my editing and most of my formatting in Word also.
  2. Load the book into Calibre and set some metadata.  Use Calibre to convert to epub.
  3. Use Sigil to edit the epub file
  4. Use the Kindle Previewer to see what it will look like and generate a mobi file
  5. Upload to Amazon KDP
  6. Kick back and wait for it to be processed

To make your writing life as easy as possible just write the story and don’t worry about formatting while you’re writing.  I referenced this in an earlier post, but let me reiterate it.  Don’t do any formatting until you’re done with editing.  Change the default font if Calibri isn’t your cup of tea, but other than that don’t do a thing but type.  The only bit of formatting I recommend is highlighting chapter headers and setting them to Word’s Heading 1 style.  The only reason I do this is because as soon as you set a block of text to Heading 1 or Heading 2 in Word it automatically gets added to the navigation pane.  That makes finding things in a long book much easier.

Word styles are basically CSS styles. Word docx files are zipped XML files with some formatting instructions dropped in.

After you’re done writing and editing you can start formatting.  This is where things start getting more and more nebulous.  There aren’t a whole lot of standards out there for formatting a book other than the end result must be readable.  I prefer a clean look personally, but others prefer more ornate looks.  For some background on formatting and some things that approach being a standard, look to Amazon’s formatting guidelines and Smashwords (PDF download) has a formatting guide of their own.  There are also a whole whack of good formatting guides out there.  Take some time to read up and see if you’re doing anything that’s an absolute no-no.

The general gist on all the formatting guides is to let styles take care of the formatting instead of using lots of hard breaks or tabs.  This is because an ebook is really nothing more than a zipped website and your ebook reader is just a fancy web browser.  All your styling should reflect this.  We’ll see a bit more when we hit the Sigil section.

One thing to definitely take a look at is the use of the magical Pilcrow.  This is the formal name for the paragraph symbol and something I work into casual conversation when I want to make myself look smarter than I really am.  The pilcrow will reveal all your formatting including hard returns, tabs, and whatnot.  If you’ve got a section that simply doesn’t work like it should, use the pilcrow and see what’s going on in the background.

So I told the President, "You really should consider using the picrow to track down that problem."
So I told the President, “You really should consider using the picrow to track down that problem.”

Once you’ve got it formatted and it’s looking good to you, make a bunch of passes through the entire text and see if you’re missing something.  One of the print versions of Arise came back without a page break between a couple of the chapters and the ebook version was missing the glyph on a couple chapters.  It’s easy to miss the little things like that.  But, it did get formatted and came out looking like this:

So … beautfiul …

My normal-style setup was 11pt Garamond, .3 indent from the left, no extra spacing before or after, and a 1.15 line space.  The Heading was set as 14pt Garamond, Bold, Centered, no paragraph indent, 24pt before, 0 after.  The glyph was set centered, no paragraph indent, 0 pt before, 50 pt after.

Don’t get too wedded to your font choice.  Remember, an ebook is a web site and the eReader is a web browser.  Files called .css (Cascading Style Sheets) determine the formatting and can be overridden by the browser.  Some things like centering, bolding, points before and after elements, and things like that will stick, but your font can be whisked away in the blink of an eye by a reader who prefers her headlines to be displayed in Comic Sans or his body text in Papyrus (there’s no accounting for taste).  As soon as you decide to do the print copy through CreateSpace you can really fret about fonts; until then find something that works and realize most people will be reading in Times New Roman or something like that.

Just as quick show, here’s the TOC from Henchmen formatted in Word.  Each line is selectable and will link to the appropriate chapter.  Looks good so far, right?  Hold onto that thought for a minute.

Not gonna lie, editing a TOC in Word is the stuff of nightmares. It tooks several iterations to get to this point and I swore I’d never touch it again.

That done, it’s time to load the sucker into Calibre and let Calibre perform its magic.  There are much better and more thorough guides out there on using Calibre than I could come up with here.  For our purposes, you need to add your document (straight from .docx, in my case), edit the metadata to set the title and author correctly, convert to .epub, and save to disk.  Don’t worry about adding a cover at this point.  I just added a cover to mine because I was sending it out to reviewers (none of whom were interested :(, oh, ah).  Recently I’ve heard some rumors that epub files created with Calibre won’t upload to Amazon, but I just did one to try it out and it worked fine so there may be other extenuating circumstances.

Had to clean up my Calibre list.
I appreciate software of this calibre.

Now, we’ve got the book written, edited, formatted, and coverted to epub.  It’s time to see what it will look like on a Kindle.  Fire up the Kindle Previewer and load up your epub file.  NOTE: Kindle Previewer is using Kindlegen in the background to convert your text.  When it’s done it will show you where it made the converted file.  For the most part it comes out okay until we hit this page:

Standard issue HTML tag rendering.

The TOC is a list of hyperlinks and <a> tags usually render like this.  It’s both a good and a bad thing.  It’s good because it’s a visual cue to the reader that they can click on a chapter title and go to the chapter.  By the way, this is how Henchmen actually looks on a Kindle.  I left it alone because of the visual cue thing.  It may not look as clean as it could, but this isn’t a print a book so some aspects of design have to be different.  It’s largely due to our good friend CSS acting up again.  Here’s where Sigil comes in handy.

Fire up Sigil and open the epub you created earlier.  You’ll get a mass of raw HTML.

One HTML file per chapter. I’ve also seen other programs create a single HMTL file for the whole book.

Note the highlighted text:

<p class=”block_6″><a class=”text_1″ href=”../Text/index_split_004.html#id_Toc403116700″>01 | It Doesn’t Stay In Vegas</a></p>

That class=”text_1″ links to the CSS file stylesheet.css down in the Styles folder.  If you scroll down you’ll find a section that looks like this:

.text_1 {

color: #00F;

text-decoration: underline


.text_1 is the class name.  Color (#00F) is the hex representation of the color and text-decoration: underline says underline the text.  If we tweak around a little and set the Color to black (#000) and comment out the text-decoration line we can change the way hyperlinks look.  So I’ll change to the following:

.text_1 {

color: #000;

/*text-decoration: underline*/


and get:


Two things to note here.  1: The links are still underlined.  This is because, like font, there are some expected things that just happen; in this case links are underlined.  2: Note the color for chapter 3 is still blue.  Go back to the big Sigil picture and you can see why.  Chapter 3’s css style is text_2, not text_1.  You can either modify the text_2 style in the stylesheet or reset the Chapter 3 line to use text_1.  Personally, I’d recommend fixing the HTML instead of modifying the css.  CSS styles apply to all elements that reference that style so a change in one place can have far reaching effects.  More than likely it’s fine to just change the text_2 css, but if anything else anywhere in your book was using that style, it will be refomatted.

Keep iterating through this process until you like what you’ve got.  Remember how I said Kindle Previewer will make a converted file for you?  Keep track of where it puts them.  When you’re satisfied, take the final mobi file and you can upload it directly into KDP.  Amazon will also accept HTML files, doc and docx files, and epub files.

I didn’t go into too much depth here on using some of these tools because there are other, better tutorials out there for them.  This post is just meant to give you an idea of what you can do and some of the tools that will help you do it.  There are also people out there who specialize in formatting eBook files so if it looks too arduous, check into a professional formatter.  If you have other questions or comments, drop ’em in the comments and I’ll see if I can help out.

Spend some time on your formatting.  You spent months writing the book, a few days of formatting is time well spent.


18 thoughts on “eBook formatting

  1. Enjoying this post and I’ve not even finished reading it yet. This might well prove to be the simple step by step guide I need to get started on the dark mysteries of ebook formatting. Thanks for posting!!!

  2. Hey Eric, This is awesome! Thanks for doing this. I really like the specs on the formatting in Word, and the html writer, Sigil. I really don’t know much about html coding. I’d really enjoy a post on simple coding, with examples, that you might use in designing ebooks. Also, I don’t know how to add the graphics like you have under each chapter heading. They look pretty good.

    Once I get some other distractions taken care of, and have some more time for the writing part of my life, I’ve got another book to edit…14 Gable Lane. I look forward to using this as a guide. Thanks.

  3. Erik, this is very helpful. It will help those comfortable with software to get the job done and wise those that aren’t into considering one of the conversion services out there. Before you get too deeply into OpenOffice, consider LibreOffice instead. After Oracle bought Sun it abandoned OpenOffice (the more PC phrasing is that it contributed it to the Apache Foundation) but almost all of the dedicated programmers went along with the fork, which is now much better supported and where all of the innovative work is being done.

    Of course, none of this had to be this difficult because, as you point out, “there aren’t any standards.” Actually, ePub is a standard, but not one that Amazon has been willing to support for reasons all too familiar. The rest of the story is here: https://updegrove.wordpress.com/2014/03/08/why-johnny-cant-format-a-book/

    Maybe some day we’ll be able to just push a button and save to an eBook distribution site. Here’s hoping.

    1. If all the main eBook distributors would just agree on a standard it would be possible to just push a button and be done with it. Unfortunately, they’re all playing the game their own way.

  4. Great info!!! I have used Apache Open Office & Libre (also free and very similar) for a decade now. I may be able to help you and any of your readers with any questions. It is very similar to the 2003 version of MS Office, and if you want certain features, you can download extensions. For example, I have an extension that will convert to epub just by hitting a button on the tool bar. Find me on twitter or facebook with any Open Office questions. 🙂 Happy writing everyone!

  5. Great info, Eric. I’d been saving this article for when I was ready to finally upload my title to KDP, and today was the day. With this in my back pocket, the whole process was smooth and problem free. Many thanks! Best, Michael.

  6. This is a whole load of information. I’m planning on publishing a poetry book on CreateSpace and maybe have an eBook as well. I’ve done the work and formatted in word. What would you suggest I do, or look out for when converting to eBook or to CreateSpace? Someone said for CreateSpace I should add the cover, spine and back and put the book in pdf. i haven’t got the cover designed as yet as i’m looking around. Thanks,

    1. Formatting for CreateSpace is a whole other can of worms. There’s a post on here somewhere about what I do when I do mine, but the general gist is grab one of CreateSpace’s templates and work with that. The hardest part for me is always getting the header and footer data to show up correctly – Word can be persnickety sometimes. CreateSpace also has cover templates that are great. Format out the book using one of their Word templates and that will give you an accurate page count. Then you can get one of their templates and use it to set up the cover, spine, and back cover. (I think there’s a post on this blog about that, too) Usually, I use Word for the manuscript and upload it directly as a Word doc. The cover art is entirely up to you. I use a mixture of Inkscape and GIMP in my covers, then export out of Inkscape directly to PDF. The PDF can go straight up to CreateSpace.

    2. Feel free to drop me a line if you run into snags and I’ll do my best to help you out. Good luck. Just be patient, putting together the formatted Word doc and cover PDF can be a tedious process. It’s actually far easier to do it for an eBook.

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