-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1422 lines (992 loc) · 41.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>EPUB Zero</title>
<style>
@media print {
html { margin: 0 !important; }
body { font-family: serif; }
th, td { font-family: inherit; }
a { color: inherit !important; }
.example:before { font-family: serif !important; }
a:link, a:visited { text-decoration: none !important; }
a:link:after, a:visited:after { /* create a cross-ref "see..." */; }
}
@page {
margin: 1.5cm 1.1cm;
}
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
figure, div.figure, div.sidefigure, pre, table.propdef, table.propdef-extra,
.example { page-break-inside: avoid; }
dt { page-break-after: avoid; }
body {
background: white;
/* background-image: floating-margin-image-goes-here; */
background-position: top left;
background-attachment: fixed;
background-repeat: no-repeat;
color: black;
counter-reset: exampleno figure issue;
font-family: sans-serif;
line-height: 1.5;
margin: 0 auto;
max-width: 50em;
padding: 2em 1em 2em 70px;
}
/* General structural markup */
h1, h2, h3, h4, h5, h6 { text-align: left; }
h1, h2, h3 { color: #005A9C; }
h1 { font: 170% sans-serif; }
h2 { font: 140% sans-serif; }
h3 { font: 120% sans-serif; }
h4 { font: bold 100% sans-serif; }
h5 { font: italic 100% sans-serif; }
h6 { font: small-caps 100% sans-serif; }
h2, h3, h4, h5, h6 { margin-top: 3em; }
h1 + h2 { margin-top: 0em; }
h2 + h3, h3 + h4, h4 + h5, h5 + h6 { margin-top: 1.2em; }
.head { margin-bottom: 1em; }
.head h1 { margin-top: 2em; clear: both; }
.head table { margin-left: 2em; margin-top: 2em; }
.head dd { margin-bottom: 0; }
p.copyright { font-size: small; }
p.copyright small { font-size: small; }
pre { margin: 1em 0 1em 2em; overflow: auto; }
pre, code, .idl-code {
font-size: .9em;
font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
}
pre .idl-code, pre code { font-size: 1em; }
dt dfn code { font-size: inherit; }
dfn { font-weight: bolder; }
dfn var { font-style: normal; }
s, del {text-decoration: line-through; color: red; }
u, ins {text-decoration: underline; background: #bfa; }
sup {
vertical-align: super;
font-size: 80%
}
details { display: block; }
dt { font-weight: bold; }
dd { margin: 0 0 1em 2em; }
ul, ol { margin-left: 0; padding-left: 2em; }
li { margin: 0.25em 2em 0.5em 0; padding-left: 0; }
[data-md] > :first-child { margin-top: 0; }
[data-md] > :last-child { margin-bottom: 0; }
td.pre {
white-space: pre-wrap;
}
.css, .property { color: #005a9c; }
.property { white-space: nowrap; }
/* Boilerplate sections */
ul.indexlist { margin-left: 0; columns: 13em; }
ul.indexlist li { margin-left: 0; list-style: none }
ul.indexlist li li { margin-left: 1em; }
ul.indexlist a { font-weight: bold; }
ul.indexlist ul, ul.indexlist dl { font-size: smaller; }
ul.indexlist dl { margin-top: 0; }
ul.indexlist dt { margin: .2em 0 .2em 20px; }
ul.indexlist dd { margin: .2em 0 .2em 40px; }
.toc {
font-weight: bold;
line-height: 1.3;
list-style: none;
margin: 1em 0 0 5em;
padding: 0;
}
.toc ul { margin: 0; padding: 0; font-weight: normal; }
.toc ul ul { margin: 0 0 0 2em; font-style: italic; }
.toc ul ul ul { margin: 0}
.toc > li { margin: 1.5em 0; padding: 0; }
.toc li { clear: both; }
.toc ul.toc li { margin: 0.3em 0 0 0; }
.toc a { border-bottom-style: none; }
.toc a:hover, ul.toc a:focus { border-bottom-style: solid; }
/* Section numbers in a column of their own */
.toc span.secno {float: left; width: 4em; margin-left: -5em}
.toc ul ul span.secno { margin-left: -7em; }
table.proptable {
font-size: small;
border-collapse: collapse;
border-spacing: 0;
text-align: left;
margin: 1em 0;
}
table.proptable td, table.proptable th {
padding: 0.4em;
text-align: center;
}
table.proptable tr:hover td { background: #DEF; }
/* Links */
a[href] { color: inherit; border-bottom: 1px solid silver; text-decoration: none; }
a[href]:hover { background: #ffa; }
a[href]:active { color: #C00; background: transparent; }
img, a.logo { border-style: none; }
.heading, .issue, .note, .example, li, dt { position: relative; }
/* CSS-ish link types */
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {content: "“";}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {content: "”";}
[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after { content: ""; }
/* Element-type link styling */
[data-link-type=element] { font-family: monospace; }
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after { content: ">" }
/* Self-links */
a.self-link {
position: absolute;
top: 0;
left: -2.5em;
width: 2em;
height: 2em;
text-align: center;
border: none;
transition: opacity .2s;
opacity: .5;
}
a.self-link:hover {
opacity: 1;
}
.heading > a.self-link {
font-size: 83%;
}
li > a.self-link {
left: -3.5em;
}
dfn > a.self-link {
top: auto;
left: auto;
opacity: 0;
width: 1.5em;
height: 1.5em;
background: gray;
color: white;
font-style: normal;
transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
opacity: 1;
}
dfn > a.self-link:hover {
color: black;
}
a.self-link::before { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before { content: "#"; }
/* Figures */
figure {
display: block;
text-align: center;
margin: 2.5em 0;
}
figure.sidefigure {
float: right;
width: 50%;
margin: 0 0 0.5em 0.5em
}
figure pre {
text-align: left;
display: table;
margin: 1em auto;
}
figure table {
margin: auto;
}
figure img, figure object {
display: block;
margin: auto;
max-width: 100%
}
figcaption {
counter-increment: figure;
font-size: 90%;
font-style: italic;
text-align: center;
}
figcaption::before {
content: "Figure " counter(figure) ". ";
font-weight: bold;
}
dd figure { margin-left: -2em; }
/* Definition tables */
table.definition {
border-spacing: 0;
padding: 0 1em 0.5em;
width: 100%;
table-layout: fixed;
margin: 1.2em 0;
}
table.definition td, table.definition th {
padding: 0.5em;
vertical-align: baseline;
border-bottom: 1px solid #bbd7e9;
}
table.definition th:first-child {
font-style: italic;
font-weight: normal;
text-align: left;
width: 8.3em;
padding-left: 1em;
}
table.definition > tbody > tr:last-child > th,
table.definition > tbody > tr:last-child > td {
border-bottom: none;
}
table.definition tr:first-child > th,
table.definition tr:first-child > td {
padding-top: 1em;
}
/* Footnotes at the bottom of a definition table */
table.definition td.footnote {
font-style: normal;
padding-top: .6em;
width: auto;
}
table.definition td.footnote::before {
content: " ";
display: block;
height: 0.6em;
width: 4em;
border-top: thin solid;
}
/* IDL fragments */
pre.idl {
padding: .5em 1em;
margin: 1.2em 0;
}
pre.idl :link, pre.idl :visited {
color:inherit;
background:transparent;
}
/* Data tables */
/* Comes in plain, long, complex, or define varieties */
.data {
margin: 1em auto;
border-collapse: collapse;
width: 100%;
border: hidden;
}
.data {
text-align: center;
width: auto;
}
.data caption {
width: 100%;
}
.data td, .data th {
padding: 0.5em;
border-width: 1px;
border-color: silver;
border-top-style: solid;
}
.data thead td:empty {
padding: 0;
border: 0;
}
.data thead th[scope="row"] {
text-align: right;
color: inherit;
}
.data thead,
.data tbody {
color: inherit;
border-bottom: 2px solid;
}
.data colgroup {
border-left: 2px solid;
}
.data tbody th:first-child,
.data tbody td[scope="row"]:first-child {
text-align: right;
color: inherit;
border-right: 2px solid;
border-top: 1px solid silver;
padding-right: 1em;
}
.data.define td:last-child {
text-align: left;
}
.data tbody th[rowspan],
.data tbody td[rowspan] {
border-left: 1px solid silver;
}
.data tbody th[rowspan]:first-child,
.data tbody td[rowspan]:first-child {
border-left: 0;
border-right: 1px solid silver;
}
.data.complex th,
.data.complex td {
border: 1px solid silver;
}
.data td.long {
vertical-align: baseline;
text-align: left;
}
.data img {
vertical-align: middle;
}
/* Switch/case <dl>s */
dl.switch {
padding-left: 2em;
}
dl.switch > dt {
text-indent: -1.5em;
}
dl.switch > dt:before {
content: '↪';
padding: 0 0.5em 0 0;
display: inline-block;
width: 1em;
text-align: right;
line-height: 0.5em;
}
/* Style for At Risk features (intended as editorial aid, not intended for publishing) */
.atrisk::before {
position: absolute;
margin-left: -5em;
margin-top: -2px;
padding: 4px;
border: 1px solid;
content: 'At risk';
font-size: small;
background-color: white;
color: gray;
border-radius: 1em;
text-align: center;
}
/* Obsoletion notice */
details.annoying-warning[open] {
background: #fdd;
color: red;
font-weight: bold;
text-align: center;
padding: .5em;
border: thick solid red;
border-radius: 1em;
position: fixed;
left: 1em;
right: 1em;
bottom: 1em;
z-index: 1000;
}
details.annoying-warning:not([open]) > summary {
background: #fdd;
color: red;
font-weight: bold;
text-align: center;
padding: .5em;
}
/* Examples */
.example {
counter-increment: exampleno;
}
.example::before {
content: "Example";
content: "Example " counter(exampleno);
min-width: 7.5em;
text-transform: uppercase;
display: block;
}
.illegal-example::before {
content: "Invalid Example";
content: "Invalid Example" counter(exampleno);
}
.example, .illegal-example, .html, .illegal-html, .xml, .illegal-xml {
padding: 0.5em;
margin: 1em 0;
position: relative;
clear: both;
}
pre.example, pre.illegal-example, pre.html,
pre.illegal-html, pre.xml, pre.illegal-xml {
padding-top: 1.5em;
}
.illegal-example { color: red; }
.illegal-example p { color: black; }
.html { color: #600; }
.illegal-html { color: red; }
.illegal-html p { color: black; }
.xml { color: #600; }
.illegal-xml { color: red; }
.illegal-xml p { color: black; }
code.css { font-family: inherit; font-size: 100% }
code.html { color: #600 } /* inline HTML */
code.xml { color: #600 } /* inline XML */
/* Issues */
.issue {
border-color: #E05252;
background: #FBE9E9;
counter-increment: issue;
}
.issue:before {
content: "Issue " counter(issue);
padding-right: 1em;
text-transform: uppercase;
color: #E05252;
}
/* Whys */
details.why > summary {
font-style: italic;
}
details.why[open] > summary {
border-bottom: 1px silver solid;
}
/* All the blocks get similarly styled */
table.definition, pre.idl, .example, .note, details.why, .issue {
border: none;
border-left: .5em solid black;
border-left: .5rem solid black;
}
.issue, .note, .example, .why {
padding: .5em;
margin-top: 1em;
margin-bottom: 1em;
}
table.definition, pre.idl {
background: hsl(210, 70%, 95%);
border-color: hsl(210, 80%, 75%);
}
.example {
background: hsl(50, 70%, 95%);
border-color: hsl(50, 70%, 60%);
}
.example::before,
.example > .marker {
color: hsl(50, 70%, 60%);
}
.note, details.why {
background: hsl(120, 70%, 95%);
border-color: hsl(120, 70%, 60%);
}
.note::before,
.note > .marker {
color: hsl(120, 70%, 60%);
}
.issue {
background: hsl(0, 70%, 95%);
border-color: hsl(0, 70%, 60%);
}
.issue::before,
.issue > .marker {
color: hsl(0, 70%, 60%);
}
span.issue, span.note {
padding: .1em .5em .15em;
border-right-width: .5em;
border-right-style: solid;
}
.example.no-marker::before,
.issue.no-marker::before,
.note.no-marker::before,
.no-marker::before {
content: none;
}
</style>
<meta content="Bikeshed 1.0.0" name="generator">
<style type="text/css">
td, th {
vertical-align: top;
border: thin solid #aaa;
padding: 2px;
}
th {
text-align: left;
}
table {
border-collapse: collapse;
}
</style>
</head>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"></p>
<h1 class="p-name no-ref" id="title">EPUB Zero</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">A Collection of Interesting Ideas,
<time class="dt-updated" datetime="2015-06-18">18 June 2015</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="http://dauwhe.github.io/epub-zero/">http://dauwhe.github.io/epub-zero/</a>
<dt>Issue Tracking:
<dd><a href="#issues-index">Inline In Spec</a>
<dt class="editor">Editors:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:tseigman@wiley.com">Tzviya Seigman</a> (<span class="p-org org">Wiley</span>)
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:dauwhe@gmail.com">Dave Cramer</a> (<span class="p-org org">Hachette Livre</span>)
</dl>
</div>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="https://licensebuttons.net/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editors have waived all copyright
and related or neighboring rights to this work.
In addition, as of 18 June 2015,
the editors have made this specification available under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
Parts of this work may be from another specification document. If so, those parts are instead covered by the license of that specification document.
</p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<div class="p-summary" data-fill-with="abstract">
<p>A simple ebook format, as close to the Open Web Platform as possible.</p>
</div>
<div data-fill-with="at-risk"></div>
<h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="content">Table of Contents</span></h2>
<div data-fill-with="table-of-contents" role="navigation">
<ul class="toc" role="directory">
<li><a href="#introduction"><span class="secno"></span> <span class="content">
Introduction
</span></a>
<li><a href="#goals"><span class="secno">1</span> <span class="content">
Design goals and rationale
</span></a>
<li><a href="#overview"><span class="secno">2</span> <span class="content">Overview</span></a>
<ul class="toc">
<li><a href="#compare"><span class="secno">2.1</span> <span class="content">Comparison of EPUB 3 and EPUB Zero</span></a>
</ul>
<li><a href="#e0-documents"><span class="secno">3</span> <span class="content">EPUB Zero documents</span></a>
<ul class="toc">
<li><a href="#content-docs"><span class="secno">3.1</span> <span class="content">
Content documents
</span></a>
<li><a href="#style"><span class="secno">3.2</span> <span class="content">Style</span></a>
<ul class="toc">
<li><a href="#pagination"><span class="secno">3.2.1</span> <span class="content">
Pagination
</span></a>
<li><a href="#page-transitions"><span class="secno">3.2.2</span> <span class="content">
Page Transitions
</span></a>
</ul>
<li><a href="#interactivity"><span class="secno">3.3</span> <span class="content">Interactivity</span></a>
<li><a href="#media-overlays"><span class="secno">3.4</span> <span class="content">Media Overlays</span></a>
<li><a href="#global"><span class="secno">3.5</span> <span class="content">Global Language Support</span></a>
<li><a href="#navigation"><span class="secno">3.6</span> <span class="content">Navigation</span></a>
<li><a href="#fxl"><span class="secno">3.7</span> <span class="content">Fixed Layout</span></a>
<li><a href="#a11y"><span class="secno">3.8</span> <span class="content">Accessibility</span></a>
</ul>
<li><a href="#installing"><span class="secno">4</span> <span class="content">Installing EPUB Zero publications</span></a>
<li><a href="#offline"><span class="secno">5</span> <span class="content">Offline reading</span></a>
<ul class="toc">
<li><a href="#appcache"><span class="secno">5.1</span> <span class="content">
AppCache
</span></a>
<li><a href="#service-workers"><span class="secno">5.2</span> <span class="content">
Service Workers
</span></a>
</ul>
<li><a href="#structure"><span class="secno">6</span> <span class="content">
Publication structure and packaging
</span></a>
<li><a href="#metadata"><span class="secno">7</span> <span class="content">
Metadata
</span></a>
<li><a href="#acknowledgments"><span class="secno"></span> <span class="content">
Acknowledgments
</span></a>
<li><a href="#appendix-1"><span class="secno"></span> <span class="content">
Reading system behaviour
</span></a>
<li><a href="#appendix-2"><span class="secno"></span> <span class="content">
References and Further Reading
</span></a>
<li><a href="#appendix-3"><span class="secno"></span> <span class="content">
Functional requirements for books, and possible solutions
</span></a>
<li><a href="#conformance"><span class="secno"></span> <span class="content">
Conformance</span></a>
<li><a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ul class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ul>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ul></div>
<main>
<h2 class="no-num heading settled" id="introduction"><span class="content">
Introduction
</span></h2>
<p class="note" role="note">Note: This specification is only a thought experiment, inspired by the <a href="http://w3c.github.io/epubweb/">EPUB+WEB White Paper</a> (by the <a href="https://www.w3.org/dpub/IG/wiki/">W3C Digital Publishing Interest Group</a> and the <a href="idpf.org">IDPF</a>) and by concerns about the complexity of EPUB3. Please join the Digital Publishing Interest Group and IDPF to help bring about a better future for ebooks.</p>
<p>A book, in the digital world, is a reading mode, not a file format. The Open Web Platform provides us with most of what we need for the content, style, and behavior of a publication. EPUB Zero aims to make publications just another part of the web.</p>
<p>EPUB3 is complex. It requires numerous custom XML vocabularies, and massive repetition of content. Developing a reading system for EPUB3 is a herculean task, as evidenced by the slow progress of Readium. Our goal is to create a simpler publication format, easier to author, and easy to read in a browser with as little additional technology as possible.</p>
<p class="note" role="note">Note: EPUB Zero is not just for books, but any packaged web content. We will use the term <i>publication</i> to describe books, magazines, journals, manuals, reference documents, corporate documents, articles, etc.</p>
<h2 class="heading settled" data-level="1" id="goals"><span class="secno">1. </span><span class="content">
Design goals and rationale
</span><a class="self-link" href="#goals"></a></h2>
<p>EPUB Zero satisfies the following design goals:</p>
<ol>
<li data-md="">
<p>Simplicity</p>
<li data-md="">
<p>“Webbiness”</p>
<li data-md="">
<p>Built from HTML and CSS and JSON as much as possible</p>
<li data-md="">
<p>Uses existing standards whenever possible</p>
<li data-md="">
<p>Don’t repeat yourself</p>
<li data-md="">
<p>Easy to author</p>
<li data-md="">
<p>Aims to use the browser as reading system</p>
</ol>
<p class="note" role="note">Note: The ultimate test of this specification is whether we can build a reading system on top of an ordinary browser with only a bit of JS.</p>
<h2 class="heading settled" data-level="2" id="overview"><span class="secno">2. </span><span class="content">Overview</span><a class="self-link" href="#overview"></a></h2>
<p>EPUB Zero is yet another ebook format, which isn’t just “based on” HTML like EPUB, but <em>is</em> HTML. Where possible, we use HTML solutions to achieve book-like functionality. It appears to be possible to do this using mostly-existing web technology:</p>
<ol>
<li data-md="">
<p>Online/offline reading via AppCache or Service Workers</p>
<li data-md="">
<p>Pagination via prollyfills</p>
<li data-md="">
<p>Installable via application manifest</p>
<li data-md="">
<p>Access to navigation document via sidebar link relation</p>
</ol>
<p>But each of these features are problematic. As this document evolves, we hope to propose alternatives.</p>
<figure>
<img alt="screenshot of an epub zero in the Opera browser" src="images/reading-e0-opera.png" width="640">
<figcaption>Using Opera 12.16 as an EPUB Zero Reading system. </figcaption>
</figure>
<figure>
<img alt="folder structure of an EPUB Zero publication" src="images/e0-folder.png" width="640">
<figcaption>Folder structure of an EPUB Zero publication</figcaption>
</figure>
<h3 class="heading settled" data-level="2.1" id="compare"><span class="secno">2.1. </span><span class="content">Comparison of EPUB 3 and EPUB Zero</span><a class="self-link" href="#compare"></a></h3>
<table>
<thead>
<tr>
<th>Feature
<th>EPUB 3
<th>EPUB Zero
<tbody>
<tr>
<td>Package Document
<td>manifest, reading order, metadata in XML vocabulary
<td>TK
<tr>
<td>Reading Order
<td>spine element in package file
<td>link rel=next in HTML
<tr>
<td>Navigation Document
<td>required nav, optional ncx
<td>required nav
<tr>
<td>Linking
<td>EPUB CFI
<td>TK
<tr>
<td>Publication Metadata
<td>custom XML format inside package file
<td>external file in any vocabulary
<tr>
<td>Content Documents
<td>XHTML5, SVG
<td>HTML5, SVG
<tr>
<td>Fixed Layout
<td>viewport in HTML + configuration in package
<td>just don’t even
<tr>
<td>Style
<td>subset of CSS
<td>any CSS
<tr>
<td>Multimedia
<td>html audio and video, mp3 and mp4 are core media types
<td>Anything supported by the browser
<tr>
<td>Fonts
<td>OTF and WOFF
<td>Anything supported by the browser
<tr>
<td>Scripting
<td>optional, recommend container constrained
<td>TK
<tr>
<td>Text-to-speech
<td>TK
<td>TK
<tr>
<td>Container
<td>OCF
<td>TK
<tr>
<td>Offline reading
<td>dependent on reading system
<td>AppCache or Service Workers
</table>
<h2 class="heading settled" data-level="3" id="e0-documents"><span class="secno">3. </span><span class="content">EPUB Zero documents</span><a class="self-link" href="#e0-documents"></a></h2>
<h3 class="heading settled" data-level="3.1" id="content-docs"><span class="secno">3.1. </span><span class="content">
Content documents
</span><a class="self-link" href="#content-docs"></a></h3>
<p>An EPUB Zero content document is an HTML5 document.</p>
<p class="issue" id="issue-28379cf4"><a class="self-link" href="#issue-28379cf4"></a> Can SVG or raster images be a content document? Does <a data-link-type="biblio" href="#biblio-html5">[HTML5]</a> define required media types?</p>