EPUB publishing

ton of different formats:

.aeh (used by Archos eReaders)
.lrx (used by Sony eReaders)
.ibooks (used by Apple eReaders)
.pkg (used by Newton eReaders)
.mobi (used by Amazon Kindle eReaders)
.epub (used by just about everyone else, including Barnes & Noble NOOK eReaders)

There are actually even more formats than those. That’s just a small sample. So, which one should you make?

Well, the only formats you need to create are EPUB and MOBI. Forget the others. EPUB is quickly becoming the industry standard and 90% of the eReaders on the market can open EPUB files. There is also a very simple conversion tool to change your EPUB into a MOBI. So, you really only need to make an EPUB, convert it to MOBI, and your book will be accessible on 99% of the eReaders out there, including NOOK and Kindle.

 


Build a digital book with EPUB

The open XML-based eBook format

Need to distribute documentation, create an eBook, or just archive your favorite blog posts? EPUB is an open specification for digital books based on familiar technologies like XML, CSS, and XHTML, and EPUB files can be read on portable e-ink devices, mobile phones, and desktop computers. This tutorial explains the EPUB format in detail, demonstrates EPUB validation using Java technology, and moves step-by-step through automating EPUB creation using DocBook and Python.


EPUB (short for electronic publication) is a free and open e-book standard by the International Digital Publishing Forum (IDPF). Files have the extension .epub.

EPUB is designed for reflowable content, meaning that an EPUB reader can optimize text for a particular display device. EPUB also supports fixed-layout content. The format is intended as a single format that publishers and conversion houses can use in-house, as well as for distribution and sale. It supersedes the Open eBook standard.

EPUB became an official standard of the IDPF in September 2007, superseding the older Open eBook standard.[4]

In August 2009, the IDPF announced that they would begin work on maintenance tasks of the EPUB standard.[5] Two broad objectives were defined by this working group: “One set of activities governs maintenance of the current EPUB Standards (i.e. OCF, OPF, and OPS), while another set of activities addresses the need to keep the Standards current and up-to-date.” The working group expected to be active through 2010, publishing updated standards throughout its lifetime.[6] On April 6, 2010, it was announced that this working group would complete their update in April 2010. The result was to be a minor revision to EPUB 2.0.1 that “…corrects errors and inconsistencies and does not change functionality.”[7] On July 2, 2010, drafts of the version 2.0.1 standards appeared on the IDPF website.

On April 6, 2010, it was announced that a working group would form to revise the EPUB specification.[7] In the working group’s charter draft, 14 main problems with EPUB are identified, which the group will address. The group was chartered through May 2011, and was scheduled to submit a final draft on May 15, 2011.[8] An initial Editors Draft for EPUB3 was published on November 12, 2010,[9] and the first public draft was published on February 15, 2011.[10] On May 23, 2011, the IDPF released its proposed specification for final review. On October 10, 2011, the IDPF announced that its membership had approved EPUB 3 as a final Recommended Specification.[11]

In September 2012, ISO/IEC JTC1/SC34 re-established Ad Hoc Group 4 on EPUB of IDPF to prepare the creation of a Joint Working Group (JWG) for EPUB. EPUB 3 will be submitted as a Draft Technical Specification by the Korean National Body via the JTC 1 fast-track procedure and it will be assigned to the SC 34/JWG when approved.[12] It is currently under a standardization process under the formal name ISO/IEC DTS 30135-1 – Information technology – Digital publishing – EPUB3 — Part 1: EPUB3 Overview.[13]

Editing systems

Creation Software
Software Platform License Notes
ABBYY FineReader Windows Commercial Version 11 exports to EPUB format.
Abiword FreeBSD,Linux,Windows GPL Support EPUB 2.0 format export since 2.9.1 release [33]
Adobe InDesign Windows,Mac OS X Commercial Exports to EPUB format. Versions prior to 5.5 create EPUBs that require significant editing to pass ePubCheck or ePubPreFlight.
Adobe RoboHelp Windows Unknown Online documentation tool that supports export to EPUB format
Aquafadas Digital Publishing System Windows,Mac OS X Commercial Exports to epub3 Fixed Layout format since version 2.0. The publishing system proposes a rich toolset of enrichments for the InDesign documents. The following subset is preserved during the epub3 export : videos, slideshows, sounds, xhtml snippets, links, actions. The generated epub preserves the layout and styles by embedding the appropriate fonts. It does not require any manual editing to pass the epubcheck test.
Aspose Windows,Addon app freeware only MS-Word2007 Converts any document to EPUB; supports multilevel TOCs, font embedding, and batch conversion.
Atlantis Word Processor Windows,Portable app Shareware Converts any document to EPUB; supports multilevel TOCs, font embedding, and batch conversion.
BlueGriffon EPUB Edition Windows,Mac OS X,GNU/Linux Commercial Wysiwyg editor. Creates, opens, edits and saves natively EPUB2 and EPUB3 (dated October 2012, only application doing it) formats; does not rely on a proprietary pivot format. Offers full UI-based control on all EPUB2 and EPUB3 metadata. Automatically generates guide and NCX in EPUB3 for compatibility with EPUB2. Includes a complete CSS editor, a SVG editor and a MathML editor. Full support for HTML 5, including video and audio tags, and CSS3.
Booktype Web GPL Book production platform that outputs to many formats, including ePub. The platform can import content in various formats and supports collaborative editing.
calibre Windows,Mac OS X,FreeBSD,GNU/Linux GPL Conversion software and e-book organizer. Allows plugins, including for editing EPUB files; there is for instance a plugin to merge several EPUB files into one.[34]
eLML Windows,Mac OS X,FreeBSD,GNU/Linux Unknown The eLesson Markup Language is a platform-independent XML-based open source framework to create eLearning content. It supports various output formats like SCORM, HTML, PDF and also eBooks based on the ePub format.
Feedbooks Web Unknown Free cloud service for downloading public domain works and for self-publishing.
GLIFOEBOOK Windows Commercial Desktop publishing. Generate ePUB version 2 and 3 with audio, video, smil and mathematical formulas compatible with MathML and LaTeX.
Help & Manual Windows Commercial Single source publishing tool that generates ePUB amongst several other documentation formats.
HelpNDoc Windows Free for personal use, commercial otherwise. Help authoring tool that generates EPUB files and other formats.
iBooks Author Mac OS X Unknown Desktop publishing and page layout application. Free from Apple. Can export .ibooks format, which is a proprietary format based on EPUB.[35] There are restrictions on the commercial distribution of works created with iBooks in the .ibooks format.[36] These restrictions apply to the .ibooks format only[37] and it can be argued that a file renamed to .epub is not distributed in the .ibooks format.
IGP:Digital Publisher Web Commercial Portal Cloud Service or licence application for digital content publishing to all formats. Generates ePub 2 and ePub 3 fixed and flow layout plus other formats.
iStudio Publisher Mac OS X Commercial Desktop publishing and page layout application.
Legend Maker Mac OS X Commercial Single source publishing from insert codes into .rtf. Auto generates .epub with insert of chapters, images, audio, video, links, Endnotes, author photo, cover and more. One-click production of .epub and mobi.
Lulu.com Web Unknown Upload and convert .doc, .docx, or PDF manuscripts to an ePub. Then choose a title, create a cover, describe your ePub, and pick a price. It’s free to publish and sell.
Madcap Flare Windows Commercial Single source publishing tool that can export content as ePUB.
oXygen XML Editor Mac OS X,Windows,FreeBSD,Linux Commercial oXygen XML Editor is the first tool that supports creating, transforming, and validating the documents that comprise the EPUB package.
Pages Mac OS X Unknown Word processor (part of the iWork ’09 suite) that can export to EPUB format (Pages ’09 only, and only with the iWork 9.0.4 update).
Playwrite Mac OS X Commercial Native EPUB-based word processor. Native to EPUB 3 with EPUB 2 compatibility.
PubCoder Mac OS X Unknow Native EPUB creator, with animation, read-aloud and interaction with all supported devices.
Pubtree editor Windows Commercial This application can open and edit EPUB 2 and EPUB 3 books, does not modify the source function can be put epub 3 Books, like iBooks Author.
QuarkXPress Mac OS X,Windows Commercial Desktop Publishing Tool, Page Layout Application. Exports also to the ePUB format.
Serif PagePlus X6 Windows Commercial Desktop Publishing Program. Exports also to the ePUB format.
Scrivener Windows,Mac OS X Commercial Program for writers. Includes organization capabilities for fiction writers. Publishes to multiple formats.
Sigil Windows,FreeBSD,GNU/Linux,Mac OS X GPLv3 This application can also open and edit EPUB books, instead of just converting from other formats to EPUB. Since version 0.7, Sigil supports embedding video or audio in EPUB.

