TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the following command to embed images in my LaTeX document (which is then rendered as PDF)

      \caption[#4]{\label{img.#1} #3}

When creating a href to an image, the viewer jumps to the image caption instead of the top of the image. How do I change my \img command so it still puts the caption below the image but links to it jump to the image itself?

share|improve this question
up vote 32 down vote accepted
  1. You can load the package caption. The default setting is hypcap=true.
  2. If you don't load the package caption, you can load the package hypcap. It is important that the package is loaded after hyperref. You can load hypcap with the option all. In this case hypcap has an influence on all float environments. You can limit it to figures by setting the option figure.
share|improve this answer
+1 for using \usepackage[all]{hypcap} – 0x6d64 Sep 1 '11 at 8:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.