Join Claudia McCue for an in-depth discussion in this video Creating an automatic table of contents, part of InDesign for the In-House Designer.
- [Instructor] If you've ever manually created a table of contents for a document, I'm pretty sure you wouldn't call that fun, would you? Well I'm going to show you how you can get InDesign to do the heavy lifting for you, but you have to do one thing first. You have to use paragraph styles throughout your document, and frankly, an automatic table of contents is sort of your reward for using paragraph styles. Open up your pages panel and let's go down to page one. You notice we have a section here, some introductory matter, and then there's E and F, and then one, and that's your real page one, the real start of the document.
Double click on page one, hit your type tool, and click in this title Want of Variety, a Blemish, which seems like a strange structure, but saying that it's a blemish to a lovely garden to not have a lot of variety of plants. But we're not interested so much in the subject matter, so much as we're interested in the formatting. Go to the paragraph styles panel, and by the way, it's echoed up here in your control panel, this uses a style called chapter title. Now, I've already created two styles to be used in the table of contents that we're going to generate, and one is for the title and one is for the text that it's going to harvest in the document and place as entries in the TOC.
So here's how automatic TOCs work. I want you to think of paragraph styles as a tagging mechanism, this paragraph has been tagged with this style, which means that we can tell InDesign, hey look through this document, find every paragraph that is tagged with that style, harvest that text, and then grow me a table of contents. In the pages panel, go back to page iii, that's going to be our table of contents, and this is sort of a two step process. You have to tell InDesign what you want it to look for, what tags it should look for, and then you have to tell it how you want it to format the TOC based on the text that it harvests.
Now go up to layout, and if you look at the bottom of that pull down, there are two entries that clearly are related, table of contents, table of contents styles. You can do it by just going to table of contents, but I'm going to make you do it through styles, and here's why. I do a lot of laying out of books, and I end up with more than one table of contents, because I might have a table of contents of maps, one of figures, and then one good old fashioned table of contents, so I need to have recipes stored for each one of those, so I'm going to walk you through how you create a recipe.
So choose table of contents styles, now you can edit the default, there's nothin' wrong with that, I don't know why it just sort of bothers me, so I never do that, so I always start with a new one. So I'm going to make you do that too. Click new, and we'll just call this landscape TOC, mainly because I'm typing stuff in here partly for you to make the connection, what my entry here means. So this is just a name for the recipe you're creating that InDesign's going to follow. Where it says title, that's a word that InDesign is going to type, so you can have anything in here you want, but it fills it for you, it says well I assume you at least want to say contents, but you could put anything in there, but we'll leave it at that.
So here on the right, this is InDesign thinking, okay, I'll type the world contents, how do you want it to look? What paragraph style do you want me to use when I type that word? Click that pull down, and we'll use this style that's already created, but I want you to notice at the very bottom of the list, where it says TOC title, I don't know if you noticed, but that wasn't there before we came in here. InDesign actually creates something on the fly because it thinks, I bet you forgot to prep for this, didn't you? I'll make you a sort of a cheesy style to go with, but luckily we have a good one, so we'll just use that.
Now this is where we tell InDesign what tags to go look for, remember it's just that chapter title. So let's scroll down on the right hand side, there it is, you can either click that and hit the add button, or take the easy way out and just double click chapter title. Now I'm not sure whether you're seeing your options at the bottom of your dialogue or not, so I'll show you what happens if you aren't seeing them. If it looks like this, I want you to click more options, so that you see more stuff down there. We're just making a single level table of contents, but imagine working on a document where you have the chapter title or section title and then there are subheads that you would also like to capture and bring into your TOC, because you want them to be on the second level.
All you would have to do is come over here and find the other tag that you want, let's say trees and shrubs, I'll do that just to show you what would happen. See how it's indented? That's its way of saying this would be a second level, it's really just to sort of differentiate between them and you would set up your paragraph styles for your TOC accordingly. So we don't need that, so we'll just undo that. So we've told it what tags to go look for, chapter title paragraph style, And now we're telling InDesign, okay once you've harvested all that text, as you're creating my table of contents, here's how I want those entries to look.
So for all the text tagged with chapter title, when it grows the table of contents, what do we want that entry to look like? Click that pull down, and remember, there's already one style made for you, it's TOC chapter name, and scroll down a little farther, and here's the style that wasn't there a little bit ago, TOC body text, that's InDesign again saying, well I'll help you out if you want? No, we already have a perfectly nice style. So click on TOC chapter name, and then what do we want sort of attached to that? Don't we want to tell them what page number it's on? Yeah, the page number would be after the entry, is there a separate character style that we would apply to the number? We could get fancy, there is already a character style in place, why not, let's use that.
So again, I want you to understand that this is a recipe for generating this table of contents and we're telling InDesign two things, what to go look for and how to format it in the table of contents. What do we want between the entry, which is going to be whatever that chapter title text is and the number, and here we're just putting a tab, and as you'll see when this grows, that tab has a leader attached to it, so that part is good. Now, this is kind of nice, if you make a PDF from this, those entries become hyperlinked bookmarks, which means that somebody can open it up in Acrobat and open up that bookmarks pane, and find their way around the document, which is really nice, and no work for you.
Alright, I think we're in good shape here, so click OK. Now click OK again, and I know, we still don't have a table of contents, but remember, that was the first part, that's where we set up the recipe. Now is when we tell InDesign, go harvest those tagged paragraphs and grow me a nice table of contents. So here's step two. Go up to layout, choose table of contents, and when you get in here, there's this sort of deja vu, like wasn't I just here? The reason is, as I mentioned earlier, for people building simple tables of contents and they just have a single one in a document, they may just elect to just kind of do this all informally and click OK.
I'm just sort of a stickler, I want to save my style, in case I blow it, I can always go back to my recipe and modify it, I just sort of like to have that stored. But we're ready to go, so just click OK, and there's your table of contents, so just put your cursor near the corner of that margined area, and click. Is that not beautiful? There's the word contents, which we asked InDesign to create for us, there's the list, and paragraph style for the TOC itself is setting up the color, there's your little dot leader, you notice that the page numbers look a little bit different, and how long did that take? What, two seconds? Maybe less, and it's dynamic, so Want of Variety, a Blemish, I think you would agree that that is sort of a clunky phrase, but it's an opportunity to show you what happens if the content changes.
So go to page one in your pages panel, double click it, and just highlight it, don't get the paragraph return at the end, and just type Variety is Delightful. Go back to page iii, that's where your TOC's living, just click anywhere in that text, go up to layout, and by the way, you don't even have to save the file, which I think's pretty clever, just go down and choose this entry that's now awake, update table of contents, and it says it's been updated successfully.
Click OK, and look, it's updated that entry, how cool is that? Oh, by the way, notice this, I'm going to click here and hit Cmd + + or Ctrl + +, you notice that this sentence is capitalized, well why is that? Go back to page one in your document, and this uses a paragraph style that makes the text all caps, but the originator of the document just typed the text in all lowercase, so change that V, if you capitalized it, if you didn't, well you're ahead of the game, but just change it to a lowercase V, it's still going to appear as a cap.
Go back to page iii, click again, layout, update table of contents, and by the way, you can make this go away if you want. One little thing I want you to take from this is that if there is formatting, like an extra character style or some kind of manual override, like I just did in those paragraphs that it's searching for, it's going to pick that up in your table of contents. So the cleaner your content is throughout your document, the more consistent it is, the less editing you're going to have to do to your table of contents, and then that leads to one last point, which is, if you edit the table of contents, which you can, it's totally editable text, if there's a change in the document that requires you to update the table of contents, you'll have to perform those same edits again.
For example, sometimes you'll have a really long title, and you might have to put your cursor in here and hit shift + return to give yourself soft return because that title perhaps is so long that it's just starting to run into your number. If you update your table of contents, you're going to lose that edit, it's not a showstopper, but think of all the time you saved by being good and using paragraph styles throughout your document, and as I always tell people, and I think I said this earlier, quick table of contents generation is your reward for being really good and using paragraph styles throughout your document, and you'll never have to type a manual table of contents again.
Aren't ya happy?
- Creating a workspace
- Setting up your document
- Using master pages
- Importing and formatting text
- Creating paragraph and character styles
- Scaling, rotating, and transforming graphics
- Adding color with swatches
- Adding content to tables
- Storing assets in InDesign Libraries and CC Libraries
- Saving and using a template
- Creating an automatic TOC
- Exporting to PDF
- Preparing for printing