I have a LaTeX document with a figure and references to it:
\begin{figure} ... \caption{...} \label{fig:1} \end{figure} \ref{fig:1}
I use the hyperref package to get hyperlinks in the resulting PDF. However the link to the figure navigates to the caption leaving the figure itself out of the view. How can I make it navigate to the start of the figure instead without moving the caption to the top?
Steps to make clickable links are as follows: Include hyperref package into your document preamble using the command \usepackage{hyperref}. hyperref package will enable you to add links with the description of your choice as well as to set URLs into your LaTeX document.
Use \begin{figure}[b] ... \end{figure} .
You can add a hyperlink into your LaTeX article using the command \usepackage{hyperref} and then including the command \href{YOUR URL}{TEXT FOR YOUR HYPERLINK}.
You can insert a pagebreak via \clearpage or \newpage , then use the t option on the figure environment: ... \clearpage \begin{figure}[t!]
Add this in your preamble
\usepackage{hyperref} \usepackage[all]{hypcap} %for going to the top of an image when a figure reference is clicked
Make sure that the \usepackage[all]{hypcap} is written after the hyperref package is imported.
To previous comment:
\usepackage{hyperref} \usepackage{caption}
is slightly better than \usepackage[all]{hypcap}
because when you use e.g. figure
without captions there won't be a compilation problem. The caption package by default sets option
hypcap=true
anchoring hyperlinks to the beginning of an environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With