<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Threepress Consulting blog &#187; ipad</title>
	<atom:link href="http://blog.threepress.org/category/ipad/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.threepress.org</link>
	<description>Threepress creates software for publishers, educators and authors.</description>
	<lastBuildDate>Mon, 09 Jan 2012 13:02:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Understanding Apple&#8217;s fixed-layout EPUBs</title>
		<link>http://blog.threepress.org/2011/01/17/understanding-apples-fixed-layout-epubs/</link>
		<comments>http://blog.threepress.org/2011/01/17/understanding-apples-fixed-layout-epubs/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 15:29:20 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[interactivity]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1765</guid>
		<description><![CDATA[iBooks now supports an extension to EPUB that allows publishers to create books with precise layout using CSS. This is Apple&#8217;s own extension, not part of the EPUB specification itself (and not one that they suggested be included in EPUB3).
The goal of this post is to simply document the extension and show how to create [...]]]></description>
			<content:encoded><![CDATA[<p>iBooks now supports an extension to EPUB that allows publishers to create books with precise layout using CSS. This is Apple&#8217;s own extension, not part of the EPUB specification itself (and not one that they suggested be included in EPUB3).</p>
<p>The goal of this post is to simply document the extension and show how to create new works with it. I&#8217;m not going to debate whether it&#8217;s a good thing for the ecosystem here.</p>
<h2>Install Phone Disk</h2>
<p>Anyone working extensively with iBooks EPUB development should first grab a copy of the invaluable <a href="http://www.macroplant.com/phonedisk/">Phone Disk</a>.  This allows Mac and Windows computers to browse most of the iOS device filesystem as a normal drive, including opening and inspecting EPUB books.</p>
<h2>Download a fixed-layout EPUB sample from the iBookstore</h2>
<p>iBooks samples do not have DRM and so can be opened and read normally. A good bet is to download one of the &#8220;Children&#8217;s Picture Books&#8221;; these tend to be fixed-layout books.</p>
<h2>Find the display-options file</h2>
<p>The key component of the extension is the addition of the file <code>META-INF/com.apple.ibooks.display-options.xml</code>. This file tells iBooks that the book is the fixed-layout type, and typically looks something like this:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;display_options&gt;
    &lt;platform name=&quot;*&quot;&gt;
        &lt;option name=&quot;fixed-layout&quot;&gt;true&lt;/option&gt;
    &lt;/platform&gt;
&lt;/display_options&gt;
</pre>
<p>There are a number of options here which are detailed in the iBookstore Asset Guide (v4.5), including how to define two-page spreads.</p>
<p>The first thing I tried with one of the samples was to validate it with the latest <a href="http://code.google.com/p/epubcheck/">epubcheck 1.1</a>:</p>
<blockquote><p>Epubcheck Version 1.1<br />
WARNING: /Users/liza/foo.epub: item (iTunesMetadata.plist) exists in the zip file, but is not declared in the OPF file<br />
WARNING: /Users/liza/foo.epub: item (iTunesArtwork) exists in the zip file, but is not declared in the OPF file
</p></blockquote>
<p>These are just warnings; the fixed-layout book is valid.  You can try opening them in other EPUB readers, with varying success depending on how wild the book designer got with the fixed-positioning.</p>
<h2>Inspect the OPF and NCX</h2>
<p>One immediate surprise to iBooks developers is that you&#8217;re likely to find an embedded font (now supported in any iBooks EPUB). Otherwise there&#8217;s nothing added to the OPF.</p>
<p>The NCX examples I found did not include all of the XHTML pages; I&#8217;m not sure whether that&#8217;s just a function of the book being a sample.</p>
<h2>Structure of a fixed-layout book</h2>
<p>In a typical EPUB, each chapter or major division of content is a single XHTML file. In the fixed-layout model, each XHTML file corresponds to a single physical page. So while it&#8217;s typical to name most EPUB XHTML files like <code>chapter01.html</code>, <code>chapter02.html</code>, in the fixed-layout book you&#8217;re apt to see a layout like:</p>
<pre>
cover.xhtml	font		package.opf	page001.xhtml	page003.xhtml	toc.ncx
css		images		page000.xhtml	page002.xhtml	page004.xhtml
</pre>
<h2>XHTML content</h2>
<p>The one unusual element in the fixed-layout content will be this HTML, which is required:</p>
<pre class="brush: xml;">
&lt;meta name=&quot;viewport&quot; content=&quot;width=1000, height=1000&quot;&gt;&lt;/meta&gt;
</pre>
<p>The specific width/height is per-book and based on the desired dimensions of the page. iBooks uses this information to scale the screen size appropriately (more on this later).</p>
<p>Otherwise the XHTML should look relatively normal (other than being very short). In fact the XHTML will be exceptionally readable since these books are by necessity all hand-coded at the moment.</p>
<h2>CSS</h2>
<p>Here&#8217;s where things get interesting:</p>
<p>The <code>body</code> element must be defined with an absolute width/height that matches the <code>viewport</code> above:</p>
<pre class="brush: css;">
body {
	width: 1000px;
	height: 1000px;
}
</pre>
<p>Images and text will often be absolutely-positioned. <code>z-index</code> and other advanced positioning techniques are also supported.  Font sizes are specified in <em>pixels</em>, not <em>ems</em> (users can zoom fixed-layout books, but the text will not reflow). Background colors are useful in this model as the XHTML content is full-bleed and does not usually have the goofy fake book margin.</p>
<p>Since this is all standard CSS 2.1 (or CSS3), these books don&#8217;t technically require a specialized reading system; any one based on a modern browser, like the mobile version of <a href="http://ibisreader.com/">Ibis Reader</a>, could potentially consume these books if the reading system could scale the pages appropriately.</p>
<h2>Interactivity</h2>
<p>It&#8217;s been noted that my original <a href="http://blog.threepress.org/2010/06/24/javascript-and-interactivity-in-ibooks/">JavaScript in EPUB</a> example no longer works in more recent versions of iBooks.  This had nothing to do with the JavaScript parts themselves; instead the problem was that Apple began squashing the positioning information needed to align the popups.</p>
<p>In recent work for publishers I&#8217;ve found ways to get around those limitations, but they&#8217;ve been quite awkward and difficult to author. Would the &#8220;freedoms&#8221; of positioning in the fixed-layout books allow the original sample to work again?</p>
<p>Yes!</p>
<p>I took my original file and made only three changes:</p>
<ol>
<li>I added the <code>com.apple.ibooks.display-options.xml</code> file just as shown above.</li>
<li>I added the <code>viewport</code> directive to the XHTML file and set it (arbitrarily to 600 pixels wide, 800 pixels tall).</li>
<li>I modified the CSS <code>body</code> directive to match the viewport.</li>
</ol>
<p>The result:</p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2011/01/javascript-in-ibooks-fixed-positioning.png"><img src="http://blog.threepress.org/wp-content/uploads/2011/01/javascript-in-ibooks-fixed-positioning-225x300.png" alt="" title="javascript-in-ibooks-fixed-positioning" width="225" height="300" class="aligncenter size-medium wp-image-1767" /></a></p>
<p><a href="http://3press-blog.s3.amazonaws.com/javascript-in-epub-fixed.epub">Download the example EPUB</a> (<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0</a>)</p>
<p>Obviously the layout could use some work; there&#8217;s no longer any default margin added by the ereader, so the text bleeds out.  Also my 600&#215;800 dimensions don&#8217;t exactly match the iBooks aspect ratio, so there&#8217;s more fake book border.  But you can see how this could be improved.</p>
<p><strong>Note that the vast majority of EPUB books should <em>not</em> be formatted this way.</strong>  This isn&#8217;t a one-way ticket to CSS Town.  <em>If the text on a particular XHTML page overflows the bottom of the single page, it will get cut off.</em>  You cannot mix fixed-layout and reflowable pages in the same EPUB file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2011/01/17/understanding-apples-fixed-layout-epubs/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Easier EPUB Experimenting and Updating in iBooks</title>
		<link>http://blog.threepress.org/2010/08/19/easier-epub-experimenting-in-ibooks/</link>
		<comments>http://blog.threepress.org/2010/08/19/easier-epub-experimenting-in-ibooks/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 12:00:51 +0000</pubDate>
		<dc:creator>Keith Fahlgren</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[ibooks]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1558</guid>
		<description><![CDATA[[Update: Liz Castro has an even easier post on editing EPUB files directly on the iPad.]
The arrival of iBooks this year helped many people understand that ebooks were already capable of interesting experimentation, multimedia, and nuanced, thoughtful design. Many of iBooks’ strengths come directly from the fact that they wisely chose to base it on [...]]]></description>
			<content:encoded><![CDATA[<p>[Update: Liz Castro has an even easier post on <a href="http://www.pigsgourdsandwikis.com/2010/11/editing-epub-files-right-in-ipad.html">editing EPUB files directly on the iPad</a>.]</p>
<p>The arrival of iBooks this year helped many people understand that ebooks were <em>already</em> capable of <a href="http://blog.threepress.org/2010/06/24/javascript-and-interactivity-in-ibooks/">interesting</a> <a href="http://blog.threepress.org/2010/06/08/geo-aware-ebook-demo/">experimentation</a>, <a href="http://blog.threepress.org/2009/11/15/using-html5-video-in-epub/">multimedia</a>, and <a href="http://www.vqronline.org/blog/2010/06/08/vqr-ipad/">nuanced, thoughtful design</a>. Many of iBooks’ strengths come directly from the fact that they wisely chose to base it on <a href="http://webkit.org">WebKit</a>, the rendering engine core used in desktop browsers like Safari &amp; Chrome and mobile browsers for the iPhone, iPad, Android, and now Blackberry browsers. This makes it an attractive test platform for folks developing new and innovative content in EPUB, but many have <a href="http://answers.oreilly.com/topic/1918-how-ibooks-stores-user-bookmarks/">been</a> <a href="http://www.pigsgourdsandwikis.com/2010/04/updating-epub-tests-in-ibooks-on-ipad.html">frustrated</a> with the time and effort it takes to update EPUB content in iBooks on an iPad using the iTunes sync. This post outlines an easier approach for iteratively developing and testing changes to EPUB XHTML and CSS files in iBooks (1.1.2) without using iTunes.</p>
<p>Here&#8217;s a tweak to the XHTML of a chapter and the CSS used for <code>h1</code>s that I did quickly without having to make a new EPUB or use iTunes:</p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2010/08/content_updates_without_itunes.png"><img src="http://blog.threepress.org/wp-content/uploads/2010/08/content_updates_without_itunes.png" alt="A screenshot from an iPad in iBooks show content modified without a sync" title="Updating iBooks without iTunes" width="799" height="541" class="alignnone size-full wp-image-1582" /></a></p>
<p>The key to this <span style="text-decoration: line-through;">hack</span> technique is the free (as in beer) <a href="http://www.macroplant.com/iphoneexplorer/">iPhone Explorer</a> application, which exposes the contents of your iPad like a USB drive (including resources for Apps). It has both a Mac and Windows version, but I’ve only tested these instructions on a Mac. Before starting, connect your iPad to your computer and iTunes. You should not be using automatic syncing (&#8220;Sync Books&#8221; is not checked).</p>
<p>To get started playing with a particular EPUB, sync the file onto your iPad, open the book once in iBooks, then close iBooks. Now you&#8217;re ready to start moving the files back and forth (iPhone Explorer is all drag and drop).</p>
<ol>
<li>Open iBooks to your Library (<strong>not</strong> a book).</li>
<li>Open iPhone Explorer (or hit Refresh if it was open, but this is occasionally flaky).</li>
<li>Expand [Your] iPad-&gt;Media-&gt;Books.</li>
<li>Find the <code>[XXXX].epub</code> you’re interested in and expand it until you find your XHTML content or CSS.</li>
<li>Drag the XHTML file or CSS you want to experiment with somewhere on your computer (perhaps your Desktop in the Finder) to edit.</li>
<li>Edit the file using something you like.</li>
<li>Drag the XHTML or CSS file back from your computer to the same location in iPhone Explorer.</li>
<li>Say &#8220;OK&#8221; to the &#8220;Overwrite?&#8221; dialog.</li>
<li>Open the book in iBooks to see the changes.</li>
</ol>
<p><a href="http://blog.threepress.org/wp-content/uploads/2010/08/how_to_update_content.png"><img class="alignnone size-full wp-image-1563" title="How content is updated without a sync into iBooks" src="http://blog.threepress.org/wp-content/uploads/2010/08/how_to_update_content.png" alt="A screenshot of updating content using iPhone Explorer" width="600" height="404" /></a></p>
<p>Now you’re ready to use steps 5–9 (closing the book in iBooks in between) to continue experimenting with the EPUB’s design or content.</p>
<p>It can occasionally be non-obvious which filename iBooks has assigned to your EPUB. Curious folks will want to play around with some of the other resources exposed in addition to the exploded EPUBs (check out <code>Books.plist</code>).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/08/19/easier-epub-experimenting-in-ibooks/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>JavaScript and interactivity in iBooks</title>
		<link>http://blog.threepress.org/2010/06/24/javascript-and-interactivity-in-ibooks/</link>
		<comments>http://blog.threepress.org/2010/06/24/javascript-and-interactivity-in-ibooks/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 15:36:06 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[ibooks]]></category>
		<category><![CDATA[interactivity]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1519</guid>
		<description><![CDATA[Note: As of iBooks 1.1.2 (December 2010) this example no longer works, though JavaScript is still supported. I&#8217;m hoping to post an updated example soon.
iBooks supports JavaScript-based interactivity in EPUB content.  
I took some content from Cooking with Booze by James Bridle (a.k.a. George Harvey Bone).  It&#8217;s released under a Creative Commons Attribution-Noncommercial-Share [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note: As of iBooks 1.1.2 (December 2010) this example no longer works, though JavaScript is still supported. I&#8217;m hoping to post an updated example soon.</strong></p>
<p>iBooks supports JavaScript-based interactivity in EPUB content.  </p>
<p>I took some content from <a href="http://cookingwithbooze.org/">Cooking with Booze</a> by James Bridle (a.k.a. George Harvey Bone).  It&#8217;s released under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 license</a>, which means that this derivative work is as well.</p>
<p>I took one recipe and marked it up in EPUB:</p>
<p><a href="http://3press-blog.s3.amazonaws.com/cooking-with-booze1.png"><img src="http://3press-blog.s3.amazonaws.com/sm-cooking-with-booze1.png"/></a></p>
<p>I added some slightly useless annotations and illustrative images from Flickr (also under an Attribution license).  I then added some JavaScript-based event handlers.  If you tap on the hyperlinked items in the recipe, the annotation will fade in as a popup.  Tap on the annotation to dismiss it.</p>
<p><a href="http://3press-blog.s3.amazonaws.com/cooking-with-booze2.png"><img src="http://3press-blog.s3.amazonaws.com/sm-cooking-with-booze2.png"/></a></p>
<p>There are two kinds of annotations available: image popups and textual notes. Here&#8217;s a text note:</p>
<p><a href="http://3press-blog.s3.amazonaws.com/cooking-with-booze3.png"><img src="http://3press-blog.s3.amazonaws.com/sm-cooking-with-booze3.png"/></a></p>
<p>The JavaScript here is extremely simple, though I needed to use <code>webkitTransform</code> rather than normal positioning code because iBooks does not recognize <code>position: absolute</code> and the like:</p>
<pre class="brush: jscript;">
function popup() {
  var p = document.getElementById(this.id + '-popup');
  var top_of_el = this.offsetTop;
  p.style.opacity = 1;
  var new_y = p.offsetTop - top_of_el - 30;
  p.style.webkitTransform = 'translateY(-' + new_y + 'px) translateX(' + this.offsetLeft + 'px)';
}
function dismiss() {
  this.style.opacity = 0;
  var el = this;
  setTimeout(function () {
    el.style.webkitTransform = null;
  }, 1000);
}
/* Register the events */
var terms = document.getElementsByClassName('term');
for (var i=0; i &amp;amp;lt; terms.length; i++) {
  terms[i].addEventListener('click', popup);
}
var popups = document.getElementsByClassName('popup');
for (var i=0; i &amp;amp;lt; popups.length; i++) {
  popups[i].addEventListener('click', dismiss);
}
</pre>
<p>Here&#8217;s a sample of the XHTML:</p>
<pre class="brush: xml;">
1 wild &lt;a class=&quot;term&quot; id=&quot;turkey&quot;&gt;turkey&lt;/a&gt; breast
</pre>
<p>Some other nerdy details:</p>
<ol>
<li> The fade-in effect uses CSS3. I think the iBooks implementation may not be hardware-accelerated like Mobile Safari &#8212; it&#8217;s less smooth than the transitions on <a href="http://ibisreader.com/">Ibis Reader</a>, for example. </li>
<li> Inline script blocks do not work, which is not a bad thing. </li>
<li>Scripts are disallowed from accessing remote URLs. This means that ebooks that interact with remote data, like the <a href="http://blog.threepress.org/2010/06/08/geo-aware-ebook-demo/">geo-aware ebook</a>, do not work. Interestingly, this is one of the restrictions that  Baldur Bjarnason suggested might allow for safe JavaScript use in ebooks in a <a href="http://blog.threepress.org/2010/06/22/practical-interactivity-and-shaping-the-future-of-epub/#comment-3250">recent comment</a> on our post <a href="http://blog.threepress.org/2010/06/22/practical-interactivity-and-shaping-the-future-of-epub">Practical Interactivity and Shaping the Future of EPUB</a>. </li>
<li> iBooks caching is really annoying isn&#8217;t it?</li>
<li> I haven&#8217;t tried this on iBooks for iPhone.</li>
<li>I have no idea if JavaScript is allowed in the iBookstore&#8230;</li>
<li>&#8230;not that you need Apple&#8217;s permission to sell a DRM-free enhanced EPUB that users could load into iBooks themselves.</li>
</ol>
<p><a href="https://s3.amazonaws.com/3press-blog/javascript-in-epub.epub">Download the sample EPUB book</a>.  All content in the book is licensed under a Creative Commons license of some kind; the whole bundle should be considered <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0</a>.  </p>
<p>That said, I encourage commercial publishers to explore interactivity in EPUB, and it goes without saying that <a href="http://threepress.org/">we&#8217;d love to help</a>, whether it&#8217;s to provide glosses and annotations like those shown here, or interactive quizzes, or animation, or&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/06/24/javascript-and-interactivity-in-ibooks/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Geo-aware ebook demo</title>
		<link>http://blog.threepress.org/2010/06/08/geo-aware-ebook-demo/</link>
		<comments>http://blog.threepress.org/2010/06/08/geo-aware-ebook-demo/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 17:47:29 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[interactivity]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1478</guid>
		<description><![CDATA[
We&#8217;re making the geo demo featured in the Interactivity in EPUB talk available for download under the MIT License.
About the demo
In the demo, the geolocation capability of the web browser transmits your latitude/longitude.  The code then queries the Geonames database to get an English placename.  
After that, the code will continually poll for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://threepress.org/static/labs/geo/"><img src="http://3press-blog.s3.amazonaws.com/sm-geo-ebook.png" alt="Geo ebook demo" style="float:right;padding-left: 1em"/></a></p>
<p>We&#8217;re making the geo demo featured in the <a href="http://blog.threepress.org/2010/06/02/interactivity-in-epub-using-javascript-html5-and-css3-beaidpf-video-posted/">Interactivity in EPUB</a> talk available for download under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>.</p>
<h3>About the demo</h3>
<p>In the demo, the geolocation capability of the web browser transmits your latitude/longitude.  The code then queries the <a href="http://ws.geonames.org">Geonames</a> database to get an English placename.  </p>
<p>After that, the code will continually poll for your current location.  If you remain still, text will be displayed to indicate that the main character is bored and waiting to set off on her adventure.  When your lat/long changes, it displays new text.</p>
<h3>What&#8217;s in the demo</h3>
<p>This is a ZIP file bundle of the following resources:</p>
<ul>
<li>The geo code itself, in JavaScript, CSS and XHTML</li>
<li>A copy of the <a href="http://monocle.inventivelabs.com.au/">Monocle</a> ereader by Inventive Labs</li>
<li>A copy of <a href="http://code.google.com/p/geo-location-javascript/">geo-location-javascript</a>, which provides a simplified API to the HTML5 geolocation feature</li>
<li>The embedded font <a href="http://www.fontsquirrel.com/fonts/IM-FELL-English-PRO">IM Fell English Pro</a>, converted to SVG format for use on iPads/iPhones.</li>
</ul>
<p>The book content is in the form expected by Monocle, not EPUB, though if someone wanted to produce an EPUB version I would be happy to link to it.  It should be possible to produce a valid EPUB file though very few ereaders would be able to run it.</p>
<p><a href="http://3press-blog.s3.amazonaws.com/geo-ebook-threepress.zip">Download the source code</a>.</p>
<h3>Try it now</h3>
<p>You can also <a href="http://threepress.org/static/labs/geo/">try it out in a geo-aware browser</a>.  This should work in Chrome, Firefox and Safari 5, as well as on iPads and iPhones (and probably Android), though the user interface will need to be changed to support smaller devices.  </p>
<p>Keep in mind that if you&#8217;re on a real computer, you&#8217;ll never see the &#8220;you&#8217;ve moved&#8221; state change since your location is based on your internet service provider. Even on a mobile device, it can take quite some distance to update your position as GPS does not discriminate very finely.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/06/08/geo-aware-ebook-demo/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Designing ebooks for ePub reading engines (video)</title>
		<link>http://blog.threepress.org/2010/04/28/designing-ebooks-for-epub-reading-engines-video/</link>
		<comments>http://blog.threepress.org/2010/04/28/designing-ebooks-for-epub-reading-engines-video/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 21:04:46 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[book design]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[devices]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[talks]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1449</guid>
		<description><![CDATA[The video of my session at BookNet Canada Tech Forum is now posted over on their site (scroll down to 1pm):

In the video you can enjoy the dramatic moment when the lights inexplicably dim and I think I&#8217;m being thrown off stage.
(Slides for &#8216;Designing ebooks for ePub reading engines&#8217;)
]]></description>
			<content:encoded><![CDATA[<p>The video of my session at BookNet Canada Tech Forum is now posted over on their site (scroll down to 1pm):</p>
<p><a href="http://www.booknetcanada.ca/index.php?option=com_content&#038;view=article&#038;id=567&#038;Itemid=534"><img src="http://3press-blog.s3.amazonaws.com/booknet.png" alt="BookNet Canada presentation" /></a></p>
<p>In the video you can enjoy the dramatic moment when the lights inexplicably dim and I think I&#8217;m being thrown off stage.</p>
<p>(<a href="http://blog.threepress.org/2010/04/02/designing-ebooks-for-epub-reading-engines/">Slides for &#8216;Designing ebooks for ePub reading engines&#8217;</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/04/28/designing-ebooks-for-epub-reading-engines-video/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>London Book Fair</title>
		<link>http://blog.threepress.org/2010/04/14/london-book-fair/</link>
		<comments>http://blog.threepress.org/2010/04/14/london-book-fair/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 18:42:44 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1442</guid>
		<description><![CDATA[No speaking engagements this time (whew!) but I&#8217;ll be at London Book Fair 2010 and would love to meet up with folks who want to talk ebooks.

Update April 19, 2010: Like many others, I was unable to fly to London and will not be attending LBF.
]]></description>
			<content:encoded><![CDATA[<p><del datetime="2010-04-19T18:57:49+00:00">No speaking engagements this time (whew!) but I&#8217;ll be at London Book Fair 2010 and would love to meet up with folks who want to talk ebooks.<br />
</del></p>
<p>Update April 19, 2010: Like many others, I was unable to fly to London and will not be attending LBF.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/04/14/london-book-fair/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iBooks and ePub</title>
		<link>http://blog.threepress.org/2010/04/05/ibooks-and-epub/</link>
		<comments>http://blog.threepress.org/2010/04/05/ibooks-and-epub/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 16:09:23 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[epub]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1380</guid>
		<description><![CDATA[Now that I&#8217;ve got the hardware iPad, I was able to do some comprehensive reviews of the iBooks application and its treatment of the ePub format.


As noted earlier by Dave Thomas, when an ePub file is added to iTunes, the file is modified in place to add a file called iTunesMetadata.plist. This is really obnoxious, [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve got the hardware iPad, I was able to do some comprehensive reviews of the iBooks application and its treatment of the ePub format.</p>
<ol>
<li>
As <a href="http://twitter.com/pragdave/status/11450222873">noted earlier by Dave Thomas</a>, when an ePub file is added to iTunes, the file is modified in place to add a file called <code>iTunesMetadata.plist</code>. <em>This is really obnoxious</em>, but it doesn&#8217;t render the files invalid. You can look at the file to see the values that iTunes has derived from the metadata of the epub; initially it won&#8217;t be readable &#8212; change the file permissions, if that&#8217;s something you know how to do.</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
        &lt;key&gt;artistName&lt;/key&gt;
        &lt;string&gt;Doctorow, Cory&lt;/string&gt;
        &lt;key&gt;book-info&lt;/key&gt;
        &lt;dict&gt;
                &lt;key&gt;package-file-hash&lt;/key&gt;
                &lt;string&gt;47CC1BA0C40608D65C4F815788FBD10F&lt;/string&gt;
                &lt;key&gt;publisher-unique-id&lt;/key&gt;
                &lt;string&gt;urn:uuid:9bde0872-1ad5-11dd-b5b9-0018f369440e&lt;/string&gt;
                &lt;key&gt;unique-id&lt;/key&gt;
                &lt;integer&gt;336337745614362820&lt;/integer&gt;
        &lt;/dict&gt;
        &lt;key&gt;genre&lt;/key&gt;
        &lt;string&gt;lcsh: Novels&lt;/string&gt;
        &lt;key&gt;itemName&lt;/key&gt;
        &lt;string&gt;Little Brother&lt;/string&gt;
        &lt;key&gt;playlistName&lt;/key&gt;
        &lt;string&gt;Little Brother&lt;/string&gt;
        &lt;key&gt;releaseDate&lt;/key&gt;
        &lt;string&gt;2008&lt;/string&gt;
        &lt;key&gt;sort-artist&lt;/key&gt;
        &lt;string&gt;Doctorow, Cory&lt;/string&gt;
        &lt;key&gt;sort-artist-status&lt;/key&gt;
        &lt;integer&gt;3&lt;/integer&gt;
&lt;/dict&gt;
&lt;/plist&gt;
</pre>
</li>
<li>
<a href="http://3press-blog.s3.amazonaws.com/error.png"><img src="http://3press-blog.s3.amazonaws.com/error-sm.png" alt="" title="photo (2)" width="300" height="225" class="aligncenter size-medium wp-image-1385" /></a></p>
<p>As expected, you can add ePubs that <a href="http://blog.threepress.org/2010/04/01/itunes-and-malformed-epub/">won&#8217;t actually be readable in iBooks</a>. Most of the cases are totally understandable: missing container files and other severe problems. It also seems that omitting a dc:title is a fatal error.  All errors are reported generically as &#8220;This book cannot be opened,&#8221; so check with the <a href="http://threepress.org/document/epub-validate">ePub validator</a> to look for the real cause.
</li>
<li> One nice feature of <a href="http://feedbooks.com/">Feedbooks</a> content is the recommendations for related titles, with links directly to those ePub files.  In <a href="http://ibisreader.com/">Ibis Reader</a>, accessing an ePub file link will prompt you if you want to add that book to your library, and let you start reading right away. In iBooks, it will open Mobile Safari and then return an error.
</li>
<li>Hyperlinks, either internal to the book or external to the web, otherwise work normally.</li>
<li>Flash video does not work (of course). HTML5 <code>&lt;video&gt;</code> also does not work, though that&#8217;s outside of the spec and therefore unsurprising. I don&#8217;t know if it&#8217;s possible to embed multimedia into an iBook ePub using some other method. <em>[Edit: subsequently Apple has released updates to support HTML5 video through use of the video tag; note that this will produce an invalid EPUB file at this time.]</em></li>
<li><em>[Edited to remove incorrect statement about justification; does seem to be under CSS control.]</em></li>
<li>CSS support seems good, as expected from a <a href="http://blog.threepress.org/2010/04/02/designing-ebooks-for-epub-reading-engines/">WebKit-based reading engine</a>. I haven&#8217;t rigorously tested it but I assume it will support CSS outside of the required ePub subset, just as a normal web browser would.</li>
<li>Embedded fonts don&#8217;t appear to work. This is consistent with @font-face not being supported on Mobile Safari. It was also what I expected.</li>
<li>Extremely long books with limited breaks seem to fail. At least, <a href="http://www.feedbooks.com/book/1232">Ulysses</a> does not work at all: page numbering is random, and reading the book is basically impossible.</li>
<li>
<p>Text that cannot be line-broken (like code) runs off the screen. This is true of both portrait and landscape mode:</p>
<p><a href="http://3press-blog.s3.amazonaws.com/longtext.png"><img src="http://3press-blog.s3.amazonaws.com/longtext-sm.png" alt="" title="photo" width="300" height="225" class="aligncenter size-medium wp-image-1381" /></a>
</li>
<li>Tables sometimes break in the middle of text when paginating. (In Ibis Reader we try to ensure that text doesn&#8217;t get cut off even when it occurs inside a table.)</li>
<li>My favorite test book looks fine:<br />
<a href="http://3press-blog.s3.amazonaws.com/abyss.png"><img src="http://3press-blog.s3.amazonaws.com/abyss-sm.png" alt="" title="photo (1)" width="300" height="225" class="aligncenter size-medium wp-image-1382" /></a>
</li>
</ol>
<p>Overall I&#8217;d say iBooks is pretty good for a first-generation ePub reader. The biggest concern is of course that once you purchase books from iTunes, you&#8217;re locked in to only reading them in iBooks.</p>
<p>I also hope to see an ePub style guide from Apple to help publishers and designers understand more fully what is and isn&#8217;t supported in iBooks.</p>
<p><em>Update: <a href="http://www.pigsgourdsandwikis.com/2010/04/ibooks-on-ipad-first-glance.html">Liz Castro has some good observations too</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/04/05/ibooks-and-epub/feed/</wfw:commentRss>
		<slash:comments>62</slash:comments>
		</item>
		<item>
		<title>iTunes and malformed ePub</title>
		<link>http://blog.threepress.org/2010/04/01/itunes-and-malformed-epub/</link>
		<comments>http://blog.threepress.org/2010/04/01/itunes-and-malformed-epub/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 14:57:44 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[epub]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1366</guid>
		<description><![CDATA[One nice feature of the Bookworm source code is that it includes a suite of test ebooks.  Books which should not be processable, because they&#8217;re severely malformed, are prefaced with invalid- in the title.  Other books demonstrate different characteristics. (Not all of the other books are actually valid, but their inconsistencies are minor [...]]]></description>
			<content:encoded><![CDATA[<p>One nice feature of the <a href="http://code.google.com/p/threepress/">Bookworm source code</a> is that it includes a suite of <a href="http://code.google.com/p/threepress/source/browse/trunk/bookworm/#bookworm/library/test-data/data">test ebooks</a>.  Books which should not be processable, because they&#8217;re severely malformed, are prefaced with <em>invalid-</em> in the title.  Other books demonstrate different characteristics. (Not all of the other books are actually valid, but their inconsistencies are minor and most readers allow them.)</p>
<p>I quickly ran through all of the <em>invalid</em> books to see how iTunes would behave.  Note that it&#8217;s too early to say how or if these will display in iBooks.  </p>
<ol>
<li> <em>Contains Adobe DRM</em> &#8211; Allowed. Surprising since these won&#8217;t be readable.</li>
<li> <em>No container.xml</em> &#8211; Allowed, but no visible metadata. Clearly an error; this book wil not work and should not be addable.</li>
<li> <em>Invalid character sets (non-UTF8)</em> &#8211; Allowed, but this is often acceptable in ePub software.</li>
<li> <em>No findable NCX, or no NCX at all</em> &#8211; Allowed. This book should not actually work as there will be no useful TOC.
</li>
<li> <em>No namespaces in container.xml</em> &#8211; Allowed, and metadata is still captured. ADE can also read this, but it shouldn&#8217;t be possible as the XML is invalid. </li>
<li> <em>No spine</em> &#8211; Allowed. This book should not be readable.</li>
<li> <em>No dc:title</em> &#8211; Allowed, uses filename. This is the one place where Bookworm and <a href="http://ibisreader.com/">Ibis Reader</a> are more strict than other readers. I feel that if there&#8217;s not even the most basic required metadata, we can&#8217;t guarantee that we can display it. But other ereaders do allow this, so not surprising.</li>
<li> <em>Extremely invalid XHTML (no body)</em> &#8211; Allowed, though not surprising since iTunes has no reason to process the XHTML content yet.</li>
</ol>
<p>In fact, all 38 books in the test suite were addable. This isn&#8217;t actually a good thing, especially when the DRM ebooks were accepted too.  iTunes should be notifying users quickly that their books can&#8217;t be read in the ecosystem, rather than waiting until they&#8217;re synced.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/04/01/itunes-and-malformed-epub/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Threepress now (re)open for business</title>
		<link>http://blog.threepress.org/2010/03/18/threepress-now-reopen-for-business/</link>
		<comments>http://blog.threepress.org/2010/03/18/threepress-now-reopen-for-business/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 15:03:41 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ibisreader]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1325</guid>
		<description><![CDATA[During much of the first quarter we needed to turn folks away who were looking for help with ebook conversions and other projects, due to the demands of launching  Ibis Reader. 
We&#8217;re on track now to resume consulting and custom publishing software development alongside Ibis Reader, so please feel free to contact info@threepress.org for:

Ebook [...]]]></description>
			<content:encoded><![CDATA[<p>During much of the first quarter we needed to turn folks away who were looking for help with ebook conversions and other projects, due to the demands of launching  <a href="http://ibisreader.com/">Ibis Reader</a>. </p>
<p>We&#8217;re on track now to resume <a href="http://threepress.org/about/">consulting and custom publishing software development</a> alongside Ibis Reader, so please feel free to contact <a href="mailto:info@threepress.org">info@threepress.org</a> for:</p>
<ul>
<li>Ebook strategy</li>
<li>EPUB consulting</li>
<li>Help getting books onto the iPad</li>
<li>Challenging ebooks: enhanced books, video, audio, interactivity, custom fonts</li>
<li>HTML5 and mobile development</li>
<li>Custom <a href="http://bookworm.oreilly.com/">Bookworm</a> development</li>
<li>White labeling Ibis Reader</li>
<li>XML workflows</li>
<li>DocBook and other schema development</li>
<li><a href="http://threepress.org/speaking/">Speaking</a> and training</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/03/18/threepress-now-reopen-for-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First ereader on the iPad</title>
		<link>http://blog.threepress.org/2010/03/17/first-ereader-on-the-ipad/</link>
		<comments>http://blog.threepress.org/2010/03/17/first-ereader-on-the-ipad/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 14:00:57 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[ibisreader]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1291</guid>
		<description><![CDATA[About 15 minutes of minor changes and Ibis Reader is the first ereader on the iPad. App developers have to wait for approval, and even Apple has to to wait for the release of the actual hardware.  If you have access to the iPad simulator, you can use it right now.
If you access the [...]]]></description>
			<content:encoded><![CDATA[<p>About 15 minutes of minor changes and <a href="http://ibisreader.com/">Ibis Reader</a> is the first ereader on the iPad. App developers have to wait for approval, and even Apple has to to wait for the release of the actual hardware.  If you have access to the iPad simulator, you can use it <em>right now</em>.</p>
<p>If you access the site on an iPad today, you get a different block of content on the home page:</p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-11.59.31-AM.png"><img src="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-11.59.31-AM.png" alt="" title="Screen shot 2010-03-16 at 11.59.31 AM" width="558" height="384" class="aligncenter size-full wp-image-1292" /></a></p>
<p>The link provided is the same one that we direct all HTML5 devices at.  Here are some screenshots from the experience:</p>
<h2>List page</h2>
<p><a href="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-11.55.25-AM.png"><img src="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-11.55.25-AM-228x300.png" alt="" title="Screen shot 2010-03-16 at 11.55.25 AM" width="228" height="300" class="alignleft size-medium wp-image-1294" /></a></p>
<h2 style="clear:both">Book table of contents</h2>
<p><a href="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-11.54.57-AM.png"><img src="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-11.54.57-AM-230x300.png" alt="" title="Screen shot 2010-03-16 at 11.54.57 AM" width="230" height="300" class="alignleft size-medium wp-image-1295" /></a></p>
<h2 style="clear:both">Reading page</h2>
<p><a href="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-12.06.24-PM.png"><img src="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-12.06.24-PM-233x300.png" alt="" title="Screen shot 2010-03-16 at 12.06.24 PM" width="233" height="300" class="alignleft size-medium wp-image-1296" /></a></p>
<p><br style="clear:both"/></p>
<p>Obviously there are some stylistic changes we&#8217;ll want to make:</p>
<ul>
<li> Making the margins in reading pages wider </li>
<li> Enlarging the size of cover images </li>
<li> Making better use of space on list pages </li>
</ul>
<h2>Tech notes</h2>
<p>Here are a few things we had to change to get it working:</p>
<h3>Event handling</h3>
<p>On Android and the iPhone, <em>touchstart</em> and <em>touchend</em> events are fired when the user touches the application, followed by <em>onclick</em>.  We preferentially use the <em>touch</em> events when reading a book because of some quirks in Android.</p>
<p>The iPad doesn&#8217;t seem to automatically fire the <em>onclick</em> event after a touch, so I had to make it manually trigger that for anchor links.</p>
<h3>Orientation changes</h3>
<p>The iPad simulator doesn&#8217;t fire the <em>orientationchange</em> event when the simulator is rotated.  We don&#8217;t know yet whether that will be true of the device, so at this time Ibis Reader won&#8217;t correctly re-paginate after an orientation change.</p>
<h3>Viewport width/height</h3>
<p>The iPhone doesn&#8217;t report its height/width correctly, and doesn&#8217;t report it differently when rotated.  We have these values hard-coded in the app.</p>
<p>Happily, the iPad does seem to report the correct value, both when the URL bar is visible and when it&#8217;s not (because the app has added to the home screen).  We don&#8217;t yet know about rotation since we&#8217;re unable to detect that.</p>
<h3>HTML5 database size</h3>
<p>There&#8217;s a bug in the current iPhone OS (3.1) in which the user won&#8217;t be prompted to increase an HTML5 database after the webapp has been added to the home screen.  This means that Ibis Reader users on the iPhone can&#8217;t ever add more than the default 50MB worth of books. This bug appears to have been fixed in the iPad OS.</p>
<p>(Android does not prompt the user to increase a DB, but does increase it automatically if there is space available on the device.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/03/17/first-ereader-on-the-ipad/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

