27.9.13

How to place images behind text

\documentclass{beamer}

% For demonstration purposes only, can be removed without harm
\usetheme{Ilmenau}
\usepackage{lipsum}

% beamer: How to place images behind text (z-order)
% (http://tex.stackexchange.com/a/134311)
\makeatletter
\newbox\@backgroundblock
\newenvironment{backgroundblock}[2]{%
  \global\setbox\@backgroundblock=\vbox\bgroup%
    \unvbox\@backgroundblock%
    \vbox to0pt\bgroup\vskip#2\hbox to0pt\bgroup\hskip#1\relax%
}{\egroup\egroup\egroup}
\addtobeamertemplate{background}{\box\@backgroundblock}{}
\makeatother

\begin{document}
\begin{frame}
\begin{backgroundblock}{10mm}{10mm}
\includegraphics[width=50mm]{example-image-a}
\end{backgroundblock}
\lipsum
\begin{backgroundblock}{60mm}{47.5mm}
\includegraphics[width=50mm]{example-image-b}
\end{backgroundblock}
\end{frame}
\end{document}
example slide with two backgroundblock environments

No hay comentarios:

Publicar un comentario