The Full Wiki

EPUB: Wikis

Advertisements
  
  

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

Encyclopedia

From Wikipedia, the free encyclopedia

Electronic Publication (EPUB)
Filename extension .epub
Internet media type application/epub+zip
Developed by International Digital Publishing Forum (IDPF)
Initial release September, 2007
Latest release 2.0 / September 2007
Type of format e-book file format
Contained by OEBPS Container Format (OCF) (ZIP)
Extended from Open eBook, XHTML, CSS, DTBook
Website IDPF Home Page

EPUB (short for electronic publication; alternatively capitalized as ePub, EPub, or epub, with "EPUB" preferred by the vendor) 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 the text display can be optimized for the particular display device. The format is meant to function 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.[1]

Contents

History

EPUB became an official standard of the International Digital Publishing Forum (IDPF) in September 2007, superseding the older Open eBook standard.[2]

In August 2009, the IDPF announced that they will begin work on maintenance tasks of the EPUB standard.[3] Two broad objectives are 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 is expected to be active through 2010, publishing updated standards throughout its lifetime.[4]

Features

  • Free and open
  • Re-flowable (word wrap) and re-sizable text
  • Inline raster and vector images
  • Embedded metadata
  • DRM support
  • CSS styling
  • Providing alternative renditions in the same file
  • Use of out-of-line and inline xml islands to extend the functionality of EPUB

File format

EPUB consists of three specifications:

  • Open Publication Structure (OPS) 2.0, contains the formatting of its content.[5]
  • Open Packaging Format (OPF) 2.0, describes the structure of the .epub file in XML.[6]
  • OEBPS Container Format (OCF) 1.0, collects all files as a ZIP archive.[7]

Basically, EPUB internally uses XHTML or DTBook (an XML standard provided by the DAISY Consortium) to represent the text and structure of the content document, and a subset of CSS to provide layout and formatting. XML is used to create the document manifest, table of contents, and EPUB metadata. Finally, the files are bundled in a zip file as a packaging format.

Advertisements

Open Publication Structure 2.0

An EPUB file uses XHTML 1.1 (or DTBook) to construct the content of a book as of version 2.0. This is different from previous versions (OEBPS 1.2 and earlier) which used a subset drawn from XHTML. There are, however, a few restrictions on certain elements. The mimetype for XHTML documents in EPUB is application/xhtml+xml.[5] For a table of the required XHTML modules and a description of the restrictions, please see Section 2.2 of the specification.

Styling and layout is performed using a subset of CSS 2.0, referred to as OPS Style Sheets. This specialized syntax requires only a portion of CSS properties to be supported by reading systems and adds a few custom ones. Some custom ones are oeb-page-head, oeb-page-foot, and oeb-column-number. Font-embedding can be accomplished using the @font-face property, as well as including the font file in the OPF's manifest (see below). The mimetype for CSS documents in EPUB is text/css.[5] For a table of supported properties and detailed information, please see Section 3.0 of the specification.

EPUB also requires that PNG, JPEG, GIF, and SVG are supported for image types. These use the mimetypes image/png, image/jpeg, image/gif, image/svg+xml respectively. Other media types are allowed, but creators must include alternative renditions in supported types.[5] For a table of all required mimetypes, see Section 1.3.7 of the specification.

Unicode is required, and content producers must use either UTF-8 or UTF-16 encoding.[5] This is to support international and multilingual books. However, reading systems are not required to provide the fonts necessary to display every unicode character, though they are required to display at least a placeholder for characters that cannot be displayed fully.[5]

An example skeleton of an XHTML file for EPUB looks like this:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
    <title>Pride and Prejudice</title>
    <link rel="stylesheet" href="css/main.css" type="text/css" />
  </head>
  <body>
    ...
  </body>
</html>

Open Packaging Format 2.0

The OPF specification's purpose is to "[define] the mechanism by which the various components of an OPS publication are tied together and provides additional structure and semantics to the electronic publication."[6] This is accomplished by two XML files with the extensions .opf and .ncx.

.opf file

The .opf file houses the EPUB book's metadata, file manifest, and linear reading order. This file has a root element package and four child elements metadata, manifest, spine, guide. All of these except guide are required. Furthermore, the package node must have the unique-identifier attribute. The .opf file's mimetype is application/oebps-package+xml.[6]

The metadata element contains all the metadata information for a particular EPUB file. Three metadata tags are required, though there are many more available: title, language, identifier. title contains the title of the book. language contains the language of the book's contents in RFC 3066 format or its successors such as the newer RFC 4646. identifier contains a unique identifier for the book, such as its ISBN or a URL. The identifier's id attribute should equal the unique-identifier attribute from the package element.[6] For a full listing of EPUB metadata, please see Section 2.2 of the specification.

The manifest element lists all the files contained in package. Each file is represented by an item element, and has the attributes id, href, media-type. All XHTML (content documents), stylesheets, images or other media, embedded fonts, and the .ncx file should be listed here. Only the .opf file, container.xml, and mimetype files should not be included.[6] Note that in the example below, an arbitrary media-type is give to the included font file, even though no mimetype exists for fonts.

The spine element lists all the XHTML content documents in their linear reading order. Also, any content document that can be reached through linking or the table of contents must be listed as well. The toc attribute of spine must contain the id of the .ncx file listed in the manifest. Each itemref element's idref is set to the id of its respective content document.[6]

The guide element is an optional element for the purpose of identifying fundamental structural components of the book. Each reference element has the attributes type, title, href. Files referenced in href must be listed in the manifest, and are allowed to have an element identifier (e.g. #figures in the example).[6] A list of possible values for type can be found in Section 2.6 of the specification.

An example .opf file:

<?xml version="1.0"?>
<package version="2.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId">
 
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
    <dc:title>Pride and Prejudice</dc:title>
    <dc:language>en</dc:language>
    <dc:identifier id="BookId" opf:scheme="ISBN">123456789X</dc:identifier>
    <dc:creator opf:file-as="Austen, Jane" opf:role="aut">Jane Austen</dc:creator>
  </metadata>
 
  <manifest>
    <item id="chapter1" href="chapter1.xhtml" media-type="application/xhtml+xml"/>
    <item id="stylesheet" href="style.css" media-type="text/css"/>
    <item id="ch1-pic" href="ch1-pic.png" media-type="image/png"/>
    <item id="myfont" href="css/myfont.otf" media-type="application/x-font-opentype"/>
    <item id="ncx" href="book.ncx" media-type="application/x-dtbncx+xml"/>
  </manifest>
 
  <spine toc="ncx">
    <itemref idref="chapter1" />
  </spine>
 
  <guide>
    <reference type="loi" title="List Of Illustrations" href="appendix.html#figures" />
  </guide>
 
</package>


.ncx file

The .ncx file (Navigation Control file for XML) contains the hierarchical table of contents for the EPUB file. The specification for .ncx was developed for Digital Talking Book (DTB), is maintained by the DAISY Consortium, and is not a part of the EPUB specification. The .ncx file has a mimetype of application/x-dtbncx+xml.

Of note here is that the values for the docTitle, docAuthor, meta name="dtb:uid" elements should match their analogs in the .opf file. Also, the meta name="dtb:depth" element is set equal to the depth of the navMap element. navPoint elements can be nested to create a hierarchical table of contents. navLabel's content is the text that will appear in the table of contents generated by reading systems that use the .ncx. navPoint's content element points to a content document listed in the manifest and can also include an element identifier (e.g. #section1).[6][8]

A description of certain exceptions to the NCX specification as used in EPUB can be found in Section 2.4.1 of the specification. The complete specification for NCX can be found in Section 8 of the Specifications for the Digital Talking Book.[8]

An example .ncx file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN"
"http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
 
<ncx version="2005-1" xml:lang="en" xmlns="http://www.daisy.org/z3986/2005/ncx/">
 
  <head>
<!-- The following four metadata items are required for all NCX documents,
including those conforming to the relaxed constraints of OPS 2.0 -->
 
    <meta name="dtb:uid" content="123456789X"/> <!-- same as in .opf -->
    <meta name="dtb:depth" content="1"/> <!-- 1 or higher -->
    <meta name="dtb:totalPageCount" content="0"/> <!-- must be 0 -->
    <meta name="dtb:maxPageNumber" content="0"/> <!-- must be 0 -->
  </head>
 
  <docTitle>
    <text>Pride and Prejudice</text>
  </docTitle>
 
  <docAuthor>
    <text>Austen, Jane</text>
  </docAuthor>
 
  <navMap>
    <navPoint class="chapter" id="chapter1" playOrder="1">
      <navLabel><text>Chapter 1</text></navLabel>
      <content src="chapterl.xhtml"/>
    </navPoint>
  </navMap>
 
</ncx>

OEBPS Container Format 1.0

An EPUB file is a group of files conforming to the OPS/OPF standards that is wrapped in a ZIP file.[1] The OCF specifies how these files should be organized in the ZIP, and defines two additional files that must be included.

The mimetype file must be a text document in ASCII and must contain the string application/epub+zip. It must also be uncompressed, unencrypted, and the first file in the ZIP archive. The purpose of this file is to provide a more reliable way for applications to identify the mimetype of the file than just the .epub extension.[7]

Also, there must be a folder named META-INF which contains the required file container.xml. This XML file points to the file defining the contents of the book. This will be the .opf file, though additional alternative rootfile elements are allowed.[7]

An example file structure:

--ZIP Container--
mimetype
META-INF/
  container.xml
OPS/
  book.opf
  chapter1.xhtml
  ch1-pic.png
  css/
    style.css
    myfont.otf

An example container.xml, given the above file structure:

<?xml version="1.0" encoding="UTF-8" ?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
  <rootfiles>
    <rootfile full-path="OPS/book.opf" media-type="application/oebps-package+xml"/>
  </rootfiles>
</container>

Digital Rights Management

An EPUB file can optionally contain DRM as an additional layer, but it is not required by the specifications.[9] In addition, the specification does not name any particular DRM system to use, so publishers can choose a DRM scheme to their liking. However, future versions of EPUB (specifically OCF) may specify a format for DRM.[7]

When present, DRMed EPUB files must contain a file called rights.xml within the META-INF directory at the root level of the ZIP container.[7]

Validation

An open source tool called epubcheck exists for validating and detecting errors in the structural markup (OPS, OPF, OCF) as well as the XHTML and image files. The tool can be run from the command line, or used in webapps and applications as a library. A large part of the original work on the tool was done at Adobe Systems.[10]

Criticism

One criticism of EPUB is that, while good for text-centric books, it is unsuitable for publications which require precise layout or contain advanced formatting. Examples of such publications are comic books and technical books.[11]

The EPUB specification does not enforce or suggest a particular DRM scheme. This could affect the level of support for various DRM systems on devices and the portability of purchased e-books. Consequently, such DRM incompatibility may prove to segment the EPUB format along the lines of DRM systems, negating the advantages of a single standard format and confusing the consumer.[12][13][14][15][16][17]

Another criticism of EPUB revolves around the specification's lack of detail on linking into, between, or within an EPUB book, as well as its lack of a specification for annotation. Such linking is hindered by the use of a ZIP file as the container for EPUB. Furthermore, it is unclear if it would be better to link by using EPUB's internal structural markup (the OPF specification mentioned above) or directly to files through the ZIP's file structure.[18] No standardized way to annotate EPUB books could lead to difficulty sharing and transferring annotations, and therefore limit the use scenarios of EPUB because it won't be able to compete with the interactivity of the web, particularly in educational settings.[19]

EPUB, as standard and file format, also has no official logo representing it.[20] A logo could be used to promote and emphasize to the consumer a device's compatibility with EPUB (or one of its DRMed variants, see above) similarly to other branding programs used by Microsoft, Apple, or Intel, for example. EPUB currently cannot reap such a benefit because it has no official logo from the IDPF.

Software

Reading systems

Software that reads, and presumably displays, EPUB files is called a reading system. An EPUB reading system is defined as:

“A combination of hardware and/or software that accepts OPS Publications and makes them available to consumers of content. Great variety is possible in the architecture of Reading Systems. A Reading System may be implemented entirely on one device, or it may be split among several computers....”[1]

Reading Systems and Software[1]
Software Platform DRM formats supported Notes
Adobe Digital Editions Windows, Mac OS X Adobe Content Server
Aldiko Android
FBReaderJ Android Open source
BookGlutton Web Free, online ePub reader with a focus on the social aspects of reading.
Bookworm Web Free, open source, online ePub reader.
Calibre Windows, Mac OS X, Linux More often used for library management, conversion, and transferring to devices than reading.
EPUBReader Firefox add-on Windows, Mac OS X, Linux Free Firefox addon, with which you can read ePub-files in Firefox.
FBReader Windows, Linux, PDAs Incomplete ePub support.
Freda Windows Mobile Only works with DRM-Free ePub files.
iBooks Apple iPad FairPlay[21]
i2Reader Apple iPhone
Lexcycle Stanza Windows, Mac OS X, iPhone
Lucidor (software) Windows, Mac OS X, Linux
Mobipocket Windows, BlackBerry, Symbian, Windows Mobile
Okular Linux, Windows, Maemo, Mac OS X
Openberg Lector Firefox add-on
Talking Clipboard Windows Text-to-speech software, that can read ebooks.
WordPlayer Android

Editing systems

Creation Software
Software Platform Notes
Adobe InDesign Windows, Mac OS X
Atlantis Word Processor Windows Converts any document to EPUB; supports multilevel TOCs and font embedding
BookGlutton Converter Web Conversion tool
eBooksWriter Windows Also can produce MobiPocket files
eCub Windows, Mac OS X, Linux No-encrypted only, also can produce mobi
Feedbooks Web Free cloud service for downloading public domain works and for self-publishing
iStudio Publisher Mac OS X Desktop publishing and page layout application
Sigil Windows, Linux, Mac OS X Free, Open source under GPLv3. Go to Sigil at Google Project page.
Smashwords Web Ebook publishing and distribution platform for authors and publishers. Authors upload manuscript as Word .doc or .RTF, formatted to Smashwords Style Guide, and Meatgrinder conversion system converts file into multiple ebook formats such as EPUB, PDF, MOBI and HTML

Hardware

See also

References

  1. ^ a b c d Conboy, Garth (May 11, 2009). "EPUB 101" (PDF). IDPF. eBook Technologies. http://www.idpf.org/digitalbook09/Presentations/EPUB%20101.pdf. 
  2. ^ IDPF (Mon Oct 15, 2007). "OPS 2.0 Elevated to Official IDPF Standard". IDPF. http://www.idpf.org/forums/viewtopic.php?t=98. 
  3. ^ "IDPF Launches EPUB Standards Maintenance Work". IDPF. August 16, 2009. http://www.idpf.org/pressroom/pressreleases/EPUBMaintWGLaunch.htm. 
  4. ^ "Charter for EPUB Standards Maintenance WG". IDPF. August 12, 2009. http://www.idpf.org/idpf_groups/epubmaint.htm. 
  5. ^ a b c d e f IDPF (September 11, 2007). "Open Publication Structure (OPS) 2.0 - Recommended Specification". IDPF. http://www.idpf.org/2007/ops/OPS_2.0_final_spec.html. 
  6. ^ a b c d e f g h IDPF (September 11, 2007). "Open Packaging Format (OPF) 2.0 - Recommended Specification". IDPF. http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html. 
  7. ^ a b c d e IDPF (September 11, 2006). "OEBPS Container Format (OCF) 1.0 - Recommended Specification". IDPF. http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm. 
  8. ^ a b "Specifications for the Digital Talking Book". April 21, 2005. http://www.niso.org/workrooms/daisy/Z39-86-2005.html. 
  9. ^ IDPF (Nov 20, 2006). "IDPF's Digital Book Standards FAQs". IDPF. http://www.idpf.org/forums/viewtopic.php?t=22. 
  10. ^ "epubcheck: Validation tool for Epub". Google Code. http://code.google.com/p/epubcheck/. Retrieved January 29, 2010. 
  11. ^ Rothman, David (July 27, 2008). "The ePub torture test: Starring ‘Three Shadows,’ a graphic novel". TeleRead: Bring the E-Books Home. http://www.teleread.org/2008/07/27/the-epub-torture-test-starring-three-shadows/. 
  12. ^ Gelles, David (January 29, 2010). "Walls close in on e-book garden". Financial Times. http://www.ft.com/cms/s/0/a00ad6f8-0d0b-11df-a2dc-00144feabdc0.html. 
  13. ^ Rothman, David (August 13, 2009). "Adobe-DRMed ePub isn’t ‘open’: Why the New York Times urgently needs to clarify its Sony eBook Store article". TeleRead: Bring the E-Books Home. http://www.teleread.org/2009/08/13/adobe-drmed-epub-isnt-an-open-standard-will-nyt-distinguish-between-nonproprietary-and-common/. 
  14. ^ Biba, Paul (December 21, 2009). "Does the Nook use its own incompatible DRM scheme?". TeleRead: Bring the E-Books Home. http://www.teleread.org/2009/12/21/does-the-nook-use-its-own-incompatible-drm-scheme/. 
  15. ^ Biba, Paul (January 28, 2010). "iPad adds to the DRM mess? Apple ebook DRM exclusive to Apple hardware". TeleRead: Bring the E-Books Home. http://www.teleread.org/2010/01/28/ipad-adds-to-the-drm-mess-apple-ebook-drm-exclusive-to-apple-hardware/. 
  16. ^ Kendrick, James (January 28, 2010). "Who Really Needs an iPad?". jkOnTheRun. http://jkontherun.com/2010/01/28/who-really-needs-an-ipad/. 
  17. ^ Dave Dickson (January 27, 2010). "EPUB, iPad and Content Interoperability". Digital Editions. http://blogs.adobe.com/digitaleditions/2010/01/epub_ipad_and_content_interope.html. 
  18. ^ "Links, pointers, bookmarks, highlights: How should .epub do it?". FrontMatters. BookGlutton. March 29, 2008. http://frontmatters.com/2008/03/29/links-pointers-bookmarks-highlights-how-should-epub-do-it/. 
  19. ^ Rothman, David (November 5, 2007). "'Social annotation and the marketplace of ideas': Time for an IDPF annotation standard for books and other e-pubs!". TeleRead: Bring the E-Books Home. http://www.teleread.org/2007/11/05/social-annotation-and-the-marketplace-of-ideas-time-for-an-idpf-annotation-standard-for-books-and-other-e-pubs/. 
  20. ^ Rothman, David (November 23, 2009). "About that ePub logo, Mike: A friendly jog for the IDPF". TeleRead: Bring the E-Books Home. http://www.teleread.org/2009/11/23/about-that-epub-logo-mike-a-friendly-jog-for-the-idpf/. 
  21. ^ Pham, Alex (February 15, 2010). "Apple to wrap digital books in FairPlay copy protection". Los Angeles Times. http://latimesblogs.latimes.com/technology/2010/02/apple-ibooks-drm-fairplay.html. 

External links


Advertisements






Got something to say? Make a comment.
Your name
Your email address
Message