In a document, which uses text links heavily I have the problem, that the target are always out of the view of the pdf viewer, when jumping there and I could not find a proper solution.
Preferably the jump should land in such a way, that the view is limited by the top line of the line where the target is in and the left border should match the left text border (or even leave a little white space). See the images below. This behaviour should be independent of the current zooming state, the viewer is in (while acknowledging that left border matching is not possible if the zoom is at a low value).
Is it possible somehow?
For instance taking this MWE
\documentclass[a4paper]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[hidelinks]{hyperref}
\begin{document}
\chapter{First chapter}
Get to know more about what is a \hyperlink{frog}{frog}.
\chapter{Second chapter}
Did you know, that a \hypertarget{frog}{frog} is an animal?
\end{document}
Is

should

\phantomsectiontag is in the upper left corner, thus if the text being labelled comes behind the tag, it will be in view (note that this behaviour can only observed with a sufficiently high zooming). There is no way, to force the anchor being set at the left text border, is there? Anyway, because zooming the text borders out of view is uncommon, this solution will do it I think. – embert Nov 14 '14 at 10:50\break\phantomsection\label{}. It is stupid but I don't know if there is actually a method to do what you want. – RicoRally Nov 14 '14 at 11:21\breakdoing? – embert Nov 14 '14 at 11:31\phantomsectionto stay in the previous line. If that is your first line of the paragraph you don't need it. – RicoRally Nov 14 '14 at 11:33\break. anyway who is possibly reading it with such zoom? putting\phantomsection\label{}before the labelled word will solve all other problems. – RicoRally Nov 14 '14 at 12:28TeXbreaks paragraphs into lines, which I can't do. But I can insert correct line break manually, before paragraph split happens, seeing the previous results ofTeX's algorithms. I can help you in that with some examples if I had a piece of code. – RicoRally Nov 26 '14 at 10:20