Small issue with cross-refs PDF hyperlinks

Everything related to our flagship word processor.
Post Reply
johseb
Posts: 27
Joined: 2016-02-13 10:01:29

Small issue with cross-refs PDF hyperlinks

Post by johseb » 2019-08-18 17:08:03

When creating cross-references to tables or figures it's common and convenient to use the caption as destination (see the NWP manua as an example).
Unfortunately when clicking on the hyperlinks in the PDF generated from the RTF the destination line (i.e. the caption) will end up at the upper border of the PDF viewer window and the table/figure, which is the real object you want to cross-reference, will be completely out of view above the upper border.

Not really a serious problem and the solution is for sure quite simple (just scroll the PDF to make the table/figure visible) but the behavior could be disconcerting to colleagues/clients/etc who is expecting to jump to the portion of interest but at first cannot see any tables or figures.

A possible (easy?) remedy would be to move up the destination point of the hyperlink say of approx 1/3 of the PDF page height. That will give no assurance that the table/figure will be completely visible but at least you can see a part of it and realize it's there.

Notice that when used in NWP the cross-refs correctly jumps in a way that puts the destination caption in the middle of NWP window.

martin
Official Nisus Person
Posts: 4598
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Small issue with cross-refs PDF hyperlinks

Post by martin » 2019-08-19 07:58:04

What you said is unfortunately true. When you click an intra-document link in a PDF, the viewer app (eg: Apple's Preview) tends to place the link target at the very top of the scrollable area. That means whatever was above the target will be out of view. If you have a link to a caption underneath a table or image, the table or image itself will be scrolled out of view.

I think the only way Nisus Writer could help solve this problem is by automatically changing the link's target when the PDF is created. Instead of having the link target the caption (as set by the user), the link could target the image or table above the caption. I feel like this might be a relatively safe change for most situations, but it's not always correct.

We can imagine a situation where a table or image has no caption, but is instead followed by a heading or other title paragraph. It would be incorrect for a link to such a paragraph to scroll the table or image into view. So I think we'd need some way for the user to disable any such feature, ideally on a per-link basis.

Thanks for bringing this to our attention! I'll file it as something for us to think about further.

johseb
Posts: 27
Joined: 2016-02-13 10:01:29

Re: Small issue with cross-refs PDF hyperlinks

Post by johseb » 2019-08-19 11:24:14

Martin, thanks for your reply!
I think that artificially move up the target of the PDF hyperlink could be the solution. I'm not proposing to move it to the top of the table/figure; just a small amount. In my OP I proposed to move it 1/3 of the page height but probably a 1/6 or even less would be enough, as much as needed to make the user aware that there's a table/figure over there (presently the user click on a hyperlink like "Figure 2" and on the destination view there's no figure in sight).

Re your concern about a table or image followed by a heading, please notice that the hyperlinked heading, when targeted, will stay in view (unless the PDF viewer window is only a few centimeter high!). I would even say that moving the heading toward the center of the viewer window can make it more visible.

Post Reply