Customizing a table of contents

From Apache OpenOffice Wiki
Jump to: navigation, search



Almost every aspect of the table of contents can be customized to suit the style and requirements of your document. However, with the flexibility also comes some complexity and it is good to have in mind the desired end result.

Start by clicking in the document where you want the table of contents to appear and choose Insert > Indexes and Tables > Indexes and Tables to open the Insert Index/Table dialog box shown in below.

You can also access this dialog box at any time by right-clicking anywhere in an existing table of contents and choosing Modify from the pop-up menu.

Index/Table page of Insert Index/Table dialog box.

The Insert Index/Table dialog box has five pages. Each of them covers a different aspect of the TOC structure and appearance:

  • Use the Index/Table page to set the attributes of the TOC, most importantly the type of index.
  • Use the Entries and Styles pages to format the entries in the TOC.
  • Use the Columns page to put the TOC into more than one column.
  • Use the Background page to add color or a graphic to the background of the TOC.

You can display a preview box, located on the left-hand side of each page, to show as you work how the TOC will look. (If you do not see the preview box, select the Preview option in the lower right-hand corner of the dialog box.) The illustrations in this chapter show the dialog box as it appears with the preview box hidden.

After making all your changes, click OK to apply them. If you need to revert to the default settings, click the Reset button.

Index/Table page

Use the Index/Table page, pictured above, to set the attributes of the TOC.

Changing the title

To give the table of contents a different title, type it in the Title field. To delete the title, clear the Title field.

Setting the type of index

In computer terminology, a table of contents is one of several types of indexes. Be sure the Type of Index is set to Table of Contents. See Alphabetic indexes” on page 18 and “Other types of indexes” on page 28 for more about creating other types of indexes.

Template:Documentation/Note

Protecting against manual changes

To prevent the TOC from being changed accidentally, select Protected against manual changes. If this option is selected, the TOC can only be changed by using the right-click menu or the Insert Table/Index dialog box. If the option is not selected, the TOC can be changed directly on the document page, just like other text. However, any manual changes will be lost when you update it.

Changing the number of levels included

Writer uses 10 levels of headings when it builds the table of contents (or the number of levels used in the document, whichever is smaller). To change the number of levels included, enter the required number in the Evaluate up to level box. For example, the TOC in this book includes only the first four heading levels.

Choosing the scope of the table of contents

The for drop-down list in the Create index/table area, allows you to select whether the TOC will cover all the document's headings (Entire document) or just the headings of the chapter where it is inserted. Writer identifies a “chapter” as all the headings between two first level outline headings (normally Heading 1).


Creating a Table of Contents from an outline

The third section of the Index/Table page is used to determine what Writer should use to create the TOC. The available choices (not mutually exclusive) are:

  • Outline
  • Additional styles
  • Index marks

By default Writer uses the outline levels; that is, paragraphs formatted with the paragraph styles associated with outline levels in Tools > Outline Numbering. In the default document, Heading 1 has outline level 1, Heading 2 outline level 2 and so on up to Heading 10.

You can change the paragraph styles included in the outline as described in Defining a hierarchy of headings in Chapter 6 of this guide. You can include other paragraph styles in the TOC by assigning an outline level to those styles. To do this, modify the paragraph style definition: go to the Outline & Numbering page for the style, and select the required outline level. Click OK to save the change.

Specifying an outline level on the Outline & Numbering page for a paragraph style.



Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools