16 November 2008

InDesign: Create a table of contents

It's about time I put InDesign through its paces. I've been neglecting Adobe's fantastic DTP package in favour of Illustrator.

For this exercise I'm going to show you how to create a table of contents in InDesign. In my experience this is a very useful thing to do. Not only do you automate the creation of a table of contents, but by creating PDF bookmarks you also make life a lot easier for yourself when you later come to format your document.

For this example I'm going to try something a little different. Rather than waste time getting you to create a book from scratch, I've taken the liberty of making the file that I use in this exercise available to everyone. If you wish to download the example file it can be found at:

http://europatraining.co.uk/Animal%20Farm.indd.zip

(Copy and paste this url into your browser window if the files does not automatically download.)


So let's begin...

1. For this exercise I'm going to be creating a table of contents (or TOC) for George Orwell's Animal Farm. As you can see from the screen-shot below, I've created a number of Paragraph Styles for the book. After we've created the TOC you can try out applying them to the text if you're so inclined.





2. In order to create a TOC in InDesign you must first ensure that certain Paragraph Styles have been applied to appropriate portions of text in the document. In other words, if you apply the Paragraph Style entitled 04 Chapter Header to every incidence of the word 'chapter' in the text, you can then tell InDesign to look for occurrences of that Paragraph Style and make a note of the page on which it appears.

You could do this manually, of course. You could trawl through the document and apply the Paragraph Style 04 Chapter Header to the beginning of every chapter of the book. I'm a lazy person by nature, however, and I'm going to let InDesign do this for me.

To do so, go to Edit> Find/Change... and ask InDesign to look for the word 'chapter' and replace it with the word 'chapter'. Confused? I don't blame you. As you know, this action will obviously make no difference to the document whatsoever. However, if you click the More Options button in the Find/Change... dialogue box, you can then access the Change Format Settings and select 04 Chapter Header from the Paragraph Styles pop-up menu.

So what we're actually doing is telling InDesign to look for the word 'chapter', replace this with the word 'chapter', and at the same time change the Paragraph Style to 04 Chapter Heading. I hope this is making sense to you.



3. So now every incidence of the word 'chapter' has been put into the Paragraph Style 04 Chapter Header. But what, I hear you say, if the word 'Chapter' happens to occur somewhere in the actual text? Don't worry about that just now. We'll get the opportunity later on to ensure that there are no glaring errors.

Of more immediate concern is the fact that our Find/Change... has ended up putting our chapter headings bang in the middle of the text in apparently random places as shown in the screen-shot below. What do we do about this?

My aim is to actually have all chapters beginning on a right-sided page. Once again, if I were not quite so lazy, I could scroll through the document and do this manually, using the 'enter' key instead of the 'return' key to force the chapter headings up to the next linked text box. However, once again I'll let InDesign do this for me.

In the Paragraph Styles palette double-click on the style 04 Chapter Header. In the resultant dialogue box select Keep Options, then choose On Next Odd Page from the Start Paragraph pop-up menu. Problem solved. All Chapter headings now start on a right-sided page. InDesign will even insert extra pages to automatically facilitate this. What an excellent program InDesign really is. I'm a fan.





4. Almost there. We've applied the appropriate Paragraph Style to every incidence of the word 'chapter' and we've got all our chapters beginning on a right-sided page. Now we go to Layout> Table Of Contents...

It's worth your while now trying a little cause and effect. The fields in the TOC dialogue box are fairly self-explanatory, I think. As a starting point you might like to use the settings that I've selected below. Remember, all we're basically doing it telling InDesign to look for the Paragraph Style 04 Chapter Header and make a note of the page numbers on which this occurs.

Please make sure that Create PDF Bookmarks is checked. This is going to come in handy very soon...



5. Click OK when you're happy with your settings and a loaded text icon will appear at your cursor position. Navigate over to Page 1 and click inside the text box on that page. Hey presto! A table of contents.

But it gets better...



Go to Window> Interactive> Bookmarks and you'll find a ready-made set of PDF bookmarks that link to every chapter heading in the document. Double-click on any of these and you get taken to that position in the document. You can now apply the appropriate Paragraph Styles to finish the book.

In the good old days when I worked in publishing, I've seen lazy subs take a whole day trying to finish formatting a document. Thanks to your PDF bookmarks you can do this in a couple of seconds. The Bookmarks palette is also the place to check for any errors in the document. If the word 'chapter' does happen to appear in the book's narrative you can now apply the correct Paragraph Style and go back to Layout> Table Of Contents... to update your TOC.





Hope you enjoyed that. Please post feedback. I get a little lonely sometimes.

|