Creating an EPUB 1

After Bluefish tidied up our HTML text, I originally planned to do some comparisons between editions, but since only the 1914 text is ready, I decided to jump ahead to creating a draft ebook.

First, lets talk a bit about EPUB.

EPUB (electronic publication) is an open and Free standard maintained by International Digital Publishing Forum designed for reflowable ebooks that can be properly displayed on any screen size.  Full documentation about the standard, as well as a lot of helpful resources, can be found at the IDPF website,  Each EPUB file is basically a ZIP package containing XHTML files for the sections of the book, image files, CSS style sheets, and metadata describing the contents.  A good way of looking at it is that an EPUB contains the elements of a complete website of the book.  If you want to take a look inside, make a copy of an EPUB on your computer and unzip it (use 7-zip, a great Free archive manager,  You will find a couple directories, including one labeled text containing the main xhtml files.

Because it is an open and relatively simple standard, it is easy to create and/or hand tweak your own EPUBs.  If you were really bored, you could hand write all the necessary files, put them in the correct directories, and zip them together.  Luckily there are a number of good tools to help create EPUB in a more automated fashion!

As usual, rather than just telling you what method I actually used, I will outline another method first–just to give you some options!

One of the quickest ways to create a usable EPUB is with the Writer2epub extension.  First, you need OpenOffice,  or LibreOffice  I won’t get into the debate about which one you should choose, but basically they are identical, Free software office suites.  They can easily replace the popular microsoft equivalent that doesn’t even need to be named… I have always used OpenOffice on my Windows computers and LibreOffice on my Linux ones–no good reason why!  If you have one installed, download the latest Writer2epub extension from (older versions of the extension no longer work, so if you installed it awhile ago, update!) and open it to install.  This should add a little EPUB tool bar.

Writer2epub tool bar.

Writer2epub tool bar.

Now open the HTML text with LibreOffice, and save it as an ODT.  If we were trying to create the entire book using this method, you would need to combine all the other HTML files as well (copy & paste works fine!).  The whole document should currently be set to style “Text body.” Now, I go through the text and change the style of each chapter title to “Heading 3.”  At the same time I scan the text for any errors.


Editing Aladore with LibreOffice.

The main thing to remember if trying to create an EPUB by this method is don’t get too fancy.  Use only styles to add formatting (and only the basic styles).  If you use the tab key, any tables, headers/footers, or weird fonts you are more like to get strange results.  Also, note that many ereaders are a bit dated in hardware and software.  They often only support EPUB2.  The only image types they can render are JPEG, GIF, PNG, and SVG+XML.  Its safest to stick to GIF for simple graphics (like logos) and JPEGs for general images.

When everything looks good, click on the EPUB E in the tool bar.  This brings up the Writer2epub window.  First, we need to enter metadata for the ebook:


Add metadata.

This information will be embedded with the files to ensure the ebook can be identified.  You could also choose a cover at this time.  Next, we need to adjust the Document Preferences:


Adjust the document preferences.

I check off the options to split the files before Headings 1, 2, and 3.  This creates a separate XHTML file for each chapter, ensuring that we have a page break in the text and making smaller files for the ereader to load.  Then click okay.  LibreOffice will think for a second, and a dialog box showing a log of the epub creation macro will appear to confirm it was successful.  The EPUB file will be saved in the same place as the ODT with the same name.


New epub viewed with Calibre.

Easy! Fast!  Thank you Luca “Luke” Calcinai (creator of w2e)!

However, for the purposes of Digital Aladore, I wanted a bit more control and options, so I used Sigil instead.  See the next post!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s