I am trying to put some hyperlinks in my document but they point to the caption instead of the figure itself. I read about the hypcap package addressing this problem but it appears to be ignored. If I try to go to the last page then it shows the whole graphic but if the graphic is in the middle of the document,the hyperlink points to the caption. I have attached the graphic used for the example below: Thanks for your help
Code: Select all
\documentclass[11pt]{article}\usepackage[usenames,dvipsnames]{color} % load all the colors\usepackage[colorlinks=true,linkcolor=Peach]{hyperref}\usepackage[all]{hypcap}\begin{document}Go to \hyperlink{bar}{bar graphic}\\Go to \hyperlink{bar2}{bar graphic2}\newpage\begin{figure}[htp]\centering\includegraphics[width=6in,height=8in]{bar}\caption{\hypertarget{bar}bar graphic}\label{bar}\end{figure}\newpage\begin{figure}[htp]\centering\includegraphics[width=6in,height=8in]{bar}\caption{\hypertarget{bar2}bar graphic}\label{bar2}\end{figure}\end{document}