7

I have been trying for a while to fix the image to the center for the frame, but it is attached to the top. I use the following code:

\documentclass[bigger]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{graphicx}
\begin{document}
{\usebackgroundtemplate{\centering \includegraphics[width=\paperwidth]{./Figures/Planck_CMB.jpg}}%
\begin{frame}


\end{frame}
}
\end{document}

enter image description here

Someone can help me with it?

2
  • 1
    You should give a full MWE...in any case, see the first answer to How to insert a background image in a beamer frame
    – user30471
    Jun 4 '14 at 13:16
  • I looked into this example, I don't see where it's explained how to position the background image, just how to add it to a single frame..
    – Ohm
    Jun 4 '14 at 13:33
6

using a picture environment might help:

\documentclass[bigger,t]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}

{
  \usebackgroundtemplate{%
    \begin{picture}(100,220)
      \includegraphics[width=\paperwidth]{Planck_CMB}
    \end{picture}
  }%
  \begin{frame}
    RIP Stephen Hawking!
  \end{frame}
}

\begin{frame}
  text
\end{frame}

\end{document}

enter image description here

4
  • Great, I didn't know this picture environment in laTex
    – Ohm
    Jun 4 '14 at 14:13
  • 1
    Does not move the picture anywhere here… Jan 27 '17 at 11:12
  • @DominikGeorge I does move, at least in vertical direction, which was the necessary for the question. If you have a new question, please open a new question. Jan 27 '17 at 12:44
  • Thanks for the tip! In combination with \hspace*{Xcm} before \includegraphics you can move the picture everywhere you like.
    – Dimitris
    Sep 28 '18 at 11:31

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.