By Paul Salvette
Copyright 2011 by Paul Salvette
Smashwords Edition
Getting Started with a Text (TXT) File
Splitting up Your eBook into Chapters with Sigil
Adding Metadata and a Table of Contents
Finalizing Your EPUB and a Trick to Make a File for Kindle
About How to Make an eBook with Sigil
About How to Format Your eBook for Kindle, NOOK, Smashwords, and Everything Else
Formatting an eBook can be a daunting task for the self-publisher who is not familiar with HTML. Many people try to upload a file (such as a .doc and .rtf) from their word processing program directly to the big eBook distributors (such as Amazon’s Kindle Store, Barnes & Noble NOOK, and iBookstore) only to find that the formatting becomes converted into a complete mess and an embarrassment to the author. This is because eReading devices display eBooks similar to the way a web browser views a website, not how a word processor reads files.
For those interested in all the nitty-gritty details of proper eBook formatting, you can peruse my guide How to Format Your eBook for Kindle, NOOK, Smashwords, and Everything Else or my tutorial series for free. Understandably, many self-publishers do not have the patience or time to learn the HTML skills required to turn a manuscript in their word processor into a quality eBook. That’s where the free program Sigil comes in, which allows indie authors to craft an EPUB eBook with minimal technical knowledge.
The EPUB format is used by Barnes & Noble NOOK, the iBookstore, and numerous other eBook distributors and aggregators. As a matter of fact, it’s pretty much used by everyone except Amazon. It is an open standard format that compresses all of the images, content, and metadata information into one packaged file that can be opened by a variety of eReaders (e.g. NOOK, the iBooks app) and PC-based software (e.g. Adobe Digital Editions). Unfortunately, the construction of an EPUB file from the ground up is complicated, difficult to validate, and uses web design standards that are no longer in use. There is an EPUB tutorial on my website that isn’t much of fun read, and the official EPUB standard is available at the International Digital Publishing Forum, which can be a bit challenging for authors who are not technically inclined. Fortunately, Sigil helps take out a lot of the heavy lifting required to make a valid EPUB.
Using Sigil allows you to avoid most of the technical complexities to get your eBook created in the EPUB format in a short amount of time. The program is available for Windows, Linux, and Mac users, and it doesn’t cost a dime. Once you download and install it, you’ll be ready to get started. Sigil can only open .txt, HTML, and EPUB files. Unless you enjoy torturing yourself, you probably did not write your novel in a text editor. One useful trick to convert your manuscript into a .txt file is to use the “Save As” feature in Microsoft Word, Open Office, or another word processor of your choice. The example below is from Microsoft Word 2007:

Saving
Your Manuscript as a plain text file (.txt) in Microsoft Word
When asked about what type of encoding to use, make sure to select “UTF-8”. You will now have a text file that can be opened with programs like Notepad, Notepad++, and Sigil.
Once you launch Sigil and open your text file, it will look similar to your manuscript, but all the text will be the same font, there will be no italics/bold/underlined text, and all your images will be gone. Here is an example of how your manuscript might look:

Opening
a .txt File in Sigil
The main pane is the “What You See is What You Get” or WYSIWYG portion of Sigil, and this is how the text will actually look on an eReader. The far left pane is the Book Browser. This is the actual directory structure of your EPUB package that Sigil has generated for you. The “content.opf” file is the package that tells the eReading device exactly how the eBook is compiled and contains the metadata. The “toc.ncx” file is the meta Table of Contents. Unless you want to be advanced, it is advisable to not alter the content.opf or toc.ncx files directly. The meta Table of Contents should not be confused with a linked Table of Contents (sometimes referred to as a “traditional Table of Contents”) that you see in the content of some eBooks. Unfortunately, Sigil does not have a good way to generate internal hyperlinks required for a traditional Table of Contents. However, you can learn about working directly with HTML to generate internal and external hyperlinks if you are interested.
If you click on the Split View function in the top menu, it will pull up the actual HTML of your eBook below the WYSIWYG pane:

