Comparison of e-book formats


The most notable e-book formats are:


A list of exhaustive e-book formats is alvailable.

The following documents aims to compare the technical features and differences between the 3 formats: EPUB3, iBook 2.0 and Kindle KF8.

A. EPUB

1.Introduction

The epub format is an open standard for e-books created by the International Digital Publishing Forum (IDPF).
The EPUB format has gained some popularity as a vendor-independent XML-based e-book format. EPUB is designed for reflowable content that can adapt its presentation to the reader device, although EPUB now also supports fixed-layout content.


2. EPUB3 Features

2.1 Packaging

An EPUB Publication is transported as a single file (a "portable document") that contains:

The OCF Container is packaged into a physical single ZIP file containing:

see OCF example

2.2. Navigation

2.3. Linking

The EPUB Canonical Fragment Identifier (epubcfi) specification defines a standardized method for linking into a publication. It uses fragment identifiers extended with a similar as Shorthand XPointer construct but to a location within an EPUB Publication.

example: book.epub#epubcfi(/6/4[chap01ref]!/4[body01]/10[para05]/3:10)

2.4. Metadata

The Package Document includes a dedicated metadata section for general information about the Publication, allowing titles, authors, identifiers (mainly based on Dublin Core). A meta element also permits refinement by meta element subexpressions.

The Package Document also allows a Unique Identifier to be established for a Publication ( ex: ISBN+date)




signatures file: Contains digital signatures for various assets.

@@@@ XHTML Content Documents also include the means of annotating document markup with rich metadata, making them more semantically meaningful and useful both for processing and accessibility purposes (Semantic Inflection [ContentDocs30]).

2.5. Content Documents

Content Documents e are XHTML (defined by a profile of HTML5) or SVG documents, etc., that describe the readable content of a Publication and reference associated media resources (e.g., images, audio and video clips).

2.6. Rendering and CSS 

Content presentation should adapt to the User rather than the User having to adapt to a particular presentation of content. Reflowable content.

2.7. Fonts

2.8. Multimedia

2.9. Text-to-speech

EPUB 3 provides text-to-speech (TTS) facilities for controlling aspects of speech synthesis, such as pronunciation, prosody and voice characteristics: pronunciation lexicons using the W3C PLS format, Inline SSML Phonemes and CSS Speech Features.

2.10. Scripting

EPUB strives to treat content declaratively, but it supports scripting as defined in HTML5 and SVG (Note:scripting support is optional for Reading Systems and may be disabled for security reasons).

2.11 Internationalisation (Global Language Support)

EPUB 3 offer features for global Language:

2.12. Accessibility

A major goal of EPUB3 is to facilitate content accessibility with a variety of features


3. EPUB3 Relation to main W3C Technologies

3.1. HTML5

The XHTML Content Documents are based on HTML5, and inherits all definitions of semantics, structure and processing behaviors from the HTML5 specification.
EPUB3 adds the following extensions to the HTML5 document model:

3.2. CSS Style sheets

The  EPUB 3 CSS Profile is based on CSS 2.1  with the following exceptions (fixed value of the position property and  the direction and unicode-bidi properties -Authors should use appropriate HTML5 markup to express directionality information instead)

EPUB 3 CSS Profile includes:

EPUB 3 CSS Profile adds new constructs in addition to the standard values defined for the display property of CSS2.1 ( new values oeb-page-head and oeb-page-foot)

3.3. SVG

EPUB3 restricts the content model of SVG 1.1 for Content Documents and SVG embedded in XHTML Content Documents as follows:

3.4. MathML

MathML markup in XHTML Content Documents must conform to the constraints expressed in the MathML specification with the following restrictions:

3.5. Scripting

EPUB Content Documents may contain scripting using the facilities defined for this in the respective underlying specifications HTML5 and SVG

3.6. Media Overlay Document

EPUB 3 allows Media Overlay Documents to describe the timing for the pre-recorded audio narration and how it relates to the EPUB Content Document markup. The file format for Media Overlays is defined as a subset of SMIL.

3.7.Text-to-Speech (TTS)

SSML is the language used for assisting Text-to-Speech (TTS) engines in generating synthetic speech. Although SSML is designed as a standalone document type, it also defines semantics suitable for use within other host languages.EPUB3 recasts the SSML 1.1 phoneme element as two attributes — ssml:ph and ssml:alphabet — and makes them available within EPUB XHTML Content Documents.

3.8 List of W3C Technologies referenced normativaly in Epub3 specifications.

3.9 Validation of EPUB documents

The open-source validator tool for EPUB 2 and EPUB 3 content.: EPUBCheck 3.0 is available at validator.idpf.org

4. New and Potential work

4.1 work in progress at IDPF

4.2 Potential work

4.3 Issues and need for coordination

EPUB 3 references W3C specifications that are not yet final, and incompatible changes to them may occur in the future that would cause EPUB 3 Content Documents that were previously conformant to no longer be conformant to the latest versions of the referenced specifications.

