Thursday, 25 November 2010

Export ePub from ID CS4 from .indb book file

There is one big difference between InDesign CS4 and CS5. If you want new page breaks/sections/chapters for each new chapter in your text then you must go about it in specific ways, depending on your version.

ID CS4 only automates new-chapter page breaks in the exported ePub if you build your book (the actual ID file) as a book, or .indb file. You need to make a new .indd file for each chapter separately, saving them in a logical order based on the structure of your book. Then you need to go to File > New Book and give it a name and Save. Then, in the Book panel you click on + at the bottom and add the collection of .indd files you prepared earlier.


As you can see, I have 10 chapters created as .indd files, all based on the name of the chapter (this will then be replicated in the Table Of Contents, or TOC, in our ePub). Also there is a separate OFC (front cover) file, also an .indd file. This file contains only one page, with a .jpg image of my cover (taken as a screenshot from an older ID file).

Separate from this is my actual Book file, the LBB_book.indb file. This is not a "page" file as such, all it is is a "collection" file, if you will, to which my .indd files are linked.



The normal benefit of doing this in ID is that you can automate pagination across chapters and flexibly move chapters round, add or remove chapters etc and the page numbers change automatically.

For the purposes of ePub, doing this in ID CS4 will give you a corresponding TOC in your ePub. In ID CS5 this is not necessary because there is a way of exporting whereby your heading paragraph styles mark new chapters and transfer into the TOC (in the same way that we will make them here) by simply ticking [i.e checking, US Eng.].

To Export, choose the fly-out menu (the little black "v=" symbol in the top right of the image above) and option Export Book for Digital Editions... Don't choose File > Export from the top, this will export the single .indd file you happen to have selected.

Choose your settings and click OK.

ID now produced an ePub file, in my case LBB_book.epub, containing all my chapters and cover. Open yours in ADE.


As you can see, everything exports from ID as an ePub that can be opened and viewed in ADE (for those wondering now, why I have been complaining, the problem relates to my ePub files after I have edited the CSS and XHTML).

Three things to note: 1) all the text (right-hand side) stacks on top of itself, with no gaps. This must be fixed using CSS, more on this in later blog posts; 2) note the chapters that appear on the left-hand TOC. These are a direct result of using the book function of ID CS4 detailed above; 3) and my cover appears in the left-hand thumbnail inside ADE, this is because I included the OFC file with the jpg placed on the page. It appeared on the first page of the ePub (not shown in the screenshot above) but to limit the number of screenshots I scrolled down to the first chapter to highlight how the text looks instead.

If I had have used a single .indd file in ID CS4 for my book and exported it as an ePub, I would only have one chapter appearing on the left (the name of that .indd file) and I would not have chapter breaks in my ePub file. All of this work could have been done by hand post export, but why make unnecessary work when it can be automated like this?

This is the benefit of using ID's book function to collate and export your ePub.








No comments:

Post a Comment