Graphics, Figures & TablesHow to include a hyperlink in a caption to direct a reader to the image source

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
bgreen
Posts: 38
Joined: Wed Nov 22, 2023 11:02 am

How to include a hyperlink in a caption to direct a reader to the image source

Post by bgreen »

Hello,

I am hoping for advice regarding how to include a hyperlink in a caption, so the hyperlink takes a reader to the source page and a description of the image/page

Here is a code excerpt

Code: Select all

   \begin{figure} [ht]
  \centering
  \begin{subfigure}{0.45\textwidth}
    \includegraphics[width=\linewidth]{DD3_w400.jpg}
    \caption{Five finned Phaeton BarrellHawk 2017}
    \label{fig:subfig1}
  \end{subfigure}
  \hfill
  \begin{subfigure}{0.45\textwidth}
    \includegraphics[width=\linewidth]{DD3b_w400.jpg}
    \caption{Five finned Phaeton BarrellHawks 2017}
        \label{fig:subfig2}
  \end{subfigure}
  \caption{Source: Youtube - Little Wing - A Contemporary and Updated Paipo Board - No Foam}
  \label{fig:two_images}
\end{figure}
I believe I need to add a href or url command, but wasn’t sure where to locate it in relation to the caption

Here is a random URL: https://www.visitphillipisland.com.au/s ... very-trail

Is the code required the same as if the link is an Instagram page?

ANy assistance is appreciated.

Recommended reading 2024:

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

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

Post Reply