Jump to content

EPUB: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m minor clarif
m punc fix
Line 22: Line 22:
| url = [http://www.idpf.org/ IDPF Home Page]
| url = [http://www.idpf.org/ IDPF Home Page]
}}
}}
'''EPUB''' (short for '''electronic publication'''; alternatively capitalized as '''ePub''', '''EPub''', or '''epub''', with "EPUB" preferred by the vendor) is a [[free standard|free]] and [[open standard|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.<ref name="epub_101">Conboy, Garth (2009-05-11). EPUB 101. Slide presentation in PDF format. eBook Technologies, 11 May 2009. Retrieved from http://www.idpf.org/digitalbook09/Presentations/EPUB%20101.pdf.</ref>
'''EPUB''' (short for '''electronic publication'''; alternatively capitalized as '''ePub''', '''EPub''', or '''epub''', with "EPUB" preferred by the vendor) is a [[free standard|free]] and [[open standard|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.<ref name="epub_101">Conboy, Garth (2009-05-11). EPUB 101. Slide presentation in PDF format. eBook Technologies, 11 May 2009. Retrieved from http://www.idpf.org/digitalbook09/Presentations/EPUB%20101.pdf.</ref>


==History==
==History==

Revision as of 03:59, 29 January 2010

Electronic Publication (EPUB)
Filename extension
.epub
Internet media type
application/epub+zip
Developed byInternational Digital Publishing Forum (IDPF)
Initial releaseSeptember, 2007
Latest release
2.0
September 2007
Type of formate-book file format
Contained byOEBPS Container Format (OCF) (ZIP)
Extended fromOpen eBook, XHTML, CSS, DTBook
WebsiteIDPF 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]

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]

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.

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 (Navigational Center 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.[12][1][13][14][15][16]

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.[17] 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.[18]

EPUB, as standard and file format, also has no official logo representing it.[19] 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 Notes
Adobe Digital Editions Windows, Mac OS X
Aldiko Android
FBReaderJ Android Opensource
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
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
i2Reader Apple iPhone
Lexcycle Stanza Windows, Mac OS X, iPhone
Mobipocket Windows, BlackBerry, Symbian, Windows Mobile
Okular Linux, Windows, Maemo, Mac OS X
Openberg Lector
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

Hardware

See also

References

  1. ^ a b c d e Conboy, Garth (2009-05-11). EPUB 101. Slide presentation in PDF format. eBook Technologies, 11 May 2009. Retrieved from http://www.idpf.org/digitalbook09/Presentations/EPUB%20101.pdf.
  2. ^ IDPF (2007-10-15). OPS 2.0 Elevated to Official IDPF Standard. Forum. Posted Mon Oct 15, 2007 by IDPF. Retrieved from http://www.idpf.org/forums/viewtopic.php?t=98.
  3. ^ IDPF Launches EPUB Standards Maintenance Work. Webpage. August 12, 2009.
  4. ^ Charter for EPUB Standards Maintenance WG. Webpage. August 12, 2009.
  5. ^ a b c d e f Open Publication Structure (OPS) 2.0 - Recommended Specification. Website. September 11, 2007 by IDPF.
  6. ^ a b c d e f g h Open Packaging Format (OPF) 2.0 - Recommended Specification. Website. September 11, 2007 by IDPF.
  7. ^ a b c d e OEBPS Container Format (OCF) 1.0 - Recommended Specification. Website. September 11, 2006 by IDPF.
  8. ^ a b Specifications for the Digital Talking Book. Website. April 21, 2005.
  9. ^ IDPF's Digital Book Standards FAQs. Forum. Posted Nov 20, 2006 by IDPF.
  10. ^ epubcheck homepage. Website.
  11. ^ The ePub torture test: Starring ‘Three Shadows,’ a graphic novel. Blog. Posted July 27, 2008 by David Rothman
  12. ^ Adobe-DRMed ePub isn’t ‘open’: Why the New York Times urgently needs to clarify its Sony eBook Store article. Blog. Posted August 13, 2009 by David Rothman.
  13. ^ Does the Nook use its own incompatible DRM scheme?. Blog. Posted December 21, 2009 by Paul Biba.
  14. ^ iPad adds to the DRM mess? Apple ebook DRM exclusive to Apple hardware. Blog. Posted January 28, 2010 by Paul Biba.
  15. ^ Who Really Needs an iPad?. Blog. Posted January 28, 2010 by James Kendrick.
  16. ^ EPUB, iPad and Content Interoperability. Blog. Posted January 27, 2010 by Dave Dickson.
  17. ^ Links, pointers, bookmarks, highlights: How should .epub do it?. Blog. Posted March 29, 2008 by BookGlutton
  18. ^ 'Social annotation and the marketplace of ideas': Time for an IDPF annotation standard for books and other e-pubs!. Blog. Posted November 5, 2007 by David Rothman
  19. ^ About that ePub logo, Mike: A friendly jog for the IDPF. Blog. Posted November 23, 2009 by David Rothman.