How to Format an eBook

So I've reposted about most of this in two entries on my blog which are more up to date:
However I am leaving this post here, because it has a few details on covers etc that the other two posts don't deal with.

This is a guide to show how I go about formatting eBooks for publication on Amazon, Smashwords (who ship on to other distributors) and Google. There are ways of making your eBook far fancier, but with the wide range of current technology, simple is often better when we're talking about novels.

Smashwords and Amazon

For Amazon and Smashwords use Word to produce .doc files (.docx is also okay for Amazon). I would suggest following the Smashwords style guide (free download on their site) to format your book and then if you require tables for your Amazon version add them in after you have completed your Smashwords version. This should guarantee no errors in your conversion.

For Amazon they have a list of what is and what is not compatible in this section of their help pages.

At Wittegen Press we used to use part of the ePub method below to create eBooks for Amazon since the process goes through the .prc phase, but KDP have since stopped supporting .prc files.

Google (ePub)

If you wish you can create an ePub from scratch, but I find it far easier to follow the steps below and it produces ePubs that pass ePubCheck (idpf have an online validator as well here) and which look good.

You will need the following free pieces of software:
1. Create the HTML book file

I have a standard format which I use for all my books. It's not perfect, but it works and the books come out readable and consistent. My book HTML template can be downloaded here - eBookTemplate.html (right click and save to download). The following are screen caps of what a sample book created with this method looks like on Adobe Digital Editions and Google Play's online viewer - click the images to see them larger.

  • Open eBookTemplate.html in PSPad or whatever HTML editor you are using (do not use Word or anything that adds its own markup tags).
  • Open a copy of your book file in your word processor.
There are comments in the HTML file which should be self-explanatory, but I'll go through it anyway.

Wherever you find [[TEXT OF SOME SORT]] replace it with your content, e.g. replace [[TITLE]] with Anne of Green Gables if that is the title of your book ;). You will need to decide on your dedication, disclaimer, back page blurb and things like that a this stage.

Now on to the main content of the book. To make things easier, rather than pasting in the main body of the text directly and then having to added the tags to each paragraph, globally search and replace inside the copy of your book document and replace each paragraph mark (^p) with </p>^p<p width="10%"> as shown below.

This will incorrectly format the chapter titles as well, but you have to do those by hand anyway so don't worry.

Paste in each chapter to eBookTemplate.html making sure you have the following tags between each as shown in the template:
<p width="0" align="center">~*~</p> <!-- end of chapter marker --><mbp:pagebreak/>  <!-- Amazon pagebreak -->
The end of chapter marker is not compulsory, I just like them, but the pagebreak tag is because this prevents chapters running in to each other.

Paste in your chapter titles or chapter numbers at the top of each chapter in the following format as shown in the template:
<p width="0" align="center" class="chapter"><b>[[CHAPTER NAME/NUMBER]]</b></p>
You can add an optional marker to the end of your last chapter to indicate the end of the main book as show below, if you like, but again it is not compulsory.
<p width="0" align="center">####</p> <!-- end of story marker -->
At this point you can preview your book, but it will not look completely right. It is good to check for mistakes, but the paragraph formatting will not yet be correct.

2. Create your cover image

Blank Pre-sized Image Files
Smashwords1600x2400pxWittegenPress.psd (all of the above zipped)
Different eBook sellers have different requirements for their cover images:
  • Smashwords say that for best results the cover should be 1600x2400px (I use this one for Google as well)
  • Amazon however give 1563x2500px 2820x4500px as the best size
To the left are pre-sized image files if you would like them. There are .png for those who don't use Photoshop and .psd (with guides for the rule of thirds) for those who do. I just keep them handy so I don't have to remember the ratios.

I also often scale them up to 200% or 300% when working on the covers so I have greater detail and then shrink them back down when they are finished, but that's me being picky.

What to put on your cover is a whole other topic that I am not going to cover. Amazon do have a cover creator as do some eBook editing packages, but the covers that come out tend to look very amateurish. If you're not overly good with graphics there are plenty of artists who have reasonable prices. Covers say a lot to a reader and a bad one can drop your books sales considerably.

3. Create the Mobi Version of the File
  1. Open MobiPocket Creator.
  2. Under Import from existing File click HTML document.
  3. Choose your HTML book file using the Browse button or drag and drop you file onto the window and it will pick it up.
  4. Click Import
  5. Go to Cover Image in the side menu and then click the Add a cover image button to add you image to the book.
  6. Go to Table of Contents and fill in First Level as shown below then click Update:
    • Tag name - p
    • Attribute - class
    • Value - chapter
  7. Go to Metadata from the side menu and fill in all the fields you have, the ones with * are not optional, but all the others are. Click Update at the bottom of the page.
  8. Click Build from the menu along the top of the window. If you get an error messages about images, copy all the images into the build folder for the ebook (it will be the same name as the book file) which is under the Default folder in your Publications Preferences.
You now have a .prc file in a folder under you Publications Preferences Default folder (check your MobiPocket Creator settings if you are unsure where this is).

4. Create the ePub file
  1. Open Calibre
  2. Click Add books from the top menu and load your .prc file.
  3. Click Convert books from the top menu and choose ePub from the Output format dropdown at the top right of the window that opens. Then click OK.
  4. Click Save to Disk and save your book wherever you like.
You now have an ePub format version of your eBook. Check it with ePubCheck or the online ePub checker to make sure there have been no errors.

If you have any questions, please feel free to drop me a comment and ask.

Links to downloads from this article
Smashwords style guide - free eBook with instructions on how to format eBooks for their site in Word.
ePubCheck - a downloadable ePub checker, but not easy to set up (idpf have an online validator as well here)
PSPad - free editor, very good for HTML and CSS files
Mobipocket Creator - free tool to create .prc files to be converted into ePub
Calibre - eBook manager which can be used to conver .prc into ePub
eBookTemplate.html - my HTML book template
Smashwords1600x2400pxWittegenPress.psd (all of the image files zipped)

1 comment:

  1. This comment has been removed by a blog administrator.


Thank you so much for reading. I love to hear from people. Please leave your comments below.