Indexes and Tables
Building an Index
On Writer it is possible to create different kinds of indexes: a table of content with the headings used on the document, an index of tables or pictures, alphabetical indexes, bibliographic indexes...
To insert an index, Insert → Indexes and Tables → Indexes and Tables:
|Inserting an index on the first line of a document, or on the first line of a section, or just after a page break it will not be possible to move it or to add space before it. It is convenient to left at least one blank line before the index.|
As it is possible to see on the previous screen shot, there are four tabs: Intex/Table, Entries, Styles, Columns and Background.
The last two tabs are identical for all types of indexes.
The Background tab is identical to the one available for the paragraph styles. On the Index/Table tab, other than select the index type it is possible to set from were the information is obtained.
The Entries tab is used to set how the information is displayed, giving the possibility to set a character style for each element (page number, chapter name, etc.). The Styles tab is used to set which paragraph styles are used for each line on the index.
Below, a description of the different options offered by this three tabs for each kind of index will be presented.
Table of Contents
There are three possible sources for the information displayed on a Table of Contents (TOC):
- The paragraph styles that have an outline level, either with the tools on Tools → Outline Numbering or using the Outline & Numbering tab on the paragraph style. This option is selected by default on every new TOC.
- Additional styles: checking this option and selecting the button to the right it is possible to take any paragraph style used on the document and assign to it a level, simulating the corresponding outline level.
- Index marks: Selecting a part of the text or an object from the document and going to Insert → Indexes and Tables → Entry it is possible to "mark" the selection. These marks can be included on the TOC or used to create an alphabetical index (see below).
On this tab, under "Create Index/Table → for", it is possible to select "Entire document" or "Chapter".
|Writer considers as "chapter beginning" a paragraph style with outline level equal to one. If our real chapters are identified by a different outline level (say 2) the option "Chapter" will not work as intended.|
Selecting a level, it is possible to define the content that will be shown for that level on the line "Structure". Each "button" on that line represents a part of the information that will be included on the TOC. It is possible to delete a button simply by selecting it and pressing, or add new content positioning the cursor on a blank space between two buttons and pressing one of the buttons from the list below. It is also possible to write any text (for example, to add the word "Chapter"). the value for those entries is:
- E#: The chapter number
- E: The text of the paragraph used as heading
- T: A "tabulator" to separate the text from the page number
- #: The page number
The button "Hyperlink" can be used to make the TOC "interactive": with a Ctrl-click on the corresponding line on the TOC (or a simple click on the exported PDF) the cursor will "jump" to the corresponding page. To activate this hyperlink it is necessary to put the cursor on a white space before the region we want to "activate" and click on: a button with the text "LS" will be introduced. Now, moving the cursor to the end of the active region we need to press again: a button with the text LE will be introduced, closing the hyperlink.
|Adding more content to "Structure" it is possible that we need to use the arrow on the borders to access all the components on the line.|
|Hyperlinks do not work with paragraph styles introduced with the "Additional Styles" option commented above: Issue 3356 - Additional styles not included in hyperlinking from TOC.|
|On the hyperlinks the character style "Internet Link" is applied. To change the characteristics for the link (by default, blue and underlined text) it is necessary to edit that character style.|
|To add a space between the chapter number and the text it is necessary to add, for each level, a space between the E# and E entries.|
|With a click on a T entry it is possible to set a "separator": points, dashes or nothing. It is important to note that tabstops on TOC do not have the same capabilities of tabstops on paragraphs:|
It is important to note that selecting each entry on Structure it is possible to associate to it a character style. This include the text entries.
On this tab it is possible to assign a particular paragraph style to each outline level on the TOC. Selecting a level on the left column and the style on the right column, it is enough to press the button between both columns to assign the style.
Index of Illustrations/Tables
The bibliographic index take the information from the bibliographic database, so the discussion of this kind of index will be delayed to the section Bibliographic database on Writer under "Integrating Components".