After an insane amount of testing, here are the unwritten rules that I have uncovered (so far) regarding how Pages exports to ePub.
- The items checked to be used in your TOC (whether you actually have one in your document or not) are what dictate the page/section breaks. This is hugely important because it effects EVERYTHING else, including formatting.
- Using the option to "Use first page as book cover image" will do so, but will effectively suck it out of the actual book when it displays so that your book will "open" to whatever page is next. This sort of stinks if you would like your book to open to the actual Title Page. One solution to this is to turn this option OFF when exporting, and BE SURE to set the title of your book to one of the Paragraph Styles that you included in your TOC list (see above). This will put your title in the auto-generated TOC *created by your reader* (we'll call this the "Reader TOC"), but it will allow your first page to remain your Title Page and should prevent problems with your formatting.
- It would seem that ANY time you start a new section in an ePub (Title, Preface, Chapter, etc… and not to be confused with a Section Break in the Pages document itself) it MUST start with a TOC marked style. If you don't you will start to find your formatting will change semi-randomly (I noticed it in left justified headlines becoming centered). You CAN manually modify the format of the text once you have set the correct style (if you want to change the justification or something).
- Use of the Insert Page/Section Break menu options will have little or no effect in the ePub itself. You can keep them in your Pages document if you like, but *it is the TOC marked styles that completely dictate the section/page breaks in the ePub export.*
- The auto-generated Table of Contents that Pages can create will be dropped in your ePub. The Reader TOC (the actual one used by the readers) will be recreated by the TOC marked sections as mentioned above. So, you might as well leave it out of a Pages document if you are only exporting to ePub. However, most Reader TOC's are not actually present in the text of the book, which is a little weird. To include a TOC in the book itself, you will need to manually create one (without page numbers since ePub's are reflowable), and then manually link it to "bookmarks" within your book. Be sure to use a TOC marked style for the header ("Table of Contents") so it starts on it's own page. Then go through your book, bookmarking sections that you want as TOC entries. The Link Inspector in the inspector pane is where you will find the bookmarking options. If, like me, you want to add, say, chapter titles as entries in your TOC, then find that title in your text, select it, then hit the "+" to add it as a bookmark. Once you have bookmarked all your sections, then go back to the text in your TOC, select an entry, and hyperlink it to one of your bookmarks. Repeat. The manual TOC will be visible in your book, and clickable to your chapters/sections.
- Some formatting works, some doesn't. You might have to experiment here. I would stay away from anything too "non-standard", such as rules and borders. Margin padding seems to be okay, as does BOLD and ITALIC. Text size will also apply, but some readers reset this, so don't count on it.
- If you can set a font beyond sans-serif or serif, I haven't found a way to do it. Readers are probably going to reset this anyway. Think "web-fonts" available in standard HTML at best.
- You CAN include graphics, but they MUST be "inline" and NOT "floating". This is nice if you want to include some simple graphic ligatures to mark the end of a chapter or something.
Hope it helps… Good luck!