Digitip 085 – Adobe InDesign CS4: A story about Table of Contents and Bookmarks
This is the 6th tip in a series of tips on Interactive PDFs. We’ve learnt in previous tips to create buttons, add cool roll over effects, add actions to buttons, create hyperlinks to pages and more. In this tip we’ll look at how we can create a Table of Contents in InDesign and automatically use the inclusion of an interactive Table of Contents during export to PDF as well as create navigational bookmarks in the PDF. The preparation as we’ll see is all on how we define and set-up our Table of Contents.
Building a Table of Contents
Rule number 1: In order to automatically generate a Table of Contents list in an InDesign document, you must use paragraph style consistently throughout your document.
So what do paragraph styles have to do with building a Table of Contents? Through-out your InDesign document (or document that is part of an InDesign Book), you use paragraph styles to format the text in the document. Styles such as “Heading1″, “Heading2″, “BodyText”, “Normal” and so on. Generally when we create a Table of Contents we want to create a copy of text, such as headings that is used through-out the document, or figure-names or table-names etc. InDesign’s Table of Contents feature can automatially filter out this text from an InDesign document IF you have formatted those headings with a unique paragraph style. Let’s say Heading1. Here’s how it all works together…
Step 1: Format headings etc. consistently with paragraph styles
Step 2: Design your Table of Content
First of all, if you are looking at building a Table of Contents from different heading levels, consider how many levels deep you’d like the Table of Contents to be. For example will you only include “Heading 1″ text? Or do you want to see different levels, such as “Heading 1″ and “Heading 2″?
Once you’ve determine this think ahead a little. When the text is formatted in the Table of Contents:
- Would you like to see a Page Number?
- If Yes, will that be preceding the heading text that is filtered out of the document? or will it follow the text?
- If there is a page number, would you like to separate it from the text in some way. Say by entering a tab-character, or maybe even an En-Space then a Tab-character? etc.
- Build a small temporary Table of Contents in which you mimic this formatting in your document.
- Also include the Table of Contents Title… that is if you want to have the ability to also generate this text during the TOC creation.
- With the formatting in place, create some paragraph styles specifically designed to format your Table of Contents.
- In the sample here, we’re keeping things pretty simple. Just a single level table of contents preceded by a title.
- Clear the content from the dummy Table of Contents text frame, and leave the frame on the page.
Step 3: Defining a New Table of Contents Style
Time to define your Table of Contents Style. From the Layout Menu choose Table of Contents Styles…
The Table of Contents Styles dialog appears. Click New… to define a new style.
Click the More Options button to see the full TOC dialog.
Let’s review this dialog top to bottom…
First of all we’ll name the Table of Content Style. Let’s say “Newsletter TOC”
The Title refers to the first bit of text that preceeds the contents listing itself. We’ll make this “In this week’s edition:”. The paragraph style next to it is the style used to format this text. We’ve created the “TOC_Title” style for this earlier.
Now we get to the good bits. Which text formatted with which paragraph style do you want to copy from the InDesign document into the Table of Contents? Answer in this example ChapterTitle_Black and ChapterTitle_White.
From the list of Other Styles you can select any of the paragraph styles that need to be included in the Table of Contents. To select multiple non-continuous styles hold down the Cmd (Mac) or Ctrl (PC) key as you are clicking style names. Press shift to select a continuous style range.
Next click the Add button to move the styles to the Include Paragraph Styles list.
InDesign automatically increments the Level numbers for each additional style included (up to 10 levels).
For each style listed set the correct level. As the ChapterTitle can appear in either Black or White I’ll set both to “Level 1″ in this example.
Now let’s go back to the list of questions we asked ourselves when designing the look of the Table of Contents.
- We created a Paragraph style called TOC_Level1 to format the Table of Contents Entries
- We decided to have the page number After the Entry and to enter a Right-Indent Tab between the Entry and the PageNumber.
Select each of the Included Paragraph Styles and set its settings for Entry Style, Page Number and Between Entry and Number
We’re almost done now…
When it comes to creating our Interactive PDF with interactive Table of Contents and PDF Bookmarks, we must enable the Create PDF Bookmarks option. Yep… you’re right… all this hard work and all we need to do is click this one button to get some extra interactivity in our PDF? Well kinda… we’ll still have create our Table of Contents in the document
Click OK twice to add the Table of Contents Style to the InDesign document.
Step 4: Create a Table of Contents
Yay. Finally… we’re going to see our Table of Contents appear in the document.
Choose Layout > Table of Contents, and in the dialog select TOC Style created earlier in this example “Newsletter TOC” created and click OK.
The loaded text cursor appears containing all of the Table of Contents text. Click in the Table of Contents frame placed on the document page earlier or simply place the text wherever it needs placing.
And… ta da… There it is…
We’re now ready to test this rollover effect in the interactive PDF.
Creating the PDF
Choose a File > Adobe PDF Presets and select a PDF setting from the list of settings. Alternatively choose File > Export and set Format to PDF.
In the General section of the Export Adobe PDF dialog ensure the Bookmarks option is enabled for inclusion. Next click Export and generate the PDF.