All things being equal, the epub format is preferable to pdf for reading on devices like the iPad, Nook, Sony, Kobo, and other dedicated e-readers.

But for some types of books (such as manga, comics, or graphic novels), epub doesn’t seem to be able to handle large images that should fill the screen.

Apple has gone so far as to create its own fixed layout format for such ebooks.

It is possible, though, to stick with epub and get perfect results for illustrated ebooks, using the forgotten (or perhaps simply overlooked) svg image element.

Here’s a peek under the hood of how we do it at eBookBurn.com, as part of our newillustrated ebook publishing feature.

This is an example of the markup to use in your epub’s xhtml files for each image:

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 592 900" preserveAspectRatio="xMidYMid meet">
<image width="592" height="900" xlink:href="images/page01.jpeg" />
</svg>

What this markup does is take a JPEG image sized 592 pixels wide by 900 pixels tall, and frame it in the center of a 592×900 svg element.

It turns out that 592×900 is the right size and aspect ratio for “standard-sized” six inch e-ink screens found on the regular Nook, and Sony Reader.

So why use svg at all?

Wouldn’t it be simpler to define it with the plain img tag (as this epub template does), like this?

<img src="images/page01.jpeg" width="592" height="900" alt="Page 1"/>

Unfortunately, many devices, such as the iPad and the Nook Color, have screens largerthan six inches.

So on those devices, using the plain img tag in your epub’s xhtml files leaves an embarrassing whitespace gap, from where the image stops to where the actual screen ends.

The svg element shown earlier, though, is different: it stretches the image to fill the entire screen, while preserving the aspect ratio.

It’s also important to note that 592 width and 900 height specified within the svg and image elements should not be thought of as pixel sizes, since no units are defined, but as a width-to-height ratio.

So any image with the same aspect ratio as 592×900 will work well, regardless of its actual size. Scaling up to larger screens, though, also means the dpi count should be reasonably high, at least 72 dpi (and more for images whose base size is smaller than 592×900 pixels).

For most devices, that’s enough, but some e-readers insist on adding margins and other padding to each page, so it’s helpful to define this in the xhtml file’s head block:

<style type="text/css">
@page { margin: 0.000000pt; padding: 0.000000pt; }
</style>

And these css classes in the stylesheet:

.svg_outer {
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
text-align: left;
}

.svg_inner {
display: block;
text-align: center;
}

So the final xhtml for each page image looks like this:

<div class="svg_outer">
<div class="svg_inner">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 592 900" preserveAspectRatio="xMidYMid meet">
<image width="592" height="900" xlink:href="images/page01.jpeg" />
</svg>
</div>
</div>

Just repeat that pattern for every image in book, for every chapter that contains full-page illustrations.


Update, May 1, 2012: Moriah Jovan has been kind enough to provide sample epub files created using this technique: