Creating Tables of Contents


Creating a table of contents

Writer’s table of contents feature lets you build an automated table of contents from the headings in your document. Before you start, make sure that the headings are styled consistently. For example, you can use theHeading 1 style for chapter titles and the Heading 2 andHeading 3 styles for chapter subheadings.

This section shows you how to:

  • Create a table of contents quickly, using the defaults.
  • Customize a table of contents.

Note: You can use custom styles for the different levels in the table of contents as well. This document uses the default styles for simplicity.

Creating a table of contents quickly

Although tables of contents can be customized extensively in Writer, most of the time you will probably find the default to be fine. Creating a quick table of contents is simple:

  1. When you create your document, use the following paragraph styles for different heading levels (such as chapter and section headings):Heading 1Heading 2, and Heading 3. These are what will appear in your table of contents. You can use more levels of headings, but the default setting is to use only the first three levels in the table of contents. It could look like the figure below if you used the default styles.

image001
Headings example.

  1. Place the cursor where you want the table of contents to be inserted.
  2. Select Insert > Indexes and Tables > Indexes and Tables.
  3. Change nothing in the Insert Index/Table dialog box. Click OK. The result will look like the figure below.

image002
Table of contents example.

If you add or delete text (so that headings move to different pages) or you add, delete, or change headings, you need to update the table of contents. To do this:

  1. Place the cursor within the table of contents.
  2. Right-click and select Update Index/Tablefrom the pop-up menu.

Note: If you cannot place your cursor in the table of contents, choose Tools > Options > OpenOffice.org Writer > Formatting Aids, and then selectEnable in the Cursor in protected areas section.

Tip: You can customize an existing table of contents at any time. Right-click anywhere in it and select Edit Index/Table from the pop-up menu. Continue as described in the next section, Customizing a table of contents.

Customizing a table of contents

To insert a customized table of contents into your document:

  1. Place the cursor where you want to insert the table of contents.
  2. From the main menu, choose Insert > Indexes and Tables > Indexes and Tables. The Insert Index/Table dialog box opens.

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

The Insert Index/Table dialog box has five pages. Any or all of them can be used when creating or editing a table of contents:

  • Use the Index/Tablepage to set the attributes of the table of contents.
  • Use the Entriesand Styles pages to format the entries in the table of contents.
  • Use the Columnspage to put the table of contents into more than one column.
  • Use the Backgroundpage to add color or a graphic to the background of the table of contents.

You can display a preview box, located on the left-hand side of each tab, to show as you work how the table of contents will look. (If you do not see the preview box, select the Preview checkbox 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 save the table of contents so it appears in your document.

Using the Index/Table page

Use the Index/Table page to set the attributes of the table of contents.

Adding a title

To give the table of contents a title, type it in the Title field. (You can change an existing title by typing over it.) To delete the title, clear the Title field.

Setting the type of index

You can create several types of indexes. They include:

  • Table of Contents
  • Alphabetical Index
  • Illustration Index
  • Table of Objects
  • Bibliography

You can also create user-defined indexes.

image004 

You can only change the type of index when you first create it. Once you define an index type (for example, make a table of contents) you cannot change the type.

Choosing the scope of the table of contents

From the for drop-down list in the Create index/table area, select Entire document. There is an additional option to create a table of contents for just the current chapter. For more information, refer to Help > OpenOffice.org Writer > Contents.

Creating a table of contents from an outline

This selection creates the table of contents using outline levels; that is, paragraphs formatted with one of the predefined heading styles (Heading 1-10) are added to the table of contents in order.

Click on the (...) button next to the checkbox to change the numbering properties of the table of contents. This can be useful if you want to put numbers in front of each level of the contents, as shown below.

image005
Table of contents with numbers.

Creating from index marks

This selection adds any index entries that you have inserted into the document by using Insert > Indexes and Tables > Entry. Normally you would not use this selection for a table of contents.

Protecting against manual changes

To stop the table of contents being changed accidentally, select theProtected against manual changes option. If this option is seleced, the table of contents can only be changed using the context menu or the Insert Table/Index dialog box. If the option is not selected, the table of contents can be changed directly on the document page, just like other text.

 image006

Any manual changes to a table of contents are lost when you update it.

 

Changing the number of levels included

Writer displays a default setting of 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, enter the required number in theEvaluate up to level box.

Creating from additional styles

Writer automatically assigns to the table of contents all paragraphs formatted with the default heading styles (Heading 1Heading 2, and so on). To assign paragraphs formatted with other styles, including custom styles:

  1. In the Create fromarea, select the Additional Styles checkbox.
  2. Click the (...) button to the right of the checkbox. The Assign Styles dialog box opens.

image007
Assign Styles dialog box.

  1. In the Not appliedcolumn, click the style that you want to assign to the table of contents.
  2. Use the >>button to move the selected style to the desired outline level. For example, to have paragraphs formatted with the selected style to appear as top-level entries in the table of contents, click the>> button once to move the style into the 1 column. To move the style in the opposite direction, use the << button.
  3. Click OKto save your changes and return to the Index/Table tab or click Cancel to return without saving your changes.
image004 

If the Outline box is checked, any changes you make to the position of one of the predefined Heading styles will be superseded by the default outline structure.

Using the Entries page

Use the Entries page to define and format the entries in the table of contents. For each outline level, you can add and delete elements such as chapter (heading) numbers, and you can also apply character styles to individual elements.

image008
Entries page of Insert Index/Table dialog box.

To begin, click a level number in the Level column to select the outline level whose elements you want to format. (You will be able to apply changes to all outline levels later.) The Structure line displays the elements for entries in that level. Each button on the Structure line represents one element:

  • The E#button represents the “chapter number”, which means the heading number, not just for chapters but also for other levels of headings.
  • The Ebutton represents the entry text.
  • The Tbutton represents a tab stop.
  • The #button represents the page number.
  • The LSbutton represents the start of a hyperlink. (This button does not appear on the default Structure line.)
  • The LEbutton represents the end of a hyperlink. (This button does not appear on the default Structure line.)

Each white field on the Structure line represents a blank space. You can add custom text if you desire.

image004 

On some operating systems, such as Windows XP, the E# and Ebuttons display as F# and F, and the LS and LE buttons display asIS and IF (the bottom of the displayed E or L character is cut off). This problem will be fixed in a future release of OpenOffice.org.

 image004

If the chapter number defined for your document includes the word “Chapter” before the number itself, then the E# field in the table of contents will also include the word “Chapter”. If you want to include the chapter number with the page number (for example, in the style “1-11-2, ...”) , you will find that the page number appears in the table of contents as “Chapter 1-1”, which is probably not what you want.

Changing elements

To change an element in the Structure line, click the button representing that element and then click the element that you want to substitute in the row of buttons just below the Structure line. For example, to change a chapter number to a tab stop, click the E# button on the Structure line (it shows then as being pressed) and then click the Tab stop button in the row of available elements.

Deleting elements

To delete an element from the Structure line, click the button representing that element and then press the Delete key on your keyboard. For example, to delete a tab stop, click the T button and then press the Delete key.

Adding elements

To add an element to the Structure line:

  1. Place the cursor in the white field to the left of where you want to insert the element.
  2. Click one of the five buttons just below the Structureline. (For example, to add a tab stop, click the Tab stop button.) A button representing the new element appears on the Structure line.
  3. If you want to add a space (for example, between E# and E), click in the white field between the two elements and type your space. The same concept works for any text you may want to add.

Hyperlinking an entry

To change the default Structure line so that the chapter number and the entry text form a hyperlink, follow these steps:

  1. On the Structureline, place the cursor in the white field to the left of the E# button.
  2. Click the Hyperlink button. An LS button, representing the start of the hyperlink, appears on the Structureline.
  3. On the Structureline, place the cursor in the white field to the right of the E button.
  4. Click the Hyperlinkbutton again. An LE button, representing the end of the hyperlink, appears on the Structure line.

The figure below represents the completion of the above steps. The number and the text of the entries on that level will now be hyperlinks.

image009
Hyperlink in table of contents.

Applying character styles

To apply a character style to an element:

  1. On the Structureline, click the button representing the element to which you want to apply a style.
  2. From the Character Styledrop-down list, select the desired style. Writer applies the selected style to the selected element.

To view or edit the attributes of a character style, select the style from theCharacter Style drop-down list and then click the Edit button.

image004 image004

The default character style for hyperlinks is Internet Link, which by default is underlined and shown in blue. If you want the table of contents entries to work as hyperlinks, but not have them underlined and blue, you can change the attributes of the Internet Link character style. However, this changes the attributes of all hyperlinks in the document.

If you want other hyperlinks (for example, website addresses) to remain in the default style, change the character style selection for table of contents entries to Index Link. If necessary, change the attributes for Index Link to what you want.

 

Applying changes to all outline levels

To apply the displayed structure and formatting to all outline levels, click theAll button.

Tab position relative to Paragraph Style indent

When this checkbox is selected, entries are indented according to the settings of their individual formats. Where a paragraph style with an indent on the left is in use, tab stops will be relative to this indent. If this checkbox is not selected, tab stops will be relative to the left margin position.

Using the Styles page

Use the Styles page to apply paragraph styles to the table of contents. You can apply a different paragraph style to each outline level of the table.

image010
Styles page of Insert Index/Table dialog box.

To apply a paragraph style to an outline level:

  1. In the Levelslist box, select the desired outline level by clicking it.
  2. In the Paragraph Styleslist box, click the paragraph style to apply.
  3. Click the <button to apply the selected paragraph style to the selected outline level.

The styles of the level appears in the square brackets in the Levels list.

To remove paragraph styling from an outline level:

  1. In the Levelslist box, select the desired outline level by clicking it.
  2. Click the Defaultbutton.

To view or edit the attributes of a paragraph style, click the style in theParagraph Styles list box and then click the Edit button.

 image004

Changes to a paragraph style will affect any text in the document that is formatted using this style, not just the format of the table of contents.

Using the Columns page

Use the Columns page to change the number of columns for the table of contents.

image011
Columns page of the Insert Index/Table dialog box.

Adding multiple columns

To display the table of contents in more than one column:

  1. Either enter the number of columns desired in the box labeledColumnsor select the icon representing the number of columns.
  2. To evenly distribute the columns according to the page width, check the AutoWidth box. If it is unchecked, you can manually set each of the following by altering the associated spin box:

o    Width between each of the columns

o    Spacing between each of the columns

  1. You can choose to have a separator line between the columns:

o    Line: The width of the line.

o    Height: The height of the line.

o    Position: Relative position of the line to the table (top, middle, or bottom) if the height is less than 100%.

Using the Background page

Use the Background page to add color or a graphic to the background of the table of contents.

Adding color

To add color to the background of the table of contents, select from the color grid.

image004 

Even though the table of contents may have a shade behind it while editing, it is actually not shaded by default. It appears shaded because it is a field and will appear to have the same shading all fields have.

image012
Background page of Insert Index/Table dialog box, showing Color choices.

Adding a graphic

To add a graphic to the background of the table of contents:

  1. From the Asdrop-down list, select Graphic. The Background tab now displays the graphics options, as shown below.
  2. Click the Browse button. The Find graphics dialog box opens.
  3. Find the graphic file you want and then click the Open button. The Find graphics dialog box closes and the selected graphic appears in the graphic preview box on the right-hand side of the Backgroundtab. (If you do not see the graphic, select the Preview checkbox.)
  4. To embed the graphic in your document, clear the Linkcheckbox. To link the graphic to the document but not embed it, select the Linkcheckbox.
  5. In the Typearea of the Background tab, choose how you want the background graphic to appear:

o    To position the graphic in a specific location, select Positionand then click the desired location in the position grid.

o    To stretch the graphic to fill the entire background area, selectArea.

o    To repeat the graphic across the entire background area, selectTile.

image013
Graphic options on the Background page of the Insert Index/Table dialog box.

Deleting color or graphics

To delete color or graphics from the table background:

  1. From the Asdrop-down list, select Color.
  2. Click No Fillon the color grid.

Maintaining a table of contents

This section shows you how to:

  • Edit an existing table of contents
  • Update a table of contents when changes are made to the document
  • Delete a table of content

Editing a table of contents

To edit an existing table of contents:

  1. Click anywhere in the table of contents and then right-click.
image006 

If you cannot click in the table of contents, it is probably because it is protected. To disable this protection, chooseTools > Options > OpenOffice.org Writer > Formatting Aids, and then select Enable in the Cursor in protected areassection. If you wish to edit the table of contents without enabling the cursor, you can access it from the Navigator.

 

  1. From the pop-up menu, choose Edit Index/Table. The Insert Index/Table dialog box opens and you can edit and save the table as described in the previous section.

You can also access the Index/Table dialog box from the Navigator.

  1. Open the Navigator (press F5).
  2. Click the + sign next to Indexes.
  3. Right-click on the desired index.
  4. Select Index > Edit.


Access an index from the Navigator.

Updating a table of contents

Writer does not update the table of contents automatically, so after any changes to the headings, you must update it manually. To update a table of contents when changes are made to the document:

  1. Click anywhere in the table of contents and then right-click.
  2. From the pop-up menu, choose Update Index/Table. Writer updates the table of contents to reflect the changes in the document.
 

You can also update the index from the Navigator by selectingIndex > Update from the menu.

Deleting a table of contents

To delete the table of contents from a document:

  1. Click anywhere in the table of contents and then right-click.
  2. From the pop-up menu, choose Delete Index/Table. Writer deletes the table of contents.
 

Writer will not prompt you to confirm the delete! Use caution when deleting a table of contents.

You can also delete the index from the Navigator by selecting Index > Delete from the menu.

 

 

 Source: Internet


Advertisements