This article is copyrighted (c) to Christina Roberts. All rights reserved.
Format and validate your e-book properly to get it validated and listed with Amazon, iBook, Barnes and Noble, Nook, and other national, online book retailers.
NOTE: This is a tutorial for non-geeks who don’t know any (or barely any) code. The formatting guide below entails simple steps.
Proofing and validating your e-book can be a stressful process. I’m here to take the guesswork and confusion out of all that! I’ve prepared a how-to article below about how to strip Word formatting, reformat, prepare, and validate your e-books, so they’ll pass even Barnes and Noble’s stringent validation requirements. For this whole tutorial, I’ll be formatting The White Musketeer. Read on!
I know there’s software programs out there that claim they can perfect your e-book without you having to look at any code. Since I haven’t used any of said software, I can’t say anything about them. But what I can, as a front-end web developer, say, is from my experience, clearing and reformatting your book in a simple program, with laughably simple code, is the safest, most full-proof approach. Why?
- Even the “cleanest” visual programs insert dirty code. Dirty code increases the file size of your e-book.
- Using super-simple code will ensure your book is squeaky clean, small, and valid.
- You will have 100% control over your e-book’s formatting and construction. No being stuck using a program in a program’s proprietary format.
- No guessing what the problem may be, if you need to fix errors.
- Don’t spend any money — use Sigil, a 100% free, super small program to format your e-book!
Here’s the common steps to format and validate your e-book:
- Download Sigil to edit your e-book
- Convert your Word document into a plain text file
- Import the plain text file into Sigil
- Re-format your new e-book
- Put in copyright and author information
- Generate table of contents
- Put in a properly-sized e-book version of your cover
- Run the e-book Sigil’s validator
- (Optional) convert your EPUB e-book and load it on your e-reader
- Review e-book
- Correct validation errors
- Upload to your distributor and publish
1. Download Sigil, the free, easy-to-use e-book formatting software
As the developers state on Sigil’s website, “Sigil is a multi-platform EPUB ebook Editor.” Sigil is also a very small, free, Google program. We’ll be looking at the visual editor first, and then changing over to the code view. But don’t stress! You only need to know a few extremely simple codes to make a polished e-book. Download Sigil to format and validate your e-book and open the program right up! This is where you’ll live and breathe perfecting your e-book.
2. Copy and Paste Your Word Book into Sigil as Plain Text
Why convert to plain text? Microsoft Word (and any other word-editing program) inserts dirty, messy code behind-the-scenes that you can’t see. But it’s there and bringing the dirty code into Sigil causes validation and formatting errors. Ever tried to make a paragraph break in Word but only single breaks will go in? Or ever get frustrated when images and content won’t align right? Dirty code causes that, and other mystery errors. So paste your Word document into Sigil only as plain text to prevent this from happening.
But what about all of your beautiful formatting in Word? Well, e-books are very simple. Most of your special formatting may not work in the e-book world. To ensure your e-book looks right on a maximum number of e-reader devices, and to reduce the e-book kilobyte size, your e-book should be as simple as possible.
To insert your Word book into Sigil:
- Copy your entire Word document (CTRL+C/CMD+C).
- Go to Sigil and paste the whole document (CTRL+P/CMD+P) in the blank screen.
- When Sigil asks if you want to convert to plain text, say yes.
- When the text is imported, save the file. The extension is .epub.
- Line up Sigil and your Word document side-by-side so you can imitate the Word document as much as possible.
3. Reformat your e-book
Of course, now that your book in Sigil is plain text, you’ll have to format and validate your e-book from scratch:
- Section Breaks
- Potential italics, bolding, underlining, etc
- Drop caps (if applicable)
- Re-inserting images
- Making sure all double quotes (dialogue quotes) and single quotes are truly plain-text and not formatted from Word
Things that don’t apply to e-books:
- Static page numbers
- Traditional headers, footers, and footnotes (there’s a different way to add these, but I’m not discussing it in this tutorial.)
- A traditional table of contents (you can include this, but it’s not needed for this format.)
- Headers lower than h3 (some e-readers support this. For maximum compatibility, don’t go lower than h3.)
- Paragraph indents (technically, you can add these with CSS code, but some e-readers have built-in indentation settings of their own. Also, some e-readers may not respect the custom indentation you might add. Also, because this is a tutorial for non-geeks, I’m avoiding CSS as much as possible.)
- Any overly fancy, complicated formatting of any type
4. Add back your chapter headers
Now that you’ve pasted your entire Word book into Sigil as plain text, you’ll need to reformat it back. Let’s get started!
Chapter headers in the fiction e-book world are very simple. Your book’s title should be the only header 1 (h1) in your entire e-book. All of your top-level chapter titles should be header 2 (h2). Why? To cover your validation bases, h2 is the way to go. Some e-book distributors may not approve of header 3 (h3) titles.
To find your chapters quickly and format them into h2:
- Perform a search (CTRL+F/CMD+F) and type in the chapter name in the bottom center search bar. When you search, Sigil will most likely change into Code view.
- Simply change the screen back to Visual by clicking on the open book icon on the top center .
- Highlight the chapter title and click on the header2 (h2) icon in the upper left toolbar.
- Repeat this process for all your chapters and major sections of your e-book.
If you don’t want to deal with searching and switching back to visual every time, simply scroll down through your book and manually locate the chapters to change them to h2.
5. Generate Your Table of Contents
In a traditional paper book, you have a page that lists your table of contents. In an e-book, you don’t need this manual page. But the table of contents must still exist for your readers to tap and easily navigate to to different places in your e-book. To do this, an e-book table of contents identifies the sections in your e-book by the headers you set in the above section. Now that our major book sections and chapters in place, we can generate a working table of contents.
- At the top of Sigil, click Tools > Table of Contents > Generate Table of Contents (or CTRL+T/CMD+T).
- A preview table of contents will will come up. If it looks right, click OK.
If you inserted the headers right, your generated table of contents will show on the right side of Sigil in your Table of Contents pane.
6. Remove all text and content that doesn’t apply to an e-book
Certain things in your paperback book version have to be included, such as a traditional table of contents. You may also have written bits of information in your copyright page to credit formatting attributes. These things, and anything else that doesn’t translate into the e-book version, must go!
- Completely highlight and delete the manual, paperback table of contents.
- Revise or remove text relating to your paperback version.
Since what you may remove or change is organic, I’ve highlighted below what I changed in The White Musketeer e-book to give you an idea:
- Manual table of contents – removed. Applies only to paperback book.
- Copyrights page:
- Paperback version printed in the United States – removed. E-books aren’t printed.
- ISBN: 978-1-387-29831-0 – changed to the e-book ISBN number
- Library of Congress Cataloging-in-Publication Data: TX 7-633-517 – removed. This is for the paperback book.
- LOC # Effective as of December 3, 2012 – removed. This is for the paperback book.
- Opening chapter numbers typeface: Eutemia I – removed. This is for the paperback book.
- ID: 21630631 – changed to the e-book Lulu ID number – changed to the e-book Lulu ID number. This one was for the paperback.
Every now and then, an author may purposefully leave in some information about the paperback (or audio or hardcover, etc) version of the book. An author may choose to this to inform the reader that the book is available in other formats, and to clarify their authority as the copyright holder to the book in said other formats. It’s up to you if you want to include any information for other formats of your work.
7. Remove the extra gaps of white space
In your paperback book, you most likely inserted some paragraph breaks to push the beginning of your chapters down a bit on the pages. This is nice and all, but also doesn’t apply to formatting and validating e-books (technically, you could try to force white space breaks, but e-readers may eliminate them automatically). When you copied and pasted your plain text book into Sigil, the paragraph breaks came over, too, though. Now you have nasty gaps of white space.
To remove, you can do 1 of 2 things:
- Manually go find and delete the extra space
- Perform a single, fast code search and get rid of them all in one massive replace!
I’m going to go the code route. Don’t be intimidated! This will save you time and be very easy. And, this won’t remove your empty section breaks. We’ll fix those next in this tutorial.
- View the book’s HTML source code by clicking on the Code View icon in the top middle
- Find this code by copying and pasting it into the Find field: <p><br /></p>
- Ensure the Replace box is empty.
- Click Replace All.
If you did it right, all that white space will now be gone!
8. Insert section breaks (section separators) in bulk
With e-books, you technically can use an image as a section break divider. However, because I want my book as lightweight as possible, I’m not going to use an image. I’m going to use this: ~~~. If you think a “common symbol” is boring and go looking for a special character, take heed! Inserting special characters by no means may work in all e-readers. To be safe, go with a “common character”.
- Look in your book’s code and find where a section break divider is. Perform a search on a word phrase to find a section break divider if you’re having trouble.
- Highlight the section break divider code. In this instance, for me, it’s <p>       </p>.
- CTRL+C, CTRL+F, and then CTRL+V to paste the section break divider code into the search field
- Make sure the Replace field has the characters you want to use as your section break divider separator. Also, make sure your separator is wrapped inside paragraph tags like this: <p><center>THIS IS MY SECTION BREAK</center></p>. If you don’t do that, your section separator may run into the end of the last paragraph, and the next section paragraph may run into it.
- Perform a Replace All.
If you did the replace correctly, your new separator will be applied globally and be centered.
9. Fix Drop Caps (if applicable)
I used drop caps in my paperback book, but that formatting broke when pasting the Word book into Sigil. You can use forms of drop caps in e-books by using CSS code, but not all e-readers may load them correctly. Once again, I err on the simple, maximum-compatibility side and forego the fancy look of drop caps altogether.
There’s no bulk fix for this. Use the table of contents on the right side in Sigil to go to each chapter and fix each drop cap. I simply backspace the rest of the chapter content to line up correctly on the same paragraph with the mis-formatted drop cap to fix.
10. Fix all the single quotes and double quotes (dialogue quotes)
When you pasted your book into Sigil, the single and double quotes that came through were still “curly”. This will cause an encoding and validation error. This is a common mistake people make and don’t fix. All of your quotes can’t be curly. They have to be straight when you format and validate your e-book to be true plain text.
<– In this little picture, the left curly quote is from Word. This is not true plain text and may cause validation errors. The right straight quote is the true plain text version. We want to use straight quotes.
- CTRL+C, CTRL+F, and CTRL+V to find all the double curly opening quotes: “
- In the replace box, type a straight, double quote: “
- Perform a Replace All.
- Repeat your Find + Replace with the ending curly double quote: ”
- Repeat your Find + Replace with all single curly quotes: ’
11. Put back your special formatting: italics, underlines, etc.
This formatting, too, was removed when you pasted your Word book into Sigil. Load your paperback book and e-book side-by-side so you see Word and Sigil at the same time. Do you want to manually look for every italicizing, bolding, underlining, and so forth? I don’t. So let’s do a style search!
- In Word, perform an italics search.
- Bring up the Advanced Find search box.
- Select “More >>”.
- Click the format button.
- Click on Font and specify italics in the “font style” box.
- Click OK. The Replace box should now say “Format: Font: italic” underneath the empty search field.
- Leave the search field blank.
- Perform your search.
- Repeat these instructions to locate your other formatting, such as bold and underlines.
With each style that you find in your paperback, search, highlight, and fix in Sigil.
12. Add in your author and e-book meta data
Each distributor requires a minimal amount of author and book information to validate your book for listing on their e-book store. We’ll put in the minimal, common data and to format and validate your e-book. If we receive validation errors later, will add in what data we may be missing.
- In Sigil, go to Tools > Metadata Editor, or simply tap F8 to being up the Metadata Editor.
- Click on ‘Basic’ and hold down CTR (CMD) to highlight these fields:
- Date: Creation
- Identifier: ISBN (if applicable)
- Insert the fields by clicking OK.
- Double-click in each field and fill them out:
- Date: Creation – will be pre-filled
- Description – The synopsis of your book. This must be 100% the same as the summary on the back of your paperback book.
- Identifier: ISBN (if applicable) – Your 13-digit ISBN assigned to your e-book. Not from your paperback.
- Language – The language your book is written in.
- Publisher – This is you. NOT your distributor. EX: Lulu is my distributor. I hold all my rights to my book and I am the publisher. Lulu only distributes the book for me.
- Title – The whole, correct title of your book. This field must match the title that will show on your listing. (EX: I couldn’t publish my e-book as Book 1: The White Musketeer but write The White Musketeer here. Both must match)
- When through, click OK.
13. Remove any extra white spaces
Sometimes, an extra white space will creep into your book. Though your e-reader will most likely remove this white space, your e-book may not pass the formating and validation test if you leave this bad formatting in here. And, most often, this unwanted space will sit at the end of your chapters. This is me being nit-picky, but we want our book perfect and this is an unwanted extra piece of code. The extra white space will be this ASCII code character:  . Let’s find and delete these white spaces:
- CTRL+F (CMD+F) and CTRL+V (CMD+V) to paste   into the search box
- Make sure Replace is empty
- Click Replace All
14. Split your book into “section” HTML files.
Now that we’ve performed most of the heavy lifting on editing our e-book, we need to split it into pieces, or HTML files. In Sigil, in the Book Browser (left pane), you should currently only have one file named “Section001.xhtml”. Technically, you could save and load your e-book from only one HTML file and your e-book will load right, but to play it safe, let’s split our book into pieces. Also, some e-book distributors may require it this way; and, it’s just better practice.
Each piece (or HTML file), ought to contain 1 chapter (one top-level header or section). Or, to explain it another way, your e-book HTML pieces should mirror your table of contents. For The White Musketeer, this means I should have 18 files.
To split your e-book into pieces, do the following:
- Go to where you want to make your split and place your cursor RIGHT IN FRONT OF WHERE YOU WANT THE SPLIT. So if I want to split at Chapter 1, I will put my cursor right in front of the text Chapter 1.
- Click on the Split at Cursor icon in the top middle of your tools panel
- Sigil will split your book into a second file. Repeat this process until all of your major sections are split into their own files.
- Now you have a Book Browser full of ‘Section001, Section002, Section003’ and such files. Right-click and rename each file to match their chapter or section title. Remember 2 things: 1) Use all lowercase and 2) dashes to split words instead of spaces.
- I recommend putting a number in front of the chapters. Sigil will organize the chapter pieces alphabetically. So, to keep them in the proper sequence when you open Sigil in the future, put a number in front of them: EX:
- 00b-copyrights.xhtml (the cover file will use 00a-)
15. Add in your Cover Image
The cover image is a unique piece of content for e-books. Though the cover image for your e-book should be sized differently than from the print version, the image should be the same. As of this writing, a good size is 72DPI at 1000×1333 pixels. This means you may need to open your image editing program, save off an e-book-specific layer version, and re-work the positioning a little of the layer elements to match the required new size.
When I designed The White Musketeer’s print book cover, I saved that Photoshop layer file off as a copy for my e-book. Then, I had to move the title and the primary image around a little to fit into the new size for e-book.
For this tutorial, I already have a cover file ready. You can import images into Sigil for your e-book. That’s what we’re going to do here.
To import your cover image:
- First create a new .xhtml file by right-clicking in the Book Browser and selecting ‘Make New Blank HTML File’
- Name the new file ‘cover.xhtml’ (or in my instance, 00a-cover.xhtml so Sigil always loads this file at the top of the list).
- Open 00a-cover.xhtml
- Click the Insert Icon icon on the top in Sigil or click Insert > Insert File from the drop-down menu
- Specify Images in the Insert File window, then click on ‘Other Files’
- Go find your file and select it. Your file will automatically be inserted into your cover.xhtml file.
Though the image is in your cover file, we haven’t told Sigil this is the cover file and cover image. To do that:
- Right click on 00a-cover.xhtml and select Add Semantic > Cover
- Scroll down in the Book Browser and click to open the Images folder:
- Right-click on your cover image (which you should have named cover for simplicity and validation) and select Add Semantics > Cover Image
16. Run Validation Checks in Sigil
With all of this work and corrections made, we’re now ready to check our e-book with Sigil for basic validation errors!
- Select Tools > Validate EPUB With FlightCrew
- Errors will show underneath in pink
The only error I received was this one: “no declaration found for element ‘center'”.
This means Sigil doesn’t like the <center> code that we put in at the section break dividers. To fix this, we’ll have to use some minimal CSS (cascading stylesheets).
- Load Sigil’s code view.
- Copy your section break divider code: <center>~~~</center>
- Globally replace all section break divider codes with this: <p style=”text-align:center;”>~~~</p>. That does the same thing as the old divider code.
- In the Search and Replace box, make sure you specify “Mode: All HTML Files”. Since your book is now made up of several HTML files, you must specify all HTML files to do a true global Find and Replace. Otherwise, you’ll only find and replace content in your currently-open HTML file.
- After the Search and Replace command is done, run the FlightCrew validator again.
No more errors came up for me!
NOTE: There could be all sorts of errors that pop up here. If you receive more errors, please comment about it and I’ll see if I can help!
17. Review your whole book in Sigil’s Visual editor
format and validate your e-book
With all this time spent to format and validate your e-book, you should thoroughly eye-ball review your e-book in it’s entirety. It’s never a waste of time to be extra thorough!
- Check for any paragraph breaks issues (like single instead of double breaks)
- Check for extra white paragraph breaks at the end of each chapter and delete
- Make sure section break dividers look right and are centered
- Check for any weird text sizing or paragraph alignment
- Re-generate your Table of Contents for good measure
- Re-check your Metadata for good measure
When you’re confident, save off the book to test in your e-reader.
18. Preview your book in your e-reader
Before we move on to uploading and validating your book with Lulu and other external tools, we should check our book in our e-reader first. Just because it’s error-free and looks okay in Sigil doesn’t mean it won’t have any odd issues in your e-reader.
- If your e-reader loads EPUB files, simply load the file into your e-reader and get to checking
- If you need to convert to another format, download Calibre and see my Convert to your e-book for your e-reader article
- If any oddities come up in your e-reader, make the proper fixes in Sigil.
- Re-export and re-load the e-book and check again
- Repeat until you’re happy
If everything looks good, login to your distributor (Lulu for me) and upload your book! However, you may want to stay tuned for my next blog post about this. I’ll be discussing how to fix errors that may come up when validating in Lulu or other global distributors.
Hope you found this post useful! Please comment for assistance.