You are previewing EPUB 3 Best Practices.

EPUB 3 Best Practices

Cover of EPUB 3 Best Practices by Matt Garrish... Published by O'Reilly Media, Inc.
  1. EPUB 3 Best Practices
  2. Preface
    1. The Future
    2. How to Use This Book
    3. Conventions Used in This Book
    4. Using Code Examples
    5. Credits
    6. Acknowledgments
    7. Safari® Books Online
    8. How to Contact Us
  3. Introduction
  4. 1. Package Document and Metadata
    1. Vocabularies
      1. The Default Vocabulary
      2. The Reserved Vocabularies
      3. Using Other Vocabularies
      4. The All-Powerful meta Element
    2. Publication Metadata
      1. The Package Document Structure
      2. The metadata Element
    3. Identifiers
    4. Types of Titles
    5. The Manifest and Spine
      1. The manifest and Fallbacks
      2. The spine
    6. Document Metadata
    7. Links and Bindings
    8. Metadata for Fixed Layout Publications
    9. The Container
  5. 2. Navigation
    1. The EPUB Navigation Document
    2. Building a Navigation Document
      1. Repeated Patterns
      2. Table of Contents
      3. Landmarks
      4. Page List
      5. Extensibility
    3. Adding the Navigation Document
      1. Embedding as Content
      2. Hiding Lists
      3. Styling Lists
    4. The NCX
  6. 3. Content Documents
    1. Terminology Refresher
    2. XHTML
      1. New in HTML5
      2. EPUB Support Gotchas
      3. DTDs Are Dead
      4. Linking and Referencing
      5. Content Chunking
    3. epub:type and Structural Semantics
      1. Adding Semantics
      2. Multiple Semantics
    4. MathML
    5. SVG
    6. Fixed Layouts
    7. Covers
    8. Styling
      1. EPUB CSS Profile
      2. CSS 2.1
      3. CSS3
      4. Ruby
      5. Headers and Footers
      6. Alt Style Tags
      7. CSS Resets
    9. Fallback Content
      1. Manifest Fallbacks
      2. Content Fallbacks
      3. The epub:switch element
      4. Bindings
  7. 4. Font Embedding and Licensing
    1. Why Embed Fonts?
      1. Maybe You Shouldn’t
      2. Maybe You Should
    2. Font Embedding in EPUB 3
    3. How to Embed Fonts
      1. Add the Font to Your EPUB Package
      2. Include the File in the EPUB Manifest
      3. Reference the Font in the EPUB CSS
      4. Obfuscating Fonts
      5. Subsetting a Font
    4. Licensing Fonts for Embedding in EPUB
      1. Use an Open Font
      2. Contact the Foundry Directly
  8. 5. Multimedia
    1. The Codec Issue
    2. The Media Elements
      1. Sources
      2. Control
      3. Posters
      4. Dimensions
      5. The Rest
      6. Timed Tracks
      7. Fallbacks
      8. Alternate Content
    3. Triggers
  9. 6. Media Overlays
    1. The EPUB Spectrum
    2. Overlays in a Nutshell
    3. Synchronization Granularity
    4. Constructing an Overlay
      1. Sequences
      2. Parallel Playback
      3. Adding to the Container
      4. Styling the Active Element
      5. Structural Considerations
    5. Advanced Synchronization
    6. Audio Considerations
  10. 7. Interactivity
    1. First Principles: Interaction Scope and Design
      1. Progressive Enhancement
    2. Procedural Interaction: JavaScript
      1. JavaScript in EPUB 2
      2. The EPUB 3 epubReadingSystem Object
      3. Inclusion Models
      4. Ebook State and Storage
      5. Identifying Scripted Content Documents
    3. Animation and Graphics: Canvas
      1. Best Practices in Canvas Usage
      2. Canvas in a Nonscripted Reading System
    4. Object
    5. Other Graphical Interaction Models
    6. Accessibility and Scripting Summary
  11. 8. Global Language Support
    1. Characters and Encodings
      1. Unicode
      2. Declaring Encodings
      3. Private Characters
      4. Names
    2. Specifying the Natural Language
    3. Vertical Writing
      1. Writing Modes
    4. Page Progression Direction
      1. Global Direction
      2. Content Direction
    5. Ruby and Emphasis Dots
      1. Ruby
      2. Emphasis Dots
    6. Line Breaks, Word Breaks, and Hyphenation
    7. Itemized Lists
  12. 9. Accessibility
    1. Accessibility and Usability
    2. Fundamentals of Accessibility
      1. Structure and Semantics
      2. Data Integrity
      3. Separation of Style
      4. Semantic Inflection
      5. Language
      6. Logical Reading Order
      7. Sections and Headings
      8. Context Changes
      9. Lists
      10. Tables
      11. Figures
      12. Images
      13. SVG
      14. MathML
      15. Footnotes
      16. Page Numbering
    3. Styling
      1. Avoiding Conflicts
      2. Color
      3. Hiding Content
      4. Emphasis
    4. Fixed Layouts
      1. Image Layouts
      2. Mixed Layouts
      3. Text Layouts
      4. Interactive Layouts
    5. Scripted Interactivity
      1. Progressive Enhancement
      2. WAI-ARIA
      3. Canvas
    6. Metadata
  13. 10. Text-to-Speech (TTS)
    1. PLS Lexicons
    2. SSML
    3. CSS3 Speech
  14. 11. Validation
    1. epubcheck
      1. Installing
      2. Running
      3. Options
      4. Reading Errors
    2. Beyond the Command Line
      1. Web Validation
      2. Graphical Interface
      3. Commercial Options
    3. Understanding Errors
      1. Common XML Errors
      2. Container Errors
      3. Package Validation
      4. Content Validation
    4. Style
    5. Scripting
    6. Accessibility
  15. Colophon
  16. Index
  17. Copyright
O'Reilly logo

Chapter 7. Interactivity

Liza Daly

Vice-President of Engineering, Safari Books Online

Why would you want a book to be interactive?

For many readers, a book’s immutability is a feature rather than a bug. A print book does not demand anything from the user but their full attention. It does not entice the reader to click, to comment, to share, or to tweet. It promises total immersion in the text, a direct conduit to the author’s thoughts.

Yet there are many cases where the static nature of the traditional book is perhaps an artifact of print technology rather than the canonical best form for the content. Books that aim to teach complex, real-world subjects could benefit from the opportunity for readers to engage with the material. New forms of storytelling can encourage readers to choose new paths, or let the reader dig deeply into the narrative, uncovering hidden motivations through careful discovery. Books packaged with their primary source material could be rich scholarly resources, allowing researchers to independently verify assertions or build follow-on experiments out of raw data. Far from being a de facto distraction, interactive publications have only begun to be explored.

EPUB 3 provides the capability to do all of the above, but author beware: interactivity remains at the vanguard of ebook support. The more the publication deviates from a traditional book, the less likely it is to be fully crossplatform. Many EPUB 3 reading systems will never support interactivity, and the standard ...

The best content for your career. Discover unlimited learning on demand for around $1/day.