Creating an eBook for iPad and Kindle in InDesign

This tutorial is for people with a grounding in InDesign already. You should know the basics of creating a new document, adding Paragraph Styles and manipulating text. I’ll be covering the “gotchas” I found creating an eBook from InDesign. Creating an eBook in InDesign will give you the option to export as EPUB, PDF and HTML all from the same source, with minimal changes. What follows is my preferred flow.

Regular readers might want to tune out now. Go read an old Rex Havoc or something.

Before you start you’ll need Calibre. Calibre is a “swiss army knife” for eBooks. It converts to and from all sorts of formats. To keep the code as pure as possible though, I only use it for the final conversion from EPUB (eBook format) to MOBI (Kindle format), which is not currently possible straight from InDesign.

Create all the different visual styles as Paragraph Styles.

As you create them, fill in the Export Tagging options at the bottom of the Paragraph Style Options window.

A screenshot of InDesign’s Paragraph Style Options dialogue box showing the “Body Text” style. Under the EPUB and HTML settings, the Tag is set to “p” and the Class is set to “bodytext”. For the PDF settings, Tag is set to “p”.

Be sparing with the H tags

Chose an appropriate Tag for both the EPUB and HTML section and the PDF section. You can choose P (paragraph) or H1 through H6 (heading sizes 1-6), but keep it simple. If you’re used to working with HTML, this will be straight forward, but you want to keep most text as Paragraph text and leave the Headings for your actual title and book headings. For instance, I’ve used H1 for the title of my book, H2 for chapter titles, H3 for the Author style, and H4 for the book subtitle.

Add a Class under EPUB and HTML. This will add all the relevant CSS to the exported document to give it a semblance of what you actually intend it to look like.

Also make sure you turn off Hyphenation on each paragraph style. Kindle reflows the book to match the reader’s text options, and hyphens won’t make sense the minute they leave your carefully formatted book.

Create a Table of Contents, but do not insert into a page. Leave it as overset text outside the flow of the document. When you export it, you have the choice to include it and you should do it then.

When you export the document, choose the Contents as shown.

Screenshot of the EPUB Export Options showing the format for the EPUB Content as XHTML. Under Contents, Break Documen is ticked and that setting is set to Chapter Number. Remove Forced Line Breaks is also checked. Under CSS Options, Generate CSS is selected and all options are ticked.

Remember this, there’s a Quiz later

Fill out at least the first tab of the File Information ( File > File Info in the menu.) This will pre-fill a lot of the metadata your eBook needs.

Screenshot showing the Description tab of the file information dialogue. A Document Title is set, along with the Author and Description fields. The Copyright field is also set, with a creative commons licence URL in the Copyright Info URL field.

Metadata is always important

  1. Export your file. At this step you can export as PDF, HTML and of course, EPUB.

    • In the EPUB Export Options tick Include Document Metadata and fill in your details of you care to.
    • Select Use Existing Image File and select a cover image. It’s better that you don’t include this image in the actual InDesign document.
    • Under Formatting Options you can choose to leave the defaults, or set Bullets to “Map to Unordered Lists” and Numbers to “Map to Static Ordered Lists” (I’m actually not sure what the difference here is.
    • You can leave the Image options as default, or tweak to your liking. The books I’ve done so far have been light on images, but if I do anything more in-depth I’ll update this page with what I find.
    • Fill in the Contents section as previously shown.
  2. Open your EPUB file in Calibre. Check the conversion. I only got this process right after much trial and error, and some of my settings have become default for me. If things aren’t working right for you leave me a comment and if I had the same issue I’ll update the tutorial with how I overcame the problem.

  3. Click Convert Book in Calibre.

    • In the Metadata section, fill in any further metadata necessary.
    • You can leave most of the rest as default, but under Structure Detection you may wish to use an XPath expression to force page breaks in your kindle document if you haven’t already done so in InDesign. To do it in InDesign, choose the Paragraph Style that will force a new page and under “Keep Options” in Paragraph Style Options set “Start Paragraph” as Next Page. EPUB and MOBI will honor this setup.
    • Under Table of Contents ensure “Force use of auto-generated Table of Contents” is unticked.
    • In MOBI Output, untick everything.
    • Click OK. If I’ve remembered all the steps I used, you should have well formatted EPUB and MOBI files.
    • From Calibre, select the new title and click “Save to disk in a single directory” and put your new files somewhere. Share and enjoy!

The MOBI file that this process produces is perfect for uploading into Amazon. The files I’ve uploaded don’t change at all and look exactly the same once they’ve been processed by Amazon’s software.

The EPUB file can be loaded over the net into iBooks on your iPad or iPhone by opening the file in Safari. The software will ask you if you’d like to add the file to your iBook shelf.

You can check out the results of this process by downloading my first Rex Havoc ebook for free, or the third Time Diversion directly from Amazon.

Space Flight 704: The Book!

Published!

Hey Rex Fans, have you always wanted to read Rex Havoc adventures conveniently collected for you in book form? Are you TIRED of visiting The Geekorium for your Space Flight 704 needs? Do you think,‘I wish there was a version I could read on my Kindle every day’?

No?

Just me then?

Well despite your interest or lack thereof, Rex Havoc is now an eBook! For the next 90 days, Space Flight 704: Time Diversion is available on Amazon for one dollar! If you own a Kindle, you could be reading it right now - isn’t that exciting?

Space Flight 704: Time Diversion collects the stories in the recent Time Diversion arc, before Rex became an enigma, when Jones was still an ally, and before The Professor was cruelly bombarded from space by a death ray. Included is a table of contents that makes it easier to follow the story in chronological order. Of course the story is free here on The Geekorium, but buying it from Amazon will give you a warm glow, and something to read on the bus.

If you’re still not convinced read these 5 Star Reviews.

A ripping space yarn of the Old School variety, this action-packed short story harks back to the golden days of Flash Gordon serials with tongue firmly in cheek. Both wonderfully amusing and butt-clenchingly thrilling, not a sentence is wasted that doesn’t thrust the story forward like a rocket ship.

HugePedlar

and

I look forward to what happens when I actually read it.

Zombie_Plan

After 90 days I’ll be offering the eBook in other formats too, but how many formats I offer will depend on how much interest I get with the version on Amazon. So if you’d like to see an iBook version, or one for Android, or just a DRM-free version you can buy directly from The Geekorium, tell your friends and followers about Rex Havoc’s eBook adventure!

Now go out! Be fruitful and multiply! Wrong command set! Go and tell people! Buy it! Stop using exclamation marks!