[Tex/LaTex] How to link images to their entry in list of figures

hyperreflinkspdftextable of contents

Right now I embed images like that:

\begin{figure}[htb]
    \centering 
    \includegraphics[width=0.5\textwidth]{images/some.pdf}
    \caption[Description in LOF, taken from~\cite{source}]{Caption for Image}
    \label{fig:sample_image}
\end{figure}

Using \listoffigures and hyperref this provides a nice list with every entry linked to the image position. As a requirement the source of the image has to be mentioned in the listoffigures it would be convenient to have the images or their caption linked to the matching entry so see the source without scrolling down the whole pdf.

So how do I link images to their entry in list of figures?

Best Answer

If I understood your question correctly, you could use the \hyperlink, \hypertarget mechanism provided by hyperref; a little example:

\begin{filecontents*}{mybib.bib}
@book{goossens93,
    author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
    title = "The Latex Companion A",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}    
\end{filecontents*}

\documentclass{article} 
\usepackage[demo]{graphicx}
\usepackage{hyperref}

\newcounter{mycntr}
\makeatletter
\newcommand\LCaption{%
  \stepcounter{mycntr}\@dblarg\@LCaption}
\def\@LCaption[#1]#2{%
  \caption[\protect\hypertarget{image\themycntr}{#1}]%
    {\hyperlink{image\themycntr}{#2}}}
\makeatother

\begin{document}
\listoffigures

\begin{figure}[htb]
    \centering 
    \includegraphics[width=0.5\textwidth]{images/some.pdf}
    \LCaption[Description in LOF, taken from~\cite{goossens93}]{Caption for Image}
    \label{fig:sample_image}
\end{figure}

\bibliographystyle{plain}
\bibliography{mybib}

\end{document}

EDIT: I updated my answer with an improved version of \LCaption suggested by egreg. This version works like the original \caption command with respect to a missing optional argument: calling \LCaption{Caption} will write "Caption" also in the list of figures; \LCaption[Short]{Long caption} will write "Short" in the list of figures.

Related Question