CSS and HTML5

The following refecenced specifications are currently  W3C Working Drafts:

Accessibility

4.4. Specification Improuvements

Reader systems support is not mandatory for many features in the spec:

4.5.Testing

4.6 Role of the W3C


5. Implementations

EPUB format can be read at least by the Kobo eReader, Blackberry Playbook, Apple's iBooks app running on iOS devices such as the iPhone, iPod Touch and iPad, Barnes and Noble Nook, Sony Reader, BeBook, Bookeen Cybook Gen3 (with firmware v. 2 and up), COOL-ER, Adobe Digital Editions, Lexcycle Stanza, BookGlutton, AZARDI, FBReader, Aldiko, Moon+ Reader and WordPlayer on Android, Freda on Windows Mobile and Windows Phone 7, the Mozilla Firefox add-on EPUBReader, and Okular. Several other desktop reader software programs are currently implementing support for the format, such as dotReader, Mobipocket, uBook.

The only notable device lacking integrated support for the EPUB format is the Amazon Kindle, although there has recently been speculation that the Kindle will soon support this format.

Adobe Digital Editions uses .epub format for its e-books, with DRM protection provided through their proprietary ADEPT mechanism.

5.2 EPUB readers and authoring tools

Note that  BISG, the leading U.S. book trade association for standardized best practices, research, and educatinon, issued a press release endorsing EPUB 3 as the "accepted and preferred format" for Web Standards-based digital content.

6. References

6.1 EPUB3 specifications

EPUB 3 consists of a set of four specifications:

Additionnal documents:

6.2 IDPF Forum discussion:


iBooks Format


1.Introduction

iBook 2.0 (release on jan 2012) Apple’s new format is an EPUB-like variant specific to Apple.
iBook 2.0 looks like an EPUB3 format, but it's not an EPUB3 format.
Indeed, Apple as forked the EPB3 specification, with many incompatible design and new features.

Unfortunally iBook format is not documented. Non standard extentions are opaque, making iBook a propratary format which displays only on Apple devices.

2. Differences to epub

The differences between the iBooks 2.0 format and ePub3 seem all but trivial. But when that format is built around non-standard extensions to the CSS rendering model and all of the XHTML and the CSS are built around that extended model, the file is likely to forever be useless and unreadable in other reading systems.The work involved in converting an iBooks 2.0 file to a standard ePub3 is likely to be easy.


2.1 Packaging

Like EPUB, iBook 2.0 is a zipped file of the OCF Container. The structure is similar  but iBook uses a different Mimetype:

The change of Mimetype is enough to make conformant EPUB3 readers stall on a *.ibooks package.

2.2 HTML

Like EPUB, all Content Documents XHTML files are all HTML5 (XML serialisation).
But there are difference with EPUB3. For example, to applies stylesheets to these html5 documents, iBooks uses an xml-stylesheet processing instructions. 
<?xml-stylesheet href='*' type='text/css' media='*'?>
instead of the more usual link element.as in EPUB.
It uses the proprietary and undocumented. XML namespace 
xmlns:ibooks="http://www.apple.com/2011/iBooks

2.3 CSS

iBooks 2.0 format adds CSS extensions that are not  part of the W3C standard. Apple uses custom properties to define for example  strikethroughs, underlines, margins, and heights in various contexts. Undocumented extensions to the CSS standard, using -ibooks- prefix  are for exmple:

-ibooks-layout-hint: inline;
-ibooks-list-text-indent: 0.0000pt; -ibooks-strikethru-width: 1.0000px; -ibooks-underline-width: 1.0000px; -ibooks-gutter-margin-left: 50.0pt;
-ibooks-positioned-slots: media-24, textShape-123, ... ;
-ibooks-box-wrap-exterior-path: directional contour both 12.0pt 0.500000 false;

Extended underlining is based on an old draft of CSS 3 Text and some of these proposed properties were dropped by the CSS WG.
Apple is also extending the CSS Multi-Column Layout Module, and Template-based layouts based on slots were originally proposed by Jakob Refstrup 10-mar-2011 on behalf of Apple

CSS style sheets also include for example definition for a proprietary namespace
@namespace ibooks "http://www.apple.com/2011/iBooks

Other issue is for example  the use of undefined behaviour of link element with the SVG documents
<link rel="stylesheet" type="text/xml+svg" href="assets/svg/content1.svg" />

for more details on CSS issues, see iBooks Author, a nice tool but.. by Glassman

With iBook layout based on a custom / proprietary features, there is no easy way to convert those CSS files into EPUB3 CSS files.
Apple has also introduced it's own extention for  Fixed layout
The key component of the extension is the addition of the file META-INF/com.apple.ibooks.display-options.xml. This file tells iBooks that the book is the fixed-layout type.
Apple was an active IDPF member, that had come closest to delivering the features and capabilities of EPUB3 with iBooks.
Seems that most of the other EPUB3 features, including Media Overlays are supported.

2.4 Widgets extentions

iBooks Author provides authors with six built-in widgets:
Apple has implemented these interactive widgets through object element with custom types and data attributes. The type tells iBooks what sort of widget it is and the data attributes give it the parameters. The code to do this are iBooks-only extensions to the webkit rendering engine they are using.
Example
object type="application/x-ibooks+anchored" data-anchor-ref="danchor-gallery-0">
    <object type="application/x-ibooks+anchorednormal">
        <object id="gallery-0" class="s12"
        type="application/x-ibooks+widget"
        title="Gallery 2.1 Lorem Ipsum dolor amet, consectetur"
        data-widget-type="gallery"
        data-geometry="affineGeometry(440,435,1,0,0,1,291,164)"
        data-fullscreen-only="no"   ......


EPUB3 provides a standard method for defining handlers for media types it doesn’t support, through the bindings element.
Apple could have provided handlers for its widgets, written in javascript, so that its books would have been forward compatible with other, future, ePub3 reading systems.
Using data-* attributes instead of PARAM tags specifically prevents the use of ePub3’s  bindings element. to point at JS implementations of those widgets in those cases when a native implementation is not available. A compliant ePub3 reading system wouldn’t pass the data-* attributes on to the handler document

Reading Systems

iBooks is an e-book application by Apple Inc. for their iOS operating system and devices. (on iPad, iPhone, iPod touch).

Authoring tool

iBooks Author (IBA) is Apple editor for ibooks 2.0 format. It does not create EPUB files and it cannot import existing EPUB files. It can't export to any other format.
Therfore authors are lock in iBook format and Apple market.

Note.  iBooks Author end-user license agreement (EULA) as a restriction — that iBooks can be sold only in the iBookstore — For more details see The Unprecedented Audacity of the iBooks Author EULA





C. Kindle Format


1. Introduction

Kindle Format 8 (KF8) is the latest generation file format for Amazon Kindle books, replacing Mobi 7.
It is used on the Kindle Fire. It is also supported by fourth-generation Kindle devices running firmware version 4.1.0 or later, by "Kindle for PC" and by "Kindle Reader" for the Mac.

Kindle devices do not support the EPUB file format used by many other e-book readers. Instead, they are designed to use Amazon's own e-book formats: AZW, MOBI and, in later devices, KF8.
These formats are intended for reflowable, richly formatted e-book content and support DRM restrictions, but unlike EPUB, they are proprietary formats.

Note: The older mobipocket format was built on HTML and CSS, and like EPUB it uses some Open eBook (OEB) files, such as .opf and .ncx. It was originally intended for low-power mobile devices, like the Palm Pilot,

2- Publishing scenarios

Kindle KF8 being encoded in Amazon's proprietary format, publishers create Kindle books using the following workflow:

To publish on Kindle, authors generally write their content in the following formats and  convert their file to Kindle’s format after completion

Converting from Epub to Kindle.

Creating an KF8 file by compiling a source ePub file using KindleGen, one may meet  the following issues:

Therfore the EPUB source files and the container architecture must be adapted before input into KindleGen which converts this source content to a single file which supports both KF8 and Mobi formats

It is unlikelly Amazon will support EPUB3 (they could have done that with KF8). Amazon has valid reasons for using KF8: it has a built-in dictionary index and fixed layout, which EPUB does not really have yet, (but currently under developpement).

Features of KF8 include

3. KF8 relation to main W3C Technologies

Unfortunatelly, Amazon hasn't released a complete spec, only the Kindle Publishing Guidelines, which are not very explicit, but more oriented to which KF8 features works on each kindle device and guidelines.

3.1. HTML5

Kindle Format 8 supports most HTML 5.0 features, although the following HTML elements are no supported:
• Canvas
• Command
• Datalist
• Script (reserved for Amazon use only)
• Base
• Form
• Eventsource
• KeyGen
• Input
• Embed (Only SVG is supported for Kindle Fire)
• Object (Only SVG is supported for Kindle Fire)
• Param
• Noscript
• IFrame

Currently, only Kindle for IOS supports audio and video content. Kindle e Ink devices and Kindle Fire do not support Kindle Editions with Audio/Video. Video Codec: H.264 (recommended), MPEG-2, Audio Codec: MP3

See full list of HTML Tags Supported in Kindle Format 8 in appendix 11.1 of  the Kindle Publishing Guidelines.or see List of supported HTML tags  in KF8

3.2. CSS Style sheets

3.3. SVG

SVG is supported via the img element. NO information available for the profile used and if it is possible to embedded in XHTML Content Documents.

3.4 Non supported W3C technologies (available in  Epub)

Testing Kindle Books

There are 3 ways to test Kindle book before adding it to the Kindle store:



How does ePUB3 compare to Amazon's new KF8 format?



Basically, it seems that EPUB3 has all the capabilities of KF8, but not the other way around.






Comparison of e-book readers
- Commercially available devices sold by maker or designer
- File format support of e-book readers