30 Aug 2010
Apple is often admired — and not just by fanbois — for the beauty of its products. But what is often overlooked is the cleverness with which it creates ecosystems in which everything works together. Your MacBook Pro works effortlessly with your iPhone, iPod and iPad. And Apple's services — such as Mobile Me — make it easy to share data across devices, put images on the web … and so it goes on.
This integration is a great selling point. It's the basis of the so-called 'halo effect' in which people who are not habitual Apple users become seduced by one device — the iPhone or iPad perhaps — and find themselves longing for other Apple products because they work together so well.
A small, largely unheralded update to iWork has given us another example.
The iWork suite is Apple's cut-price office package. It contains Pages word processor and page layout software, the Numbers spreadsheet and the Keynote presentation package. This isn't a guide to using Pages: if you want to know how to wring every last bit of capability out of this package, I suggest you pay regular visits to I Work in Pages where Alexander Anichkin demonstrates the full versatility of this software.
Export to ePub
Apple recently issued a minor update which mostly affected Pages. Version 9.0.4 of iWork included a number of bug fixes — plus (and you'd be forgiven for not having noticed this) the ability to export a document directly to the ePub e-book format. And it just so happens that ePub is the format Apple has adopted for iBooks — so if you want to get your publications into the iBookstore, they'll have to be in ePub format.
As ePub is fast becoming the de facto standard for e-books, and is the focus of the work we're doing at WebVivant Press (not least because we publish via the iBookstore among other channels) I decided to check out how good a job Pages does when creating ePub files.
Best practice
Apple has produced a short document, 'ePub best practices for Pages' (ZIP file) that contains a number of predefined paragraph styles, such as Title, Subtitle, Author, Chapter Title etc. There are about 15 that will be of interest to e-book producers. That's a little skimpy, but you can always define your own.
As we’ve discussed before, working with paragraph styles is the key to creating successful e-book files.
As suggested in the Apple guide, I deleted the text in its sample document and saved the file as a template. I then opened a new document using this template and pasted in the text from my novel, Lady Caine. I reformatted the text using just a few of these basic styles. The bulk of the book used just Chapter Title and Body styles. I named the file 'Lady Caine - basic styles', then exported it as an ePub document.
Here's how it looked in Adobe Digital Editions:
The first thing to notice is that the e-book has a table of contents. That tells me that Pages has cleverly split the text into separate files, one per chapter. It does this based on the table of contents set-up in your Pages document. This is very smart and makes for more standards-compliant ePub files.
The ePub unzipped
I unzipped the .epub file and checked the file hierarchy (right), which confirmed my suspicions about the separate chapter files.
Here's the OPF file (named epb.opf in this case):
<?xml version="1.0" encoding="UTF-8"?>
<package unique-identifier="BookId" version="2.0" xmlns="http://www.idpf.org/2007/opf">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
<dc:title>Lady Caine - basic styles</dc:title>
<dc:creator opf:role="aut">Steve Mansfield-Devine</dc:creator>
<dc:contributor opf:role="bkp">Pages v4.0.4</dc:contributor>
<dc:date>2010-08-28</dc:date>
<dc:subject>Fiction & Literature</dc:subject>
<dc:identifier id="BookId">07CBB607-5854-4D85-9905-9303471CA34E</dc:identifier>
<dc:language>en</dc:language>
</metadata>
<manifest>
<item id="cover" href="cover.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-1" href="chapter-1.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-2" href="chapter-2.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-3" href="chapter-3.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-4" href="chapter-4.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-5" href="chapter-5.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-6" href="chapter-6.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-7" href="chapter-7.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-8" href="chapter-8.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-9" href="chapter-9.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-10" href="chapter-10.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-11" href="chapter-11.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-12" href="chapter-12.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter-13" href="chapter-13.xhtml" media-type="application/xhtml+xml"/>
<item id="stylesheet" href="css/book.css" media-type="text/css"/>
<item id="ncx" href="epb.ncx" media-type="application/x-dtbncx+xml"/>
</manifest>
<spine toc="ncx">
<itemref idref="cover" linear="yes"/>
<itemref idref="chapter-1" linear="yes"/>
<itemref idref="chapter-2" linear="yes"/>
<itemref idref="chapter-3" linear="yes"/>
<itemref idref="chapter-4" linear="yes"/>
<itemref idref="chapter-5" linear="yes"/>
<itemref idref="chapter-6" linear="yes"/>
<itemref idref="chapter-7" linear="yes"/>
<itemref idref="chapter-8" linear="yes"/>
<itemref idref="chapter-9" linear="yes"/>
<itemref idref="chapter-10" linear="yes"/>
<itemref idref="chapter-11" linear="yes"/>
<itemref idref="chapter-12" linear="yes"/>
<itemref idref="chapter-13" linear="yes"/>
</spine>
<guide>
<reference type="text" title="Title Page" href="cover.xhtml"/>
</guide>
</package>
A few observations.
First, it has created an appropriate 'creator' entry, presumably because I used the Author paragraph style for my name.
Pages has also created a unique identifier, which is important, although I would want to hack this to use the ISBN instead. The date given is the date the file was created and I'd want to change this to the official publication date. And I'd want to add publisher details.
In fact, I'd probably want to make a number of changes to this file, just to ensure it matches our standard approach to ePub packages. For example, even though I entered a number of keywords into Pages' 'info' panel, the software didn't create any keyword entries in the metadata section.
So I'd end up unzipping the ePub file, making the changes and zipping it up again, as described in this earlier post. But that's only because I'm being picky.
The acid test
Now for the real test. I ran the ePub file through epubcheck 1.0.3. It passed with no errors reported.
I had less success adding a cover image to the start of the file. There is an option, when exporting, to use the first page as the cover image. Inserting a JPEG or PNG file on to the first page led to the creation of a relevant entry in the epb.opf file — but it was empty. Even exporting the sample file from Apple failed to produce a cover image when viewed in Adobe Digital Editions. I'll need to investigate this further, but it's not a big deal for us. We send cover images separately when supplying to the iBookstore and other e-book channels.
Quick and easy
To sum up, creating a standards-compliant ePub file from Pages is now very simple. While I might be picky about metadata, the ePub files output by Pages are well-formed and will be accepted without quibbling by the Apple iBookstore — which is rather the point.
Adding Pages to the publishing ecosystem created by the iBooks app, the iBookstore, the iPad and the iPhone means that Apple now has the entire process covered, from writing the book, through digital file creation, distribution and sales to reading on a mobile device. And the whole thing is relatively effortless.
Please note: comments on this site are moderated - partly to eliminate spamming and partly to avoid wasting space and bandwidth. Any comments deemed offensive, juvenile, stupid or pointless are deleted.
Write a comment
Posts: 4
Reply #8 on : Mon October 17, 2011, 00:56:45
Posts: 4
Reply #7 on : Mon October 17, 2011, 01:21:50
Posts: 4
Reply #6 on : Sat October 22, 2011, 07:53:58
Posts: 4
Reply #5 on : Sat October 22, 2011, 11:34:16
Posts: 4
Reply #4 on : Mon October 24, 2011, 20:58:06
Posts: 4
Reply #3 on : Tue October 25, 2011, 01:12:15
Posts: 4
Reply #2 on : Thu October 27, 2011, 03:36:30
Posts: 4
Reply #1 on : Thu October 27, 2011, 04:14:40