0

Maybe this is an obvious question, but I need some help defining slide templates.

I would like to make my own beamer template and have the option to use several slide templates in one document. One of the slide templates I would like to be a half coloured slide. To make such a slide, I use tikz, as explained here. Contrary to the post I linked, I don't want this to be the default slide, because I want to define several. Changing setbeamertemplate to defbeamertemplate does not work.

Am I right in thinking that "background canvas" is the name of this template? How do I choose for each beamer frame what template to use?

1 Answers1

3

You can declare several defbeamertemplate and restict their use to only one or several frames enclosing them into {...}.

\documentclass{beamer}

\defbeamertemplate{background canvas}{vertical color}[1] { \color{#1}\rule{.5\paperwidth}{\paperheight} }

\defbeamertemplate{background canvas}{horizontal color}[1] { \color{#1}\rule{\paperwidth}{.5\paperheight} }

\begin{document}

\begin{frame} test \end{frame}

{\setbeamertemplate{background canvas}[vertical color]{red} \begin{frame} Not background \end{frame} }

{ \setbeamertemplate{background canvas}[horizontal color]{green} \begin{frame} test \end{frame} }

\end{document}

enter image description here

Ignasi
  • 136,588