Hi,
I would like to link an image, displayed within the figure environment to a web page. So one could click on the image in the PDF to visit a certain web page. So far, i couldn't figure out how to do this with the standard \href command.
Thanks for any help!
Dorian
General ⇒ Image as Hyperlink to URL
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Posts: 126
- Joined: Sun Feb 13, 2011 8:36 pm
Image as Hyperlink to URL
This should work without any problems. See the below example and the rendered output.
Code: Select all
\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\begin{figure}
\href{http://commons.wikimedia.org/wiki/File:Pachydyptes_ponderosus.jpg}
{\includegraphics[width=\textwidth]{picture}}
\caption{A reconstruction of New Zealand Giant Penguins (\emph{pachydyptes ponderosus}) by
F.~W.~Kuhnert (1865--1926). Click on the image to visit the page on Wikimedia Commons where it
was downloaded from.}
\end{figure}
\end{document}
- Attachments
-
- example.pdf
- Rendered output of the above MWE. (The image has been shrunk drastically in order to meet the file size limitation.)
- (169.77 KiB) Downloaded 2075 times
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
Re: Image as Hyperlink to URL
Thank you, that makes sense and works perfectly well! Problem solved
thanks and have a nice day
dorian
thanks and have a nice day
dorian