Is it possible to change the half of the beamer frame background color perfectly (no margins), as shown in the picture:
without using the above image as background. Maybe by using tikz or something.
Asked
Active
Viewed 1,606 times
4
lRadha
- 220
- 1
- 11
2 Answers
6
Thanks to @AlexG
using \setbeamertemplate{background canvas}{}
The Minimal file:
\documentclass{beamer}
\usepackage{tikz}
\setbeamertemplate{background canvas}{\begin{tikzpicture}
\useasboundingbox (0,0) rectangle (\paperwidth,\paperheight);
\fill [color=orange!80] (0.5\paperwidth,0) rectangle (\paperwidth,\paperheight);
\end{tikzpicture}}
\begin{document}
\begin{frame}
test
\end{frame}
\setbeamertemplate{background canvas}{}
\begin{frame}
Not background
\end{frame}
\end{document}
OR:
\documentclass{beamer}
\usepackage{tikz}
\setbeamertemplate{background canvas}{\begin{tikzpicture}[remember picture,overlay]
\fill[orange!80] (current page.north east) rectangle (current page.south);
\end{tikzpicture}}
\begin{document}
\begin{frame}
test
\end{frame}
\setbeamertemplate{background canvas}{}
\begin{frame}
Not background
\end{frame}
\end{document}
M.Ahmadi
- 1,477
-
Thanks a lot... – lRadha Oct 25 '19 at 09:05
4
With TikZ it is easily done:
\documentclass{beamer}
\usepackage{tikz}
\usepackage{xsavebox}
\setbeamertemplate{background}{\xusebox{graphics for bg}}
\begin{document}
\begin{xlrbox}{graphics for bg}
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle (\paperwidth,\paperheight);
\definecolor{bgcolor}{rgb}{1,0.753,0}
\fill [color=bgcolor] (0.5\paperwidth,0) rectangle (\paperwidth,\paperheight);
\end{tikzpicture}
\end{xlrbox}
\begin{frame}
Slide 1
\end{frame}
\begin{frame}
Slide 2
\end{frame}
\begin{frame}
Slide 3
\end{frame}
\end{document}
AlexG
- 54,894

