Tuesday, June 4, 2013

InDesign TOCs to EPUB

I'm exporting an InDesign document to EPUB and for some reason the formatting that I've applied to the TOC title doesn't stick. I click in it and look in the Paragraph Styles box and it says TOC title,

InDesign

but when I export, it says "No Paragraph Style". I go back again, check once again in the Paragraph Styles box, export, and once again, I get "No Paragraph Style".

Dammliz-2.xhtml

What's going on?

And here's where going to trade shows really helps. I mentioned a while back that the engineers at Adobe are really open to suggestions and requests, and it happens that a couple of them came to my EPUB3 talk the other day in New York City. We talked for a bit afterward about my wish for a single file for both the navigational TOC and for the regular, in-the-body-of-the-document TOC (which I describe in some detail in my slides which you can find at the previous link). And the engineer told me, “but since we regenerate the ncx file upon export, we wouldn't know if the user had changed something in the text”.

Remembering that today helped me realize why my format wasn't making it through. InDesign doesn't pay attention to the document that's on your page upon exporting a TOC to EPUB, it only looks at the TOC Style, and what you have defined there. And here's what I had:

Edit Table of Contents Style

Since InDesign uses this definition and not what you see on the page to generate the TOC in your EPUB document, it was giving me "No Paragraph Style".

Once I updated the TOC style, I was able to get the TOC title to be exported with the proper style.

Edit Table of Contents Style

Dammliz-2.xhtml

Unfortunately, InDesign CS 6 has a bug which keeps it from properly splitting an EPUB on a style that's part of a TOC. Argh. So, in the end, I had to add the TOC title separately in my InDesign document to ensure the break. (I also had to get rid of the title from my TOC style so that it wouldn't be repeated there.)

Still, I think it's important to keep in mind that when InDesign generates a TOC file, it gets the information from the TOC Style definition, and not from the content that you may have edited on the page.

7 comments:

  1. I fully agree with your remarks about Adobe's engineers and software developers. I live only a couple of miles from where ID is developed and meet them at an ID user group in their office building. They are fully committed to making ID the best tool for print and digital creation. That's the key reason I've changed from a critic of Creative Cloud to a supporter. Getting enhancements rolled out monthly rather than after a 12-18 month wait will save me more than the service costs.

    ****

    There's another issue with the table of contents that you might want to check into. When ID creates the contents for a print book, it doesn't strip out the forced carriage returns I place to make long chapter titles wrap at the right place. I have to manually correct that in the generated table of contents. I wonder if ID does the same when that contents is exported to ePub. If so, it'll be a lot harder to fix that problem in the resulting ePub file than in the print version.

    Perhaps ID should have a branch of the contents setup window that lets users either mirror the printed edition's parameters or specify a new set, including whether there is a title at the top.


    ReplyDelete
  2. I hate to diverge from the topic but I was introduced to an interesting sample on the kindle that played with video. Now, it didn't look like it was embedded, as it seemed to open a separate player application to play it, and the play button and picture (of the video), seemed to me like a screenshot that served a function of just opening whatever external player it used to play the video. Anyhow I'm interested in getting your thoughts on this, as to the best of my understanding (and practice) any attempts I've made to implement video into a kf8 file (when played on the fire +, not kindle for ios) have ended in the video tag being ignored and the fallback text "reader does not support video" is not supported. The sample is "Global banking 2020" and is free through the amazon marketplace. My guess is external player, but I'd like a second opinion :).. Thanks, dig your bloog.

    -eBook & back end web dev

    ReplyDelete
    Replies
    1. To my knowledge, you can't sideload or self-publish audio and video to Kindle, except using the method that I describe here: http://www.pigsgourdsandwikis.com/2013/05/video-in-kindle-books-thanks-to-epub3.html It's not that Kindle can't deal with it, it's that Amazon doesn't allow it.

      Delete
    2. Yep that's it. I thought it was strange because the size of the entire azw totaled only 1.7mb (clearly didn't contain any videos) and that it opened a separate window. I wasn't convinced that it was the browser at first, because of how the back button functioned to send the user back into the reader. I've worked with external linking, however because it seems as though most people want content that's readily available without a live connection, they're not fans of anything that's not embedded, even though it helps tremendously with file size, and offers a way around amazons lack of support for both audio and video tags. This opens up a pretty good door for clients who MUST have their book available on kindle, because of the % of their base that purchases for that platform, and I can only hope we see more ties between epub3 and kf8 in the future. Thanks ;)

      Delete
    3. Herm.. I looked at that file and noticed that once I disabled my wifi the videos were still playing. I doubt they were preloaded, what's up?

      Delete
  3. Blog* But I'm sure your bloog is equally as informative. I really need to read through more before I post.

    ReplyDelete
  4. Hello Liz, I just became a subscriber to your terrific blog (and I'm relying heavily on your EPUB book for my first project).
    I have two iBook questions:
    First, I just saw in Apple's latest Assets guide that they support soft hyphens. Can I use InDesign's discretionary hyphen for this, and is there an automated way of inserting them for large amounts of text?
    Second, the Assets guide also says iBooks now support page-break-after. Is this a better way to force, say, a chapter break than splitting the text into separate HTML files?
    Thanks so much.

    ReplyDelete

More of my books