Opening
the HTML Pane with Split View
You’ll notice that every paragraph of your eBook is wrapped in <p> and </p> tags, which is how a web browser or an eReader determines where a paragraph starts and where it ends. For individual lines of text, such as “Chapter X” headings and section breaks, they should also be wrapped in <p> and </p> tags.

Pane
Layout in Sigil
If you want to learn how HTML works, you can directly edit the HTML in the HTML Pane. After editing the HTML and clicking in the WYSIWYG Pane, you will notice that your eBook is altered.
Content with all the same font and characteristics is probably not how you want your finalized eBook to look. For instance, you probably want to add some italics, bold, or underlined text. To accomplish this you simply select the text and then click on one of the appropriate buttons in the top menu:

Adding
Italics, Bold, and Underlined Text in Sigil
Some self-publishers might prefer paragraphs of body content to be justified, which is when the text aligns vertically on both the left and right side like a newspaper. Also, for your title and chapter headings, you probably want them centered. You can click the cursor inside any paragraph within the WYSIWYG Pane and then click one of the justification buttons in the top menu to align your paragraph left, center, right, or justified:

Making
Paragraphs Align
You’ll notice that when you select one of the text alignment buttons, it will alter the justification of the entire paragraph. Do not attempt to align lines in the same paragraph differently. If you want individual lines aligned to different positions, you should break them up into different paragraphs by pressing Enter.
The next step is to declare your title and chapter headings as “Heading X”. Headings have a larger font size than the regular content and are typically bold. When you generate the meta Table of Contents, it will find any text that you have defined as “Heading X” and include that in the meta Table of Contents. Click your cursor inside the paragraph of any text and make turn it into a heading with the dropdown menu in the upper-left corner of the top menu:

Making
Your Title and Chapter Headings
Here is an example of how your eBook might look in the WYSIWYG pane after adding various styles:

eBook
Layout in the WYSIWYG Pane
When eReaders first came around, they were very primitive devices that had trouble reading large files. That is why splitting your single HTML file into many smaller ones, or “parsing”, is continued as a best practice today. Additionally, everywhere you split your HTML file, the eReading device will recognize it as a page break, which is desirable for a good reading experience.
It is advisable to split your HTML file before each chapter. So if you have 13 chapters in your novel, you probably want to have 1 HTML file for the title page, and 13 more files for each of the chapters (14 total). To split the HTML file, you simply press Ctrl+Enter or press the Chapter Break button in the top menu:

Splitting
Up the Chapter and Establishing Page Breaks
The EPUB format supports JPG, GIF, PNG, and SVG images. The JPG format is good for photographs and has a small file size, the GIF format is good for text, line art, and tables, and the PNG format has a large file size that is good for images you want to look sharp (like a company logo). To add an image click on the Add Images button in the top menu:

Add
Images Button in Sigil
Metadata is information about the eBook that is embedded into the EPUB file. This includes the eBook’s title, author name, publishing date, etc. You can even add relatively obscure data like the name of your photographer. This metadata is important for search engine optimization (SEO) for potential readers to locate your eBook and improve sales, so do not neglect it. To access the Metadata editor, click on “Tools” and then “Meta Editor”.
Many eBook retailers (like NOOK and iBookstore) require certain information in the metadata. As a best practice, you should add the following metadata at a minimum: title, author, language, description (the back jacket blurb), date of publication, date of creation, and subject (you can add multiple subjects and they function like keywords). Some sample metadata is as follows:

