Today I am going to explian how it’s possibile to create a linked index of a document. All of us know the importante of indexes in written documents. But if this documents are stored electronically (tipically in PDF format) it’s nice to have a clickable index, which immediatly redirects you to the part of the document you are intrested in.
Creating an index
To easily created an index the quickest way is to format your index entries through the most intuitive instrument: Headers. You can find this options in the toolbar Formatting (View->Toolbars->Formatting).
On this toolbar you find the Heading style I am talking about. As you can see you don’t just have one heading, but at least three. Heading 1 is to be used for the most important titles (es: chapter titles). After this you can use Heading 2-3-4 to create your gerarchy. Once you have created your documents structure is time to create the index.
Select where on your document you want to set your index (usually at the beginning) and go on Insert -> Indexes and Tables -> Indexes and Tables
A small window will open. That’s the window which lets you control your index. Give your index a name and move to the tab named Entries that’s the one which matters for our scope, which is to create a linked index.
The part really interesting for us is the Structure section. This structure specifies, for each level, how one entry of the index should look like. The standard format is the following:
- E#: Chapter number
- E: Entry
- T: Tab stop (this gives the line of spots we see)
- #: Page number
Linking index entries
Between one an another of this buttons there is a small textbox which can be used both to write something or to add new pieces to the line entry layout. Our goal is to create a linked index. In order to to this:
- Click on the “E#” button. Click on the “Hyperlink” button. The label of “E#” is now changed to “LS” which stands for “Link Start”. Below select “Page number” from the Character style.
- Click now on the small textbox after the last entry of the line structure, “#”. Click now on “Hyperlink” again. A new piece should be added and it’s label should be “LE” (Link End).
The is how your structure should look like now:
The last thing to do is to click on “All“. This will apply the newly created structure to the whole index and not just to the “first level” (Heading 1).
Click now on “OK”. Your index will now be inserted in your document and the entries will be clickable. When you will click on the entries you will automatically been redirected to the specific header. In order to try links in OpenOffice you have to click on the index entries while you keep CTRL button down.
You can now for exemple export your document as PDF and have a really nice clickable index in the PDF format!
Small tip: to automatically update your index after some changes you do in the doc’s structure just right-click on your index and select “Update Index/Table”.