Graphics, Figures & Tableshyperref | Let Label point to Top of a Figure

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gcomte10
Posts: 4
Joined: Fri Jul 27, 2012 5:34 pm

hyperref | Let Label point to Top of a Figure

Post by gcomte10 »

Hello everyone,

When I put the label in the caption for a figure, if I click on the link to this label (hyperref is used), the PDF viewer will go to the caption itself and, because the caption is under the figure, I have to scroll up to see the figure.

Is there a way to put the label at the top of the figure without moving the caption?

Guillaume

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

hyperref | Let Label point to Top of a Figure

Post by Stefan Kottwitz »

Hi Guillaume,

welcome to the board!

You could use the hypcap package to solve this.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

hyperref | Let Label point to Top of a Figure

Post by localghost »

The caption package supports this. See Sections 6.5 and 6.6 of its manual.


Best regards and welcome to the board
Thorsten
gcomte10
Posts: 4
Joined: Fri Jul 27, 2012 5:34 pm

Re: hyperref | Let Label point to Top of a Figure

Post by gcomte10 »

Thank you very much!

@ localghost (nice name^^), in the pdf file you gave me, the links are either red either pink. Did you use the hyperref package to make this? Because my links are 'framed' (not sure of the english word here) in red. Do you know how to change it?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

hyperref | Let Label point to Top of a Figure

Post by localghost »

gcomte10 wrote:[…] in the pdf file you gave me, the links are either red either pink. Did you use the hyperref package to make this? Because my links are 'framed' (not sure of the english word here) in red. Do you know how to change it?
I did not give you a PDF, just a link to the CTAN entry of a package. And you should not turn away from the original topic here. Is your question answered? If so, accept the answer that led you to the solution. If not, inquire to get more details.

How to generate colored instead of boxed (or framed) links in a PDF is a FAQ and as such can be answered by reading the relevant passages in the hyperref manual.
Post Reply