You can insert a table of contents into a single long document or into a master document. There are different procedures for each. Quick, impulsive TOC insertionIf you just want to quickly insert a TOC (table of contents) now without fuss, just choose Insert > Indexes and Tables > Indexes and Tables. Make sure Table of Contents is selected twice in the lists, and that Entire Document is selected in the third list, then click OK.
Note In Writer, a table of contents is a type of "index." Index is the all-encompassing term for tables of contents, indexes, lists of figures, and so on. Debate the terminology all you want, but just know that any type of list with associated page numbers is created through a menu item called "Indexes" off the Insert menu. Setting Up What's Included in the TOCMake sure you've got the basicsheadingsplus anything else that should show up. Standard Headings: The Key to TOCsA table of contents is easiest to create if you've used styles for headings rather than just selecting plain text and manually making it big and bold. See Power Formatting With Styles on page 247 for more information on styles. Make sure you've used paragraph styles for the headings in your document, such as Heading 1 or any that you've created. Heading styles are the basis of tables of contents; as long as you've used them, you're going to end up with something in your TOC. Marking Special Table of Contents EntriesThere may be instances where you want to include certain parts of a document in a table of contents. For example, say you're creating a table of contents that contains entries for Heading 1 and Heading 2 items only, but there's a single item at the Heading 4 level that is an extremely important section, and you want to include it in the table of contents as well. You can mark that item as a special entry for inclusion in the table of contents.
When you generate the table of contents, be sure that in the Insert Index window, on the Index tab, you select the Index marks option. If you don't, your special table of contents entries won't be included in the index. Inserting a Table of ContentsSelect the appropriate procedure depending whether you're working in a single standard document, or in a master document. Inserting a Table of Contents Into a Standard DocumentUse this procedure for inserting a table of contents into a single document rather than a master document. The procedure for inserting a table of contents into a master document follows this one. Make sure you've used paragraph styles for the headings in your document, such as Heading 1 or any that you've created. Also mark any text you want to include in the table of contents (see Marking Special Table of Contents Entries on page 333).
To have more control over how it's generated, see Advanced Setup for Tables of Contents on page 336. To format the paragraph styles in the table of contents, see Formatting and Editing a Table of Contents on page 339. Figure 9-17. Setting table of contents options in the Insert Index window
Note Select Additional styles to include other-than-default paragraph styles in the table. Then click the ellipsis points button to set the additional styles; the Assign Styles window, shown in Figure 9-18, will appear. Figure 9-18. Setting table of contents options in the Assign Styles window
Inserting a Table of Contents Into a Master Document
As in a single document, all parts of a table of contents have their own paragraph formats that you can modify. Click in a line of the table of contents, and the name of the style is highlighted in the Stylist under paragraph styles, as shown in Figure 9-22 on page 340. Figure 9-22. Identifying styles used for table of contents levels
To have more control over how it's generated, see Advanced Setup for Tables of Contents on page 336. To format the paragraph styles in the table of contents, see Formatting and Editing a Table of Contents on page 339. Advanced Setup for Tables of ContentsIf you want to go beyond the quick TOC, here are some controls you can apply to what's in it, and how it looks. Previewing the TOCWhen you insert indexes and tables of contents, select the Preview option in the lower right corner of the Index tab, in the Insert Index/Table window. You'll see how the TOC or index will look with the current settings. An example is shown at right.
Understanding the Table of Contents Formatting CodesIf you're the acronym type, think of it as CML (OpenOffice.org Complex Markup Language). When you select a table of contents level in the Entries tab (shown at right; see also Figure 9-19 on page 338), you can customize the way that level in the table of contents is displayed. Do this by working with the table of contents codes. Here's what each of the codes means.
Figure 9-19. Defining what's in each level of a table of contents
Specifying Advanced Setup OptionsChoose Insert > Indexes and Tables > Indexes and Tables. Then use the Assign Styles window in Figure 9-18. (In the Index/Table tab, click the browse icon (...) next to Additional Styles to get to the Assign Styles window.) Then use the Entries tab in Figure 9-19 to set additional options, if necessary. Figure 9-20 explains the codes and how to set them up, and Figure 9-21 shows how to select the styles for the TOC. Figure 9-20. Defining what's in each level of a table of contents
Figure 9-21. Selecting the styles you want to be able to use in the table of contents
To delete part of the structure section at the top, click on it and press Delete. To add a chapter number, spot for entry text, tab stop, page number, or hyperlink, click in the part of the Structure area where you want it, and click the corresponding button. Formatting and Editing a Table of ContentsA table of contents is typically a big block of read-only text that you can't edit directly (though you can change this effect in the first tab of the Insert Index window, shown in Figure 9-18 on page 337). Best practices are to regenerate the table of contents to change the text inside of it; because if you change just the table of contents entry, the heading used to generate it is still incorrect, and if you regenerate the table of contents for some reason, the incorrect heading will reappear. In terms of formatting, you can change the formatting of the table of contents entries without regenerating the table of contents. Basic Table of Contents FormattingEach level in a table of contents has its own paragraph style. For example, level 1 headings by default are associated with the "Contents 1" paragraph style, which uses plain ol' vanilla formatting. To change the formatting of table of contents levels, modify their associated paragraph formats. You can tell which paragraph style is associated with a level by clicking in a line of the table of contents. The paragraph style used for it will be highlighted in the Stylist, as shown in Figure 9-22. For more information on modifying paragraph styles, see Standard Paragraph Styles on page 251. Advanced Table of Contents FormattingInstead of using and modifying the default paragraph table of contents styles, you can assign other paragraph styles to table of contents entries. Using this procedure you can also change the number of columns used for the table of contents, and you can add background color or graphics to the table of contents.
Fixing Page Flow After You Insert a Table of Contents or Adding New Content Before the Table of ContentsWhen you insert a table of contents above the content of your document, you may need to paginate your document so that the table of contents is by itself on one (or more) pages, and the body of your document starts on a new page. Figure 9-19 on page 338 shows a table of contents that is sitting right above the body of the document. In a master document, you must use this procedure on the individual source files.
Editing a Table of ContentsEditing a table of contents involves tasks like including or excluding certain types of paragraph styles that are displayed, altering the way entries are displayed, associating levels with other-than-default paragraph formats, and making other fundamental changes to a table of contents. If your basic table of contents setup is just as you want it, and you've simply added new content to your document, you only need to update the table of contents, not edit it. See Updating or Deleting a Table of Contents, next. To edit a table of contents:
Updating or Deleting a Table of ContentsIf your page count changes, or you just don't want to have a TOC anymore, follow the steps in one of these procedures. Updating a Table of ContentsIf the contents or page count of a document changes after a table of contents has been generated, update the table of contents using this procedure. However, if you need to make more fundamental changes to the table of contents structure, you need to edit the table of contents. See the previous procedure.
Removing a Table of ContentsYou can't remove a table of contents by selecting it and deleting it. To remove a table of contents, click in it, right-click, and choose Remove Index. |