Join Keith Gilbert for an in-depth discussion in this video Create table of contents buttons, part of InDesign: Fixed-Layout EPUB Interactive Techniques & Publish Online.
- This is kind of a long document, so I want to build in some navigation that will help users jump directly to different sections of the document. And I want each entry of this lengthy Table of Contents to be hyperlinked as well. Since we've used paragraph styles consistently throughout the InDesign document, and used InDesign's automatic Table of Contents feature, we can do this without too much work. In the Exercise Files folder, open 01_02_handbook_begin, and then turn to master page B.
I want to add some buttons to these tabs at the bottom of the page, and these buttons should lead to different sections of this long document. So I'm going to draw a clear frame over this Introduction tab. The Introduction is on page four of this document. So I could choose for my action for this button, Go To Page, and tell it that I want it to go to page four. However, the problem with that is if the Introduction later on moves to a different page, this button is going to go to the wrong spot.
So I oftentimes prefer to do these navigation buttons a different way. I'm going to undo that. And instead of using a Go To Page action, I'm going to use a Go To Destination action. This is much more flexible. Now what is a destination? A destination is something that you can add within the text of your document. It's sort of like a little anchor that goes right within the text flow, and you can point to that anchor with these Go To Destination buttons.
The beauty of this is that if and when the text moves to a new location, that little anchor moves with the text, and the button still works. The problem is there are no destinations here to point to, so I have to somehow create those. One way to do that would be to go to my Hyperlinks panel and use the Hyperlinks panel to create the destinations manually. I would do that by turning to the page that contains the text that I want to put the destination in.
I would select the text and go to the Hyperlinks panel menu and choose New Hyperlink Destination. I would give it a name, and then I would OK out of it, and then I would point to that destination with my button action. But I would have to do that over and over and over again for each thing that I want a button to point to, and that's a lot of work. So I'm going to cancel out of that, and we're going to do it a different way. I'm going to turn to page two, and you can see that on this page, we have a visible Table of Contents.
This TOC was generated automatically by InDesign, based on our paragraph styles that we've applied to headings and subheads throughout our document. Because we did this, we can use this feature to automatically create destinations for each entry in our Table of Contents. If you want to learn more about how to create one of these automatic Table of Contents, see Mike Rankin's Creating Table of Contents movie. In order to make this work, we just need to make one change to our Table of Contents here.
I'm just going to click within the Table of Contents with my Type tool, and choose Layout, Table of Contents. Because this was just a print Table of Contents, there's a couple options that weren't checked here, because they weren't necessary for print. For EPUB output, we need to check this Create PDF Bookmarks option and this Make text anchor in source paragraph option. Selecting these two choices is going to add destinations throughout the document and have the added bonus of making each of these TOC entries clickable within the EPUB.
So I'm going to OK out of this. It's going to update the Table of Contents. It did its work. So now if we turn to page five, for example, click somewhere in the text and choose Edit in Story Editor, we'll see that a whole bunch of destinations have been added. That's what these little icons represent. And those have been added throughout the document. So now I'll return to master page B, go back down to these tabs at the bottom, select my clear frame for the first button, and for the destination, I've now got a whole bunch of destinations in this dropdown list.
And I can find the one named Introduction and choose that. Now all I need to do is Option, or alt-drag, this button to the next tab, and change the destination for that one to Definitions of Employee Status, and then repeat that process for the rest of the buttons. Once you've done that for all the buttons on this page, all that remains is to go to File, Export, choose EPUB Fixed Layout, and export the Fixed Layout EPUB and check your work.
So for long documents, taking the time to use paragraph styles consistently, and then setting up an automatic Table of Contents makes it much easier to create buttons that point to specific sections of your document.
- Creating animated navigation buttons
- Building interactive slideshows
- Creating reveal buttons
- Adding multiple choice and branching quizzes
- Creating a scrolling panorama
- Embedding video
- Creating buttons to send email