E-Book Enlightenment

Making EPUBs

e_books.png

Of all the formats for e-books only EPUB combines small file sizes with the ability to do formatted text and illustrations.  An EPUB is like a website contained in a Zip file, with a Table of Contents attached.  It is also in one important way different from a website.  A website is made with HTML (usually) but an EPUB is made with XHTML.

The difference is small but crucial.  HTML is meant to be forgiving.  If you make a web page you can leave out some tags, fail to close tags, or close tags in a different order than you opened them in.  A web browser is supposed to forgive that, as much as possible.  XHTML, on the other hand, is like HTML that is not forgiving.  You can't leave out a tag or put in a tag where the XHTML browser does not expect it.  If an XHTML browser discovers an error in your page it can simply refuse to display it.

The end result is that an XHTML browser is easier to make than an HTML browser.  A lot easier.   It does put a burden on the e-book author to get his tags right, but in practice you'll never create an XHTML file by hand.  Instead, I recommend that you use the free e-book editor Sigil, shown here editing The Galaxy Primes by Edward E. Smith:

Sigil in action

Sigil is available for Windows, Linux, and the Macintosh.  You can download it here:

http://code.google.com/p/sigil/ 

There are installers for all three platforms.  On Windows the installer can be a little flaky.  It is supposed to install a Visual C++ runtime component if it is needed but it doesn't always do that.  If you have problems check the FAQ on the website, which explains how to work around the problem.  The installer on Linux worked fine, and I would recommend using that instead of compiling Sigil from the source code.

To create your EPUB you'll start by creating an HTML file with your word processor using the Save As... option from the File menu.  As before, I recommend Open Office but MS Word will do.  When you add this HTML file to Sigil under the Text folder it will run a piece of code called HTML Tidy that will convert your HTML into XHTML automatically.  After that you can split your book into multiple chapters, create table of contents entries, add images, etc.  Here is the Boy's Aviation book being edited using Sigil.  The Ch button on the toolbar is used to split the file containing the entire book into separate files for each chapter.  When you make the title of a chapter have the Heading 1 style Sigil puts the chapter in the Table of Contents for the book.

Sigil Boys Aviation

You can easily add pictures to the book by cropping them out of the original page images, but they should probably be resized to be 600 pixels wide for best results.

Here are a couple more screen shots of the EPUB I made with Sigil being read in the Read Activity:

Read EPUB

In the Read Activity you can change the size of the text using the View tab, but the illustrations stay the same size.

Read EPUB