General ⇒ Image as Hyperlink to URL
Image as Hyperlink to URL
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
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- Posts: 126
- Joined: Sun Feb 13, 2011 8:36 pm
Image as Hyperlink to URL
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 2062 times
Re: Image as Hyperlink to URL
thanks and have a nice day
dorian