https://bugs.kde.org/show_bug.cgi?id=128434

Henry Gebhardt <hsggebha...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsggebha...@gmail.com

--- Comment #10 from Henry Gebhardt <hsggebha...@gmail.com> ---
(In reply to Philip from comment #6)
> I find Evince's link preview well done.
Thank you! As the main person who implemented Evince's link preview behavior
(https://gitlab.gnome.org/GNOME/evince/-/commit/f95c24b96de0024f5888e1b11f787ad1432e2263)
(just the behavior, not the previews themselves), I can explain the
considerations that went into Evince's link previews, as well as common
complaints.

In order to be useful, Evince's link previews need to have several
characteristics. First, the text in the link preview needs to be readable (as
already mentioned in the description of this bug). Second, the size of the
popup needs to span the entire width of the page, because links only contain a
single (x,y) coordinate, and the convention where the content is relative to
the link destination (x,y) differs for different types of links (see below).
Third, vertically the link preview is at most 1/3 the size of the main view, so
that the preview doesn't dominate the view, while still showing sufficiently
much around that (x,y) destination.

fancy-previews would be awesome (as mentioned in Comment #2), but are not used
much, so cannot be depended upon.

As to what should be shown inside the preview, I did a survey of the different
kinds of links I saw in papers on https://arxiv.org/, many of which have two
columns of text side-by-side on each page. The different types of links are:

* Section headers, bibliographic references, footnotes, and tables have the
link point to the top left of the content they are pointing to.

* Equations have the link point to the equation number that is printed to the
right of the actual equation.

* Links to figures usually point to the caption below the figure.

Evince does not try to heuristically fix incorrectly set links (e.g., the
problem of Def 2 pointing to Def 4 mentioned in one of the duplicate bugs).

The upshot is that the best destination area to show is such that the link
points to just a little above the center of the previewed area.

I did a (more detailed but somewhat shitty) writeup of all this at
http://www.2-node-supercomputer.net/2020/blog-20201114-evince-link-preview.html
(sorry no https). Though the most concise explanation is in the previously
linked Evince commit
https://gitlab.gnome.org/GNOME/evince/-/commit/f95c24b96de0024f5888e1b11f787ad1432e2263.

A common complaint about Evince's behavior is that the link preview is
automatically triggered when hovering over a link, and this can get annoying
when there are many links on the page. Evince maintainers are opposed to adding
a configuration option to disable opening a preview. Alternatively, one could
also imagine showing the link previews only on some other action, say, when
clicking the link (and double click could follow the link - this has not been
explored further, just thinking out loud).

PDFs with incorrectly set links have also occasionally led to bug reports on
Evince.

Some people also don't like the aethestics of a preview spanning the entire
width. However, this is crucial to get all the aforementioned link types
displayed sufficiently, especially for papers with two columns.

I hope this helps in deciding to add link previews to Okular, perhaps with a
different take on them, perhaps similar to Evince. They are immensely useful
when reading papers with lots of equations and references, so I do hope someone
will find the time to implement them in Okular, and I am willing to help where
I can as I am enjoying Plasma 6 quite a bit.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to