Documentation/How Tos/Creating Automatic Tables of Contents
This is a table of contents in Writer. Never, ever create one from scratch. It is so much easier to create one automatically.
- The gray part does not print; it is just there to indicate that there is something automatically happening.
- You can change how each level looks just by modifying certain styles; more on that later.
- If you make changes to the document, then right-click on the table of contents and choose , the table of contents will automatically reflect the changes in the document. Page numbers will be correct, etc.
Step 1: To Select and Apply Paragraph Styles
Writer knows what to put in the table of contents based on what paragraph styles you tell it to look at. Paragraph styles like Heading1 should be applied to the headings in the document. So plan and apply the paragraph styles that set up the structure of the document.
Paragraph styles are in the Styles and Formatting window; choose Format → Styles and Formatting. You can use existing ones such as Heading1 through Heading10 (recommended) or create your own.
So that's what you do.
- Decide what paragraph styles you will use on the top-level headings, the second-level headings, and so on.
- Apply those styles to the headings.
To apply a style:
- Click in the heading
- And either double-click the style name in the Styles and Formatting window, or if it is there, select it in the dropdown list on the left.
Do that to every heading in your document. This is of course less of a pain if you do it as you write the document rather than all at once afterwards.
|If you apply Heading1, Heading2 and so on and do not like how they look, right-click on a heading with the style applied and choose Edit Paragraph Style. In the window that appears, just make your changes and click.
Step 2: To Set Up the Table of Contents
- Click in your document where you want the table of contents to appear.
- Choose Insert → Indexes and Tables → Indexes and Tables.
The Insert Index/Table window will appear.
- Check the number of levels you want to include. If you do not want all of them, change the Evaluate Up To Level setting.
- Be sure that the Outline checkbox is marked. Click the
The Outline/Numbering window will open up.
button next to it.
- Specify the paragraph styles you selected and applied in the previous major step, then click
If you used Heading1 through Heading10 it should already be set up correctly.
- Then click in the main tab and your table of contents will appear.
Step 3: To Modify the Table of Contents
If you do not like how the table of contents looks, modify the styles used to format the table of contents.
- Right-click on a line in the table of contents that you do not like and choose Edit Paragraph Style.
- In the window that appears, change the settings, then click
The table of contents will reflect those changes.
To update, edit, or delete the table of contents, right-click on it and choose Edit Index/Table.
- Creating Tables of Contents (TOCs) in OpenOffice.org including how to make the table of contents hotlinked.
This How To comes from Solveig Haugland's Blog
|Content on this page is licensed under the Public Documentation License (PDL).