11

I am including an image in a beamer presentation, centred, and want to give an unintrusive attribution link, just under the picture, right-aligned to the right-hand edge of the image.

In other words, I’d like something almost like what’s produced by

\documentclass[10pt]{beamer}

\begin{document}

\begin{frame}
  \begin{center}
     \includegraphics[width=0.6\textwidth]{file_extensions.png} \\
     \url{http://xkcd.com/1301}
  \end{center}
\end{frame}

\end{document}

except with the url shifted horizontally, so that its right-hand edge is flush to the right-hand edge of the image. How can I achieve this?

(Image file for MWE.)

9

Or use a minipage

\documentclass{beamer}

\begin{document}

\begin{frame}

\begin{center}
\begin{minipage}{0.6\textwidth}
\includegraphics[width=\linewidth]{example-image} \\
\raggedleft\url{http://xkcd.com/1301}
\end{minipage}
\end{center}

\end{frame}

\end{document}

enter image description here

8

Use a tabular

\documentclass{beamer}

\begin{document}

\begin{frame}

\begin{center}
\begin{tabular}{@{}r@{}}
\includegraphics[width=0.6\textwidth]{example-image} \\
\url{http://xkcd.com/1301}
\end{tabular}
\end{center}

\end{frame}

\end{document}

enter image description here

3

...or use a right-aligned stack

\documentclass[10pt]{beamer}
\usepackage{graphicx}
\usepackage{url,stackengine}
\begin{document}
\begin{frame}
  \begin{center}
     \def\stackalignment{r}\stackunder[6pt]{%
      \includegraphics[width=0.6\textwidth]{example-image}%
     }{%
      \url{http://xkcd.com/1301}%
     }
  \end{center}
\end{frame}
\end{document}

enter image description here

2

Or use a makebox:

\documentclass[10pt]{beamer}
\begin{document}
\begin{frame}
\centering
\includegraphics[width=0.6\textwidth]{example-image}\\ 
\makebox[0.6\textwidth][r]{\url{http://xkcd.com/1301}}
\end{frame}
\end{document}

Or \llap and \raisebox

\documentclass[10pt]{beamer}
\begin{document}
\begin{frame}
\centering
\includegraphics[width=0.6\textwidth]{example-image-a}% no space here !
\llap{\raisebox{-10pt}{\url{http://xkcd.com/1301}}}
\end{frame}
\end{document}

Or even a \vbox:

\documentclass[10pt]{beamer}
\begin{document}
\begin{frame}
\hspace{-.2\textwidth}
\vbox{
\raggedleft
\includegraphics[width=.6\textwidth]{example-image}\\
\url{http://xkcd.com/1301}}%
\end{frame}
\end{document}

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.