The
Meta Editor in Sigil
The next step is to add a meta Table of Contents (also called the NCX Table of Contents). To do this, you simply pull up the Table of Contents under “View” or press Alt+F3. Then, you click on “Generate TOC from headings”. Sigil will look for anywhere that you defined text as “Heading X” and incorporate that into the Table of Contents. Most eReaders access the NCX Table of Contents in a way that is separated from the actual body content of the eBook.
Now you simply click “Save” and you will have an eBook in EPUB format. Try opening it on your PC using a program such as Adobe Digital Editions or NOOK for PC to see how it looks. If you aren’t happy with it, you can always adjust it in Sigil or learn about XHTML and CSS coding to fine tune your eBook. You should also validate the EPUB file to check for any errors. To do this, you simply click the Green Checkmark on the far-right corner of the top menu. Alternatively, you can upload it to the ThreePress website to see if the EPUB file is valid.
You may be disheartened that the Amazon.com Kindle Store accepts the EPUB format for submission, but they automatically convert it into their proprietary AZW format. This can be problematic if you would like to examine how your eBook will look on a Kindle before actually putting it up for sale. Fortunately, the AZW format is very similar to the MOBI format, and there is a relatively simple process to convert your EPUB eBook to a MOBI eBook.
If you unzip your EPUB file using a program like 7-Zip, you can open the content.opf file with MobiPocket Creator, which is free (be warned that this program is very buggy for Windows 7). Alternatively, you can use a command line program from Amazon.com called KindleGen to easily convert the EPUB format to MOBI format. If these options are not working for you, try using the open source eBook management system Calibre, which is a powerful tool for converting from one eBook format to another.
Good luck on your eBook!
Paul Salvette is an author who lives in Bangkok, Thailand, with his wife, Lisa, and newborn daughter, Monica. He grew up in the United States and served in the Navy from 2002 to 2009, with some time in Iraq. His day job involves working at a Thai foundation that focuses on poverty eradication, philanthropy, and education. He hopes to stay in Thailand until he is deported or dies of natural causes, whichever comes first.
Learn more about Paul at http://paulsalvette.com or follow him on Twitter @PaulSalvette.
Creating a perfect eBook from a manuscript requires technical knowledge that many authors in the self-publishing community either do not have or do not have time to learn. By using the free program Sigil, you can quickly and easily convert your manuscript into an EPUB eBook that is ready to be uploaded to many of the eBook stores. Also, you can easily convert the eBook made in Sigil into a format that is ready to upload to Kindle.
How to Make an eBook with Sigil is a 2,000-word guide for self-publishers that teaches you to quickly format your manuscript into an eBook.
This series originally appeared on the Password Incorrect website, which is a great resource for those interested in digital publishing and self-publishing.
Online sales of eBooks have exploded recently, and the trend will only continue with the availability of low-cost technology. Unfortunately, guidelines on how to properly format an eBook to sell on Amazon.com, Barnes & Noble NOOK, Smashwords, and other distributors are terse and geared toward web developers rather than self-publishers. Templates and third-party programs advertised to quickly convert a manuscript into an eBook often leave the final product in a dismal state of sloppiness that offends readers. This is because eBooks need to be converted to the same code that is seen on websites, not what is in a word processor.
This guide was designed by an indie author for indie authors in the self-publishing community to provide the requisite knowledge to professionally format an eBook in all major formats. It will take you step-by-step from a manuscript on your computer to the perfect eBook formats you need for Amazon, NOOK, Smashwords, and other markets.
In this guide you will learn how to:
• Layout your manuscript for conversion into the major eBook formats (i.e. MOBI, EPUB, PDF) for all the big markets (i.e. Amazon, Barnes & Noble, Smashwords, and others)
• Add styles to different types of text in your eBook
• Add hyperlinks, bullets, and images to your eBook
• Create a clickable Table of Contents for your eBook
• Generate eBooks using open source software
No prior knowledge of web programming is needed, because this guide provides detailed instructions and images to improve your level of knowledge from the ground up. The following detailed tutorials are covered in this guide:
• Converting your manuscript from a word processor into a text editor
• Web programming tutorial (XHTML)
• Web programming needed to add styles to your eBook (CSS)
• Using Microsoft Word for Smashwords
• Using Calibre to convert XHTML into all eBook formats
• Publishing your eBooks on Kindle, NOOK, and Smashwords
• XHTML/CSS source code
For those interested in the advanced methods and techniques of eBook formatting, this guide also provides the following tutorials:
• Regular Expressions for eBooks
• Creating an EPUB from the ground up
• Using KindleGen to create a MOBI file
• EPUB source code
Buy this 46,000-word (~200-page) guide that comes with over 150 helpful images, and you will never have to pay to have your eBook professionally formatted. Available now.