Highlight table of contents entries hovered by mouse

Discuss the word processor
Post Reply
Angelo_P81
Posts: 7
Joined: Tue Oct 31, 2023 1:55 pm

Highlight table of contents entries hovered by mouse

Post by Angelo_P81 »

Hello,
I am searching fora a way to do this kind of things:
effect or animation to highlight rows of the table of contents when hovering the mouse over;

I have alredy searched a lot in the forum but I didn't find it.

What i want is something like the table of contents of this pdf:
https://sisma2016.gov.it/wp-content/upl ... signed.pdf

Thanks.
Last edited by Angelo_P81 on Wed Nov 15, 2023 3:39 pm, edited 2 times in total.
Openoffice 4, Windows 10
erbsenzahl
Volunteer
Posts: 256
Joined: Tue Apr 18, 2017 8:23 am
Location: Germany

Re: effect or animation to highlight rows of the table of contents when hovering the mouse over

Post by erbsenzahl »

Angelo_P81 wrote: Tue Oct 31, 2023 2:02 pmeffect or animation to highlight rows of the table of contents when hovering the mouse over
Ciao,
I used some PDF viewers (Acrobat, PDFXchange, Foxit, MasterPDF, Xreader) and did not see any highlighting (TOC) in your linked PDF file.
I do not think that LibreOffice can manage that.
Probably it is an effect which is connected to some JavaScript code snippets. For that check Scribus - it can do e.g. counting in PDF forms by JavaScript. Maybe it is possible to produce and export the mouse hovering effect.

The original PDF version of the linked document was generated by "iLovePDF" - check this for some features as well.
LibreOffice current versions 7.x & 24.x and OpenOffice 4.1.15
on LinuxMint 20 - 21 Mate, W10-64 pro
JeJe
Volunteer
Posts: 2841
Joined: Wed Mar 09, 2016 2:40 pm

Re: Highlight table of contents entries hovered by mouse

Post by JeJe »

Table of contents paragraphs are just normal text paragraphs and there is nothing inbuilt for something happening on mouse over like a color change in the text.

You could construct something using form controls and macros that looks like a TOC and has that effect - but for a minor cosmetic effect it would be an enormous amount of fiddly work.
Attachments
form control.odt
(12.38 KiB) Downloaded 224 times
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
floris v
Volunteer
Posts: 4437
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Highlight table of contents entries hovered by mouse

Post by floris v »

Opening the document in Firefox (Ubuntu Linux) does hyperlink highlighting at mouseovers. The default document viewer in Ubuntu Linux, on the other hand, opens pop-ups with a preview of a few lines above and below the target of the link and doesn't highlight the hyperlink at all. So, the same PDF may be displayed differently by different viewers. So maybe you go to a lot of trouble to get that effect in the PDF on your system, then others may see something different. I agree with JeJe, it's much trouble for a small effect.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
JeJe
Volunteer
Posts: 2841
Joined: Wed Mar 09, 2016 2:40 pm

Re: Highlight table of contents entries hovered by mouse

Post by JeJe »

If the goal is a pdf then form controls with OO macros wont work for that anyway.

As erbsenzahl suggests, perhaps it needs Acrobat JavaScript and a different pdf creator:

https://stackoverflow.com/questions/412 ... r-from-pdf
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Angelo_P81
Posts: 7
Joined: Tue Oct 31, 2023 1:55 pm

Re: Highlight table of contents entries hovered by mouse

Post by Angelo_P81 »

Ok, my goal is to make that who read the pdf can understand that the summary (index or table of contents) is interactive; otherwise he dn't find the way to navigate inside the document.

I remember that, a long time ago, in Ms Frontpage '97 / 2003, there was a function, in text style for html links, that made this kind of things I've asked before (I've linked table of contents to hyperlink text style, so I've tought that, in some way, it could be possible to do it).

However, thanks a lot for everybody for your tips. I appreciate it.
Openoffice 4, Windows 10
Bill
Volunteer
Posts: 8941
Joined: Sat Nov 24, 2007 6:48 am

Re: Highlight table of contents entries hovered by mouse

Post by Bill »

Angelo_P81 wrote: Thu Nov 02, 2023 10:49 am Ok, my goal is to make that who read the pdf can understand that the summary (index or table of contents) is interactive; otherwise he dn't find the way to navigate inside the document.
How is the user supposed to know that highlighting of the TOC entry text means it is interactive? I would not know because that behavior is not familiar to me. However, I am familiar with the mouse pointer changing from an arrow cursor to a hand cursor when hovering over an interactive TOC entry. It's that change in the mouse pointer that should tell users the TOC entry is interactive.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
Hagar Delest
Moderator
Posts: 32716
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Highlight table of contents entries hovered by mouse

Post by Hagar Delest »

+1 with Bill.
Note that if you want to ease the navigation experience, make sure that your headings are exported with bookmarks in the PDF (should be the default if you have used the Tools > Chapter numbering features with heading styles). With that, the headings will be displayed in the PDF panel for bookmarks.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
Angelo_P81
Posts: 7
Joined: Tue Oct 31, 2023 1:55 pm

Re: Highlight table of contents entries hovered by mouse

Post by Angelo_P81 »

Bill wrote: Thu Nov 02, 2023 1:35 pm
Angelo_P81 wrote: Thu Nov 02, 2023 10:49 am Ok, my goal is to make that who read the pdf can understand that the summary (index or table of contents) is interactive; otherwise he dn't find the way to navigate inside the document.
How is the user supposed to know that highlighting of the TOC entry text means it is interactive? I would not know because that behavior is not familiar to me. However, I am familiar with the mouse pointer changing from an arrow cursor to a hand cursor when hovering over an interactive TOC entry. It's that change in the mouse pointer that should tell users the TOC entry is interactive.
Yes... but... I like it so much that kind of effects / animations ... They seems to be elegant and stylish. :roll:
Openoffice 4, Windows 10
Angelo_P81
Posts: 7
Joined: Tue Oct 31, 2023 1:55 pm

Re: Highlight table of contents entries hovered by mouse

Post by Angelo_P81 »

Hello Bill, I've already changed the style of heading and I've linked it also with a custom text style: it make possible to add some simple effetcts like blinking text but... I remember that, a long time ago, in Ms Frontpage '97 / 2003, there was a function, in text style for html links, that made this kind of things I've asked before (higlighting text effect/animation when moving cursor over it) so I supposed that it colud be possible now (I've linked table of contents to hyperlink text style, so I've tought that, in some way, it could be possible to do it).
Openoffice 4, Windows 10
JeJe
Volunteer
Posts: 2841
Joined: Wed Mar 09, 2016 2:40 pm

Re: Highlight table of contents entries hovered by mouse

Post by JeJe »

Ms Frontpage is/was an HTML editor not a word processor.

The link I posted gave some pointers how to do it - but you can't do it with OO.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply