2

I am making a presentation in LaTex using the Beamer document class. I am using the Hannover theme. This has a navigation bar on the left side and the content of the presentation is on the right hand side.

I want to place background image on a slide (or a frame) but only on the right hand side (spanning the entire right hand side only). I followed this link --> How to insert a background image in a beamer frame? . However, part of the image also lies behind the navigation bar (which I do not want). How can I achieve this?

Edit 1: Here's an MWE:

\documentclass[xcolor={dvipsnames}]{beamer}
\usetheme{Hannover}
\usecolortheme{rose}

\begin{document}
    \section{A section}
    {
        \usebackgroundtemplate{\includegraphics[width=\paperwidth {../img/cluster-ex-1.png}}%
        \begin{frame}
            \begin{center}
                \LARGE
                    \textit{\textbf{Title of the frame}}            
            \end{center}
        \end{frame}
    }
\end{document}

Here is the result: Result of above latex code

As you can see, the image also lies behind the navigation bar, which I do not want. I want it to occupy the entire right hand side of the presentation only. How can I do the same?

3
\documentclass{beamer}
\usetheme{Hannover}

\makeatletter
    \newlength{\imagewidth}
    \setlength{\imagewidth}{\paperwidth}
    \addtolength{\imagewidth}{-\beamer@sidebarwidth}

    \newlength{\sidebarwidth}
    \setlength{\sidebarwidth}{\beamer@sidebarwidth}
\makeatother

\usebackgroundtemplate{%
    \hspace*{\sidebarwidth}%
    \includegraphics[width=\imagewidth,height=\paperheight]{example-image}%
}

\begin{document}

\begin{frame}
content
\end{frame}

\end{document}

enter image description here

  • Hey. Thanks a lot! This is exactly what I was looking for! :) – Python_user Jul 6 '17 at 17:09

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.