0

I want to create a presentation that is of the following form where I refer in the caption of a figure to the website-url I have taken it from. The url should be at the end of the presentation inside an itemize environment. I actually do have \usepackage{hyperref} in my template but using \href did not work for me, same as "anchor manual positioning" with just label{source} as in the example above. How can I make this work?

\documentclass[xcolor=dvipsnames]{beamer}

   \begin{frame}
    
   \begin{figure}
   \centering
      \includegraphics{some_graphic.jpg} 
      \caption{Example of \ref{source}}
   \end{figure}

   \end{frame}


\section{Literature}

   \begin{frame}{Literature}

   \begin{itemize}
    
        \item \url{some_website}\label{source}
    \end{itemize}

\end{document}

1 Answer 1

1

You can add a link in the caption to the \item with the url

a

\documentclass[xcolor=dvipsnames]{beamer}

\hypersetup{%
    colorlinks=true,
    linkcolor=blue,   
    urlcolor=magenta,
}

\begin{document}

\begin{frame}   
    \begin{figure}
        \centering
        \includegraphics[width=0.3\linewidth]{example-image} 
        \caption{More examples in \hyperlink{source}{here}}
    \end{figure}    
\end{frame}


\section{Literature}

\begin{frame}{Literature}   
    \begin{itemize}
        \item \hypertarget{source}{\url{http://www.overleaf.com}}       
    \end{itemize}
\end{frame}
    
\end{document}

OPTION

If you want the links to appear in both the title and the reference list at the end, but type them only once, define a new command with each one and insert it in the appropriate places,

b

\documentclass[xcolor=dvipsnames]{beamer}

\newcommand{\linkRefi}{\url{http://www.overleaf.com}}   
\newcommand{\linkRefii}{\url{https://tex.stackexchange.com}}

    \hypersetup{%
    colorlinks=true,
    linkcolor=blue,   
    urlcolor=magenta,
}

\begin{document}

\begin{frame}   
    \begin{figure}
        \centering
        \includegraphics[width=0.3\linewidth]{example-image} 
        \caption{More examples in \linkRefi\ and \linkRefii}
    \end{figure}    
\end{frame}


\section{Literature}

\begin{frame}{Literature}   
    \begin{itemize}
        \item \linkRefi 
        \item \linkRefii        
    \end{itemize}
\end{frame}
    
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .