首页 What Is EPUB3

What Is EPUB3

举报
开通vip

What Is EPUB3 Matt Garrish What Is EPUB3? www.newgen.co To experience Silk contact sales@newgen.co speed accuracy automation from fixed format to fluid format from PDF to EPUB bridging the gap... What Is EPUB 3? Matt Garrish Beijing • Cambridge • Farnham ...

What Is EPUB3
Matt Garrish What Is EPUB3? www.newgen.co To experience Silk contact sales@newgen.co speed accuracy automation from fixed format to fluid format from PDF to EPUB bridging the gap... What Is EPUB 3? Matt Garrish Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo What Is EPUB 3? by Matt Garrish Copyright © 2011 O’Reilly Media. All rights reserved. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com. Editor: Kathleen Meyer Production Editor: Teresa Elsey Cover Designer: Karen Montgomery Interior Designer: David Futato Revision History for the First Edition: 2011-09-27 First release See http://oreilly.com/catalog/errata.csp?isbn=9781449314545 for release details. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. What Is EPUB 3?, the image of a Thick-Knee, and related trade dress are trademarks of O’Reilly Media, Inc. This book was published in collaboration with the International Digital Publishing Forum (IDPF), the global trade and standards organization for electronic publishing that is responsible for development of the EPUB format. EPUB is a registered trademark of the IDPF. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein. ISBN: 978-1-449-31454-5 1317063966 Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v What Is EPUB 3? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 EPUB 3 in a Nutshell 1 The EPUB 3 Revision 5 EPUB and Web Standards 7 The Goodies 9 Multimedia 9 Media Overlays 11 Scripting 11 Graphic Content 13 Globalization 13 Accessibility 14 Experimenting 15 The Arrival 15 iii Preface Publishing has always been driven by content and the ephemeral “reading experience.” Until recently, the industry has struggled to adapt this experience to the demands of consumers used to getting what they want, when they want, and how they want in the now decade-old digital millennium. A new breed of reading devices has improved the physical experience, and now the new EPUB 3 format is poised to lead a content rev- olution that will transform the reading experience beyond two dimensions. What Is EPUB 3? discusses this exciting new format, which is set to unleash a content revolution in the publishing world, both for people who are curious what the hype is about and for pros looking to learn more about the new format. Laden with features the printed page could never offer—such as embedded multimedia and scripted inter- activity—EPUB 3 will forever change what a book can be. This article walks you through the format and its place in the digital landscape, explaining why EPUB 3 is set to become the new global standard for ebooks as it also becomes the new accessible standard for ebooks. Attribution and Permissions This article is here to help you get your job done. If you reference limited parts of it in your work or writings, we appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN: “What Is EPUB 3? by Matt Garrish (O’Reilly). Copyright 2011 O’Reilly Media, 978-1-449-31454-5.” If you feel your use of examples or quotations from this book falls outside fair use or the permission given above, feel free to contact us at permissions@oreilly.com. Safari® Books Online Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly. v With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, down- load chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features. O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other pub- lishers, sign up for free at http://my.safaribooksonline.com. How to Contact Us Please address comments and questions concerning this book to the publisher: O’Reilly Media, Inc. 1005 Gravenstein Highway North Sebastopol, CA 95472 800-998-9938 (in the United States or Canada) 707-829-0515 (international or local) 707-829-0104 (fax) We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at: http://shop.oreilly.com/product/0636920022442.do To comment or ask technical questions about this book, send email to: bookquestions@oreilly.com For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com. Find us on Facebook: http://facebook.com/oreilly Follow us on Twitter: http://twitter.com/oreillymedia Watch us on YouTube: http://www.youtube.com/oreillymedia vi | Preface What Is EPUB 3? EPUB 3 in a Nutshell So what exactly is an EPUB? If you follow electronic publishing at all, you’ve undoubt- edly run into the term, but you may have seen or heard it incorrectly being used as a synonym for “ebook”—as a shorthand for talking about electronic books. Although the two terms share a common relation in electronic book production, they aren’t inter- changeable. EPUB, as we’re here to discover, is a format for representing documents in electronic form. “Ebook,” on the other hand, is just an abstract term used to en- compass any electronic representation of a book, and includes formats such as PDF, HTML, ASCII text, Word, and a host of others, in addition to EPUB. Like “ebook,” the EPUB name comes from a contraction of terms—in this case, Electronic PUBlication. The choice of the more general term “publication” was delib- erate, and it was selected specifically so that expectations of the format wouldn’t be pigeonholed into a single document type. EPUB may garner much of its notoriety from its prominence in the ebook world, but don’t think that the format won’t be a good fit for your needs just because you’re not planning to publish novels. EPUB was always intended to be a general-purpose document format, and it can be used to represent many kinds of publications other than just books: from magazines to newspapers to journals and on through office documents and policies and beyond. Just about any document type you want to distribute electronically can be represented as an EPUB. On a practical level, EPUB defines both the format for your content and how reading systems go about discovering it and rendering it to readers (we’ll avoid the word “dis- play” for what a reading system does with content, as EPUBs aren’t only for the sighted and don’t only contain visual content). But perhaps the best way to understand what goes into an EPUB is to quickly break down the creation process: 1. The first step in making an EPUB is to create your content document(s). These must be either XHTML5 documents, SVG images, or a mixture of the two (we’ll skip how to use nonstandard formats for now). If you’ve created web pages before, 1 marking up your EPUB content will be a breeze. And if not, there are many so- phisticated layout programs that can make the process no more painful than for- matting a Word document. (Some of these programs can even do the entire EPUB creation process.) Note, however, that your content document will typically ref- erence many other types of resources required for its proper rendering—CSS style- sheets, images, multimedia clips, script files, and so on—all of which you will need to keep together to bundle up into the finished distribution file later. 2. Once you’ve crafted your content, the next step is to create the package docu- ment, a special document used by reading systems to glean information about your publication—for ordering in your bookshelf, to render the content, and the like. The first step in creating this file is to list all of the resources you assembled in the content creation step in the manifest section of the package document (most of these resources will be in the EPUB file, but some, such as audio and video, can live on the Web). Reading systems need this list to determine whether a publication is complete or not and to discover which remote files will have to be retrieved. All your publication metadata (title, author, etc.) also goes in this file, consolidating it in a single, common location so that it can be easily extracted and used in dis- tribution channels and by reading systems. You also have to include the default reading order in the spine section—a sequential list of your content files, from the first one to display to the last. And finally, the package document identifies which of the resources represents the navigation document (the table of contents). 3. The last step is to zip up your content documents, associated resources, and the package document into a single file with the .epub extension for distribution. This process isn’t quite as simple as a standard zipping, however: a special mimetype file has to be added first to indicate that your zip file contains an EPUB and not something else, and a file called container.xml has to go in a directory named META-INF to tell reading systems where to find your package document. But that’s really all there is to an EPUB file under the hood. There are many details intentionally glossed over here for the sake of simplicity, but if you feel comfortable with the concept of an EPUB as a predictable, discoverable container of your content, you’re well on your way to understanding the power of EPUB. And if you read the list above in reverse, you can understand how reading systems work: they examine your zip container, determine it’s an EPUB, find the package document, and from there discover how to render the resources to readers. What this quick overview of the content file should also show is that the EPUB format unabashedly draws many of its capabilities and its versatility from web technologies, but also that the Web alone doesn’t tell the whole story of EPUB. Without the com- plementary technologies the EPUB format brings under its common umbrella, the abil- ity to create distributable publications would be severely limited. Some of the technologies used in EPUBs have been specially developed by the Inter- national Digital Publishing Forum (IDPF; http://idpf.org)—the organization that 2 | What Is EPUB 3? maintains the EPUB suite of specifications (see “The EPUB 3.0 Specifica- tions” on page 4), and whose membership includes publishers, distributors, and reading system developers of all sizes. But most of the standards that have been lever- aged are internationally recognized and should at least sound familiar to most readers. The key technologies you’ll find in EPUB 3 publications include: XHTML5 For representing text and multimedia content, which now includes native support for MathML equations, ruby pronunciation markup, and embedded SVG images SVG 1.1 For representing graphical works (for example, manga and comics) CSS 2.1 and 3 To facilitate visual display and rendering of content JavaScript For interactivity and automation TrueType and WOFF To provide font support beyond the minimal base set that reading systems typically have available SSML/PLS/CSS 3 Speech For improved text-to-speech rendering SMIL 3 For synchronizing text and audio playback RDF vocabularies For embedding semantic information about the publication and content XML A number of specialized grammars facilitate the discovery and processing aspects of EPUBs ZIP To wrap all the resources up into a single file This list contains many new additions and upgrades from what you’ll find in the EPUB 2 publications on the market right now. EPUB 2 had support for XHTML 1.1, CSS 2, and the XML and ZIP standards, but lacked the ability to use the rest of the technologies listed (as we’ll come back to again). The last thing the publishing world needs is more proprietary standards, and EPUB has wisely avoided the proverbial re- inventing of the wheel by adopting the best existing technologies, a design approach it has maintained from version to version. A great benefit of EPUB (especially for those new to electronic publishing) is that it’s not a whole new beast that you have to learn from the ground up before you can hope to do anything interesting. Almost all of the technologies it uses are common web and XML standards, not obscurities from the fringes of the spectrum. If you’re already familiar with these technologies, jumping into the core of EPUB is a simple task. And EPUB 3 in a Nutshell | 3 even if you’re only aware of these technologies at a higher level, you’re still well on your way to understanding the format. (And if they seem foreign and scary, don’t worry; we’ll be elaborating on their uses as we work through all EPUB 3 has to offer.) In this day and age, the Web skills needed to create basic EPUB content (XHTML and CSS) are not only ubiquitous but also a daily part of most people’s digital lives. So if you’re only interested in how to publish documents and not in all the details under the hood, you’re no more excluded from digital publishing than you are from Web pub- lishing. Add all the authoring tools at your disposal, and you don’t have to be a pro- gramming geek to create top-flight EPUB content. The EPUB format is also specifically designed to be free and open for anyone to use without having to sift through a litany of patent encumbrances and restrictions; it just doesn’t make sense for an organization that promotes the global electronic publishing trade to tie its technology up and limit its usability, after all. EPUB’s widespread adop- tion is also due in no small part to the fact that basic text editing tools can be used to create publications, and the EPUB 3 revision of the specification has not deviated from this core tenet. And there you have EPUB in all its minimal glory. But, of course, minimal EPUB 3 barely scratches the surface of the format. The EPUB 3.0 Specifications Although EPUB 3 aggregates a number of technologies, an EPUB is not just a loose collection of these technologies. The term “EPUB 3” actually encompasses four sepa- rate specification documents, each of which details an aspect of how the employed technologies interact. This allows anyone to author an EPUB without struggling through all the related specifications and allows the development of reading systems that can predictably process them. Another way to think of EPUB 3 is as the glue that binds these technologies into a usable reading experience. The number and size of the specification documents is often intimidating to novices to electronic publishing, but once you understand which aspect of the content creation and rendering process each handles, they’re not very difficult reads. They break down as follows: EPUB Publications 3.0 The Publications specification defines the XML format used in the package docu- ment to store information about a publication. As noted earlier, the package docu- ment contains metadata about the publication (such as the title, author, and language), lists all the resources used, defines the default reading order, and indi- cates where to find the navigation document. The Publications specification also defines general content requirements that all EPUBs must adhere to, such as required content types and when and how to pro- vide fallbacks for content that isn’t guaranteed to render on all devices. 4 | What Is EPUB 3? EPUB Content Documents 3.0 The Content Documents specification defines profiles of XHTML5, SVG 1.1, and CSS 2.1 and 3 for use in authoring content. A profile can perhaps best be described as a snapshot of the specific functionality that you are allowed to use (that is, you may not get to use everything defined in those specifications just because it exists). If you skip or skim this specification, not only might you wind up using illegal elements, styles, and features, but you also might miss the additions that EPUB makes to improve the reading experience. The Content Documents specification also defines the format of the special navi- gation document. This document contains the table of contents for a publication, but it may also include other navigational aids, from tables of figures and illustra- tions to specialized tours of content. EPUB Media Overlays 3.0 For those already familiar with EPUB 2, the Media Overlays specification is the new kid on the specification block. The ability to include audio content in EPUB 3 does not limit you just to embedding audio clips in your documents. Media Overlays take advantage of the SMIL specification to enable the text content ren- dered in the reading system’s display area to be synchronized with audio narration, so that, for example, words can be highlighted as they are narrated. EPUB Open Container Format (OCF) 3.0 And, finally, the Container specification defines how you bundle all your resources together into a single file. As we noted above, creating an EPUB file is more complex than just a simple instruction to zip up content, and this specification defines the discovery aspects discussed previously. The EPUB 3 Revision So now that we know what an EPUB is, it’s time to look at what drove the need for a new revision. If evolution is the cornerstone of life, that’s certainly no less true in the electronic world. If you can’t adapt—or fail to adapt in time—you’re destined to join the ranks of the Netscape Navigators, OS/2 operating systems, and WordPerfect office suites of the world, as a warning to future technology developers that nothing lasts forever, and never in its original form. In this light, EPUB 3 is more than just bug fixes and tweaks from the last version; it represents a major change in what an ebook can be. It’s a whole new beast, you might say. The ebook market has been going through its own kind of hyper-evolution in the mere four years since EPUB 2 was released, and a flurry of new devices and document formats have come and gone in that time. E Ink technology was all the rage in 2007 when Adobe, Amazon, Sony, and others were entering the market, however, and EPUB 2 arrived to meet the new needs of these portable reading devices, with improved presentation capabilities, better navigation, support for DAISY accessibility features, and some advances in global language support. But EPUB 2, like its predecessor and The EPUB 3 Revision | 5 contemporaries, remained a static format, in that its core only allowed for the reading of basic text and image documents. EPUB 2 was an advance, and for a time it served the needs of the market well. It might even have had a longer run had dedicated E Ink devices remained the predominant choice for reading. But just as readers were abandoning their paper books, tablet com- puters c
本文档为【What Is EPUB3】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_358097
暂无简介~
格式:pdf
大小:928KB
软件:PDF阅读器
页数:26
分类:互联网
上传时间:2013-12-30
浏览量:45