You could specify the opacity of your blocks using \addtobeamertemplate
:
\addtobeamertemplate{block begin}{\pgfsetfillopacity{0.5}}{\pgfsetfillopacity{1}}
\addtobeamertemplate{block alerted begin}{\pgfsetfillopacity{0.5}}{\pgfsetfillopacity{1}}
\addtobeamertemplate{block example begin}{\pgfsetfillopacity{0.5}}{\pgfsetfillopacity{1}}
It doesn't work well if you use block shadows though.
Example:
\documentclass[compress]{beamer}
\usecolortheme{rose}
\usebackgroundtemplate{\centering
\includegraphics[width=\paperwidth,height=\paperheight]{image.png}}
\addtobeamertemplate{block begin}{\pgfsetfillopacity{0.5}}{\pgfsetfillopacity{1}}
\addtobeamertemplate{block alerted begin}{\pgfsetfillopacity{0.5}}{\pgfsetfillopacity{1}}
\addtobeamertemplate{block example begin}{\pgfsetfillopacity{0.5}}{\pgfsetfillopacity{1}}
\begin{document}
\begin{frame}{}
\begin{theorem}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue.
\end{theorem}
\begin{alertblock}{Alert!!!}
Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\end{alertblock}
\begin{exampleblock}{Example}
Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros.
\end{exampleblock}
\end{frame}
\end{document}
The \hspace
"hack" can be easily avoided; you are leaving spurious blank spaces in your code; suppress them by using %
right after \def\arraystretch{0}
and \setlength{\tabcolsep}{0cm}
.
To place your grid, you can use TikZ with a \node
containing the tabular
array of images; the width of each image will be 0.5\paperwidth
; the tricky part is to calculate the precise height; the obvious choice, 0.5\textheight
(and not 0.5\paperheight
), won't be a good choice since it doesn't take into account the height of the frametitle
box, so the height will be 0.5\textheight-0.5\ftht
, where \ftht
represents the height of the frametitle
box.
TikZ will then be used to place the node at ( $ (current page.center) + (0,-\ftht) $ )
; using \ftht
in all the calculations will allow you to make the necessary adjustments (for example, if there's a theme change affecting the height of the default frametitle box) by simply making one change in the code. For example, for the Madrid theme the approximate value (obtained through trial/error) was 4ex
:
\documentclass{beamer}
\usetheme{Madrid}
\usecolortheme{default}
\usefonttheme[onlylarge]{structurebold}
\useinnertheme{rectangles}
\useoutertheme{smoothbars}
\setbeamertemplate{navigation symbols}{}
\usepackage{tikz}
\usetikzlibrary{calc}
\newlength\ftht
\setlength\ftht{4ex}
% Code for placeholder images
\makeatletter
\AtBeginDocument{%
\def\Ginclude@graphics#1{%
\begingroup\fboxsep=-\fboxrule
\fbox{\rule{\@ifundefined{Gin@@ewidth}{150pt}{\Gin@@ewidth}}{0pt}%
\rule{0pt}{\@ifundefined{Gin@@eheight}{100pt}{\Gin@@eheight}}}\endgroup}}
\makeatother
\begin{document}
\usebackgroundtemplate{%
\begin{tikzpicture}[remember picture,overlay]
\node at ( $ (current page.center) + (0,-\ftht) $ )
{
\def\arraystretch{0}%
\setlength\tabcolsep{0cm}%
\begin{tabular}[t]{cc}
\includegraphics[width=0.5\paperwidth,height=\dimexpr0.5\textheight-0.5\ftht\relax]{} &
\includegraphics[width=0.5\paperwidth,height=\dimexpr0.5\textheight-0.5\ftht\relax]{} \\
\includegraphics[width=0.5\paperwidth,height=\dimexpr0.5\textheight-0.5\ftht\relax]{} &
\includegraphics[width=0.5\paperwidth,height=\dimexpr0.5\textheight-0.5\ftht\relax]{} \\
\end{tabular}%
};
\end{tikzpicture}%
}
\begin{frame}
\frametitle{Using tabular}
\end{frame}
\end{document}
Unfortunately, if a frame has a two line title (or no title), the value for \ftht
will have to be changed.
Best Answer
Include the white frames into a group with an empty
usebackgroundtemplate
you may also create a custom frame environment with an empty background:
To make the answer a bit more general, if you'd like a background color different from white (which is a kind of special case) your custom environment should be:
or you could have a shaded background: