1

In me latex document I use the command \listoffigures for the list of figures that I have.

My figure code is

\begin{figure}
\centering
    \includegraphics[scale=0.5]{xamarin.png}
    \caption{Architettura di Xamarin}
    \label{ref:xamarin}
\end{figure}

that I refer with \ref{ref:xamarin} into the document. At the end, my list of figure it's this: enter image description here

It is possible to add also the link, for each figure? under each description...like this: enter image description here

Thank you in advance!

2

You can define a different caption text for lof using \caption[text for list]{text under figure} and add the url to text for the lof.

\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}

\begin{document}

\begin{figure}
\centering
    \includegraphics[scale=0.5]{example-image}
    \caption[GalaxyZoo\newline \url{https://astrobites.org/wp-content/uploads/2013/08/Galaxy-Zoo-Flowchart.png}]{GalaxyZoo}
    \label{ref:xamarin}
\end{figure}

\listoffigures

\end{document}

enter image description here

  • thank you! I added \protect before \url because without gives me an error. – JEricaM Sep 1 '17 at 16:49
2

For your figure captions use the custom command \ccaption{Figure caption}{Figure link}. I have packaged all the necessary components in this command.

To control the appearances of hyperlinks, please see the hyperref documentation.

I use this setup most of the time, you may change as suits you:

\hypersetup{
  colorlinks,
  linkcolor={red!50!black},
  citecolor={blue!50!black},
  urlcolor={blue!80!black}}

Here is your main piece of code:

\documentclass{article}

\usepackage{hyperref}

\usepackage{url}

\def\hhref#1{\href{#1}{#1}}
\def\ccaption#1#2{\caption[#1\newline#2]{#1}}

\begin{document}

\listoffigures

\clearpage

\begin{figure}[!tb]
  \centering
  \rule{0.2\textwidth}{0.25\textwidth}
  \ccaption{First figure.}{\hhref{www.figure.com/fig1}}
  \label{fig:fst}
\end{figure}


\begin{figure}[!tb]
  \centering
  \rule{0.2\textwidth}{0.25\textwidth}
  \ccaption{Second figure.}{\hhref{www.morefigure.com/figII}}
  \label{fig:scd}
\end{figure}


\end{document}

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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