5

I am trying to insert a background image in my beamer template as follows:

\documentclass[10pt,c,aspectratio=169,a4paper]{beamer}
\usepackage{tikz}


\setbeamertemplate{background}{
    \begin{tikzpicture}%
     \node {\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{example-image-a}};
    \end{tikzpicture}
}

\begin{document}

    \section{Introduction}

    \begin{frame}

\end{frame}
\end{document}

this results in

enter image description here

as you can see, due to some sort of bounding box around the inserted image, there is a space from the north-west corner of the image in (x-y). However, I would like to position the image in the starting at the north-west corner.

9

You need to set inner sep=0pt.

\documentclass[10pt,c,aspectratio=169,a4paper]{beamer}
\usepackage{tikz}


\setbeamertemplate{background}{
    \begin{tikzpicture}%
     \node[inner sep=0pt] {\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{example-image-a}};
    \end{tikzpicture}
}

\begin{document}

    \section{Introduction}

    \begin{frame}

\end{frame}
\end{document}

enter image description here

  • 1
    thanks a lot for the hint ;). – Raaja Apr 1 at 13:52

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.