Clickable table of contents

Discuss the word processor
Post Reply
Brigb
Posts: 24
Joined: Thu Jan 07, 2021 7:13 pm

Clickable table of contents

Post by Brigb »

I've searched the replies on this subject but most are either grossly out of date or incomplete. The manual says, "In the dialog "Insert Index/Table" in the "Entries" tab, put the cursor in the blank area before the "E#" entry and click on the "Hyperlink" button. Now put the cursor in the blank area after the "#" and again click on the "Hyperlink" button. Now when you create the Table Of Contents it should be hyperlinked." Must this action be taken before starting to build contents entries or can it be added when contents has been done? I've followed the instructions above, but the contents table remains as before? Any ideas please?
OpenOffice 4.1.7 on Windows 10
User avatar
keme
Volunteer
Posts: 3691
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Clickable table of contents

Post by keme »

You need to update the ToC after adding link elements. Just right click inside the table to get the update option.
Brigb
Posts: 24
Joined: Thu Jan 07, 2021 7:13 pm

Re: Clickable table of contents

Post by Brigb »

Thanks very much Keme. I right clicked in the table and selected update. All that happened was that the table reverted to the format before I'd edited it and there are no links in it. I've tried Crl click but no little finger comes up (which I presume should happen when a link is present.)
OpenOffice 4.1.7 on Windows 10
FJCC
Moderator
Posts: 9231
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Clickable table of contents

Post by FJCC »

Can you upload a small example document? It just needs to have a couple of headings and the table of contents. To upload a file, click Post Reply and look for the Upload Attachment tab just below the box where you type a response.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
Hagar Delest
Moderator
Posts: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Clickable table of contents

Post by Hagar Delest »

Note that you need to do that for each level if you've different layouts for each of them. Or click the button "All" right of the structure line in the "Entries" tab of the ToC properties.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Brigb
Posts: 24
Joined: Thu Jan 07, 2021 7:13 pm

Re: Clickable table of contents

Post by Brigb »

FJCC wrote:Can you upload a small example document? It just needs to have a couple of headings and the table of contents. To upload a file, click Post Reply and look for the Upload Attachment tab just below the box where you type a response.
I'm most grateful for your help here. Sampled doc attached.

Best wishes

Brian
Attachments
sample contents.odt
(10.37 KiB) Downloaded 158 times
OpenOffice 4.1.7 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Clickable table of contents

Post by RoryOF »

In general, you need to position your Hyperlink commands at the start and finish of the text you want hyperlinked.

Right click on your ToC, and select Edit Index/Table from the popup. Click on Entries tab, and select 1 under "Level".

Observe that you have two E# entries for Chapter number. Click on one, then press Delete key. Move to the far right and use the arrow button to scroll - you will be shown an empty square. Click in that, press Hyperlink button and an "LE" entry will show up.

Now select 2 under "Level" Your LS/LE brackets surround an E# entry (Chapter number). Click on the LE entry, press Delete key. Once again, go to the arrow button on the right, click on it, click in the blank square revealed, and press Hyperlink button.

Now press OK, and your ToC should rebuild using the new settings. You will see the Chapter lines and the Title lines hyperlinked.

The E# entries you use have no effect because you are not using dynamic numbering of the chapters, and may safely be removed.
Attachments
sample contents repaired.odt
(9.82 KiB) Downloaded 135 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Hagar Delest
Moderator
Posts: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Clickable table of contents

Post by Hagar Delest »

As a tip: when you select the LS tag, in the Character style field, you can select something else than the "Internet link", it will prevent the blue color and the underlining.
In AOO, I thought that the only other character style that works is the "Index link". In LibreOffice, any character style works.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the *EDIT button if your issue has been fixed.
Attachments
sample contents repaired 2.odt
ToC without the internet link formatting
(10.53 KiB) Downloaded 134 times
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Brigb
Posts: 24
Joined: Thu Jan 07, 2021 7:13 pm

Re: Clickable table of contents

Post by Brigb »

Many thanks for that tip, Hagar. I'll test it all out later today.

Best wishes

Brian
OpenOffice 4.1.7 on Windows 10
User avatar
keme
Volunteer
Posts: 3691
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Clickable table of contents

Post by keme »

All that happened was that the table reverted to the format before I'd edited it and there are no links in it.
That statement calls for another tip:
Do not edit ToC (neither content nor formatting) manually unless you MUST.
Also, since these changes will be lost with every ToC update: If you really find that you MUST, do not put any great effort into it until you are finalizing your document (e.g. for publishing).

Better, set desired formatting for each outline level by ...
  • Change the Content x style to desired setting in ToC for each line referencing the corresponding Heading x
    ... and/or ...
  • Find/create character styles for the desired formatting
    Select outline level in the left vertical bar and select your character style in the entries tab of the ToC dialog.
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Clickable table of contents

Post by RoryOF »

A brief answer (dealt with more fully in my previous post): the problem was caused by improper positioning (or omission) of the Hyperlink tags, which are used in pairs.

Re: Keme's reply: in many years of using Tables of Contents, I have never needed to hand-edit them. A workable structure can usually be arrived at using the automatic generation methods.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Brigb
Posts: 24
Joined: Thu Jan 07, 2021 7:13 pm

Re: Clickable table of contents

Post by Brigb »

Thanks Rory. I'm afraid this didn't work for me. Here's what happened:
In general, you need to position your Hyperlink commands at the start and finish of the text you want hyperlinked.

Right click on your ToC, and select Edit Index/Table from the popup. Click on Entries tab, and select 1 under "Level".
OK
Observe that you have two E# entries for Chapter number.
(I needed to click Chapter no. to get this.)
Click on one, then press Delete key. Move to the far right and use the arrow button to scroll - you will be shown an empty square.
(I presume this to be an empty oblong between the grey squares)
Click in that, press Hyperlink button and an "LE" entry will show up.
LS appeared. LS appeared
Now select 2 under "Level" Your LS/LE brackets surround an E# entry (Chapter number). Click on the LE entry, press Delete key. Once again, go to the arrow button on the right, click on it, click in the blank square revealed, and press Hyperlink button.
Selecting 2 I have E# E T and # and the arrows are greyed out. I needed to click chapter no. again. This produces E# E# E T but no LE or LS and the arrows are greyed out.
At this point I'm stymied. But thanks for the effort. Actually, John Ha has the document and is looking at it for me.


Best wishes

Brian
Last edited by robleyd on Fri Sep 10, 2021 1:36 pm, edited 1 time in total.
Reason: Add quoting to make discussion more readable
OpenOffice 4.1.7 on Windows 10
Post Reply