0

I need a background only for one slide, I need include a picture, like a background, in a unique slide. The background is on all slides but I need a picture in only one slide like a bacgkround. I am using madrid theme. Thanks for any help.

1

1 Answer 1

2

If you want to change the background image for a group (1 or more) of slides, then before that group, set

% image from https://tranhtreophongkhachdep.com/200-mau-tranh-phong-canh-dep-nui-rung-tay-bac/
\setbeamertemplate{background}{
\tikz\node[opacity=.5,yscale=1.5,inner sep=0]{\includegraphics[width=\paperwidth]{luavang}};}

(let play with some options of the \includegraphics command, e.g., [width=\paperwidth] and/or some options of the TikZ,'s \node command, e.g., [opacity=.5,yscale=1.5], [inner sep=0] to get desired background) and then set

\setbeamertemplate{background}{}

after that group of slides to back to the usual background.

enter image description here

Full example code: link on overleaf

\documentclass{beamer}
\usepackage{tikz}
\usetheme{madrid}
\title{Beamer Template}
\author{TeXstudio Team}
\begin{document}
\begin{frame}[plain]
\maketitle
\end{frame}

\begin{frame}{Usual background}
\end{frame}

% image from https://tranhtreophongkhachdep.com/200-mau-tranh-phong-canh-dep-nui-rung-tay-bac/

\setbeamertemplate{background}{
\tikz\node[opacity=.5,yscale=1.5,inner sep=0]{\includegraphics[width=\paperwidth]{luavang}};}
\begin{frame}{A specific background}
\end{frame}
\setbeamertemplate{background}{}

\begin{frame}{Usual background again}
\end{frame}

\end{document}

PS: As said in Make a slide background optional in Beamer, you can put that group of slides inside a local group {...} to locally change the background (and other things if you want).

\documentclass{beamer}
\usepackage{tikz}
\usetheme{madrid}
\title{Beamer Template}
\author{TeXstudio Team}
\begin{document}
\begin{frame}[plain]
\maketitle
\end{frame}

\begin{frame}{Usual background}
\end{frame}

{% scope to starting a new background
% image from https://tranhtreophongkhachdep.com/200-mau-tranh-phong-canh-dep-nui-rung-tay-bac/
\setbeamertemplate{background}{
\tikz\node[opacity=.5,yscale=1.5,inner sep=0]   {\includegraphics[width=\paperwidth]{luavang}};}
\begin{frame}{A specific background}
\end{frame}
}% end of the scope of the new background

\begin{frame}{Usual background again}
\end{frame}

\end{document}
8
  • thanks, but this background is for all slides, I need background in only one slide. Jul 5, 2020 at 15:45
  • @julianaperezordoñez did you compile my code above?
    – Black Mild
    Jul 5, 2020 at 17:40
  • yes was genial! Jul 5, 2020 at 17:43
  • @julianaperezordoñez there is overleaf link overleaf.com/read/grxjknjppckj
    – Black Mild
    Jul 5, 2020 at 17:49
  • 1
    @BlackMild You don't need to fix again \setbeamertemplate to revert changes if changes are made local within a scope. See tex.stackexchange.com/a/325228/1952
    – Ignasi
    Jul 6, 2020 at 7:16

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.