Showing posts with label TOC. Show all posts
Showing posts with label TOC. Show all posts

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.

Friday, April 27, 2012

Word for Mac can't generate linked TOCs for Kindle

I've been trying to document the simplest way to create an ebook with a tool that most folks already own. The tool I've chosen, Microsoft Word, is a bloated, impossibly complicated piece of software that for some inexplicable reason, is used by a huge proportion of the populace. Feel free to enlighten me about its virtues in the comments.

Anyways, I want to call your attention to one particularly important failing of Microsoft Word for Macintosh: it will only create linked or active TOCs if the TOC contains page numbers. It's really important to include linked TOCS in ebooks, and particularly in Kindle books since most of Kindle devices don't have device-generated or navigational tables of contents, but it doesn't make sense to include page numbers (since they don't make any sense in a digital landscape).

Note that Microsoft Word for Windows is happy to automatically generate a useful TOC, sans page numbers, for an ebook.

Table of Contents

Simply uncheck Show page numbers and then check Use hyperlinks instead of page numbers.

Now look at the corresponding dialog box in the latest version of Word for Macintosh:

Table of Contents

You can hide the page numbers, but you can't convert them to hyperlinks, and I assure you, after much testing (and confirmation from @ljndawson), that without page numbers, no page links will be created. The TOC is there, but will take you nowhere in the converted ebook.

Kindle Fire Previewer - testerTOC7

It makes Word for Mac a much less powerful tool for creating ebooks. Of course, there are solutions (like manually creating bookmarks for each TOC entry), but it's nothing like a one-button solution (!).

Why should anyone care about how Word creates TOCs? Because Word (.doc or .docx) is the one styled format that can be read and converted automatically into Kindle format (using KDP, Send to Kindle, and by emailing the document to a Kindle device). More on that soon.

Wednesday, June 8, 2011

Visual TOC for Fixed Layout EPUBs

Last night, Anne-Marie Concepción took a look at my new Fixed Layout EPUB book, “Barcelona Beyond Gaudí” and pointed out that the navigational TOC was made out of thumbnails of the individual pages instead of text descriptions.

I wish I could say I had done that on purpose, but although I noticed in Apple's new iBookstore Asset Guide (4.7 rev2) that they had mentioned how to create such a thumbnail-based TOC, I was so focused on the Javascript and geolocation parts of the project that I didn't even notice the TOC until Anne-Marie pointed it out.

But actually, it's a bit more complicated (or simple) than that. It turns out that iBooks creates visual “Thumbnail TOCs” for Fixed Layout books by default. You don't have to do anything special. When a visitor clicks the TOC button, the Thumbnail TOC is what appears by default, along with two buttons that let you switch between the Thumbnail and Text TOCs:

Both TOCs

Frankly, the Thumbnail TOC is pretty perfect for a fixed layout ebook that's based on photos like this one. It makes much more sense to be able to jump to the desired image than to try to figure out which one is which from an abbreviated bit of text in a text-based TOC.

But, if your visitor wants the text TOC, all they have to do is click the List icon at the right of the screen (next to the Bookmark icon).

Text TOC in Fixed Layout

The instructions in the iBookstore Asset Guide shows you not how to create the Thumbnail TOC but how to get rid of the Text TOC. Not sure why you'd want to, as it's not harming anyone back there and is pretty hidden as it is, but to get rid of it, simply specify a single navPoint in your toc.ncx file:

<docTitle>
<text>Barcelona Beyond Gaudí</text>
</docTitle>

<navMap>
  <navPoint id="p3" playOrder="3">
  <navLabel>
    <text>Barcelona Beyond Gaudí</text>
  </navLabel>
  <content src="page06.xhtml" />
  </navPoint>
</navMap>


Now when your reader views the TOC, they'll see only the thumbnail one, with no List button to switch to Text view.

No text TOC

If you'd like to buy this first book in my Barcelona Beyond Gaudí series, it's available right now from my own site, and has no DRM so that you can look inside. It should be up any day now (come, on Apple!) on the iBookstore in the US, UK, France, Germany, Australia, and New Zealand. (I'd do more if there were more!) If you want more information about creating Fixed Layout EPUBs, you might be interested in buying my miniguide to Fixed Layout EPUB.

More of my books