March 23rd, 2005 • 6:30 am
This is something that I have just realized, so I figure I’d share it, in case other people are as confused as I am by Word’s always puzzling interface.
I had a Word document with an automatic table of contents today, and the table of contents generated by Word included some level-2 headings that I didn’t really want to include in the table of contents.
This happens to me quite often. I get structured documents in which heading styles are used to subdivide the document into sections and sub-sections. But only some of the sub-sections are actually included in the (manually created) table of contents.
For example, the main section of the documents has sub-sections that are included in the table of contents, but then the document also has a few appendices, which in turn are divided into sub-sections, and those sub-sections are not included in the table of contents, even though the author of the document used the same heading style for the sub-section headings in the appendices as the style he used for the sub-sections in the main section of the document.
When I need to recreate such a document in Word, I want the table of contents to be generated automatically by Word. So I use heading styles that will be automatically included in the table of contents. But how do you control which heading styles will be used to build the table of contents?
That’s where it gets rather confusing. Since the heading styles are styles, and since the option to use the style to build the table of contents is an attribute of the style, you’d expect to find it somewhere in the interface that’s used for defining the style, right?
Indeed, if you take a style such as the default “Heading 1” style that’s included in Word’s Normal template, for example, and if you use the “ ” command in the “ ” menu to access the interface used to define the style, you will find, under the “Paragraph…” section of the style’s definition, an attribute called “Outline Level” (in the “Paragraph” dialog box, under the “Indents and Spacing” tab). This attribute is a pop-up menu with a “Body Text” option and then with level options going from 1 to 9.
However, you should know that this “Outline Level” attribute actually has nothing to do with automatic table of contents generated by Word. It is the level attribute that Word uses in the Outline view mode and when you choose to apply automatic outline numbering to your heading styles. But this level attribute is not the attribute that defines the level that the heading in question will have in the table of contents. In fact, the fact that a heading style has an “Outline Level” attribute other than “Body Text” does not mean that the headings formatted using that style will be included in the automatic table of contents.
No, in fact styles in Word have another attribute that indicates whether headings formatted with a style should be included in the table of contents or not. But this other attribute is nowhere to be seen in the interface used for defining styles. It’s not in the “Paragraph” dialog box. It’s not anywhere else in the “Style” dialog box.
Where is it, then? Well, it’s in… the “Index and Tables…“. If you look under the “Table of Contents” tab in the “Index and Tables” dialog box, you’ll see a button labelled “Options…“. Click on that button, and you will get yet another dialog box that lets you define which of your existing styles are to be used to build the table of contents, and which level they will have in the table of contents.” menu, under “
There are, of course, many problems with this approach. First of all, there is the fact that, yet again, we have some formatting options in Word that are only accessible through the “” menu, even though the user might want to change their values without inserting anything.
Secondly, there is the fact that this is a style attribute and that the user would expect to find it in the style definition. It’s not there. The style definition makes no mention of what TOC level the style will be used to build, and the “” command in the “ ” menu does not let you access this attribute.
Thirdly, there is the very confusing fact that TOC level and outline level are two different things. For example, you could very well have a style whose TOC level is 1 and whose outline level is 2. And, for some reason, the outline level attribute is accessible through the “” command in the “ ” menu, while the TOC level is not. Users will be forgiven for assuming, like I did initially, that this outline level attribute is what defines the TOC level that the style will be used to build.
This also means that there is no way to manually exclude a particular heading from the table of contents. You cannot, in the type of document that I have described above, go to the sub-section headings in the appendices and manually change their formatting options so that they won’t be included in the table of contents. You actually have to create a separate style that will have the exact same appearance, but will not be included in the table of contents.
(You can also just remove the references to the sub-sections in the table of contents once it has been built, but if you or someone else rebuild(s) the table of contents later on, these references will be reinserted.)