Finally there’s a commercial word processor that can export ePub.
Today Apple released an update to iWork 9.0.4 that provides ePub as one of the output formats in the Export menu, alongside PDF and Word. Apple has also provided a support page describing the differences between ePub and PDF, and a very helpful Pages template for use in creating an ePub.
I quickly took a stroll through the template and its output and so far I’m quite impressed.
The template provides a number of different default styles and headers. The headers are critical; this is how Pages determines which items are chapter boundaries that should be given unique NCX entries. Headers with the Chapter Name style mark the boundaries where content is chunked into discrete XHTML files. The Chapter Subtitle style will create a new nested TOC entry but not a new XHTML file. This is sensible and should produce rich TOCs if used appropriately.
I modified the sample template just a bit to test out color and ensure that my changes were propagated into the epub:
Image may be NSFW.Clik here to view.

Then I went to the Export Menu, which now has an ePub option:
Image may be NSFW.Clik here to view.

and prompts you for some additional metadata, a nice touch:
Image may be NSFW.Clik here to view.

The ePub file was valid, hooray. I took a look at the OPF file:
<dc:title>ePub Best Practices for Pages 09-49-51</dc:title> <dc:creator opf:role="aut">Liza Daly</dc:creator> <dc:contributor opf:role="bkp">Pages v4.0.4</dc:contributor> <dc:date>2010-08-26</dc:date> <dc:subject>Business & Personal Finance</dc:subject>
Nice use of opf:role
, one of the additional types of ePub authorship metadata that we recommend. The NCX file was also sane.
The CSS is a little bloat-y and unreadable but that’s typical of automated output from page-centric tools. It’s no worse than InDesign’s:
.s2{ color: #000000; font-size: 75.0000%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0.0000em; margin-bottom: 1.2821%; ...
The default style produces some reasonable CSS for superscripts and subscripts, another nice touch:
sup{ font-size: 67%; vertical-align: 33%; } sub{ font-size: 67%; vertical-align: -10%; }
In future improvements I’d like to see the randomly-numbered classnames be transformed to something more human-readable.
Unfortunately I can’t say as many positive things about the XHTML:
<div class="s2"> This document will show you how to use paragraph styles to create a publication that looks great.. </div>
If those are paragraph styles, where are the paragraphs? It is not acceptable to use <div>
where <p>
is semantically accurate. This must be corrected in future updates.
Uploading it to Ibis Reader produced good results, and the CSS “works”:
Image may be NSFW.Clik here to view.

I had a few random Pages documents lying around and I got decent ePub output from them too, even without using the styles found in the best-practices template. Those styles should be used on content of any length or complexity, if only to get the critical XHTML automatic chunking.
Overall I’m quite excited that there’s finally a commercial tool for normal humans that produces one-step valid ePub output. If the XHTML output is improved only to use <p>
I’ll be able to recommend Pages without reservation.
The outputted ePub file: test-from-pages.epub.
Edited Friday August 27 to reflect some further exploration. Thank you to Baldur Bjarnason for identifying the div issue.