Download - HTML5 Is the Future of Book Authorship
![Page 1: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/1.jpg)
HTML5 Is the Future of Book Authorship
Digital Book World January 14, 2014
Sanders Kleinfeld O’Reilly Media, Inc.
![Page 2: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/2.jpg)
The Goal of Publishing:
Packaging and
Distribution of Ideas
![Page 3: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/3.jpg)
Publishing! �
![Page 4: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/4.jpg)
Traditional Publishing! �
![Page 5: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/5.jpg)
Traditional Publishing Process! �(Writing!) (Conversion!) (Printing!)
![Page 6: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/6.jpg)
Digital Publishing!�
![Page 7: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/7.jpg)
(Post)Modern Publishing Process! �(Both Print and Digital) �
(Writing!) (Conversion!)
(Conversion!)
(Printing!)
![Page 8: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/8.jpg)
Welcome to Conversion City
Enjoy Your Stay ☺
Conversion! Conversion!
Conversion!
![Page 9: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/9.jpg)
The Single-Source Solution:��
Replace conversions with semantic markup and automated transforms �
<!/>!
![Page 10: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/10.jpg)
How We Did It:�
1. Encourage authors to write in DocBook (heavyweight, semantic XML markup) or AsciiDoc (lightweight, semantic wiki-like “markdown”) �
2. If authors prefer to write in Microsoft Word ("), let them ("""), but convert to DocBook when
book goes into Production�
3. Maintain a customized version of the DocBook project stylesheets for automatically generating
print/ebook outputs �
![Page 11: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/11.jpg)
O’Reilly’s Single-Source Workflow (2006-2013):
AsciiDoc
DocBook XML
asciidoc.py
DocBook XSL EPUB Stylesheets + Custom CSS
EPUB
DocBook XSL HTML5 Stylesheets
HTML5
Print PDF Web PDF
AntennaHouse + Print CSS3 AntennaHouse +
Web CSS3
EPUB
DocBook XSL EPUB Stylesheets
Custom XSL for EPUB postprocessing + KF8/Mobi7 CSS
Mobi-ready EPUB
Kindlegen
Mobi (KF8) Source Content
Intermediate Output
Final Output For Sale
(optional; can start with DocBook)
![Page 12: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/12.jpg)
Three Slowly Dawning
Realizations About Our Workflow
![Page 13: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/13.jpg)
Realization #1: Our toolchain is
rather heavyweight, complex
![Page 14: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/14.jpg)
PDF* Toolchain Stats
The DocBook project XHTML5 stylesheets** contain:
• 33,707 lines of HTML-generation code…
• …which rely on 8,346 lines of common dependencies
Or, in terms of functions, they contain:
• 1,857 <xsl:template>s…
• …which rely on 272 common dependency <xsl:template>s
* Separate code base for EPUB/Mobi!** docbook-epub3-addon-b3!
![Page 15: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/15.jpg)
When doing transforms,
this complexity is a necessary evil,
emphasis on evil
![Page 16: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/16.jpg)
Peril of a Transform-Heavy Workflow:
![Page 17: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/17.jpg)
Troubleshooting is a real $!%#@&*
![Page 18: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/18.jpg)
An example! Let’s say your DocBook source is:
<div class="chapter">! <h1>Poodles and Cookies</h1>! ...!</div>!
And your desired/expected HTML output is:
<chapter>! <title>Poodles and Cookies</title>! ...!</chapter>!
![Page 19: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/19.jpg)
But then you run your transform…
<p class="sect1">! <h2>Poodles and Cookies</h2>! ...!</p>!
<chapter>! <title>Poodles and Cookies</title>! ...!</chapter>!
…And you say, “What the $!%#@&*?”
33,707 lines of
code
![Page 20: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/20.jpg)
What about implementing validation to preemptively catch errors before running
the transforms?
![Page 21: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/21.jpg)
book.xml:2192: element chapter: validity error : Element chapter content does not follow the DTD, expecting (beginpage? , chapterinfo? , (title , subtitle? , titleabbrev?) , (toc | lot | index | glossary | bibliography)* , tocchap? , (((calloutlist | glosslist | bibliolist | itemizedlist | orderedlist | segmentedlist | simplelist | variablelist | caution | important | note | tip | warning | literallayout | programlisting | programlistingco | screen | screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para | simpara | address | blockquote | graphic | graphicco | mediaobject | mediaobjectco | informalequation | informalexample | informalfigure | informaltable | equation | example | figure | table | msgset | procedure | sidebar | qandaset | task | anchor | bridgehead | remark | highlights | abstract | authorblurb | epigraph | indexterm | beginpage)+ , (sect1* | refentry* | simplesect* | section*)) | sect1+ | refentry+ | simplesect+ | section+) , (toc | lot | index | glossary | bibliography)*), got (para title para para para sect1 sect1 sect1 sect1 sect1 sect1 sect1 sect1 sect1 sect1 sect1 sect1 )! </chapter>!
Validation is still troubleshooting:
Again you say, “What the $!%#@&*?”
![Page 22: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/22.jpg)
Streamlining Production Workflows isn’t just about automating conversions
whenever possible…
…It’s about eliminating conversions whenever
possible!
![Page 23: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/23.jpg)
DocBook
Why not seriously consider:
HTML
Rather than build a toolchain around:
InDesign HTML
Or:
MS Word HTML
Or:
HTML HTML
![Page 24: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/24.jpg)
Realization #2: HTML5 Is Ideal for
Digital-First Content
![Page 25: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/25.jpg)
Digital-First Content Development
When doing digital-first (ebook/web) content development, these are the key output formats:
• EPUB (2.0 and 3.0)
• Amazon Kindle Mobi (Mobi7/KF8)
• HTML
* docbook-epub3-addon-b3!
![Page 26: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/26.jpg)
The Common Thread: HTML + CSS
* e.g., AntennaHouse Formatter or Prince!
= HTML + CSS + open source packaging
= HTML + CSS + proprietary packaging
= HTML + CSS + PDF processor*
= HTML + CSS (duh!)
![Page 27: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/27.jpg)
Interactivity/Multimedia Is Ultimately All About HTML5
<canvas> or <svg>!!
<audio>!!
<video>!!
<math>!!!
Animation/Games
Music/Narration
Video Clips
Math Equations
![Page 28: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/28.jpg)
It’s way easier to do stuff like this:
If you start with HTML5
![Page 29: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/29.jpg)
It’s way easier to do stuff like this:
If you start with HTML5
![Page 30: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/30.jpg)
Realization #3: Authors Generally Don’t Want to Deal
with Markup
![Page 31: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/31.jpg)
Authors prefer visual authoring platforms
because…
![Page 32: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/32.jpg)
“Nobody’s going to learn your markup
language”
Books in Browsers 2012: Liza Daly & Keith Fahlgren, “The self-publishing book”
http://www.youtube.com/watch?v=UWftLHopWQ0#t=5m25s
![Page 33: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/33.jpg)
Non-Technical Authors Don’t Like This…
<?xml version="1.0" encoding="utf-8"?>!<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" !"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">!<chapter>! <title>Autobiography of Me</title>! <para>I was born in 1980, I love chocolate ice cream, and I am a <emphasis>wicked awesome</emphasis> writer, yo!</para>!</chapter>!
DocBook
![Page 34: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/34.jpg)
Non-Technical Authors Will Sometimes Tolerate This…
== Autobiography of Me!!I was born in 1980, I love chocolate ice cream, and I am a _wicked awesome_ writer, yo!!
AsciiDoc
![Page 35: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/35.jpg)
Non-Technical Authors Really Want This…
Microsoft Word
![Page 36: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/36.jpg)
But This is the Future of Digital
Content Creation:
![Page 37: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/37.jpg)
Medium
(Short-Form Web Publishing)
![Page 38: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/38.jpg)
O’Reilly Atlas
(Short and Long-Form Print, Digital, and Web Publishing)
![Page 39: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/39.jpg)
Next-Generation Content Authoring =
• Visual Editing
• Web-Based (Responsive Design)
• Version-Controlled
• Seamless
![Page 40: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/40.jpg)
Visual Editing
![Page 41: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/41.jpg)
Responsive Design
![Page 42: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/42.jpg)
On Version Control…
![Page 43: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/43.jpg)
Two Questions About Your (e)Book’s Editorial Lifecycle
1. Will more than one person be working on the manuscript files?
2. Will there be more than one draft of the manuscript?
![Page 44: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/44.jpg)
If you answered yes to either question, you need a version-
control system.
![Page 45: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/45.jpg)
Key Feature #1 of Version Control: Revision Snapshots
![Page 46: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/46.jpg)
Key Feature #2 of Version Control: Diffing
![Page 47: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/47.jpg)
What if we versioned
manuscripts like software developers
version code?
![Page 48: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/48.jpg)
Revision snapshots
Études for Elixir: https://github.com/oreillymedia/etudes-for-elixir
![Page 49: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/49.jpg)
Diffing
Études for Elixir: https://github.com/oreillymedia/etudes-for-elixir
![Page 50: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/50.jpg)
Crowdsourced Collaboration
Pro Git: https://github.com/progit/progit
![Page 51: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/51.jpg)
Seamless Authoring & Production…
![Page 52: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/52.jpg)
Step #1: Author!
![Page 53: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/53.jpg)
Step #2: Build!
![Page 54: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/54.jpg)
Step #3: Review Results!
![Page 55: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/55.jpg)
All Roads Lead to HTML5…
![Page 56: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/56.jpg)
…But Is It Semantic Enough for Book
Publishing?
![Page 57: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/57.jpg)
Introducing HTMLBook
(github.com/oreillymedia/htmlbook)
![Page 58: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/58.jpg)
HTMLBook = • Open Spec for Book Authoring • Subsets XHTML5 Vocabulary and
Content Model
• Adds Book-Specific Semantics (e.g., <section data-type="chapter”>)!
• Open Source Tooling for Producing
Ebook Outputs
![Page 59: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/59.jpg)
HTMLBook Sample
(github.com/oreillymedia/HTMLBook/blob/master/samples/htmlbook.html
<html xmlns="http://www.w3.org/1999/xhtml">! <head>! <title>HTMLBook Sample</title>! </head>! <body data-type="book" id="htmlbook">! <section data-type="chapter" id="chapter01">! <h1>Chapter 1. HTMLBook Markup</h1>! <p>This chapter describes and demonstrates the types of markup<a data-type="indexterm" data-primary="markup" data-secondary="types of"></a> that might appear in a chapter. See <em>mappings.asciidoc</em> for more information. HTMLBook borrows much of its semantics from the EPUB 3 specification, as applied via the <a href="http://idpf.org/accessibility/guidelines/content/semantics/epub-type.php"><code>epub:type</code></a> attribute.</p>! </section>! </body>!</html>!
![Page 60: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/60.jpg)
O’Reilly’s Single-Source Workflow (2006-2013):
AsciiDoc
DocBook XML
asciidoc.py
DocBook XSL EPUB Stylesheets + Custom CSS
EPUB
DocBook XSL HTML5 Stylesheets
HTML5
Print PDF Web PDF
AntennaHouse + Print CSS3 AntennaHouse +
Web CSS3
EPUB
DocBook XSL EPUB Stylesheets
Custom XSL for EPUB postprocessing + KF8/Mobi7 CSS
Mobi-ready EPUB
Kindlegen
Mobi (KF8) Source Content
Intermediate Output
Final Output For Sale
(optional; can start with DocBook)
![Page 61: HTML5 Is the Future of Book Authorship](https://reader033.vdocuments.net/reader033/viewer/2022051608/53f33f6e8d7f72c80e8b47c3/html5/thumbnails/61.jpg)
O’Reilly’s Single-Source Workflow (2014!):
XHTML5
EPUB Print PDF Web PDF
AntennaHouse + Print CSS3
AntennaHouse + Web CSS3
EPUB
Custom XSL for EPUB postprocessing + KF8/Mobi7 CSS
Mobi-ready EPUB
Kindlegen
Mobi (KF8)
Source Content
Intermediate Output
Final Output For Sale
Packaging XSL + CSS
Packaging XSL + CSS