Hyperref coupled with pdflatex has the nice effect of producing hyperlinks and tags in my pdf-file whenever i use a \ref or \label command. Convenient.
What is not so convenient is this: The hyperlink references the exact place of the \label{fig:XXX}. This works great for makeindex and such, but as long as I have my captions printed below my figures, the result of activating the reference link in the pdf-file is that my Adobe Reader (version 7.0.9 on MS Windows) shows me the caption, and not the figure. Depending on the viewing setup of Adobe Reader (single page, continuous, FitW, FitH) the figure is partially or completely off-screen.
I would like to make the hyperlink show the whole figure. How do I go about this?
General ⇒ References to figures with hyperref
NEW: TikZ book now 40% off at Amazon.com for a short time.
- countbela666
- Posts: 64
- Joined: Thu Apr 26, 2007 2:44 pm
References to figures with hyperref
Hi,
just put the following code into your preamble (after including hyperref!):
Regards
Marcel
just put the following code into your preamble (after including hyperref!):
Code: Select all
\usepackage[all]{hypcap}
Marcel
Listen to me children of the night, beyond the doors of darkness you will find
a thousand worlds for you to see here, take my hand and follow me...
a thousand worlds for you to see here, take my hand and follow me...
Re: References to figures with hyperref
Thanks so much.
I noticed that it did not work as expected, though. I use MikTeX 2.5, and I found that I needed to start all my figure environments with \capstart instead og passing the [all] opption to hypercap. This is OK for me, though. It seems to be more flexible, too, as it allows for finer control, i.e. it works better with subfigures.
Cheers.
Now, while I am at it it would be lovely with backreferences too. I am considering wether to put all my figures on a separate page of floats, and then it would be nice to be able to navigate easily back to the place in the text where the figure was referenced.
Any ideas for this?
I noticed that it did not work as expected, though. I use MikTeX 2.5, and I found that I needed to start all my figure environments with \capstart instead og passing the [all] opption to hypercap. This is OK for me, though. It seems to be more flexible, too, as it allows for finer control, i.e. it works better with subfigures.
Cheers.
Now, while I am at it it would be lovely with backreferences too. I am considering wether to put all my figures on a separate page of floats, and then it would be nice to be able to navigate easily back to the place in the text where the figure was referenced.
Any ideas for this?
- countbela666
- Posts: 64
- Joined: Thu Apr 26, 2007 2:44 pm
References to figures with hyperref
There is an option quite easy to implement, which only works if the output PDF is viewed with an Acrobat Viewer. For this purpose hyperref provides the command \Acrobatmenu which allows you to access Acrobat menu options.
The following minimum example implements a solution with the View->Back menu item:Regards
Marcel
The following minimum example implements a solution with the View->Back menu item:
Code: Select all
\documentclass[demo,english]{article}
\usepackage{babel,blindtext,graphicx,hyperref}
\usepackage[all]{hypcap}
\def\demofig{%
\begin{figure}
\centering
\includegraphics{foo}
\caption{I'm figure \thefigure}
\Acrobatmenu{GoBack}{(back)}
\label{fig:\thefigure}
\end{figure}
}
\begin{document}
see~\autoref{fig:2}\par
\Blindtext[5]
\demofig\demofig\demofig
\Blindtext[5]
see~\autoref{fig:1}
\end{document}
Marcel
Listen to me children of the night, beyond the doors of darkness you will find
a thousand worlds for you to see here, take my hand and follow me...
a thousand worlds for you to see here, take my hand and follow me...