Creating eBooks with Pages.app

· Posted by mike in Company and tagged · 16 Comments

iBooks on left and Kindle on right.

We sometimes get asked for downloadable versions of our Mockups documentation to go along with the online version we publish on our support site. We now publish the Mockups Docs in PDF, and additionally in the ebook reader formats EPUB (for iBooks) and MOBI (for Kindle). It's nothing fancy, just a version of our Documentation that was prepared in Apple iWork's Pages.app, and exported in all of these formats.

Since we took the time to figure out how to do this, we thought other small companies who may want to do the same may save some time by seeing the notes we took when we set up our templates and migrated our content. These steps are only useful if you're using a Mac, obviously.

Download our eBook

If you want to get an idea of what we've published, you can download the eBook for the Mockups for Desktop Documentation in the following formats.

PDFPDF
For viewing in Acrobat reader.

EPUBEPUB
For iBooks app for iPad, and other ebook readers that support the EPUB format.

MOBIMOBI
For Amazon Kindle and other eBook readers that support the MOBI format.

Notes about downloading
Instructions for installing the EPUB and MOBI files vary depending on your device.

  • iPad: On iOS 5+ iPads, press the links to open, and you'll be prompted to Open in... the appropriate app (EPUB for iBooks and MOBI for Kindle).
  • Kindle: On Kindle devices, download the MOBI file and sync with your USB cable.

.dtico {
float: left;
margin: 0 1em 0 0;
}

Download the Template

We learned how to publish to EPUB using the Apple article, “Creating ePub files with Pages”. We used a sample template they provided and modified it to suit our needs. Then we used a tool called Calibre to convert our exported EPUB file to MOBI, to make it available to Kindle users as well.

First start by saving our template file: eBook.template

You can simply open the file and select the menu File > Save as template... to save it on your Mac to ~/Application Support/iWork/Pages/Templates/My Templates/.

Writing and Editing

Set up your workspace:
  • Styles Drawer should be visible. If it is not, select View > Show Styles Drawer.
  • Inspector Should be visible. If it is not, select View > Show Inspector.
  • Use Layout mode. View > Show Layout.
Start your file
  • Start by opening a new blank document by select File > New from Template Chooser...
  • If you added the eBook.template file above, you will see it under My Templates. Select it and click "Choose."
Set up title page
  • With the first page selected, check the Layout Inspector > Section tab. "First Page is different" should be checked.
  • Change the title and subtitle.
  • To add a new image select the image box. Select the menu Insert Choose... (or use CMD+SHIFT+V) to place a new image.
  • Change the author and edition text if necessary.
Table of contents
  • Leave it alone, it gets generated automatically.
  • If for some reason you have to force it to update, right-click the TOC and select Update Table of Contents from the context menu.
Adding Content
  • Chapter title
    • Insert the cursor at the start of a new chapter and select the Chapter Name style from the styles drawer. Enter your chapter name or paste it via Right-click > Paste and match style.
  • Headings
    • Use the Heading style for headings, Subheading style for subheadings.
  • Body
    • Select the Body style. Start entering your content.
    • If you've worked on the content outside of pages, select the content you want to paste, right-click at the insertion point and select Paste and match style.
  • Images
    • Use Insert > Choose (CMD+SHIFT+V) to insert images at the insertion point.
    • Images must be inline to work properly in EPUB an MOBI format, so be sure to check the Wrap Inspector. Make sure you have the "Inline" radio selected images they flow with the text. Check "Object causes wrap."
    • Use a hard return after images.
    • Use the Caption style if you want to place a centered caption below an image.
  • Lists
    • Put each list item on a new line, select the entire series and select the list style (bullets, numbered).
    • Use CMD+\] to indent.
  • Code
    • Code Blocks: Use this style for blocks of code. They'll be shown in a block with a fixed-width font and yellow background.
    • Inline Code: Use this style for code that's shown inline in a paragraph. They selected code will be shown in a fixed-width font and yellow background.
  • Chapter Breaks
    • After the last line of the chapter select the menu Insert > Section Break. This will start the next chapter on a new page.
Header/Footer
  • We use the header and footer for the PDF version only, since EPUB and MOBI will strip these out, and use the document properties instead to get this information.
  • The header shows the Document Title on every page except for the title page. On the Table of Contents page, double-click in the header to replace it with your document title.
  • The footer shows the page number. You can leave this alone.

Exporting and Testing

First, save your Pages document, obviously. For PDF, simply select File > Export PDF. Follow the instructions below for exporting EPUB and MOBI formats.

Exporting to EPUB using Pages

  • Select File > Export.
  • Select the EPUB tab, and enter title and author information.
  • Check the "Use first page as cover image" checkbox, and click Next.
  • Ignore the warning about floating images, because you set the image wrapping properties if you followed the instructions above.
  • Save.
  • You have a few options to test in iPad: 1) Email the file to self as attachment and open to iBook, and 2) Open iTunes, drag to Books on left side of iTunes window under Library and Sync.

Exporting to MOBI using Calibre

  • Use the Calibre app to convert EPUB to MOBI
  • The process is pretty simple. Add your EPUB file to Calibre.
  • Click Convert.
  • I make sure that Output format is set to MOBI, and I add our company name to the Publisher field. I leave all other settings at defaults and click OK.
  • After the file is converted, you can right-click the eBook in the app and choose Open Containing Folder to browser to the file on your file system. It's saved to the ~/Calibre Library/ folder.
  • If you attach a Kindle you can copy the MOBI file to the Kindle.

That's all there is to it. Hope this helps.