Featured image showing the e-book cover for The White Musketeer in Sigil

Format and Validate Your e-Book to Get Into National e-Book Markets

This article is copyrighted (c) to Christina Roberts. All rights reserved.

Spread the love

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?

  1. Even the “cleanest” visual programs insert dirty code. Dirty code increases the file size of your e-book.
  2. Using super-simple code will ensure your book is squeaky clean, small, and valid.
  3. 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.
  4. No guessing what the problem may be, if you need to fix errors.
  5. 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:

  1. Download Sigil to edit your e-book
  2. Convert your Word document into a plain text file
  3. Import the plain text file into Sigil
  4. Re-format your new e-book
  5. Put in copyright and author information
  6. Generate table of contents
  7. Put in a properly-sized e-book version of your cover
  8. Run the e-book Sigil’s validator
  9. (Optional) convert your EPUB e-book and load it on your e-reader
  10. Review e-book
  11. Correct validation errors
  12. Upload to your distributor and publish

1. Download Sigil, the free, easy-to-use e-book formatting software

Sigil: Interface
The Sigil Visual Editor window

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:

Sigil: Import your Content as Plain Text Notice
Sigil will ask you if you want to import your entire document as plain text. Say yes.
  1. Copy your entire Word document (CTRL+C/CMD+C).
  2. Go to Sigil and paste the whole document (CTRL+P/CMD+P) in the blank screen.
  3. When Sigil asks if you want to convert to plain text, say yes.
  4. When the text is imported, save the file. The extension is .epub.
  5. 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:

  1. Headers
  2. Section Breaks
  3. Potential italics, bolding, underlining, etc
  4. Drop caps (if applicable)
  5. Re-inserting images
  6. 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:

  1. Static page numbers
  2. Traditional headers, footers, and footnotes (there’s a different way to add these, but I’m not discussing it in this tutorial.)
  3. A traditional table of contents (you can include this, but it’s not needed for this format.)
  4. Headers lower than h3 (some e-readers support this. For maximum compatibility, don’t go lower than h3.)
  5. 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.)
  6. 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.

Sigil: Find and Replace Window
The Find and Replace search bar on the bottom middle of the screen in Sigil.

To find your chapters quickly and format them into h2:

  1. 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.
  2. Simply change the screen back to Visual by clicking on the open book icon on the top center .
  3. Highlight the chapter title and click on the header2 (h2) icon Sigil: The Header 2 Icon in the upper left toolbar.
  4. 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

Sigil: Generate Table of Contents
After you’ve defined your chapters and major sections in your e-book with H1, H2, and H3, you’ll need to generate the Table of Contents from Tools > Table of Contents > Generate 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.

  1. At the top of Sigil, click Tools > Table of Contents > Generate Table of Contents (or CTRL+T/CMD+T).
  2. A preview table of contents will will come up. If it looks right, click OK.
Sigil: Generating and Previewing Your Table of Contents
Sigil will present you a review of your Table of Contents to ensure it’s correct.

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

Sigil: The Table of Contents
In physical books, a table of contents is a standard requirement. In e-books, you don’t need a manual table of contents. Delete the manually-listed table of contents completely.

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!

  1. Completely highlight and delete the manual, paperback table of contents.
  2. 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:

  1. Manual table of contents – removed. Applies only to paperback book.
  2. Copyrights page:
    1. Paperback version printed in the United States – removed. E-books aren’t printed.
    2. ISBN: 978-1-387-29831-0 – changed to the e-book ISBN number
    3. Library of Congress Cataloging-in-Publication Data: TX 7-633-517 – removed. This is for the paperback book.
    4. LOC # Effective as of December 3, 2012 – removed. This is for the paperback book.
    5. Opening chapter numbers typeface: Eutemia I – removed. This is for the paperback book.
    6. 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

Sigil: Removing Extra White Space
You’ll need to search and replace the HTML white space code in your e-book, or manually check each chapter and delete the extra 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:

  1. Manually go find and delete the extra space
  2. 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.

  1. View the book’s HTML source code by clicking on the Code View icon in the top middle Sigil: Code View Icon
  2. Find this code by copying and pasting it into the Find field: <p><br /></p>
  3. Ensure the Replace box is empty.
  4. Click Replace All.

If you did it right, all that white space will now be gone!

8. Insert section breaks (section separators) in bulk

Sigil: e-book Section Separators
A visual example of how to find the large white gaps of space where section break dividers should be, and how to search and replace those gaps with your custom section break dividers.

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”.

  1. 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.
  2. Highlight the section break divider code. In this instance, for me, it’s <p>&#160; &#160; &#160; &#160;</p>.
  3. CTRL+C, CTRL+F, and then CTRL+V to paste the section break divider code into the search field
  4. 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.
  5. 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)

