You are previewing EPUB 3 Best Practices.
O'Reilly logo
EPUB 3 Best Practices

Book Description

Ready to take your ebooks to the next level with EPUB 3? This concise guide includes best practices and advice to help you navigate the format’s wide range of technologies and functionality. EPUB 3 is set to turn electronic publishing on its head with rich multimedia reading experiences and scripted interactivity, but this specification can be daunting to learn. This book provides you with a solid foundation.

Table of Contents

  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
        1. Navigation Labels
      2. Table of Contents
        1. Hiding Content
      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
        1. EPUB Canonical Fragment Identifiers
      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
        1. Media Queries
        2. Namespaces
        3. Fonts
        4. Multicolumn Layout
        5. Writing Modes, Text, and Speech
        6. Additional Support
      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
        1. Historically, reading system support for font embedding has been poor and inconsistent
        2. Embedding adds complexity
        3. Device makers have already done the work for you
        4. Embedding inflates file size
      2. Maybe You Should
        1. Embedding to be forward-thinking
        2. Embedding to create a consistent look and feel across “platforms”
        3. Embedding for improved glyph coverage
        4. Embedding for specialized or technical reasons
    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
        1. Size matters
        2. Optimizing Playback
        3. Preloading
        4. Another Option
      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
        1. Detect features
        2. Use preventDefault to avoid reading system default behavior
        3. Always query epubReadingSystem!
      3. Inclusion Models
        1. Container-constrained scripts
        2. Spine-level scripting
      4. Ebook State and Storage
      5. Identifying Scripted Content Documents
        1. Creating fallbacks
    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
        1. Deficiencies
        2. Contrast
        3. Luminosity
      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
        1. Custom controls
        2. Forms
        3. Live regions
      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
        1. Validating EPUB archives
        2. Validating unpacked EPUBs
        3. Validating EPUB component files
        4. Assessment reports
        5. Help
      4. Reading Errors
    2. Beyond the Command Line
      1. Web Validation
      2. Graphical Interface
      3. Commercial Options
    3. Understanding Errors
      1. Common XML Errors
        1. Document errors
        2. Element errors
        3. Attribute errors
        4. Character encoding
        5. Linking errors
      2. Container Errors
      3. Package Validation
      4. Content Validation
        1. Entity errors
    4. Style
    5. Scripting
    6. Accessibility
  15. Colophon
  16. Index
  17. Copyright