Table of Contents
Acknowledgments xiii
Introduction xv
1 EPUB Defined 1
EPUB Version2 (EPUB 2) 2
Open Container Format 3
Key Word Usage 4
Open Packaging Format (OPF) 11
Open Publication Structure (OPS) 11
What About the Kindle? 11
What Is SVG? 12
What Is Namespace-based Validation Dispatching Language (NVDL)? 14
What Is DAISY or DTBook? 14
What Is an EPUB? 17
Preparing to View the Contents of an EPUB File 17
Viewing the Contents of an EPUB File 20
XML Basics 21
2 HTML 27
XHTML 28
What Is XHTML? 28
What's the Difference Between HTML and XHTML? 29
OPS XHTML Types 30
Structure 30
Text 39
Hypertext 45
List 48
Object 49
Presentation 52
Edit 54
Bidirectional Text 55
Table 56
Image 61
Client-Side Image Map 62
Meta Information 65
Style Sheet 66
Link 66
Base 67
Practice 68
3 CSS 69
What Are Cascading Style Sheets (CSS)? 70
Selectors 71
Declarations 73
What Are the Four Ways to Specify Size? 75
How Do I Test font-size-adjust? 77
What Are the Various Length Measurements? 79
What Is Inheritance? 82
What Is the Difference Between Inline and Block? 88
Special Selectors 105
Practice 111
4 Fonts, Images, and Colors 113
Fonts 114
Embedding Fonts 115
How Does the Directory Structure Work? 116
What If My TTF File Doesn't Work? 118
Shouldn't All EPUB Systems Support Embedded Fonts? 119
Images 120
Embedding Images 120
How Do I Get Dimensions of an SVG Image? 121
What About CSS Order of Precedence? 122
EPUB Note 123
Colors 126
Displaying Colors 126
Grayscale 127
5 Navigation Center extended (NCX) and Open Packaging Format (OPF) 129
NCX Introduction 130
Header 130
<ncx> 131
<head> 131
<doctitle> 132
<navMap> 132
How Do I Know If the NCX Is Valid? 134
OPF Introduction 134
Header 135
<package> 135
<metadata> 135
<manifest> 136
<spine> 137
<guide> 139
6 Converting EPUB Files 141
Getting Ready to Convert 142
Converting to EPUB 144
Converting from EPUB 148
Practice, Practice, Practice 154
7 EPUB Security 155
Introduction to EPUB Security 156
Public Key Infrastructure and RSA 157
Online Libraries 157
Advanced Encryption Standard 158
EPUB Security Files 158
rights.xml 159
encryption.xml 161
Font Mangling 163
Signing an EPUB 164
Secure Hash Algorithm 164
signatures.xml 164
Validation 167
8 EPUB 3 169
Differences Between EPUB 2 and EPUB 3 170
New Navigation File 171
Viewing EPUB 3 Files 171
Cover Image 172
MathML 173
Fixed Layouts 174
Embedding Audio and Video 177
Synchronized Multimedia Integration Language 183
Creating Narrative Files Without a Microphone 183
Text to Speech 193
Flash Animation 193
9 JavaScript 195
Getting Ready 196
Setting Up a Spot for JavaScript 198
JavaScript Programming 200
Variables 200
What Is document.write? 202
Math Operators 203
Assignment Operators 204
Arrays 205
Multidimensional Arrays 207
Associative Arrays 208
Functions 208
What About Forms? 209
What Is the Alert? 211
Objects 213
Conditions 214
Loops 219
Events 220
Example Functions 222
Index 227