Sigil: Fix Dropcaps
Dropcaps in Word won’t translate into Sigil. You’ll need to manually click through each chapter and fix the hanging letters.

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.

Sigil: Curly and Straight Quotes <– 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.

  1. CTRL+C, CTRL+F, and CTRL+V to find all the double curly opening quotes:
  2. In the replace box, type a straight, double quote:
  3. Perform a Replace All.
  4. Repeat your Find + Replace with the ending curly double quote:
  5. Repeat your Find + Replace with all single curly quotes:

11. Put back your special formatting: italics, underlines, etc.

Microsoft Word advanced italics word search box
Perform an italics word search in word from Advanced Find > More > Format > Font > Font Style > Italics

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!

  1. In Word, perform an italics search.
  2. Bring up the Advanced Find search box.
  3. Select “More >>”.
  4. Click the format button.
  5. Click on Font and specify italics in the “font style” box.
  6. Click OK. The Replace box should now say “Format: Font: italic” underneath the empty search field.
  7. Leave the search field blank.
  8. Perform your search.
  9. 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

Sigil: The Metadata Editor
Sigil’s Metadata editor is the window where you define and correct your book’s identifying information. E-book distributors may have specific requirements for Metadata fields.

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.

  1. In Sigil, go to Tools > Metadata Editor, or simply tap F8 to being up the Metadata Editor.
  2. Click on ‘Basic’ and hold down CTR (CMD) to highlight these fields:
    1. Date: Creation
    2. Description
    3. Identifier: ISBN (if applicable)
    4. Language
    5. Publisher
    6. Title
  3. Insert the fields by clicking OK.
  4. Double-click in each field and fill them out:
    1. Date: Creation – will be pre-filled
    2. Description – The synopsis of your book. This must be 100% the same as the summary on the back of your paperback book.
    3. Identifier: ISBN (if applicable) – Your 13-digit ISBN assigned to your e-book. Not from your paperback.
    4. Language – The language your book is written in.
    5. 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.
    6. 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)
  5. When through, click OK.

13. Remove any extra white spaces

Sigil: Removing Extra White Space
You’ll need to search and replace the HTML white space code in your e-book, or manually check each chapter and delete the extra white space.

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: &#160;. Let’s find and delete these white spaces:

  1. CTRL+F (CMD+F) and CTRL+V (CMD+V) to paste &#160; into the search box
  2. Make sure Replace is empty
  3. 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.

Sigil: Split Content at the Cursor and Create Sections
To split your content into HTML documents in Sigil, place your cursor before the split mark and click the Split at Cursor button in the top toolbar.

To split your e-book into pieces, do the following:

  1. 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.
  2. Click on the Split at Cursor icon in the top middle of your tools panel
  3. Sigil will split your book into a second file. Repeat this process until all of your major sections are split into their own files.
  4. 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.
  5. 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:
    1. 00b-copyrights.xhtml (the cover file will use 00a-)
    2. 01-prologue.xhtml
    3. 02-chapter01.xhtml

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.

Sigil set semantics for covers box
Right-click on your cover HTML file and specify Add Semantics > Cover to set your cover file.

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:

  1. First create a new .xhtml file by right-clicking in the Book Browser and selecting ‘Make New Blank HTML File’
  2. 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).
  3. Open 00a-cover.xhtml
  4. Click the Insert Icon icon on the top in Sigil or click Insert > Insert File from the drop-down menu
  5. Specify Images in the Insert File window, then click on ‘Other Files’
  6. 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:

  1. Right click on 00a-cover.xhtml and select Add Semantic > Cover
  2. Scroll down in the Book Browser and click to open the Images folder:
    Sigil images folder highlighting the cover image
  3. 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!

  1. Select Tools > Validate EPUB With FlightCrew
  2. 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).

  1. Load Sigil’s code view.
  2. Copy your section break divider code: <center>~~~</center>
  3. 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.
  4. 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.
  5. 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!

  1. Check for any paragraph breaks issues (like single instead of double breaks)
  2. Check for extra white paragraph breaks at the end of each chapter and delete
  3. Make sure section break dividers look right and are centered
  4. Check for any weird text sizing or paragraph alignment
  5. Re-generate your Table of Contents for good measure
  6. 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.

  1. If your e-reader loads EPUB files, simply load the file into your e-reader and get to checking
  2. If you need to convert to another format, download Calibre and see my Convert to your e-book for your e-reader article
  3. If any oddities come up in your e-reader, make the proper fixes in Sigil.
  4. Re-export and re-load the e-book and check again
  5. 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.

For free books, story previews, give-a-ways, exclusive artwork, book publishing how to's, audio books, and more!