<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sanders Kleinfeld on Medium]]></title>
        <description><![CDATA[Stories by Sanders Kleinfeld on Medium]]></description>
        <link>https://medium.com/@sandersk?source=rss-baf5f824b1eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4tWsmEEDn3fgelL-.png</url>
            <title>Stories by Sanders Kleinfeld on Medium</title>
            <link>https://medium.com/@sandersk?source=rss-baf5f824b1eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:59:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sandersk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Add Custom Status and Away Messages to Slack]]></title>
            <link>https://medium.com/@sandersk/how-to-add-custom-status-and-away-messages-to-slack-d62f4f3fc32d?source=rss-baf5f824b1eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/d62f4f3fc32d</guid>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[chat]]></category>
            <dc:creator><![CDATA[Sanders Kleinfeld]]></dc:creator>
            <pubDate>Mon, 07 Dec 2015 14:36:09 GMT</pubDate>
            <atom:updated>2015-12-07T14:36:09.706Z</atom:updated>
            <content:encoded><![CDATA[<p>When working on distributed teams, posting a status message in your chat client is an easy, effective way to broadcast information about location and availability to colleagues.</p><p>Unfortunately, at present (December 2015), Slack doesn’t formally support status messages, and <a href="https://get.slack.help/hc/en-us/articles/201864558-Setting-your-Slack-status">provides only a simple active/away toggle</a> to indicate user status:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*2J16uUjrza88PgQnVq92fg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*Wi2cH4LRkqlOObzuEY96rw.png" /><figcaption>To toggle active/away status, choose “Set yourself [away|to active]” from the main-menu dropdown in Slack’s left navigation pane.</figcaption></figure><p>However, if status/away messages are on your Slack wishlist, there’s no need to <a href="https://twitter.com/webster/status/623943829079482369">wait for them to be officially implemented</a>. You can roll your own status-message fields using Slack’s new “<a href="https://get.slack.help/hc/en-us/articles/212281478-Customizing-your-team-s-profiles">Customize profile feature</a>,” as described below.*</p><p><em>* Note: profile customization is available only for Slack customers on paid plans, so the following will not work for teams using free accounts.</em></p><h4>Customize your team’s profile template</h4><p>If you’re an owner or admin, you can customize the user profiles for your Slack team. To access the Customize Profile page in Slack’s Desktop or Web app, choose View Profile &amp; Account from the main-menu dropdown in Slack’s left navigation pane, click Edit in the right profile pane, and then on the Edit Profile screen, click “Add, edit, or reorder fields” below the Save Changes button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*mZ61HOgi7VSqSBYHsPCDaA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*QH-hAXIN_qy4UwTZ8Y6pbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aRZ_7qFowr4h5ed1jcNDXQ.png" /><figcaption>First, choose View Profile &amp; Account from the main main dropdown, then click Edit in the profile pane, and finally click “Add, edit, or reorder fields” on the Edit Profile screen.</figcaption></figure><p>In the Web Slack client, you can also navigate directly to the Customize Profile page by going to the following URL and clicking “Edit your team’s profile fields”:</p><p><em>http://&lt;your_team_name_here&gt;.slack.com/customize/profile</em></p><p>On the Customize Profile page, you can create additional fields for team members to enter status information.</p><p>For example, you may want to add a field where coworkers can enter details on where they’re currently based: working in the office, working remotely, or away on vacation. To create a Location field with a dropdown that contains a series of options appropriate for your team, choose “Create a custom field.” Then on the “Create a new field” screen, select “List of Options”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fgy3W5WNXb6yBBi4y0_7LA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f0A1BqkfZsbyzAWdft6qyw.png" /><figcaption>On “Customize profile,” choose “Create a custom field.” Then, on “Create a new field,” choose “List of options.”</figcaption></figure><p>Then, on the “Edit Profile Field,” add a Label and Hint (user aid) for the dropdown, add your desired location options, and hit Save:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JGrh7WTCrzz3Ct64bCAvoA.png" /><figcaption>Under Label, enter “Location.” Under Hint, enter a textual description to aid users (e.g., “Where are you currently located?”). Under Options, enter a list of appropriate location options for your team.</figcaption></figure><p>Similarly, you may also want a field for team members to provide a custom away message. In this case, choose the Text field option from the “Create a new field” page, and then add your Label and Hint as before:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LO7-cQs5bzbKhYjFOzXP3Q.png" /><figcaption>Under Label, enter “Away Message.” Under Hint, enter a textual description to aid users (e.g., “Enter a custom Away Message here”).</figcaption></figure><h4>Update your profile</h4><p>You’ve successfully added custom location and away-message fields to your team’s profile template; now you can update your profile to fill in this information.</p><p>To edit your profile, again choose View Profile &amp; Account from the main-menu dropdown in Slack’s left navigation pane, and then click the Edit button in the right profile pane. Then fill in the new Location and Away Message fields, and hit Save Changes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TbIMtjTziPKn0-1OEwQwlQ.png" /><figcaption>Update your Location and Away Message, and hit Save Changes to publish your status information on your Slack profile.</figcaption></figure><p>Your status information is now published on your profile and will be visible to everyone on your team. 👍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d62f4f3fc32d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Streamlining CSS Print Design with Sass]]></title>
            <link>https://medium.com/@sandersk/streamlining-css-print-design-with-sass-debaa2a204c3?source=rss-baf5f824b1eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/debaa2a204c3</guid>
            <category><![CDATA[ebook]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[ebooks]]></category>
            <category><![CDATA[sass]]></category>
            <dc:creator><![CDATA[Sanders Kleinfeld]]></dc:creator>
            <pubDate>Mon, 23 Nov 2015 13:28:43 GMT</pubDate>
            <atom:updated>2015-11-23T13:28:43.282Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Asf6NPl0tDnDXExuzf3uMw.jpeg" /><figcaption><a href="https://www.flickr.com/photos/stevecorey/16667725930/">“Bugatti Veyron”</a> by <a href="https://www.flickr.com/photos/stevecorey/">Steve Corey</a> (<a href="https://creativecommons.org/licenses/by-nc-nd/2.0/">CC BY-NC-ND 2.0</a>)</figcaption></figure><p>Three years ago, my colleagues and I in <a href="http://www.oreilly.com/">O’Reilly Media</a>’s Production department made the decision to rearchitect our print-publishing software toolchain to support typesetting print books in HTML and CSS. Doing <a href="http://alistapart.com/article/building-books-with-css3">print layout with web technology</a> was a fairly radical notion at the time (and still is today!), especially in traditional publishing-industry circles where <a href="http://www.adobe.com/products/indesign.html">commercial desktop-publishing software</a> continues to hold sway. But we were convinced that aligning our publishing tech with the web stack would pay dividends. Short-term, we knew it would enable us to simultaneously produce print and <a href="http://idpf.org/epub/30">digital</a> <a href="http://www.amazon.com/gp/feature.html?docId=1000729511">media</a> more efficiently. And long-term, we felt that placing our bets on HTML+CSS was the best way to future-proof our workflows as electronic publishing, <a href="http://w3c.github.io/dpub-pwp/">both online and offline</a>, <a href="http://www.w3.org/2014/Talks/1023-SF-IH/">continued</a> <a href="https://www.ampproject.org/">to</a> <a href="https://instantarticles.fb.com/">evolve</a>.</p><p>Transitioning to HTML as our <a href="http://oreillymedia.github.io/HTMLBook/">canonical content source format</a> immediately allowed us to realize many benefits, including <a href="https://atlas.oreilly.com/">Web-based authoring</a> and a digital-first approach to <a href="https://www.safaribooksonline.com/library/view/html5-for-publishers/9781449320065/">next-gen ebook development</a>. Building print templates in CSS also proved to be surprisingly straightforward, once we got up to speed on <a href="http://www.w3.org/TR/css3-page/">Paged</a> <a href="http://www.w3.org/TR/css-gcpm-3/">Media</a>, and the particular <a href="http://www.antennahouse.com/CSSInfo/extension.html">dialect</a> of it spoken by our <a href="http://www.antennahouse.com/">PDF formatter software</a>. We were able to quickly implement CSS templates for a wide variety of book series interior designs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7iYr_PQxHTagWZq0oFhqg.jpeg" /><figcaption>Every single book above was typeset using HTML and CSS 😮</figcaption></figure><p>However, as we completed a critical mass of templates and moved from the proof-of-concept phase to production, CSS maintenance considerations rose to the fore. In our initial rollout of Paged Media designs, we built one set of core CSS files that contained a complete implementation of the styling for all standard book elements (headers, footers, chapter openers, tables, figures, etc.) for one of our simplest and most popular interior designs. CSS for all other interiors designs then <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@import"><strong>@import</strong>ed</a> this <em>core.css </em>and performed selective overrides to adjust styling as appropriate.</p><p>This approach served us well for a while, but as we added more and more templates, the monolithic nature of our CSS architecture became a liability. We had amassed a mountain of customizations that were piled on top of — and somewhat precariously balanced on — the style base. For any given template, it required effort and care to distinguish the aspects of the design that had <em>dependencies on the base</em> versus those that were <em>overrides of the base</em>. Changes to <em>core.css</em> were thus especially fraught, as they could have unanticipated ripple effects on numerous designs.</p><p>With each new template, the compromise here felt increasingly unpleasant, so we swung the pendulum in the other direction and rearchitected our CSS to take the opposite approach: eliminate <em>core.css</em> entirely, and implement a distinct, independent set of CSS stylesheets for each interior design.</p><p>Now, happily, each design was completely siloed. There was zero chance of code changes to one template having side effects on another. But sadly, each design was completely siloed<em>. </em>The common CSS that designs formerly shared was now replicated in multiple independent codebases, which made global updates a tedious, error-prone chore.</p><p>It was clear we needed a more nuanced, middle-ground approach to CSS development. Stepping back a bit to look at the big picture, these were the goals we wanted to accomplish:</p><ul><li>Keep templates independent to avoid convoluted cascading, but share common code to eliminate redundancy.</li><li>Refactor templates encompassing 2,000+ lines of CSS to make them more human-readable and -editable.</li><li>Make it easier for non-designers on the Production team to make simple “oneoff” customizations for individual books (such as adjusting color scheme) without having to wade through those 2,000+ lines in the first place.</li></ul><p>While our overarching aim was to make our print-design workflows more efficient, none of the above challenges was at all print-specific, which led us toward exploring CSS maintenance solutions adopted by the greater web design community. Inspired by <a href="http://lea.verou.me/">Lea Verou</a>, who designed the print stylesheets for <a href="https://www.safaribooksonline.com/library/view/css-secrets/9781449372736/"><em>CSS Secrets</em></a> using Sass, we decided to explore the <a href="http://sass-lang.com/">Sass language</a> to see if we could leverage CSS preprocessing to tackle the above challenges.</p><p>Over the course of several months of experimentation, we found that we were indeed able to apply many Sass language features within a print-design context to achieve our goals of streamlining template development and maintenance. Here’s a look at some key principles we put into practice when refactoring our stylesheets using Sass. (<em>Note: all examples in the following sections use Sass’s SCSS syntax, which is a superset of CSS syntax.</em>)</p><h4>Encapsulate shared code using mixins</h4><p>Our first objective in refactoring our stylesheets with Sass was to eliminate duplicate code across our templates. Sass’s <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#mixins"><strong>@mixin</strong></a><em> </em>functionality was a great solution to this problem. Mixins allow stylesheet developers to define modular styling blocks, which can contain a set of properties and/or full rules, e.g.:</p><pre><strong>@mixin heading-style {</strong> <br>  font-family: Arial, sans-serif;<br>  font-weight: 600;<br>  text-transform: capitalize;<br><strong>}</strong></pre><p>that can then be inserted via <strong>@include</strong> statements:</p><pre>h1, h2, h3 { <br>  <strong>@include heading-style;</strong><br>}</pre><p>When the above Sass is compiled to CSS, this is the result:</p><pre>h1, h2, h3 { <br>  font-family: Arial, sans-serif;<br>  font-weight: 600;<br>  text-transform: capitalize;<br>}</pre><p>Mixins are far more flexible than standard CSS <strong>@import</strong>s, because they can be interpolated anywhere within a stylesheet, as many times as needed. This makes it possible to create a library of frequently used styling modules that can be dropped in whenever and wherever appropriate.</p><p>We did an audit of our stylesheet corpus and identified many such modules that were being replicated verbatim in every template. These styling blocks were clearly globally applicable to a wide variety of designs, and encompassed handling ranging from <a href="http://www.w3.org/TR/2011/WD-css3-text-20110215/#hyphenation">hyphenation rules</a> and PDF <a href="http://www.w3.org/TR/css-gcpm-3/#bookmarks">bookmark configuration</a> to <a href="https://en.wikipedia.org/wiki/Syntax_highlighting">syntax highlighting</a> for code listings and <a href="http://www.w3.org/TR/MathML/">MathML</a> equation handling. We removed all this CSS from individual template files and placed it into a new mixins library that was accessible to every theme:</p><pre><strong>@mixin hyphenation-rules</strong> {<br>  hyphens: auto; <br>  hyphenate-before: 3; <br>  hyphenate-after: 3;<br>  -ah-hyphenate-hyphenated-word: false;<br>  -ah-hyphenate-lines: 2;<br><strong>}</strong></pre><pre><strong>@mixin pdf-bookmarks</strong> {<br>  figure[data-type=&quot;cover&quot;] {  <br>    bookmark-level: 1;  <br>    bookmark-state: closed;  <br>    bookmark-label: &quot;Cover&quot;;<br>  } </pre><pre>  section[data-type=&quot;copyright-page&quot;] {  <br>    bookmark-level: 1;  <br>    bookmark-state: closed;  <br>    bookmark-label: &quot;Copyright&quot;; <br>  }<br><strong>}<br><br>@mixin syntax-highlighting {<br>  </strong>/* <em>Redacted for space; you get the idea...</em> */<strong><br>}</strong></pre><p>This solved our duplicate-code problem, while simultaneously modularizing shared code into manageable, clearly labeled blocks. We invoked mixins only when needed, at the exact locations they were needed, making it much easier to pinpoint dependencies in any given template and foresee the implications of changes to these shared resources.</p><h4>Use variables to enhance readability/maintainability</h4><p>Someday <a href="http://www.w3.org/TR/css-variables/">native CSS syntax for variables</a> will be broadly implemented, but <a href="http://caniuse.com/#feat=css-variables">that day is not today</a>. Until then, one of Sass’s most compelling features is its support for variables. In Sass, variable names start with a $ and are defined using the same syntax as properties:</p><pre>$my-favorite-color: #008700;</pre><p>Somewhat ironically, we found Sass variables immensely beneficial when employed as <a href="https://en.wikipedia.org/wiki/Constant_%28computer_programming%29">constants</a>, allowing us to attach human-friendly names to otherwise opaque Unicode and color values.</p><p>For example, take the following snippet:</p><pre>blockquote p.attribution::before {<br>  <strong>content: &quot;\2014&quot;;</strong><br>}</pre><p>Unless you have the Unicode codepoint memorized, it’s likely not readily apparent that the character being inserted before <strong>p.attribution</strong> elements (<a href="http://www.fileformat.info/info/unicode/char/2014/index.htm">U+2014</a>) is an em dash.</p><p>By contrast, if the following variable is defined in the Sass stylesheet:</p><pre>$em-dash: &quot;\2014&quot;;</pre><p>The above rule can now be rewritten as:</p><pre>blockquote p.attribution::before {<br>  <strong>content: $em-dash;</strong><br>}</pre><p>Which is much easier to grok at a glance, relieving much cognitive overhead for the beleaguered designer.</p><p>In addition to augmenting readability, Sass variables-as-constants also enhance stylesheet maintainability. Take the following example, where a variable for a company’s logo background color is defined:</p><pre>$logo-background-color: $trademarked-shade-of-crimson;</pre><p>And then invoked potentially dozens of times throughout the stylesheet. Should the company change the logo background color from <strong>$trademarked-shade-of-crimson</strong> to <strong>$trademarked-shade-of-chartreuse</strong>, a single variable declaration can be updated, obviating the need for global find-and-replace. 👏</p><h4>Use variables to enable end-user customization</h4><p>Our Production team often needs to make template customizations on a book-by-book basis to perform minor design adjustments. So when we first rolled out our new CSS book templates, we knew that we’d need to build in the capability to override styling for individual books. Our original solution was to add support for a <em>oneoff.css</em> file that could be added to any book project. The <em>oneoff.css</em> <strong>@import</strong>ed the designated template CSS, and then overrode styling as appropriate.</p><p>This served us reasonably well, but the main shortcoming of this approach was that it required the Production team to be conversant with the base template CSS to successfully implement overrides. We did our best to lower overhead by including boilerplate snippets in the <em>oneoff.css </em>that could be toggled on/off as needed, e.g.:</p><pre>/*---- Uncomment to turn on automatic code wrapping<br>pre {<br>  white-space: pre-wrap;<br>  word-wrap: break-word;<br>}<br>----*/</pre><p>But we wanted to see if we could leverage Sass to implement a more elegant solution that eliminated the need to maintain that extra level of CSS. Perhaps instead of modifying styling via oneoff CSS override files, we could define parameters for frequently used design customizations (e.g., <em>code-wrap=true</em>) and pass them into our Sass stylesheets as variables?</p><p>Unlike <a href="http://lesscss.org/">Less</a>, which offers a <a href="http://lesscss.org/usage/#command-line-usage-command-line-usage"><strong>--global-var</strong> option</a> for passing variable values into stylesheets, the Sass preprocessor does not directly accept custom parameters. So we hacked the same functionality by replacing our <em>oneoff.css </em>with a <em>_variables.scss</em> <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#partials">partial</a> file that defined only the custom design parameters (no styling) needed for a given book:</p><pre>$trim-width: 6in;<br>$trim-height: 9in;<br>$code-wrapping: false;<br>/* And so on... */</pre><p>Then the template Sass stylesheets <strong>@import</strong>ed <em>_variables.scss</em>, incorporating its parameter values.</p><p>Here’s an example showing this approach in action. The following <a href="http://www.w3.org/TR/css3-page/#at-page-rule"><strong>@page</strong></a> declaration uses the <strong>$trim-width</strong> and <strong>$trim-height</strong> values defined in <em>_variables.scss</em> to dynamically set PDF <a href="http://desktoppub.about.com/od/glossary/g/Trim-Size.htm">trim size</a>:</p><pre>@page {<br>  size: <strong>$trim-width</strong> <strong>$trim-height</strong>;<br>}</pre><p>And then the following SCSS employs Sass <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#operations">math operations</a> to calculate <strong>$figure-width</strong> based on <strong>$trim-width</strong>, and set image <strong>max-width</strong> accordingly:</p><pre><strong>$figure-width: $trim-width - 2.2in;</strong></pre><pre>img {<br>  max-width: <strong>$figure-width</strong>;<br>}</pre><p>As we built out our custom-parameter architecture, we realized that requiring users to configure a full set of parameters in <em>_variables.scss</em> for each individual book would likely be a real nuisance. To make our lives easier, we defined default values for all parameters in the template CSS using Sass’s <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#variable_defaults_"><strong>!default</strong> flag</a>:</p><pre>$trim-width: 7in !default;<br>$trim-height: 9.1875in !default;</pre><p>Then we only needed to configure a parameter in <em>_variables.scss</em> when we wanted to override one of the defaults. Not only was this architecture much more efficient, but more extensible, too. If we needed to add new custom parameters in the future, we could populate them with default values in the template stylesheets, making it unnecessary to retroactively update all the <em>_variables.scss</em> files for legacy books.</p><h4>DIY “media queries” with SassScript</h4><p>When developing <a href="http://alistapart.com/article/responsive-web-design">responsive stylesheets </a>for the Web, the key tool in the designer’s arsenal is the <a href="http://www.w3.org/TR/mediaqueries-4/">media query</a>, which makes it possible to adapt styling based on features of the browser environment — width and height, orientation (portrait or landscape), resolution, and so on:</p><pre><strong>@media (min-width: 900px) {</strong><br>  /* CSS HERE IS APPLIED ONLY IF VIEWPORT WIDTH EXCEEDS 900px */<br><strong>}</strong></pre><p>Ever since our early days of print typesetting with CSS, we desperately wanted the ability to craft our own custom media queries for different “print book environments.” For example, if a book were to be printed with a one-color (black-and-white) interior, we might want table header rows to be shaded gray, but if it were printed with a four-color (CMYK) interior, we might want table header rows shaded <strong>$trademarked-shade-of-chartreuse</strong>.</p><p>Ideally, we wanted to be able to write queries like the following:</p><pre>@media print and <strong>(print-book-color-count: 4) </strong>{<br>  th { background-color: $trademarked-shade-of-chartreuse }<br>}</pre><p>Sadly, the <strong>print-book-color-count </strong><a href="http://www.w3.org/TR/mediaqueries-4/#mq-features">media feature</a> did not exist in the <a href="http://www.w3.org/TR/mediaqueries-4/">W3C Media Queries spec</a> or in our <a href="http://www.antennahouse.com/CSSInfo/property.html">PDF formatter’s documentation</a>; it was viable only in our hearts.</p><p>But when we started exploring SassScript, we realized we had an equivalent solution at our fingertips. We could create the media features we wanted by defining custom parameters (see previous section), and then use <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_9"><strong>@if</strong>/<strong>@else</strong> directives</a> to craft our own queries.</p><p>To implement the above example, we defined the interior color count in our <em>_variables.scss</em>:</p><pre><strong>$print-book-color-count: 4;</strong></pre><p>And then added an <strong>@if/@else</strong> block to specify styling for each possible condition:</p><pre><strong>@if $print-book-color-count == 4 {<br>  </strong>th { background-color: $trademarked-shade-of-chartreuse; }<br>  /* <em>More 4-color styling here</em> */<br><strong>} @else {<br>  </strong>th { background-color: gray; }<br>  /* <em>More 1- or 2-color styling here</em> */<br><strong>}</strong></pre><p>With this DIY “media query” approach in place, our stylesheets could easily adapt to any combination of print-book specs. This allowed us to take what had formerly been multiple distinct templates — “trade book,” “trade book four-color,” “trade book small trim,” “trade book four-color small trim” — and collapse them into one “smart” parameterized template (“trade book”). Huge boon for maintainability!</p><h4>Except the unexpected</h4><p>By opening up our stylesheets to accept user-supplied values for parameters like <strong>$print-book-color-count, </strong>we knew we were also introducing the possibility of unexpected inputs, e.g.:</p><pre>$print-book-color-count: &quot;pizza!&quot;;</pre><p>To address this, we wanted to add error handling to our stylesheets to validate parameter values and raise exceptions in cases where inputs did not meet template requirements.</p><p>One area where validation was essential was for our parameters defining the trim size for book pages: <strong>$trim-width</strong> and <strong>$trim-height</strong>. Many of our templates were intended to be compatible with only a handful of whitelisted trims. For example, one template was designed to support a trim of either 6in×9in or 7in×9.1875in, and we wanted a stylesheet error to be thrown if <strong>$trim-width</strong> and <strong>$trim-height</strong> did not conform to one of these specifications.</p><p>SassScript provides two directives that can be used for exception handling: <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_6"><strong>@warn</strong></a>, which can be used to output warning messages to <a href="https://en.wikipedia.org/wiki/Standard_streams#Standard_error_.28stderr.29">stderr</a>, and <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_7"><strong>@error</strong></a>, which both outputs an error messages to stderr and terminates the Sass preprocessor.</p><p>To ensure preprocessing failed on bad trim inputs, we added the following SCSS to our template stylesheet:</p><pre>@if not (($trim-width == 6in and $trim-height == 9in) or ($trim-width == 7in and $trim-height == 9.1875in)) {<br>  <strong>@error(&quot;Invalid trim size. Trims supported are 6in×9in or 7in×9.1875in&quot;)</strong><br>}</pre><p>In other circumstances, bad input values did not necessitate terminating the preprocessor, as we could gracefully recover by using appropriate defaults. In these cases, we used <strong>@warn</strong> to alert users to the fallback behavior:</p><pre>@if $color-count &gt; 4 {<br>  <strong>@warn(&quot;Invalid color count of #{$color-count}. Defaulting to maximum color count of 4&quot;);</strong><br>  $color-count: 4;<br>}</pre><p>Having <strong>@error</strong> and <strong>@warn</strong> handling in place protected the integrity of our designs and provided salient feedback to users configuring them in inappropriate ways.</p><h4>Conclusion</h4><p>At time of publication, we have officially deployed and launched Sass support in our publishing toolchain, and are releasing our first set of Sass stylesheets into production. In the coming months, we’ll be continuing to add new designs to our Sass stylesheet corpus, as well as iteratively improve existing templates. We’re looking forward to sharing more best practices we learn along the way!</p><p><a href="https://www.safaribooksonline.com/blog/2015/11/20/streamlining-css-print-design-with-sass/"><em>Originally posted</em></a><em> on the </em><a href="https://www.safaribooksonline.com/blog/"><em>Safari Books Online blog</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=debaa2a204c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Responsive Ebook Design: A Primer]]></title>
            <link>https://medium.com/@sandersk/responsive-ebook-design-a-primer-8bba01328219?source=rss-baf5f824b1eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bba01328219</guid>
            <category><![CDATA[ebooks]]></category>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Sanders Kleinfeld]]></dc:creator>
            <pubDate>Mon, 05 Jan 2015 01:01:14 GMT</pubDate>
            <atom:updated>2015-06-26T22:09:17.135Z</atom:updated>
            <content:encoded><![CDATA[<h4>Modern websites largely fulfill the promise of being device-agnostic, but our ebooks are lagging behind. A look at how publishers can adopt responsive practices to build better digital books.</h4><blockquote>Dear Publisher,<br>Your book looks like <em>💩</em> on my <em>📱</em>. Please fix.<em><br></em>— Customer</blockquote><p>In the book publishing industry, we tend to cotton to one of three prevailing schools of thought on how to accomplish ebook design.</p><p>One favored paradigm is the <a href="http://www.idpf.org/epub/fxl/"><strong><em>fixed-layout</em></strong></a><strong><em> </em></strong>approach (pioneered by Apple and codified as an <a href="http://idpf.org/">IDPF</a> <a href="http://idpf.org/epub">EPUB</a> specification), which stipulates that “page” dimensions are rigidly set, and text and graphics must be painstakingly manually laid out on each page spread. Fixed-layout ebooks are destined for a predetermined platform (typically iPad or Kindle Fire) and customized to its reading-system specifications, which guarantees that consumers of the content will see exactly what the designer envisioned.</p><p>On the other end of the spectrum is a philosophy of <strong><em>design nihilism</em></strong>, characterized by Nietzschean indifference to the enterprise of styling content for an ebook ecosystem in which HTML5 and CSS3 support fluctuate greatly, and the results of loading a lovingly crafted EPUB 3 to any given device may make the jaw drop in horror. Design nihilists want ebook content to be available across all ereader platforms (rather than siloed to a specific device, as in fixed layout) but are understandably jaded about what can be pragmatically achieved, and thus settle for lightweight, lowest-common-denominator CSS styling that is guaranteed to work across all platforms.</p><p>Splitting the difference is the strategy I dub the <strong><em>Heinz method</em></strong>, in which designers create <a href="http://en.wikipedia.org/wiki/Heinz_57">57 ebook varieties</a>—one for iBooks, one for NOOK Color, one for Kobo GLO, etc.—such that each file can be subtly (or sometimes, not so subtly) optimized to suit the constraints and tics of its host. This enables design customization for a diversity of ereaders, but at the expense of inordinate effort; see <a href="http://craigmod.com/journal/platforming_books/">Craig Mod’s “Platforming Books”</a> for an enlightening case study on the production legwork necessary to accomplish this task for a single title, for just a handful of devices.</p><p>Any one of the above paradigms may well suit a given publisher’s needs; fixed layout is a great fit for graphic novels or children’s books, and barebones styling may be perfectly sufficient for novels. But oftentimes, these approaches entail distasteful compromises—e.g., content restricted to one ereader platform, lower-caliber design, or cost-ineffective expenditure of resourses.</p><p>The missing component in all three philosophies is a focus on <a href="http://alistapart.com/article/responsive-web-design"><em>responsive design</em></a>: the methodology that web developers and designers began cultivating at the advent of the smartphone era to facilitate creation of a universal set of web assets that yield high-quality results optimized for all devices. There’s no reason publishers shouldn’t strive to achieve these same goals, to commit to an analogous philosophy of <strong><em>responsive ebook design</em></strong>.</p><p>An ebook is not the same as a web application, however, and an ereader is not the same as a web browser. As such, the precepts of responsive ebook design must be tailored to the unique contours of the medium, where:</p><ol><li><strong>Content is <em>split into pages</em>.<br></strong>While a handful of reading systems (e.g., iBooks) have a “scrolling mode” in which content is presented in one long scroll like a single web page, most major ereaders default to a paginated view, in which the text is split into a series of “pages” that users can navigate through linearly. Responsive design for ebooks entails optimizing the layout of content delivered in these arbitrarily sized pages, where the location of page boundaries depends largely on the device’s screen dimensions.</li><li><strong>Content <em>reflows</em> <em>among these pages</em>.</strong><br>A fixed-layout approach, where designers expressly earmark a specific chunk of content for a specific page, is entirely antithetical to the endeavor of responsive design. If pages are arbitrarily sized to account for a multiplicity of screen form factors, then content must be allowed to flow freely through those pages, or aesthetics will vary widely (and often unpleasantly) across platforms.</li><li><strong>Content adapts to a <em>user-configurable ereader environment</em>.</strong><br>Ebooks are by definition “longreads,” and ereader settings are by design highly user-configurable to facilitate people’s ability to adjust display specs for a screen at which they’ll be staring for many hours. Responsive ebook design strives to account for individual customization of features such as font face, text size, screen brightness, etc., as much as feasible.</li><li><strong>Content is encapsulated in a <em>single, universal archive</em> of assets for all ereader platforms.</strong><br>As currently defined by both of its leading specifications, <a href="http://idpf.org/epub">EPUB</a> and <a href="http://wiki.mobileread.com/wiki/MOBI">MOBI</a>, an ebook is a discrete archive of content and metadata assets. Those that create separate custom files for each ereader platform are not making a responsive ebook; they’re making dozens of unresponsive ebooks. For the term <em>responsive</em> to describe an ebook in any meaningful fashion, it must be associated with a single, universal file, just as a responsive website is associated with a single, universal URL.</li></ol><p>In this article, I describe a series of responsive-ebook best practices—from media queries to pagination hacks—that stem from the principles above. I provide example-based guidance on real-world implementation in contemporary ereading platforms (with a focus on iBooks and Kindle), culled from both my own research and that of other ebook developers. I also advocate for upcoming, bleeding-edge specifications with the potential to further augment the responsive capabilities of ebooks.</p><h3>Media Queries</h3><p><a href="http://www.w3.org/TR/css3-mediaqueries/">Media queries</a> are CSS <a href="http://en.wikipedia.org/wiki/Conditional_(computer_programming)">conditionals</a>, which allow you to selectively apply styling based on two categories of user-agent parameters: the output medium (called <a href="http://www.w3.org/TR/CSS2/media.html#media-types"><em>media type</em></a><em>)</em>, and its display properties, called <a href="http://www.w3.org/TR/css3-mediaqueries/#media1"><em>media features</em></a><em>. </em>A media-query block in CSS takes the form:</p><pre><strong>@media</strong> <em>query_parameters </em><strong>{</strong><br>  /* <em>CSS properties to be applied if query_parameters are true</em> */<br><strong>}</strong></pre><p>Where <em>query_parameters</em> typically consist of an optional single media-type value of <strong>screen</strong> (any onscreen display) or <strong>print</strong> (for output printed to paper), followed by one or more media features, which include <strong>width</strong> and <strong>height</strong> to style based on the size of the viewport; <strong>orientation</strong> to style based on whether the screen is portrait or landscape; and <strong>monochrome</strong> or <strong>color </strong>to<strong> </strong>style based on color support of display<strong>. </strong>Parameters are concatenated by the<strong> and </strong>operator, and each media feature must be delimited by parentheses.</p><p>The following example shows a media query in which styling is applied to content when the viewport width is at least 400 pixels wide and at least 600 pixels tall:</p><pre>@media (min-width: 400px) and (min-height: 600px) {<br>  /* properties here will be applied only if the viewport<br>     is at least 400px wide and 600px tall */<br>}</pre><p>For further explanation of media queries, see the <a href="http://www.w3.org/TR/css3-mediaqueries/">W3C “Media Queries” specification</a>, which provides comprehensive documentation and examples.</p><p>CSS media queries are <a href="http://www.idpf.org/epub/30/spec/epub30-contentdocs.html#sec-css-media-queries">formally included in the EPUB 3 CSS Profile</a>, which means that they <em>should</em> be supported in all EPUB 3–compliant ereaders. And in fact, they are supported to varying degrees in both EPUB 3 on Apple iBooks, as well as in MOBI on the Kindle ecosystem.</p><h4>Media Queries in iBooks</h4><p>Good news for EPUB 3 developers in iBooks: you can indeed use media queries to distinguish between iPhone and iPad platforms, as well as portrait and landscape orientation—with the slight caveat that user-agent eccentricities can entail workarounds that can make this task a bit of a headache at times.</p><p>For a proof of concept, I created an EPUB 3 file called <a href="https://github.com/sandersk/ibooks_ereader_detector/blob/master/ibooks_ereader_detector.epub">“iBooks Ereader Detector,”</a> which includes the following XHTML5:</p><pre>&lt;h1&gt;iBooks Ereader Detector&lt;/h1&gt;<br>&lt;p&gt;You are likely reading this ebook:&lt;/p&gt;<br>&lt;ul&gt;<br>  &lt;li&gt;&lt;span <strong>id=&quot;platform_device&quot;</strong>&gt;On&amp;#xa0;&lt;/span&gt;&lt;/li&gt;<br>  &lt;li&gt;&lt;span <strong>id=&quot;orientation&quot;</strong>&gt;In&amp;#xa0;&lt;/span&gt;&lt;/li&gt;<br>&lt;/ul&gt;</pre><p>I was then able to dynamically update the <strong>#platform_device</strong> and <strong>#orientation</strong> list items using CSS containing a series of media queries that made use of three media features: <a href="http://www.w3.org/TR/css3-mediaqueries/#width"><strong>width</strong></a>, <a href="http://www.w3.org/TR/css3-mediaqueries/#device-width"><strong>device-width</strong></a>, and <a href="http://www.w3.org/TR/css3-mediaqueries/#orientation"><strong>orientation</strong></a>. I used <strong>min-device-width</strong> and <strong>max-device-width</strong> to query for the absolute screen-width dimensions of iPhone and iPad (as reported by <a href="http://stephen.io/mediaqueries/">Stephen Gilbert</a>), and <strong>orientation </strong>to ascertain whether the device display was portrait (width &lt; height) or landscape (width &gt; height). However, iBooks for iPad posed some specific orientation challenges due to viewport quirks specific to landscape display in paginated view (where two pages are displayed side by side). As <a href="https://blog.safaribooksonline.com/2012/03/20/create-rich-layout-publications-in-epub-3-with-html5-css3-and-mathml/">Liza Daly notes</a>, in landscaped page view, iBooks considers the two pages to be “distinct portrait viewports,” but I found that in iBooks v4, it was possible to distinguish these smaller pages from a single portrait mode using different <strong>width</strong> values, as <a href="https://github.com/dvschultz/99problems/issues/18">Derrick Schultz has documented</a>.</p><p>Here is the relevant annotated CSS I added to my EPUB:</p><pre>/* <em>Media query order matters here, as content of later media queries will override that of earlier ones)</em> */<br><br>/* <em>Default orientation handling</em> */<br> <br>@media<strong> </strong>(<strong>orientation:landscape</strong>)<strong> </strong>{<br>    <em>#orientation</em>::after {<br>        content: &quot;landscape mode&quot;;<br>    }<br>}<br><br>@media<strong> </strong>(<strong>orientation:portrait</strong>)<strong> </strong>{<br>    <em>#orientation</em>::after {<br>        content: &quot;portrait mode&quot;;<br>    }<br>}<br><br>/* <em>iBooks Platform Queries</em> */<br><br>/* <em>Standard iPad device pixel dimensions</em> */<br><br>@media<strong> </strong>(<strong>min-device-width:768px</strong>)<strong> <br></strong>and (<strong>max-device-width:1024px</strong>)<strong> </strong>{<br>    <em>#platform_device</em>::after {<br>        content: &quot;iBooks for iPad&quot;;<br>    }<br>}<br><br>/* <em>Standard iPad device pixel dimensions + two-up landscaped viewport (in landscape view for iPad, each page is a separate viewport which is less than 480 px)</em> */<br>@media<strong> </strong>(<strong>min-device-width:768px</strong>) and<strong> <br></strong>(<strong>max-device-width:1024px</strong>) and<strong> </strong><br>(<strong>max-width: 480px</strong>)<strong> </strong>{<br>    <em>#orientation</em>::after {<br>        content: &quot;landscape mode (two-up view)&quot;;<br>    }<br>}<br><br>/* <em>Should work on iPhone 5s and below</em> */<br>@media<strong> </strong>(<strong>max-device-width:480px</strong>)<strong> </strong>{<br>    <em>#platform_device</em>::after {<br>        content: &quot;iBooks for iPhone&quot;;<br>  }<br>}</pre><p>The following screenshots illustrate the resulting rendering in iBooks 4 on iPad 3 Retina and iPhone 5S, in both portrait and landscape modes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*6zMJfV4YrD-hw2ExrB0upA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z9bifII_XX7nMWsqybOI6g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9x4PaJCu1TsALyzGCshazA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-DM2K9PzgXXieqz-NvoQQ.png" /><figcaption>iBooks Ereader Detector successfully distinguishes iBooks on iPhone 5S in portrait mode (top left), iBooks on iPhone 5S in landscape mode (top right), iBooks on iPad 3 Retina in portrait mode (bottom right), and iBooks on iPad 3 Retina in landscape two-up mode (bottom left).</figcaption></figure><p><a href="https://github.com/sandersk/ibooks_ereader_detector/blob/master/ibooks_ereader_detector.epub"><em>iBooks Ereader Detector EPUB</em></a><em> and </em><a href="https://github.com/sandersk/ibooks_ereader_detector/blob/master/OEBPS/epub.css"><em>full CSS code</em></a><em> (which include additional media queries for iBooks Desktop for Mac) are </em><a href="https://github.com/sandersk/ibooks_ereader_detector/"><em>available on GitHub</em></a><em>; bug reports and pull requests welcome.</em></p><p>For a more real-world example of media queries used on iBooks to implement responsive design, see Liza Daly’s <a href="http://www.ibm.com/developerworks/web/library/x-richlayoutepub/index.html#responsive_layout">illustrated poetry example</a> from her article <a href="http://www.ibm.com/developerworks/web/library/x-richlayoutepub/index.html">“Create rich-layout publications in EPUB 3 with HTML5, CSS3, and MathML.”</a></p><h4>Media Queries for Kindle</h4><p>Kindle actually arguably eclipses iBooks in terms of its media query support, adding to its <a href="http://www.amazon.com/gp/feature.html?docId=1000765211">KindleGen software</a> two custom <a href="http://www.w3.org/TR/CSS2/media.html#media-types">media types</a> (not formally included in the <a href="http://www.w3.org/TR/css3-mediaqueries/">W3C Media Queries specification</a>) for targeting platforms that support the KF8 file format (e.g., Kindles Fire and Paperwhite) vs. those that don’t (e.g., first-generation Kindle DX): <strong>amzn-kf8</strong> and <strong>amzn-mobi</strong>, respectively. These queries make it possible to provide fallback styling for non-KF8 Kindle devices, which don’t support as wide a range of CSS properties as KF8-enabled platforms.</p><p>A typical use case for <strong>@media amzn-mobi</strong> and <strong>@media amzn-kf8</strong>, as recommended in Chapter 8 of the <a href="http://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf">Amazon Kindle Publishing Guidelines</a>,<strong> </strong>is to employ <strong>display: none </strong>to toggle on/off display of elements based on the targeted platform, e.g.:</p><pre><strong>@media amzn-mobi {</strong><br>  table.complex {<br>    /* Suppress display of complex tables on MOBI and use fallback image instead */<br>    display: none;<br>  }<br><strong>}</strong><br><br><strong>@media amzn-kf8 {</strong><br>  img.table_fallback {<br>    /* Suppress display of table fallback images on KF8, which can support complex tables */<br>    display: none;<br>  }<br><strong>}</strong></pre><p><strong>@media amzn-kf8</strong> and <strong>@media amzn-mobi</strong> are quite useful, but alone, they cannot distinguish between two KF8 platforms or two legacy MOBI platforms, and are not helpful if you want to target styling for just Kindle Paperwhite or just Kindle Fire. Fortunately (as documented by <a href="http://epubsecrets.com/media-queries-for-kindle-devices.php">Derrick Schultz</a>, <a href="http://extraordinarycommons.com/media-query-values-for-kindle-fire-previewer/">Peter Hatch on the Extraordinary Commons blog</a>, and <a href="http://www.mobileread.com/forums/showthread.php?t=209528">William Ockham and the grassroots experimentation of the MobileRead community</a>), like iBooks, KindleGen also supports the <strong>device-width</strong> and <strong>device-height</strong> <a href="http://www.w3.org/TR/css3-mediaqueries/#media1">media features</a> for targeting specific Kindle platforms based on device screen dimensions.</p><p>In the following example, <strong>device-width</strong> and <strong>device-height</strong> have been added to the second <strong>@media amzn-kf8</strong> query, in order to override paragraph first-line styling for the Kindle Paperwhite platform only:</p><pre>/* Applied on any KF8 platform */<strong><br>@media amzn-kf8 {<br>  </strong>p:first-of-type::first-line {<br>    color: green;<br>  }<br><strong>}<br><br></strong>/* Overrides specific to Kindle Paperwhite */<br><strong>@media amzn-kf8 and (device-height: 1024px) and <br>(device-width: 758px) {<br>  </strong>p:first-of-type::first-line {<br>    color: black;<br>    font-variant: small-caps;<br>  }<br><strong>}</strong></pre><p>The following side-by-side screenshots illustrate the resulting rendering on Kindle Paperwhite vs. Kindle Fire.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*6JsQrzuE9Fr-Xjz4E9mKDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*IqTd48t1SQYB6Z4HgFlZog.png" /><figcaption>KF8 rendering differently cross-platform on Kindle via media queries: on Kindle Previewer, with first line in smallcaps (left) vs. on Kindle Fire HD, with first line in green (right)</figcaption></figure><h4>What about monochrome vs. color?</h4><p>Oftentimes, it’s less important to tailor design to a specific device or set of screen dimensions than it is to target specific display properties—one notable example being whether the display is monochrome or color. In this case, writing queries using <strong>device-width</strong> and <strong>device-height</strong> to isolate specific devices (e.g., Kindle Paperwhite vs. Fire) by screen dimensions as a proxy for color support is rather clunky—and potentially also less future-proof should specifications change in future hardware models.</p><p>A more elegant way to distinguish devices by their color space is to use the media features expressly designed for this purpose, aptly named <a href="http://www.w3.org/TR/css3-mediaqueries/#monochrome"><strong>monochrome</strong></a> and <a href="http://www.w3.org/TR/css3-mediaqueries/#color"><strong>color</strong></a>, as shown in the following queries:</p><pre>@media (<strong>monochrome</strong>) {<br>  /* <em>This CSS is targeted at monochrome devices only</em> */<br>}<br><br>@media (<strong>color</strong>) {<br>  /* <em>This CSS is targeted at color devices only</em> */<br>}</pre><p>Unfortunately, despite the fact that the <a href="http://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf">Kindle Publishing Guidelines</a> assert that <strong>monochrome</strong> is supported for KF8, this was not borne out in my own testing, where <strong>@media (monochrome)</strong> was ignored on KF8 devices.</p><p>I also tried using the <strong>color</strong> media feature to specify “not color” via both the media queries <strong>@media not (color)</strong> and <strong>@media (color: 0)</strong>, but neither of these queries worked as expected. In the case of <strong>color</strong>, Kindle does not ignore the query, but instead inaccurately considers both monochrome and color KF8 devices (both Paperwhite and Fire) to be color displays (with an 8-bit color system), which effectively makes it impossible to reliably distinguish between these two types of platforms based on media-query-reported color support. So, at least for the time being, those who want to craft different CSS for Kindle monochrome and color devices do indeed need to fall back on querying for each device separately by screen dimensions.</p><p>Monochrome-versus-color querying is less relevant within the iBooks ecosystem, as all its platforms currently have color displays. However, in my own testing, I found that iBooks ignored media queries containing <strong>monochrome</strong>, and<strong> </strong>returned true (indicating an 8-bit color system) for queries using <strong>color</strong>—e.g., <strong>@media (color)</strong> and <strong>@media (color: 8)</strong>—should there prove to be a relevant use case for employing them.</p><h4>Media Queries for both iBooks and Kindle</h4><p>Media queries are even more useful to publishers when they can be used <em>across</em> proprietary vendor ereader ecosystems. Extant support for media queries on both Apple and Amazon platforms currently makes it possible to achieve the goal of supplying the same EPUB 3 file to iBooks and Kindle (via <a href="http://www.amazon.com/gp/feature.html?docId=1000765211">KindleGen</a> conversion to MOBI), while still employing some degree of CSS customization on a per-device basis.</p><p>One popular approach for targeting both Kindle and iBooks with a single EPUB is to divide the ebook design into two separate categories: one set of styling for both iBooks and KF8-enabled Kindles (whose CSS support is reasonably comparable with that of EPUB 3), and one set of “fallback” styling for legacy Kindle devices that support only MOBI 7&#39;s much more limited set of CSS properties. Each set of CSS can then be encapsulated with media queries.</p><p>For legacy MOBI, the query is straightforward:</p><pre>@media <strong>amzn-mobi</strong> {<br>  /* <em>This styling will only be applied to MOBI 7 platforms</em> */<br>}</pre><p>For KF8 and iBooks, one approach might be to use a comma-separated list of the media queries documented in the previous two sections, e.g.:</p><pre>@media <strong>amzn-kf8</strong>, <br>(<strong>min-device-width:768px</strong>)<strong> </strong>and (<strong>max-device-width:1024px</strong>), ... <br>{<br>  /* <em>Styling applied to all platforms matching <br>     one of the above queries</em> */<br>}</pre><p>However, if all that’s needed is a query that will <em>match everything that is not MOBI 7</em>, it’s possible to simplify to the following query using the <strong>not</strong> keyword (which matches the exact opposite of <strong>@media amzn-mobi)</strong>:</p><pre>@media <strong>not amzn-mobi</strong> {<br>  /* <em>Styling for everything that _is not_ a MOBI 7 platform</em> */<br>}</pre><p>Liz Castro provides a real-world example of this approach in action in her article, “<a href="http://www.pigsgourdsandwikis.com/2012/01/media-queries-for-formatting-poetry-on.html">Media Queries for formatting Poetry on Kindle and EPUB</a>,” where she walks through the CSS styling for optimizing the rendering of a stanza of Whitman poetry on iBooks and Kindle.</p><h4>Media Queries:TNG (a.k.a. Media Queries Level 4)</h4><p>The <a href="http://www.w3.org/">W3C’s</a> Media Queries specification continues to evolve, and the latest iteration, <a href="http://www.w3.org/TR/mediaqueries-4/">Media Queries Level 4</a> (still in Working Draft status), adds some <a href="http://www.w3.org/TR/mediaqueries-4/#mf-display-quality">new</a> <a href="http://www.w3.org/TR/mediaqueries-4/#mf-environment">media features</a> that should be of particular interest to many ebook developers. None of the following features are supported yet in the greater ereader ecosystem, but the digital-publishing community should begin to advocate for their adoption if they believe they would find them valuable in developing more responsive designs for their content:</p><p><a href="http://www.w3.org/TR/mediaqueries-4/#mf-overflow-block"><strong>overflow-block</strong></a>— Enables queries based on the user agent’s handling of content that flows beyond the boundaries of the screen. Accepts the following enumerated values: <strong>none</strong> (overflow content is truncated and not displayed), <strong>scroll</strong> (overflow content is accessible by scrolling the screen), <strong>optional-paged </strong>(by default, overflow content is accessible by scrolling, but content creators can also specify formal breakpoints to paginate content as desired), and <strong>paged</strong> (content is split into distinct pages).</p><p><em>Relevant use case for ebooks:</em> Use the queries <strong>@media (overflow-block: scroll)</strong> and <strong>@media (oveflow-block: paged)</strong> to distinguish between Scrolling View and Paged View, respectively, in ereaders that support one or both of these modes to customize CSS styling accordingly.</p><p><a href="http://www.w3.org/TR/mediaqueries-4/#light-level"><strong>light-level</strong></a>—<strong> </strong>Enables queries for the amount of ambient lighting present in the surrounding environment (for platforms like smartphones and tablets that have light sensors). Accepts the following enumerated values: <strong>dim</strong> (low lighting), <strong>normal </strong>(appropriate amount of lighting), and <strong>washed</strong> (high level of lighting, resulting in “washed out” display).</p><p><em>Relevant use case for ebooks:</em> Use the query <strong>@media (light-level: washed) </strong>to adjust text/background contrast to optimize reading in high-light settings, such as a sunny day on the beach.</p><p><a href="http://www.w3.org/TR/mediaqueries-4/#update-frequency"><strong>update-frequency</strong></a>— Enables queries based on the refresh rate of the screen, a good metric for distinguishing LCD tablet screens from <a href="http://www.eink.com/">E Ink</a> displays (which are relatively slower to update). Accepts the following enumerated values: <strong>none</strong> (display cannot update at all; basically printouts, so effectively the equivalent of <a href="http://dev.w3.org/csswg/mediaqueries-4/#media-types"><strong>@media print</strong></a>), <strong>slow</strong> (slow refresh rate; not suitable for animations), and <strong>normal</strong> (refresh rate fast enough to be suitable for animations).</p><p><em>Relevant use case for ebooks:</em> Use the query <strong>@media (update-frequency: normal) </strong>to silo CSS <a href="http://www.w3.org/TR/css3-transitions/">transitions</a> so that they are not applied to E Ink devices.</p><p><a href="http://dev.w3.org/csswg/mediaqueries-4/#inverted"><strong>inverted-colors</strong></a>—<strong> </strong>Matches displays in which colors have been inverted (e.g., Night View on many ereader platforms). Boolean query that also accepts the following enumerated values: <strong>none</strong> (screen colors not inverted) and <strong>inverted</strong> (screen colors inverted).</p><p><em>Relevant use case for ebooks: </em>Use the query <strong>@media (inverted-colors) </strong>to provide CSS overrides to customize styling when display is in Night View mode, in cases where ereader software defaults would otherwise provide less than ideal results, as in the side-by-side comparison below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ZCQdNQthmDj7qLtNLOonQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_PKqOL6qsPoa_YfxSGzEAA.png" /><figcaption>Excerpts from Apple’s <em>The Swift Programming Language </em>on iBooks 4 for iPad 3 with inverted screen in Night View (left) and with original colors on a white background (right). The availability of <strong>inverted-colors</strong> in iBooks would make it possible to better adapt code <a href="http://en.wikipedia.org/wiki/Syntax_highlighting">syntax highlighting</a> styling so that it would not be completely lost in the white-on-black environment.</figcaption></figure><h3>Multiple Renditions</h3><p>Sometimes media queries alone are not enough. In order to further optimize ebooks for different ereader platform specifications, it’s often desirable to adjust content assets in addition to CSS styling. For example, an electronics ebook with color diagrams may require text and image adaptations for monochrome screens (the caption “Figure 1.1—Whatever you do, don’t cut the green wire!” might be a problem for Kindle Voyage readers).</p><p>At present, the “57 varieties” strategy—create a distinct, custom EPUB/MOBI file for each target platform—is really the only viable mechanism for accomplishing this goal. But this approach entails a steep cost in terms of inefficiencies in file management and distribution.</p><p>As a means of addressing these challenges, in December 2014 the IDPF released a new proposed specification, <a href="http://www.idpf.org/epub/renditions/multiple/">“EPUB Multiple-Rendition Publications 1.0,”</a> whose goal is to ease the burden of maintaining ebook variants by introducing formalized metadata conventions for bundling these distinct content <em>renditions </em>in a single EPUB container, <a href="http://www.idpf.org/epub/renditions/multiple/#h.limr975p7dbf">syncing navigation points between them</a>, and instructing reading systems which one to display.</p><p>Multiple Renditions offers a couple of key efficiencies to publishers currently making more than one EPUB file for a single title. First, it can eliminate a good deal of redundancy, as the spec permits content assets to be shared across any variants packaged in the same EPUB container. (If an HTML chapter file requires errata revisions and is shared by all renditions in the EPUB container, the content only needs to be updated once, in one place—as opposed to several times in several different ebook archives that must carefully be kept in sync.) Second, it streamlines ebook distribution, as a single “universal” EPUB file can potentially be delivered to all ebook vendors, placing the burden of selecting and delivering the appropriate rendition on the retailer or ereader platform.</p><h4>Embedding multiple renditions in EPUB</h4><p>There are three requirements for embedding multiple renditions of an ebook inside a single EPUB file. First, the EPUB must include a <em>META-INF/metadata.xml file </em>that contains universal metadata for all renditions, which must include at minimum a unique publication identifier (see <a href="http://www.idpf.org/epub/renditions/multiple/#h.o65k36ti19">Publication Metadata</a> in the spec for more details and an example). Second, each rendition must be uniquely identified by a distinct OPF <a href="http://www.idpf.org/epub/301/spec/epub-publications.html#sec-package-documents">Package Document</a> that contains its <a href="http://www.idpf.org/epub/301/spec/epub-publications.html#sec-metadata-elem">metadata</a>, <a href="http://www.idpf.org/epub/301/spec/epub-publications.html#sec-manifest-elem">manifest</a>, and <a href="http://www.idpf.org/epub/301/spec/epub-publications.html#sec-spine-elem">spine</a> (sequencing in which assets should be rendered). Third, each rendition’s OPF file must be referenced in a distinct <strong>&lt;rootfile&gt; </strong>child element of <strong>&lt;rootfiles&gt;</strong> in the EPUB’s <em>META-INF/container.xml</em> file, e.g.:</p><pre>&lt;rootfile full-path=&quot;OEBPS/greatexpectations.opf&quot;<br>          media-type=&quot;application/oebps-package+xml&quot;/&gt;</pre><p>Each <strong>&lt;rootfile&gt; </strong>may contain one or more of four <a href="http://www.idpf.org/epub/renditions/multiple/#h.4tead1f3mo1e">rendition-selection attributes</a>, which identify the rendition’s purpose to the reading system:</p><p><a href="http://www.idpf.org/epub/renditions/multiple/#h.u174vaicigpv"><strong>rendition:accessMode</strong></a><strong> </strong>— Rendition content is categorized by a specific mode of communication. Accepts one or more of four enumerated values: <strong>auditory (</strong>content is primarily audio-based), <strong>tactile (</strong>content is primarily conveyed via touch — e.g., Braille), <strong>textual (</strong>content is primarily written language), and <strong>visual (</strong>content is primarily graphics/video).</p><p>The following <strong>&lt;rootfile&gt; </strong>element identifies an audio rendition:</p><pre>&lt;rootfile full-path=&quot;OEBPS/greatexpectations_spoken.opf&quot;<br>          media-type=&quot;application/oebps-package+xml&quot;<br>          <strong>rendition:accessMode=&quot;auditory&quot;</strong>/&gt;</pre><p><a href="http://www.idpf.org/epub/renditions/multiple/#h.i2sz2e7fiql8"><strong>rendition:language</strong></a>— Rendition content is associated primarily with a specific language. Accepts a <a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">valid language code</a> as its value.</p><p>The following <strong>&lt;rootfile&gt;</strong> element identifies a rendition in Japanese:</p><pre>&lt;rootfile full-path=&quot;OEBPS/greatexpectations_ja_translation.opf&quot;<br>          media-type=&quot;application/oebps-package+xml&quot;<br>          <strong>rendition:language=&quot;ja&quot;</strong>/&gt;</pre><p>Rendition variation by language should not be perceived as being limited solely to changes in text content. There’s also a dimension of responsive design that is quite relevant to linguistic variation. Languages differ in required character set support (English has 26 lowercase letters; <a href="http://en.wikipedia.org/wiki/Kanji#Total_number_of_kanji">Japanese has ~50,000 kanji characters</a>), and writing direction (Italian is written left to right; Arabic is written from right to left). It may be desirable, for example, to change CSS font declarations (<a href="http://www.w3.org/TR/css3-fonts/#font-face-rule">@font-face</a>/<a href="http://www.w3.org/TR/css3-fonts/#font-family-prop">font-family</a>) or margin handling to accommodate these sorts of differences.</p><p><a href="http://www.idpf.org/epub/renditions/multiple/#h.652no7qrkqt9"><strong>rendition:layout</strong></a><strong> — </strong>Rendition content is intended for either a reflowable or <a href="http://www.idpf.org/epub/301/spec/epub-publications.html#sec-package-metadata-fxl">fixed-layout</a> context. Accepts one of two enumerated values: <strong>reflowable (</strong>reflowable context) or <strong>pre-paginated (</strong>fixed-layout context).</p><p>The following <strong>&lt;rootfile&gt; </strong>element identifies a rendition to be used in a fixed-layout context:</p><pre>&lt;rootfile full-path=&quot;OEBPS/greatexpectations_color.opf&quot;<br>          media-type=&quot;application/oebps-package+xml&quot;<br>          <strong>rendition:layout=&quot;pre-paginated&quot;</strong>/&gt;</pre><p><a href="http://www.idpf.org/epub/renditions/multiple/#h.v5umqueir7kw"><strong>rendition:media</strong></a><strong> — </strong>Rendition is associated with a specific set of <a href="http://www.w3.org/TR/css3-mediaqueries/#media1">media feature</a> conditions. Accepts a valid media query (sans opening <strong>@media </strong>declaration and <a href="http://www.w3.org/TR/CSS2/media.html#media-types">media type</a>) as its value.</p><p>The following <strong>&lt;rootfile&gt; </strong>element identifies a rendition targeted for color displays:</p><pre>&lt;rootfile full-path=&quot;OEBPS/greatexpectations_color.opf&quot;<br>          media-type=&quot;application/oebps-package+xml&quot;<br>          <strong>rendition:media=&quot;color&quot;</strong>/&gt;</pre><p>Here is an example of a full <em>container.xml</em> file that lists three available renditions:</p><pre>&lt;container version=&quot;1.0&quot; xmlns=&quot;urn:oasis:names:tc:opendocument:xmlns:container&quot; xmlns:rendition=&quot;http://www.idpf.org/2013/rendition&quot;&gt;<br>    &lt;rootfiles&gt;<br>        &lt;rootfile full-path=&quot;OEBPS/default.opf&quot;<br>                  media-type=&quot;application/oebps-package+xml&quot;/&gt;<br>        &lt;rootfile full-path=&quot;OEBPS/color-reflow.opf&quot;<br>                  media-type=&quot;application/oebps-package+xml&quot;<br>                  <strong>rendition:media=&quot;color&quot;</strong>/&gt;<br>        &lt;rootfile full-path=&quot;OEBPS/ipad-reflowable.opf&quot;<br>                  media-type=&quot;application/oebps-package+xml&quot;<br>                  <strong>rendition:layout=&quot;reflowable&quot;</strong><br>                  <strong>rendition:media=&quot;min-device-width:768px&quot;</strong>/&gt;<br>    &lt;/rootfiles&gt;<br>&lt;/container&gt;</pre><p>Ereaders that comply with Multiple Renditions are required to use the algorithm defined in the specification’s <a href="http://www.idpf.org/epub/renditions/multiple/#h.4n44azuq1490">“Processing Model” section</a> to choose which rendition to display: Starting with the last <strong>&lt;rootfile&gt;</strong> entry in the list and moving backward, the reading system should review each entry. If all the entry’s <strong>rendition:</strong> attributes are true based on device specs and/or reading environment settings, that entry’s rendition should be displayed. If an entry has a <strong>rendition:</strong> attribute that is false, or does not have any <strong>rendition: </strong>attributes, the reading system should move on to the preceding <strong>&lt;rootfile&gt;</strong> entry and review it in the same fashion. The first <strong>&lt;rootfile&gt;</strong> in the list should be considered the default and be rendered if none of the other renditions are suitable.</p><p>In the preceding example, the final <strong>&lt;rootfile&gt;</strong> specifies both <strong>rendition:layout </strong>of “reflowable” and a<strong> rendition:media </strong>of “min-device-width:768px”. If the reading system is in reflowable mode and the device has a screen width of at least 768 pixels, then this rendition should be displayed. If not, the second <strong>&lt;rootfile&gt;</strong> specifies a <strong>rendition:media </strong>of “color,” so if the display supports color, this rendition should be displayed. If not, the reading system should fall back on the first <strong>&lt;rootfile&gt;</strong>’s rendition by default.</p><h4>Can I use Multiple Renditions right now?</h4><p>As of December 2014, I’m not aware of any ereader platforms that support Multiple Renditions. However, there’s no real harm in packaging additional renditions into EPUB files, and doing so would make ebooks forward-compatible with future ereader software iterations that build functionality around the spec. Both the <a href="http://idpf.org/epub/201">EPUB 2</a> and <a href="http://www.idpf.org/epub/30/spec/epub30-ocf.html#sec-container-metainf-container.xml">EPUB 3 OCF specifications</a> instruct reading systems to consider the OPF document referenced in the first <strong>&lt;rootfile&gt;</strong> in <em>container.xml</em> to be the default, so as long as you structure the EPUB’s <strong>&lt;rootfiles&gt;</strong> list accordingly, your desired default rendition should display as expected in reading systems that don’t support Multiple Renditions.</p><p>That said, reconfiguring workflows and updating tooling to produce Multiple Rendition EPUBs is a nontrivial effort, and content creators likely won’t find it a worthwhile investment until at least one of the major ereading platforms adds support (which will hopefully happen soon!).</p><h3>Pagebreaking and Adaptive Layout</h3><p>One of the biggest challenges of producing highly designed ebook content is ensuring content is paginated nicely. The <a href="http://www.idpf.org/epub/fxl/">fixed layout</a> spec is appealing because it provides a definitive approach for delineating page boundaries: mark up each two-page spread separately, to the exact screen-dimension specifications of your target ereader platform. But fixed-layout content is by definition unresponsive; it focuses on a single reading platform and thwarts user efforts to customize display settings such as type size and font face. It’s a sledgehammer solution not particularly suited to the nuances of a delicate problem.</p><p>Thus, the challenge is to replace that sledgehammer with a scalpel. We want to produce the standard, reflowable EPUB 3 or KF8 file, but still retain a reasonable level of control over content pagination and layout. The following sections explore several strategies for pagebreaking and layout in a reflowable context.</p><h4>“Hard” pagebreaks</h4><p>A <em>hard pagebreak</em> is an invisible, dashed horizontal line drawn across your content, saying “Start a new page here!” CSS 2.1 supports the insertion of hard pagebreaks via two properties: <a href="http://www.w3.org/TR/CSS21/page.html#page-break-props"><strong>page-break-before</strong> and <strong>page-break-after</strong></a>, which, when set to a value of <strong>always</strong>, force a pagebreak either before or after the designated element, respectively. The following CSS indicates that hard pagebreaks should be created before <strong>h1</strong> elements, so that these headings will always begin on a new page:</p><pre>h1 { <strong>page-break-before: always</strong> }</pre><p>Both <strong>page-break-before</strong> and <strong>page-break-after</strong> are honored by iBooks and Kindle KF8 reading systems.</p><p>Hard pagebreaks are easy to insert, but they should be employed sparingly in responsive ebooks, as their overuse effectively regresses to a fixed-layout paradigm that limits the flexibility of content to adapt to different screen dimensions. If you use <strong>page-break-before</strong> to optimize every page boundary for one platform, you may be unpleasantly surprised with the results on another, where there may be unintended short pages.</p><h4>“Soft” pagebreaks</h4><p>A better, more responsive method of adjusting page boundaries is to use <em>soft pagebreaks</em>. Rather than mandating, “Start a new page here!”, soft pagebreaks are conditional instructions, which suggest the placement of pagebreaks based on current page geometry.</p><p>A popular and useful form of soft pagebreak available in CSS is the <strong>page-break-inside</strong> property, which accepts a value of <strong>avoid</strong> to indicate that, whenever possible, the reading system <em>should not</em> insert a pagebreak within the content of the designated element.</p><p>The following CSS indicates that a page boundary should not split the content of <strong>pre</strong> elements with a class of <strong>poem, </strong>and results are shown in the screenshots below:</p><pre>pre.poem { <strong>page-break-inside: avoid</strong> }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J4e-dcJq0UUIZZxEXdMsXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ezVRPZFg_B9tsiCxmuG3g.png" /><figcaption>Poem excerpt from <em>Through the Looking-Glass </em>in iBooks for Mac. At left, poem is typeset so that it is not interrupted by a page boundary using <strong>page-break-inside: avoid</strong>. At right, the same poem is typeset without any pagebreaking CSS, and spans a page boundary.</figcaption></figure><p><strong>page-break-inside: avoid</strong> is supported by iBooks, but is ignored on Kindle KF8 platforms. When typesetting for both platforms, you may want to use media queries (see <strong>“Media Queries for Kindle,”</strong> earlier in this article, for more on this topic) to specify fallback pagebreaking for Kindle, e.g.:</p><pre>pre.poem { <strong>page-break-inside: avoid</strong> }<br><br>@media amzn-kf8 {<br>  pre.poem { <strong>page-break-before: always</strong> }<br>}</pre><p>Soft pagebreaks can also theoretically be implemented with <strong>page-break-before: avoid </strong>and <strong>page-break-after: avoid</strong>. The following CSS indicates that a pagebreak should not be inserted prior to the first paragraph following a <strong>h1</strong>, specifying that a top-level heading should be kept on the same page as the subsequent paragraph:</p><pre>h1 + p { <strong>page-break-before: avoid</strong> }</pre><p>However, I’ve found that the above CSS pagebreaking instruction is not consistently obeyed in either iBooks or Kindle, so this approach is not widely usable at this time.</p><p>When employed judiciously, the <strong>page-break-before</strong>, <strong>page-break-after</strong>, and <strong>page-break-inside</strong> CSS properties are quite powerful, but the granularity of their control extends only to the level of specifying locations where breaks can occur <em>between</em> elements. They do not permit you to suggest locations for a pagebreak <em>within</em> elements. In other words, you can specify <strong>page-break-inside: avoid</strong> on a <strong>pre</strong> element to require that a pagebreak fall before or after its content, but you cannot use this property to specify that a pagebreak is permitted to fall anywhere after the first four lines of its content or before the last four lines of its content.</p><p>To achieve additional intraelement granularity at the line level, there are two other CSS properties available:<a href="http://www.w3.org/TR/CSS21/page.html#break-inside"> <strong>orphans</strong> and <strong>widows</strong></a>. The <strong>orphans</strong> property allows you to specify the minimum number of lines of content within an element that must be preserved <em>before</em> a page boundary (i.e., at the bottom of a page), and the <strong>widows</strong> property allows you to specify the minimum number of lines of content within an element that must be preserved <em>after</em> a page boundary (i.e., at the top of a page). Both properties have a default value of <strong>2</strong>, and are typically set on a global basis (e.g., to make sure all paragraphs are typeset such that they have no fewer than 2 lines “orphaned” or “widowed” at the bottom or top of a page).</p><p>However, it’s easy to customize widow and ophan properties for different elements. In the following CSS, <strong>widows</strong> and <strong>orphans</strong> are set to <strong>4</strong> for <strong>pre</strong> elements with a class of <strong>poem</strong>:</p><pre>pre.poem {<br>  <strong>widows: 4;</strong><br>  <strong>orphans: 4;</strong><br>}</pre><p>The screenshot at below-left illustrates the results; compare to the screenshot at below-right, where <strong>page-break-inside: avoid</strong> was used instead, forcing the entire second poetry block to the recto page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aC9vK5I42MmkeJWiZitYzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VFktTMjm_PV58WRzEZeB6A.png" /><figcaption>Soft pagebreaking of a poem excerpt from <em>Through the Looking-Glass</em> in iBooks for Mac. At left, second “Jabberwocky” poem is pagebroken using <strong>widows: 4</strong> and <strong>orphans: 4</strong>,<strong> </strong>and spans the page break with more than four lines on either side. At right, second “Jabberwocky” poem is pagebroken using <strong>page-break-inside: avoid</strong>,<strong> </strong>and is pushed to the second page.</figcaption></figure><h4>EPUB Adaptive Page Layout</h4><p>Soft and hard pagebreaks are powerful tools for optimizing pagination of responsive ebook content, but they fall short of fixed-layout design in one key area. Pagebreaking alone can’t bring the sort of sophisticated layouts possible in a fixed context, where each element can be absolutely positioned on a set canvas, to a reflowable context, where content must dynamically adapt to different screen dimensions.</p><p>To fill this gap, the IDPF developed a new <a href="http://www.idpf.org/epub/pgt/">EPUB Adaptive Layout specification</a>, whose mission is to support “magazine-style” design for reflowable EPUB. Adaptive Layout comprises a set of CSS extensions (<a href="http://www.idpf.org/epub/pgt/#s1.5">prefixed with <strong>-epub</strong> or <strong>-epubx</strong></a><strong>)</strong>, which facilitate the creation of book templates containing <a href="http://www.idpf.org/epub/pgt/#s3.4.2">master pages (<strong>@-epubx-page-master)</strong></a>, broken up into distinct <a href="http://www.idpf.org/epub/pgt/#rule-partition">“partitions” (<strong>@-epubx-partition)</strong></a> into which HTML elements can be flowed based on user-defined rules.</p><p>Features of EPUB Adaptive Layout include:</p><ul><li>Conditional master pages based on screen dimensions of reading system via <a href="http://www.idpf.org/epub/pgt/#s3.4.9"><strong>-epubx-min-page-width</strong> and <strong>-epubx-min-page-height</strong></a></li><li>Conditional styling via media queries and the custom <a href="http://www.idpf.org/epub/pgt/#s2.3"><strong>@-epubx-when </strong></a>rule.</li><li>Repeated content regions on pages (e.g., headers/footers containing section titles) via <a href="http://www.idpf.org/epub/pgt/#s3.3.2"><strong>-epubx-flow-options: static</strong></a></li><li>Snap-to-grid for multicolumn layouts via <a href="http://www.idpf.org/epub/pgt/#s3.4.13"><strong>-epubx-snap-height</strong></a></li></ul><p>A detailed explanation of Adaptive Layout is beyond the scope of this article. To learn more, I highly recommend the <a href="http://sorotokin.com/adaptive-layout/">series of progressive tutorials and corresponding sample files</a> created by Peter Sorotokin (coeditor of the specification), which walk through building adaptive-layout CSS stylesheets step by step.</p><p>At present, no major ereading platforms support the Adaptive Layout CSS extensions (the spec is currently in Informational Document status). However, Sorotokin has released an open source, JavaScript browser implementation <a href="https://code.google.com/p/adaptive-layout/">available for download on Google Code</a>, which is relatively <a href="https://code.google.com/p/adaptive-layout/source/browse/README.txt">easy to install on a web server</a>. Additionally, desktop viewers are available for both Mac and Windows OSes on <a href="http://sorotokin.com/adaptive-layout/">Sorotokin’s site</a>.</p><p>The following screenshots from a <a href="http://sorotokin.com/adaptive-layout/driver.xhtml#x=samples/apollo8/index.xhtml">live demo</a> created by Sorotokin illustrate an adaptive-layout CSS rendering of the text of <a href="http://en.wikipedia.org/wiki/Apollo_8">Wikipedia’s Apollo 8 entry</a> on Mobile Safari for iPad and iPhone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BYJQ_6TQqFR8yvtD3khdkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*YWt_5Y1zWmkoSGQ7udolog.jpeg" /><figcaption><a href="http://sorotokin.com/adaptive-layout/driver.xhtml#x=samples/apollo8/index.xhtml&amp;f=epubcfi()">“Apollo 8&quot; Adaptive Layout EPUB demo</a> by Peter Sorotokin, rendered in Mobile Safari for iPad 3 (left) and iPhone 5S (right)</figcaption></figure><p>There has been some lively debate about the merits of both the <a href="http://www.baldurbjarnason.com/notes/idpf-css-pgt/">EPUB Adaptive Layout</a> <a href="http://www.baldurbjarnason.com/notes/amazon-wins/">specification</a> and the <a href="http://alistapart.com/blog/post/css-regions-considered-harmful">CSS Regions module</a> on which its partition module was originally based, and it’s a bit unclear right now as to what the future holds for either specification. Regardless, the Adaptive Layout initiative is clearly an impressive proof of concept of what’s currently achievable on the web stack. I’m optimistic that it will serve as a jumping-off point for future exploration in this space (such as <a href="http://vivliostyle.com/">the Vivliostyle project</a>), which will ultimately bear fruit for publishers looking for open-standard, responsive alternatives to fixed layout. Stay tuned!</p><h3>Bibliography/Further Reading</h3><p><a href="http://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf"><em>Amazon Kindle Publishing Guidelines</em></a>, 2014.</p><p>Bjarnason, Baldur. <a href="http://www.baldurbjarnason.com/notes/idpf-css-pgt/">“On CSS Page Templates,”</a> March 2, 2012.</p><p>Castro, Liz. <a href="http://www.pigsgourdsandwikis.com/2012/01/media-queries-for-formatting-poetry-on.html">“Media Queries for formatting Poetry on Kindle and EPUB,”</a> January 15, 2012.</p><p><a href="http://www.w3.org/TR/css3-break/">“CSS Fragmentation Module Level 3,”</a> W3C Working Draft, January 16, 2014.</p><p><a href="http://www.w3.org/TR/css-regions-1/">“CSS Regions Module Level 1,”</a> W3C Working Draft, October 9, 2014.</p><p>Daly, Liza. <a href="http://www.ibm.com/developerworks/web/library/x-richlayoutepub/index.html">“Create rich-layout publications in EPUB 3 with HTML5, CSS3, and MathML,”</a> July 5, 2012.</p><p><a href="http://www.idpf.org/epub/pgt/">“EPUB Adaptive Layout,”</a> IDPF Informational Document, 2011–2012.</p><p><a href="http://www.idpf.org/epub/fxl/">“EPUB 3 Fixed-Layout Documents,”</a> IDPF Informational Document, 2012.</p><p><a href="http://www.idpf.org/epub/renditions/multiple/">“EPUB Multiple-Rendition Publications 1.0,”</a> IDPF Proposed Specification, December 2, 2014.</p><p><a href="http://www.idpf.org/epub/301/spec/epub-publications.html">“EPUB Publications 3.0.1,”</a> IDPF Recommended Specification, June 26, 2014.</p><p>Gilbert, Stephen. <a href="http://stephen.io/mediaqueries/">“CSS Media Queries for iPads &amp; iPhones.”</a></p><p>Gylling, Markus and Ivan Herman. <a href="http://w3c.github.io/epubweb/">“Advancing Portable Documents for the Open Web Platform: EPUB-WEB,”</a> Unofficial Draft, November 21, 2014.</p><p>Hatch, Peter. <a href="http://extraordinarycommons.com/media-query-values-for-kindle-fire-previewer/">“Media Query Values for Kindle Fire (Previewer),”</a> January 26, 2012.</p><p><a href="http://www.mobileread.com/forums/showthread.php?t=209528">“Help improve Kindle ebook formatting,”</a> MobileRead Forums, March 29, 2013-.</p><p>Marcotte, Ethan. <a href="http://alistapart.com/article/responsive-web-design">“Responsive Web Design,”</a> May 25, 2010.</p><p><a href="http://www.w3.org/TR/css3-mediaqueries/">“Media Queries,”</a> W3C Recommendation, June 19, 2012.</p><p><a href="http://www.w3.org/TR/mediaqueries-4/">“Media Queries Level 4,”</a> W3C First Public Working Draft, June 5, 2014.</p><p>Mod, Craig. <a href="http://craigmod.com/journal/platforming_books/">“Platforming Books,”</a> August 2012.</p><p><a href="http://w3c.github.io/dpub-pagination/">“Requirements for Latin Text Layout and Pagination,”</a> W3C Editor’s Draft, November 14, 2014.</p><p>Schultz, Derrick. <a href="https://github.com/dvschultz/99problems/issues/18">“iBooks media queries differ for scrolling vs pagination,”</a> May 11–12, 2014.</p><p>Schultz, Derrick. <a href="http://epubsecrets.com/media-queries-for-kindle-devices.php">“Media Queries for Kindle Devices,”</a> May 14, 2014.</p><p>Sorotokin, Peter. <a href="http://sorotokin.com/adaptive-layout/">“Adaptive Layout.”</a></p><p>Wium Lie, Håkon. <a href="http://alistapart.com/blog/post/css-regions-considered-harmful">“CSS Regions Considered Harmful,”</a> January 22, 2014.</p><p><em>Title image </em><a href="https://www.flickr.com/photos/dullhunk/6827669146/in/photostream/"><em>“λάστιχο, rubber bands by Bill Ebbesen”</em></a><em> by </em><a href="https://www.flickr.com/photos/dullhunk/"><em>Duncan Hull</em></a><em> (</em><a href="https://www.flickr.com/photos/dullhunk/6827669146/in/photostream/"><em>https://www.flickr.com/photos/dullhunk/6827669146/in/photostream/</em></a><em>)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bba01328219" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Fault in Our Email]]></title>
            <link>https://medium.com/@sandersk/the-fault-in-our-email-ea7a56278899?source=rss-baf5f824b1eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea7a56278899</guid>
            <dc:creator><![CDATA[Sanders Kleinfeld]]></dc:creator>
            <pubDate>Mon, 29 Sep 2014 13:27:25 GMT</pubDate>
            <atom:updated>2014-09-29T13:27:25.545Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7cccqnDA67MlYbAhnqcRPA.jpeg" /><figcaption><a href="https://www.flickr.com/photos/glenbledsoe/6245440290">“Telephone Exchange”</a> by <a href="https://www.flickr.com/photos/glenbledsoe/">Photo Atelier</a>; <a href="https://creativecommons.org/licenses/by/2.0/">Creative Commons — Attribution 2.0 Generic</a></figcaption></figure><h4>On the deprecation of the inbox and the rise of a new breed of workplace communication apps</h4><p>Conventional workplace wisdom declares email a daily scourge. We <a href="http://www.news.com.au/finance/work/emails-expected-to-rise-to-140-a-day-in-2018/story-e6frfm9r-1226904239876">receive too much</a> of it. We spend too much <a href="http://mashable.com/2012/08/01/email-workers-time/">time replying to it</a>. We concoct elaborate strategies to <a href="https://www.google.com/search?q=%22tame+your+inbox%22">cope with it</a> and avoid incurring a debt that downward-spirals to <a href="http://en.wikipedia.org/wiki/Email_bankruptcy">email bankruptcy</a>.</p><p>We bow down at the altar of <a href="http://www.43folders.com/2006/03/13/inbox-zero">Inbox Zero</a>, the methodology that dictates we take prompt, concrete action to dispatch with every single message we receive. <em>Reply to it. </em>Or<em> File it. </em>Or<em> Delete it.</em> We turn the drudgery of processing the flood of correspondence into a <a href="http://badgeville.com/wiki/">game</a>. <a href="https://twitter.com/search?f=realtime&amp;q=inbox%20zero%20ftw&amp;src=typd">Inbox Zero, FTW!</a> Achievement unlocked…</p><p>…till the next time we hit Refresh. Because emails are like gray hairs: for every one we send packing, five more will soon arrive in its place. Any client-side strategy we take to conquer our inboxes is thus limited by the fact that it’s palliative, not ameliorative. Perpetuating Inbox Zero means living in a constant state of vigilance, aggressively and swiftly responding to every incoming message. It means becoming an email-<a href="http://upload.wikimedia.org/wikipedia/commons/e/e0/Southwestern_Bell_-_Answering_Machine-_Model_FA935.jpg">answering machine</a>!</p><p>Things weren’t supposed to turn out this way. Despite the efficiency and convenience afforded in terms of near-instantaneous delivery, email was initially sold to us as a method for more formal, deliberate correspondence—the modern-day electronic substitute for the physical letter, which both aptly and ironically was originally mass-marketed in America via millions of physically shipped CD-ROMs and a <a href="https://www.youtube.com/watch?v=gFBLiHpkcOk">retro-folksy catchphrase</a>. Receiving an email from a friend or a family member or a colleague was at that time an event of import, and that’s a key reason why we all bought in.</p><p>What’s happened, however, in the transition from the age of “You’ve Got Mail” to the era of Inbox Zero is that our perception of and relationship to email has dramatically changed. As Douglas Rushkoff puts it in his book <a href="http://www.amazon.com/Present-Shock-When-Everything-Happens/dp/1617230103/"><em>Present Shock</em></a>, the advent of ubiquitous Internet access via WiFi and cellular data networks has fostered an <em>why-haven’t-you-answered-me-yet?!? </em>culture that’s coopted a <a href="http://books.google.com/books?id=pe0v5ZgdtigC&amp;pg=PT66&amp;lpg=PT66&amp;dq=%22potentially+empowering+asynchronous+technology%22">“potentially empowering asynchronous technology” and recast it as a “falsely synchronous one,”</a> where we must scramble to keep up with the imperative laid down by the bold subject lines infiltrating our screens.</p><p>The collective self-deception laid bare: an asynchronous technology for a synchronous age. We cannot keep up with email because it cannot keep up with us.</p><p><em>Q.E.D.</em>, email is broken.</p><h3>“Slack” to the future</h3><p>OK, our business culture is clamoring for a more synchronicity-friendly environment; what are viable alternatives to email? Instant messaging apps (<a href="http://www.aim.com/">AIM</a>, <a href="https://support.google.com/chat/answer/159495?hl=en">Google Chat</a>, <a href="https://messenger.yahoo.com/">Yahoo Messenger</a>) have long been popular office tools for one-on-one real-time conversation, yet what they’re largely missing (beyond some basic transcripting features) is the gestalt of the inbox: robust functionality around collating and organizing disparate strands of digital correspondence.</p><p>But there’s another longstanding model for digital synchronous communication that has been gaining traction in the tech sphere: the chatroom. Ironically, at the same time that IRC <a href="http://royal.pingdom.com/2012/04/24/irc-is-dead-long-live-irc/">has been on the decline</a>, “old-school” chat is having a renaissance in the workplace. Primarily adopted to facilitate interaction within distributed developer teams, tools such as <a href="http://campfirenow.com/">Campfire</a> (launched in 2006) and <a href="https://www.atlassian.com/software/hipchat">HipChat</a> (launched in 2010) have further adapted the chat paradigm to suit the office, each adding some form of the following features geared toward task management and bolstering productivity:</p><ul><li><strong>API integrations. </strong>Connect the chatroom with other services used for project management—<a href="https://github.com/">GitHub</a>, <a href="https://asana.com/">Asana</a>, <a href="https://travis-ci.org/">Travis</a>/<a href="http://jenkins-ci.org/">Jenkins</a>, <a href="https://www.dropbox.com/">Dropbox</a>—and set up chatroom notifications to track user activity on these outside platforms (e.g., post a chat message whenever a new bug is filed on GitHub).</li><li><strong>File management. </strong>Upload binary files (Word docs, PDFs, images, etc.), and share them with everyone in chat, as well as archive them for future access.</li><li><strong>Smart notifications. </strong>Configure desktop/smartphone alerts to ping you whenever somone explicitly @mentions you (<a href="https://support.twitter.com/articles/14023-what-are-replies-and-mentions">the model popularized by Twitter</a>), or just includes your first name in a chat message (usefulness inversely proportional to popularity of appelation).</li><li><strong>Bots!</strong> Set up a <a href="https://hubot.github.com/">chatbot</a> to lurk in your room and perform designated tasks in response to predefined commands or <a href="http://en.wikipedia.org/wiki/Regular_expression">text patterns</a>—e.g., <a href="https://github.com/github/hubot-scripts/blob/master/src/scripts/sosearch.coffee">send queries</a> to <a href="http://stackoverflow.com/">StackOverflow</a>, or spray the message window with <a href="https://github.com/github/hubot/blob/master/src/scripts/pugme.coffee">pug images</a>.</li></ul><p>Chatroom apps have been bubbling under the radar for quite some time, but they appear to be approaching a tipping point of cultural awareness this year with the release of <a href="https://slack.com/">Slack</a>, which enters the category with two key advantages: <a href="http://blogs.wsj.com/venturecapital/2014/04/25/slack-raises-42-8m-to-kill-inbox-clutter-app-overload-at-work/">~$40 million in VC funding</a> and i<a href="https://twitter.com/SlackHQ/status/467457718270189568">nsouciant-hipster branding</a>.</p><p>Slack boldly promises that it’s the <a href="http://www.theverge.com/2014/8/12/5991005/slack-is-killing-email-yes-really">email killer</a> we’ve been waiting for (<a href="https://slack.com/is/team-communication">“Internal email becomes unnecessary as desktop &amp; mobile messaging, file sharing and notifications fold into one place.”</a>), but the implication of its branding isn’t particularly subtle either: use Slack, and your virtual workspace will be so chill… 😎</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h114Ptj7Jdqz8czNClBkwA.png" /><figcaption>This Slack conversation is fictional.<br>Any resemblance to actual virtual workplace conversation is purely coincidental.</figcaption></figure><h3>Send in the GIFs!</h3><p>…Except maybe it’s not so chill? <em>Lively</em>, sure. <em>Irreverent</em>, perhaps. <a href="http://giphy.com/"><em>GIFtastic</em></a>, indubitably. But <em>chill</em> perhaps is not the best choice of slang to capture the feeling of playing catch-up with a perpetual scroll of unthreaded messages from every single one of your team members. Take, for example, the tiny excerpt of <strong>#group_chat</strong> above, in which the Slack user must track three separate conversational threads involving four different people, a web server under siege, a robo-notification from GitHub, and a canine posing in a hotdog bun.</p><p>But we ♥ this sort of thing nowadays, right? It’s the premise behind social media: let’s go panning for some useful nuggets of information in a stream of frivolous stimuli.</p><p>Context matters, though. Work chat is not another <a href="http://www.washingtonpost.com/news/the-intersect/wp/2014/09/23/after-eight-years-with-facebooks-news-feed-theres-no-such-thing-as-tmi/">“news” feed</a>, not a diversion buried deep in the bowels of your browser tabs to which you spelunk when feeling bored or voyeuristic. Work chat is email in Twitter’s clothing, and the concomitant pressures and responsibilities of the inbox lurk just beneath its surface. <em>Contribute to the conversation. Click on the </em><a href="https://twitter.com/ftrain/status/490162232903602177"><em>Hackernews links</em></a><em>. Add </em><a href="http://giphy.com/gifs/LlTYKN146VMyI"><em>a GIF</em></a><em>.</em> Being a participant in chat is your job…</p><p>…Although it’s not really your job. It ain’t cool to do nothing but Slack all day. You’re being paid to<em> &lt;insert your job title in verb form here&gt;</em>, remember?, so only one eye on the <a href="http://giphy.com/gifs/FLndjoNsb2Gkw">GIFs</a>, please, and keep the other one glued to <em>&lt;insert preferred example of official drudgery here&gt;</em>.</p><p>No mistake, like the best email clients, apps such as Campfire and Slack are beautifully conceived and executed pieces of software. The benefits they accrue to an organization in terms of adding transparency, archivability, and accountability to team decision making are real and potentially game-changing. As are the productivity gains, e.g., of employing chatbots to automate routine tasks or <a href="https://github.com/github/hubot-scripts/blob/master/src/scripts/eight-ball.coffee">assist with forecasts/projections</a>.</p><p>That said, insofar as they guarantee a more innately desirable form of digital correspondence, an escape hatch from the tyrannies of the inbox, their promises are largely chimerical. If we abandon email as a result of the stress induced by leveraging asynchronous technology for synchronous purposes, then we need to acknowledge that we’re re-creating the same tension with “chat” by doing the opposite: treating synchronous technology asynchronously.</p><p>With most synchronous forms of communication—telephone calls, <a href="https://www.google.com/+/learnmore/hangouts/">“hangouts”</a>, or actual face-to-face conversations unmediated by circuit boards—the implicit, <a href="https://medium.com/@cshirky/why-i-just-asked-my-students-to-put-their-laptops-away-7f5f7c50f368">if not explicit</a>, etiquette is that you are supposed to lend your undivided attention to the interaction. However, in a culture of Slack, where the chatroom stays “live” 24/7, no such presumption exists. Again, if you’re Slack-ing without multitasking, then you truly are slacking.</p><p>As such, ultimately, chat users find themselves in the same anomic, oxymoronic state as they did with email, a sort of <em>asynchronous </em><strong><em>NOW</em></strong><em>, </em>in which they’re totally empowered to respond to others at their leisure, as long as it’s within the next five minutes.</p><h3>Surviving the Asynchronous Synchrony</h3><p>If both synchronous and asynchronous technologies fail to meet the demands of our 4G LTE–based economy, what’s left?</p><p>Clearly, we need a new tool. One that’s both synchronous and asynchronous simultaneously (or maybe not simultaneously). An <a href="http://www.quora.com/What-startups-are-working-on-Uber-for-X">Uber for confabulation</a>!</p><p>Here’s the elevator pitch:</p><p>Since the primary bottleneck slowing down contemporary messaging services is the overhead of reading, dynamically formulating thoughts in response, and compiling them into written language, let’s outsource those capabilities to a server farm. We’ll build a cloud-based service that takes advantage of the latest advances in machine learning and natural language processing, à la <a href="https://www.apple.com/ios/whats-new/quicktype/">QuickType</a>, to analzye the full corpus of a user’s past digital correspondence (emails, IMs, SMSes), and adaptively suggest appropriate prefab replies to incoming messages that users can dispatch with a single flick of the finger—thinking optional.</p><p>Via “personless chat,” we can revolutionize workplace productivity by increasing our median communication throughput to 108 messages per hour, decreasing mean response latency to 27 seconds, while still leaving ample bandwidth for videoconferencing, Twitter, and <a href="http://gabrielecirulli.github.io/2048/">2048</a>…</p><p>…Or, alternatively, maybe we could all just log off for a few hours and get some work done.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea7a56278899" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Five reasons for optimism about the future of ebooks ☺]]></title>
            <link>https://medium.com/@sandersk/five-reasons-for-optimism-about-the-future-of-ebooks-23ce94f3bfb8?source=rss-baf5f824b1eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/23ce94f3bfb8</guid>
            <dc:creator><![CDATA[Sanders Kleinfeld]]></dc:creator>
            <pubDate>Tue, 01 Jul 2014 13:09:15 GMT</pubDate>
            <atom:updated>2014-07-12T02:53:15.160Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“THAT COMPANY is destroying my P&amp;L, the entire book industry, and the fabric of civilized society.”</blockquote><blockquote>“I really like their free, two-day shipping, though.”</blockquote><blockquote>“Me too.”</blockquote><p>There’s a lot of tsoris in the publishing community right now over ebooks. Much of it has something to do with THAT COMPANY WITH THE WEBSITE THAT SELLS ALL THE THINGS, how THAT COMPANY has a stranglehold on the book market, how it’s devaluing our literary canon, how it has publishers <a href="https://www.youtube.com/watch?v=s_hFTR6qyEo"><em>right where it wants them</em></a>.</p><p>But we’re not just cranky about THAT COMPANY. Other jeremiads include—but are not limited to—the painfully slow <a href="http://epubtest.org/results/">adoption curve of EPUB 3</a>, the demise of beloved sites like <a href="https://readmill.com/">Readmill</a>, the <a href="http://www.thebookseller.com/news/time-called-enhanced-e-books-lbf-digital-conference.html">failure of “enhanced” ebooks to gain traction</a>, <a href="http://www.pigsgourdsandwikis.com/2013/06/getting-ibooks-to-respect-image-width.html">sundry ereader feculence</a>, <a href="http://business.time.com/2013/10/31/the-pen-is-mightier-e-book-growth-stagnating/">stagnating ebook sales</a>, and <a href="https://www.52novels.com/sideloading-your-ebooks-to-a-device-or-app/">sideload</a>ing<em>.</em></p><p>I’m a cynic by nature, and count wallowing among my favorite hobbies, but after half a decade as a software engineer in the digital publishing space, even I’ve had enough and am issuing a moratorium on the negativity! Instead, I want to talk about some of the promising trends I’ve seen develop over the past year that foretell a bright future for the digital book. Forthwith, <strong><em>Five reasons for optimism about the future of ebooks </em></strong>☺</p><h3>#1: Ebook standards development is flourishing</h3><p>I think there’s a tendency in publishing circles to look at EPUB 3 as some sort of digital-book endgame (e.g., “When NOOK finally fully supports EPUB 3, I can upgrade my entire ebook catalog”), when in reality, it’s merely a precondition for the real cutting-edge work to come.</p><p>EPUB 3 set the stage for avant-garde ebook development by opening the door to embedding (X)HTML5, CSS3, and JavaScript within an ebook container, but the next stage of evolution in the EPUB specification is about further leveraging standards to mainstream this innovation.</p><p>Here’s an overview of some of the new EPUB specifications currently being developed by the <a href="http://idpf.org/">International Digital Publishing Forum</a> (most currently in Draft status) to do just that:</p><p><strong>Dictionaries/Glossaries and Indexes</strong>: Marking up reference sections and indexes in EPUB XHTML content documents is challenging, especially if you care about rich semantics (which <a href="http://blog.safaribooksonline.com/2014/06/02/craft-ebooks/">you really should</a>). In an index, how do you tag a page reference when content is reflowable, and there are no set pages? In a dictionary, how do you tag the pronunciation information? The <a href="http://www.idpf.org/epub/dict/"><em>EPUB Dictionaries and Glossaries</em></a> and<strong> </strong><a href="http://www.idpf.org/epub/idx/"><em>EPUB Indexes 1.0</em></a> specs provide canonical semantic inflection guidelines for dictionary/glossary and index content, respectively, via the <a href="http://www.idpf.org/accessibility/guidelines/content/semantics/epub-type.php">epub:type</a> attribute. The Dictionaries/Glossaries spec also defines a required <a href="http://www.idpf.org/epub/dict/#h.8uipzwzfoeec">Search Key Map Document</a>: an XML mapping of term keywords to their locations in the dictionary/glossary. Reading-system platforms that add support for these specifications can use them to implement features and behaviors that provide an improved reader experience—for example, pop-up definitions for custom glossary terms in a medical textbook, or a navigation panel for the index with separate tabs for each letter-group of alphabetized terms.</p><p><strong>Open Annotation</strong>: A key value-add of digital over print is its ability to foster social reading, whereby ebook consumers can highlight/annotate text content and share this data with select friends and/or the general public. Most ereader platforms have some degree of “social” built into their reading systems (e.g., iBooks has pop-up functionality where you can annotate text, or highlight a quote and post it on Twitter or Facebook), but these mechanisms are generally proprietary and not interoperable with other systems. In other words, if you annotate your EPUB in iBooks, and then move it to your NOOK (assuming DRM doesn’t prohibit you from doing so; see <strong>#4, </strong>below), your notes are not coming along for the ride. As its name suggests, the <a href="http://www.idpf.org/epub/oa/"><em>Open Annotation in EPUB</em></a><em> </em>spec seeks to address this issue by defining a universal data-interchange format for EPUB annotations, based on the <a href="http://www.openannotation.org/spec/core/"><em>W3C’s Open Annotation Data Model</em></a>. Annotation metadata (name of annotator, date of annotation, publication being annotated, etc.) is formatted as <a href="http://json.org/">JSON</a>, and annotation content itself is stored within the JSON <em>chars</em> property as an XHTML5 document fragment. Annotation data can be packaged within an EPUB archive or distributed separately.</p><p><strong>Widgets: </strong>The EPUB 3.0 spec already makes it possible to add “widgets” (e.g., a graphing calculator for a math textbook, a slideshow viewer for a photography book) to an ebook, by embedding the necessary XHTML5/CSS/JS for the mini webapp. What the <a href="http://www.idpf.org/epub/widgets/"><em>EPUB Widget Packaging and Integration</em></a><em> </em>specification offers, however, is a standard mechanism for packaging widgets as standalone EPUB archives (based on the <a href="http://idpf.org/epub/30/spec/epub30-publications.html">EPUB Publications 3.0 spec</a>) that can be distributed separately from the ebook, and for embedding these independent widget modules back into EPUBs. It’s the start of a module architecture for ebooks, which will make it possible for developers to share/distribute the widgets they make—effectively a <a href="http://rubygems.org/">rubygems</a> or <a href="https://www.npmjs.org/">npm</a> for EPUB. Very exciting!</p><p><strong>EDUPUB (</strong><em>Disclaimer: I am a member of the EDUPUB working group</em>): The mission of EDUPUB is to develop an ebook profile based on EPUB 3 expressly geared for educational (textbook) content. The first draft release of the <a href="http://www.idpf.org/epub/profiles/edu/spec/"><em>EPUB 3 EDUPUB Profile</em></a><em> </em>introduces a initial set of <a href="https://docs.google.com/document/d/1_Tzeq5xwdwLhSdaHStvAthhOFu9UuT8yFmK787yw420/edit#">structural semantics</a> tailored for educational content (encompassing the <a href="http://www.idpf.org/epub/vocab/structure/">EPUB 3 Structural Semantics Vocabulary</a>, as well as additional terminology for learning objectives, assessments, etc.), content model rules for sectioning, and metadata usage recommendations. Future iterations will tackle requirements for teacher editions and analytics.</p><p>In addition to the IDPF’s work on ebook standards, the <a href="http://www.w3.org/">W3C</a> has also chartered the <a href="http://www.w3.org/dpub/IG/wiki/Main_Page">Digital Publishing Interest Group</a> to guide development of HTML5 and CSS features to meet the needs of publishers producing digital content. The DPIG has released a <a href="http://www.w3.org/TR/dpub-latinreq/">“latinreq”</a> Working Draft to formalize typsetting requirements for Latin character sets, as well as documents/wikis around structural semantics, annotation, and metadata.</p><h3>#2: A new open-source rendering engine for ereaders is on the way</h3><p>Standards are great, but on their own, they’re not enough. To effect meaningful change in the ebook space, publishers need to adopt said standards, and ereader vendors need to support them in their reading systems. The past three years since the EPUB 3 spec was released have seen a protracted chicken-or-egg standoff where both publishers and vendors have been relatively content to let the other side act first. Throughout this time period, there’s definitely been <a href="http://toc.oreilly.com/2013/02/oreillys-journey-to-epub-3.html">some</a> <a href="http://exchanges.wiley.com/blog/2014/05/16/improving-the-reader-experience-with-epub-3/">motion</a> on <a href="http://the-digital-reader.com/2012/05/23/official-ibooks-now-supports-epub3/#.U7C2pxbbq0Q">both sides</a>, but a tipping point has yet to be reached.</p><p>At present, if anything’s going to break this impasse, it’s going to be the Readium project. Most people probably know of Readium as the organization behind that Chrome plugin that lets you QA EPUB 3 files in the Web browser, but they’re also developing the <a href="http://readium.org/projects/readium-sdk">Readium SDK</a>, a new, <a href="https://github.com/readium/readium-sdk">open-source rendering engine for EPUB 3</a> that can power native ereader applications and serve as a successor to the <a href="http://www.adobe.com/devnet/readermobile.html">Adobe RMSDK</a> currently in use in many platforms, including the NOOK.</p><p>With Kobo, Google, and Adobe counted among Readium’s membership, it does not seem unreasonable to be optimistic that the SDK initiative is finally going to catalyze more widespread support of EPUB 3 in ereaders. But even if the majority of commercial platforms continue to stagnate indefinitely at EPUB 2, Readium (along with initiatives like <a href="https://github.com/futurepress/epub.js/">epub.js</a>) represents a key step toward bringing ebooks to the open web, where I believe they can flourish equally as well (if not moreso) as they do in any digital retailer’s walled garden.</p><h3>#3: The tools keep coming</h3><p>At <a href="http://bib.archive.org/">Books in Browsers</a> 2012, Adam Witwer gave an insightful talk entitled <a href="https://www.youtube.com/watch?v=aRmHVzIQ_D0">“We’ve got the tools. Let’s start using them</a>,” arguing that those lamenting the lack of quality tooling upon which to build ebook workflows were too focused on a handful of high-level, proprietary apps, and had failed to take notice and avail themselves of the rich ecosystem of open-source libraries and technologies available to better accomplish the same goals. While I enthusiastically agree, I also think, pragmatically, at the time, it was too soon to expect publishers to take up this particular gauntlet. There’s a difference between employing a high-level tool “out of the box” to accomplish a task versus rolling your own app from lower-level components; the latter is degrees of magnitude more challenging—especially for firms that don’t have a deep bench of in-house software engineering talent. I’m sure to many publishers, the message “Let them build their own Rails app!” goes over about as well as “Let them eat cake!”</p><p>In 2012, the higher-level tooling available to publishers was either too print-centric, treating digital development as an afterthought (e.g., <a href="http://www.adobe.com/products/indesign.html">InDesign</a>), or, as Witwer noted, created by ereader vendors and/or digital retailers and tied to their ecosystems (e.g., <a href="https://www.apple.com/ibooks-author/">iBooks Author</a>).</p><p>A lot’s changed in the past couple of years. My job is now primarily dedicated to filling this high-level tool void. I’ve been working on a team doing backend development for a commercial <a href="http://en.wikipedia.org/wiki/Business-to-business">B2B</a> <a href="http://atlas.oreilly.com/">book authoring and production platform</a>, as well as maintaining an <a href="https://github.com/oreillymedia/HTMLBook">open-source XHTML5-based single-source publishing toolchain</a> (inspired by the <a href="http://docbook.sourceforge.net/">DocBook project</a>).</p><p>Due to the nature of my work, several times a week, a colleague will reach out to me with a hyperlink to a piece of digital publishing software and ask, “Have you seen this one yet?” In the past year, I’ve explored dozens of platforms targeting different niches in the publishing industry. There are <a href="https://www.inkling.com/habitat/">commercial platforms</a> and <a href="https://github.com/sourcefabric/Booktype">open-source platforms</a>; <a href="https://authorea.com/">platforms for scientific journals</a>; <a href="http://www.redjumper.net/bookcreator/">platforms for making children’s books on a tablet</a>; <a href="https://www.sharelatex.com/">platforms for people who like LaTeX</a>; <a href="https://www.penflip.com/">platforms for people who like Markdown</a>; <a href="https://www.gitbook.io/">more platforms for people who like Markdown</a>; <a href="http://www.ulyssesapp.com/">even more platforms for people who like Markdown</a>. (Is <a href="http://daringfireball.net/projects/markdown/">Markdown</a> the new Word? Or should we stop trying to make Markdown happen? Discuss.)</p><p>Point being, in 2014, the tools keep coming, they’re high-level, and, while they’re not perfect, they keep getting better. <em>Let us eat cake</em>!</p><h3>#4: Might the tide be turning against DRM?</h3><p>When Tom Doherty, publisher of <a href="http://www.tor.com/">Tor Books,</a> announced at <a href="http://idpf.org/digital-book-2014">IDPF Digital Book 2014 </a>that Tor had eliminated DRM from its ebooks and <a href="http://www.tor.com/blogs/2014/05/tom-doherty-tor-books-book-expo-of-america-2014">had seen no significant detrimental impact on sales</a>, the audience erupted in a loud cheer.</p><p>I took this as a hopeful sign that publishers are perhaps becoming more receptive to the notion that DRM is maybe not so much the solution to safeguarding ebook sales, but in fact the problem. In his 2011 dispatch, <a href="http://www.antipope.org/charlie/blog-static/2011/11/cutting-their-own-throats.html">“Cutting their own throats,”</a> author <a href="http://en.wikipedia.org/wiki/Charles_Stross">Charlie Stross</a> put it thusly:</p><blockquote>As ebook sales mushroom, the Big Six’s insistence on DRM has proven to be a hideous mistake. Rather than reducing piracy…it has locked customers in <em>[THAT COMPANY WITH THE WEBSITE THAT SELLS ALL THE THINGS’s]</em> walled garden, which in turn increases <em>[THAT COMPANY’s]</em> leverage over publishers….If the big six began selling ebooks without DRM, readers would at least be able to buy from other retailers and read their ebooks on whatever platform they wanted, thus eroding <em>[THAT COMPANY’s]</em> monopoly position.</blockquote><p>In addition to fostering a more competitive ebook retail landscape, I believe dropping DRM from ebooks will help lead to more competition, and thus innovation, in ereader software. When the ebook point of sale is decoupled from the platform on which the product is consumed, customers have the freedom to choose retailer independent of ereader, and vice versa. Regardless of where they purchase their ebooks, they can choose the reading system that has the features they like best—e.g., best CSS3 support, best open annotation functionality (see <strong>#1</strong>, above), or best <a href="http://www.daisy.org/">accessibility for those with visual disabilities</a>.</p><p>I hope more and more publishers will be swayed by the case against DRM and follow Tor’s lead, or at least consider that the benefits DRM affords in terms of the <a href="https://www.google.com/search?rls=en&amp;q=how+to+crack+drm">illusion of piracy prevention</a> might be outweighed by unfavorable market effects and diminished customer satisfaction.</p><h3>#5: Books matter</h3><p>Yes, books are a commodity. Yes, it’s hypocritical to assert otherwise, to proclaim “No, books are special. THAT COMPANY WITH THE WEBSITE THAT SELLS ALL THE THINGS can’t just treat them like they’re bags of corn chips,” when you’re the one likening them to corn chips in the first place by slapping an <a href="http://en.wikipedia.org/wiki/International_Standard_Book_Number">ISBN</a> and a retail price on them.</p><p>But no, none of that changes the fact that <em>books are indeed special. </em>Most of us love books in a deeper, more profound way than we love corn chips. They are our cultural legacy; they endure. (If I survive the <a href="http://en.wikipedia.org/wiki/Climate_change">zombie apocalypse</a>, I’m most looking forward to all the <a href="http://horrornews.net/wp-content/uploads/2013/03/Time-Enough-to-Last-Twilight-Zone-2.jpg">spare time to dig in to the huge stack of books</a> in my queue.)</p><p>As publishers, typographers, editors, proofreaders, designers, and now software developers, we help act as stewards of the future of the written word. Nearly everyone I’ve ever met in the book industry or the publishing-tech startup space takes this mission seriously, believes it is bigger than the free market. As long as there are people passionate about ebooks (however they manifest in digital form—EPUB, app, website, whatever), I have no doubt they will survive even the most nefarious corporate machinations, including radically driving prices down to make books more affordable to <a href="https://medium.com/message/ebooks-for-all-b23d2d8e63b8">people all over the world</a>.</p><h3>Conclusion</h3><p>Don’t despair. Help create a bright future for books in the digital age. If you need more information or additional inspiration, please check out the “Further Reading” links below culled from this piece (some of which are video). Kthxbai.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23ce94f3bfb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Broke Up with MakerBot]]></title>
            <link>https://medium.com/@sandersk/why-i-broke-up-with-makerbot-eee36e197e3a?source=rss-baf5f824b1eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/eee36e197e3a</guid>
            <category><![CDATA[imho]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[3dprinting-accessories-3d]]></category>
            <dc:creator><![CDATA[Sanders Kleinfeld]]></dc:creator>
            <pubDate>Mon, 24 Jun 2013 16:36:01 GMT</pubDate>
            <atom:updated>2015-02-25T01:24:35.469Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*qEJ67jn3jJsDIHb8.jpeg" /><figcaption>Yoda (http://www.thingiverse.com/thing:14104)</figcaption></figure><h4>Printing plastic tchotchkes was fun, but MakerBot was just too high-maintenance</h4><p>I’ll never forget the day I first met MakerBot. It was August 1, 2012 when he*—a bright, shiny <a href="http://en.wikipedia.org/wiki/MakerBot_Industries#Replicator">first-generation Replicator</a>—arrived at our Cambridge, MA, office, greeted by screams of delight by a throng of fans. I must admit, I was a bit intimidated and star-struck: MakerBot’s reputation preceded him. He was a rockstar in the DIY community, a true maverick of a machine, ushering in the <a href="http://makezine.com/2013/06/20/makerbot-origins-the-revolution-will-be-squirted/">“Wild West of 3D printing”</a> among our sedate sea of MacBook Air laptops running Adobe InDesign. All we had ever made here before were PDF files, but with MakerBot humming cheerfully in the lounge next to the kitchen, that had all changed. We were now maker-magicians, spinning <a href="http://store.makerbot.com/filament">ABS thread</a> into <a href="http://1.bp.blogspot.com/_7dHoulkOs_A/TNfIcT26vTI/AAAAAAAAAAo/MKcVxNXdnbY/s1600/6007677_rumpelstiltskin.jpg">gold</a>.</p><p>At first, it was hard to get any quality time with MakerBot. I’d come into the office in the morning, and he’d already be surrounded by three or four groupies, who were browsing the catalog at <a href="http://www.thingiverse.com/">Thingiverse</a>, selecting a fresh set of <a href="http://en.wikipedia.org/wiki/STL_(file_format)">STL</a> models to print: from <a href="http://www.thingiverse.com/thing:27678">Mario</a> and <a href="http://www.thingiverse.com/thing:34066">Batman</a> to <a href="http://www.thingiverse.com/thing:63906">Mayan Robot</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*LOwu73QK7Ftpk8pe.jpeg" /><figcaption>The <a href="http://www.thingiverse.com/thing:21315">T-Rex</a> (far left) and <a href="http://www.thingiverse.com/thing:32969">Barack Obama</a> figurine (bottom-right) were made with glow-in-the-dark ABS thread (hence “Glowbama”)</figcaption></figure><p>But MakerBot didn’t just allow me and my coworkers to print out other people’s models; he offered us the promise of designing our own plastic masterpieces. He came packaged with the open source software <a href="http://www.makerbot.com/support/replicatorg/documentation/usage/">ReplicatorG</a>, which provides a nice GUI for doing simple modifications on existing models (scaling, rotating, etc.). ReplicatorG isn’t a tool for constructing models from scratch, however, so I also started experimenting with other 3D rendering applications like <a href="http://www.blender.org/">Blender</a>, <a href="http://meshlab.sourceforge.net/">MeshLab</a>, and <a href="http://www.openscad.org/">OpenSCAD</a>.</p><p>I was interested in the possibilities in transforming 2D photos into 3D models that MakerBot could print, so I started experimenting with a Python tool called <a href="https://pypi.python.org/pypi/img2scad">img2scad</a>, which can convert a JPEG image file into a <em>.scad</em> file (convertible to a compatible STL file with OpenSCAD) by transforming each pixel in the image to a rectangular prism whose height is directly proportional to how dark/light the pixel is. When this SCAD model is printed, the output is a photograph embossed into a sheet of plastic. Pretty cool—although, in practice, the results were somewhat lackluster since much of the detail captured in the subtle shading differences among pixels in the source JPEG didn’t get preserved in the conversion to prisms.</p><p>I wanted to take things to the next level and actually make 3D replicas of photographs, which is possible by hooking up an XBox Kinect to a Windows machine and using <a href="http://reconstructme.net/">ReconstructME</a> to <a href="http://www.makerbot.com/blog/2012/02/28/replicating-with-reconstructme/">do a 360-degree scan</a> and convert to STL. I volunteered to be the first guinea pig of this process, which entailed sitting motionless in a swivel chair while one of my coworkers spun me around in a circle at a rate of 0.0000000001 miles per hour, and another coworker aimed the Kinect at my head.</p><p>Here was the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*BkQYoD0OLn9yopRG.png" /><figcaption>This is a picture of me holding my head (from the <a href="http://www.youtube.com/watch?v=LbHTblXVYL0&amp;feature=youtu.be">YouTube documentary “MakerBot in Cambridge”</a>).</figcaption></figure><p>My plastic doppelgänger looks just like me (white and inert), except he has no eyes or mouth.</p><p>Anyway, six months into his residence at the office, MakerBot had become <a href="http://www.mtv.com/shows/parisbff/season_2/series.jhtml">my new BFF</a>. But then a series of unfortunate events occurred that started to test the strength of our bond. One of the qualities I prize most highly when entering into a relationship with a piece of machinery is its dependability, and as time wore on, MakerBot just kept letting me down again and again and again. Here were my three main gripes.</p><h4>Gripe #1: MakerBot was wicked** slow and glitchy</h4><p>We live in an age of instant gratification (“You mean I have to wait five seconds for that web page to load? Screw dat!”), and MakerBot just took too @$(&amp;@# long to complete a print. Waiting five hours for your <a href="http://www.thingiverse.com/thing:14104">Yoda</a> feels like an eternity; you can play approximately sixty rounds of Candy Crush Saga in that same timeframe (although arguably, staring blankly at the MakerBot is equally intellectually stimulating).</p><p>To make matters worse, I’d estimate MakerBot’s failure rate fell in the range of 25%–33%, which meant that there was around a one-in-three chance that two hours in, your Yoda print would fail, or that it would finish but once it was complete, you’d discover it was warped or otherwise defective.</p><p>Some of these glitches could be attributed to human error. For example, you forgot to configure the Energy Saver setttings properly on the laptop feeding data to MakerBot via USB, and the laptop went to sleep, causing MakerBot to time out as well. Or you neglected to set the temperature of the MakerBot platform hot enough, and partway through the print, the plastic stopped sticking to it, potentially causing the model to tip over and/or MakerBot to <a href="http://spaghettibot.tumblr.com/image/53440088933">spray a bird’s-nest jumble of plastic thread over it</a>. But other glitches were less foreseeable and preventable, such as molten plastic getting gunked up in the extruder midway through the printing process, resulting in the MakerBot nozzle dancing futilely above your half-finished creation.</p><p>Overall, MakerBot was rather finicky and unforgiving when it came to preparation and configuration for printing, which segues nicely into my next gripe.</p><h4>Gripe #2: MakerBot was wicked high-maintenance</h4><p>Because of the relatively high chance of errors (see Gripe #1), my colleagues and I developed our own rigmarole of preflight checks to try to mitigate the likelihood of #makerbotfail on any given print. These steps included:</p><ol><li>Use ReplicatorG to preheat the extruder to be used to ~235 degrees Celsius.</li><li>Detach the filament guide tube from the extruder and remove the filament from the tube.</li><li>Manually apply pressure to the filament to push it through the extruder.</li><li>If plastic thread is emitted from the extruder nozzle, proceed to step #5. Otherwise, turn off the MakerBot, disassemble the extruder apparatus, clean off any plastic buildup from the components, reassemble the extruder apparatus, and start over at step #1.</li><li>Hooray, plastic is being extruded from the MakerBot nozzle! Now see if the MakerBot can automatically extrude plastic all on its own, without you jamming it through the machine. In ReplicatorG, click the “forward” button next to “motor control” to initiate a feed through the extruder. If plastic does not feed through automatically, return to step #3. Otherwise continue on to step #6.</li><li>Click “Build” and pray.</li></ol><p>We discovered that by going through this preflight process (which takes anywhere from ten to ninety minutes to complete), we could decrease the likelihood of a printer failure by one or two percent.</p><h4>Gripe #3: MakerBot just plain breaks</h4><p>After about three months of using MakerBot, he stopped squirting plastic from his right extruder, no matter what pre-print precautions and preparations we took (see Gripe #2). After examining the extruder mechanism and doing some research, one of my coworkers pinpointed the problem: the Delrin plunger was worn out.</p><p>The Delrin plunger is a small, black cylinder whose purpose is to apply pressure against the molten plastic thread to help force it through the MakerBot extruder nozzle. However, apparently this pressure gets applied via a grinding process, which slowly erodes the plunger material until it eventually is no longer able to make contact with the plastic.</p><p>But luckily, the <a href="http://store.makerbot.com/mk7-delrin-plunger.html">MakerBot store offered replacement Delrins</a> for sale, and they were only $6, so I just ordered another one. This served us well for another three months or so, until the Delrin plunger in the left extruder wore out as well. I went back to the MakerBot store, but this time I found that the Delrins were out of stock (and they continue to be unavailable to this date, possibly because first-generation Replicators are no longer being sold).</p><p>I was really bummed. One of the two Delrin plungers in the $2,000 MakerBot was busted, the $6 replacement parts were no longer available, and eventually the other Delrin plunger would wear out, and I’d be left with the equivalent of a fried toaster.</p><p>But then I had an idea: the Delrin plunger was just a chunk of plastic. What if MakerBot could print a replacement plunger, and regenerate itself back to health <a href="http://www.youtube.com/watch?v=d5dOSyaKWTQ">like a starfish</a>? And sure, enough, there was indeed some good news: Thingiverse came to the rescue with a model for a <a href="http://www.thingiverse.com/thing:47740">plunger replacement</a>. But then some bad news: the replacement plunger just didn’t work. Whether that was because the STL model was not an accurate replica of the bona fide Delrin plunger, or because the actual plunger that MakerBot printed was defective (see Gripe #1), I don’t know. Either way, we were out of luck.</p><p>I did some research into <a href="http://www.thingiverse.com/thing:15718">some more elaborate contraptions</a> MakerBot could print as replacements for the extruder apparatus, but they required screws and springs and other stuff, and upon further reflection I realized I was not cut out to be a MakerBot repairman.</p><p>Not long after the second Delrin plunger failed, I decided it was time for MakerBot and me to go our separate ways (the majority of my colleagues had already jumped ship many weeks prior). Nearly every time I would attempt to print something on MakerBot, I was met with frustration or disappointment because of some snag or another. Dealing with MakerBot was time consuming and depressing, and I decided I just didn’t need that kind of negativity in my life. I deserved <em>better</em> than that!</p><p>But I really miss making those plastic tchotchkes. I’ve considered investing in a <a href="https://store.makerbot.com/replicator2.html">Replicator 2</a> (the follow-up to the first-generation MakerBot Replicator), but right now, it still feels too soon to be getting involved with another 3D printer.</p><p>I was excited to hear last week of <a href="http://thenextweb.com/insider/2013/06/19/3d-printing-company-makerbot-acquired-by-stratasys-for-403m-in-stock-after-selling-22k-3d-printers/">Stratasys’s $400 million acquisition of MakerBot Industries</a>. I hope this move presages further investment in creating high-quality, low-cost 3D printers for the average consumer who wants a reliable device for printing models that doesn’t require a DIY approach to maintenance and repair. The first-generation MakerBot Replicator felt too much like a prototype, as opposed to a proven, refined piece of hardware.</p><p>I look forward to the day when 3D printers are as cheap, ubiquitous, and easy to use as their 2D inkjet printer counterparts. But for now, every time I pass by MakerBot, abandoned in a corner of the office lounge, I feel a slight pang of guilt and regret. <em>I’m sorry we couldn’t make it work, MakerBot, but I’ll always remember the great times we shared.***</em></p><p>* Our MakerBot’s name is Rob Roboto, and since gender-normative naming is de rigueur for 3D printers, I have concluded he is male.</p><p>** FYI, in Boston, we use the word <em>wicked</em> as an adverb—in place of <em>very</em> or <em>really—</em>to indicate emphasis.</p><p>*** <strong>Update (7/1/13)</strong>: Since I originally published this piece on Medium, MakerBot support has reached out to me and has suggested we try using the <a href="http://store.makerbot.com/drive-block-hardware-kit.html">Replicator 2 Drive Block Hardware Kit</a> in place of the Delrin-based extruder apparatus. They have been kind enough to offer to send us a couple free kits, and I’m open to giving them a try.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eee36e197e3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[That’s Not a Book!]]></title>
            <link>https://medium.com/@sandersk/thats-not-a-book-1e1ec7651be6?source=rss-baf5f824b1eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e1ec7651be6</guid>
            <dc:creator><![CDATA[Sanders Kleinfeld]]></dc:creator>
            <pubDate>Tue, 04 Jun 2013 17:36:37 GMT</pubDate>
            <atom:updated>2013-06-04T19:31:48.053Z</atom:updated>
            <content:encoded><![CDATA[<h4>On web publishing and semantics</h4><p>Last week, at the <a href="http://idpf.org/digital-book-2013">IDPF Digital Book conference</a> at <a href="http://www.bookexpoamerica.com/">Book Expo of America</a>, I demoed some new <a href="http://chimera.labs.oreilly.com/books/1230000000345">interactive</a> <a href="http://chimera.labs.oreilly.com/books/1234000001552">web publications</a> I helped adapt from traditional print books, in conjunction with the books’ authors. These projects take advantage of modern web browser functionality to offer enhancements that are impossible in a physical print book (and in some cases, impossible in today’s ereaders as well): audio/video, interactive exercises and games, animated data visualizations, and social features such as paragraph-level commenting.</p><p>I was both excited and a bit apprehensive to hear the reactions and opinions of conference attendees (largely a mix of publishing-industry professionals, ebook developers, and digital-publishing startup principals). I anticipated there might be both enthusiasm and a fair amount of ambivalence, but one response I did not anticipate was the indignation manifested by one gentleman raising his hand in the back of the room. There was a perceptible hint of disdain and agitation in his voice as he said, approximately (I’m paraphrasing here): “You have taken a book and turned it into a <em>website</em> [disdain]. Why would you <em>do</em> [agitation] such a thing!”</p><p>Oops, my bad! I was accomplice to a desecration, and I didn’t even know it. </p><p>More seriously, it’s easy to lose sight of how culturally fraught that term “book” really is. To many, it imbues a certain weight, significance, or erudition to the words it labels. Digitizing those words and still calling them a book is fine, as long as they stay ensconced on an ereader’s virtual bookshelf, right next to that free copy of <em>Pride and Prejudice</em> that was preinstalled. But set those same words free on the web, that cesspool of cat pictures and poor grammar, and you’re incurring a taint that threatens the sanctity of the book, a sanctity that can only be preserved by indignant shouts of “That’s not a book!” </p><p>To many others, the angst around the word “book” may  be less concerns about stultification than about commoditization. The threat isn’t the inanity of the web; it’s the economy of the web, that Wild West frontier where you can read stuff without buying it from Amazon. When you’re viewing things from the perspective of book-as-product, the paramount concern is preserving a healthy marketplace to peddle those wares. Such a marketplace exists for ebooks right now, but business models for selling book content “loose” on the web are far more inchoate, so it’s highly <a href="http://www.baldurbjarnason.com/notes/the-ebook-innovation/">disruptive</a> to package the material in this way. So again must come the shouts of “That’s not a book!”</p><p>But as much as some may want to dismiss and delegitimize books on the web by waging this semantic war, I don’t believe that’s a battle that can be won. There is a reason we call content on the Kindle an <em>ebook</em> and not an <em>e-read</em> or an <em>e-text</em>: we acknowledge that print books and ebooks are two breeds of the same thing and belong in the same category. They both convey long-form information, whether narrative (e.g., stories), instructional (textbooks), or reference (dictionary). Yes, there are meaningful differences in how we experience them, but they are akin to the differences between a Chihuahua and a German Shepherd, not a Chihuahua and a rhinoceros. We didn’t stop calling the device that takes photos a camera when we stopped inserting film into it; we called it a digital camera. So when we take the text of <em>Alice’s Adventures in Wonderland</em> and <a href="http://www.gutenberg.org/files/11/11-h/11-h.htm">put it on the web</a>, what’s inaccurate about calling it a web book? When we assert otherwise, aren’t we just <a href="http://www.goodreads.com/quotes/493911-lovers-of-print-are-simply-confusing-the-plate-for-the">“confusing the plate for the food”</a>?</p><p>Form factor shouldn’t be about including or excluding content from being categorized as “book”; it should be about the best way to deliver that content to readers. For fiction, that may very well be a codex or an <a href="http://en.wikipedia.org/wiki/EPUB">EPUB</a>/<a href="http://en.wikipedia.org/wiki/MOBI">Mobi</a> file, and for instructional/reference titles, that may very well be a website. </p><p>I am an avid reader. As a child, I used to check out ten to twelve books from the library every month. As an adult, I buy two to three books a month from my local bookstore and/or digital book emporium. But on an average day, I probably read at least four times more content in my web browser than I do in print or ebook form. And I’m thirty-two years old; imagine the habits of today’s teenagers and how they will be reading ten years from now!</p><p>Now is the time to experiment, to explore, to innovate. The best way to ensure a rich and vibrant future for the “book,” however you define it, is to embrace the opportunities of new media and new business models. Otherwise, keep in mind that today’s dogmatism may very well be tomorrow’s irrelevance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e1ec7651be6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>