Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to create a background gradient for a set of Beamer slides. This question seems to be doing more or less what I want but the answer does not work for me. If I paste the answer into a file I get this error:

! Undefined control sequence.
<recently read> \backgroundsetup 

l.4 \backgroundsetup
                    {
? x
No pages of output.
Transcript written on bg.log.

The linked question also doesn't do quite what I want because I would like the gradient to start in the center. I'm going for an effect like this.

I prefer answers using tikz since I have worked with that.

share|improve this question
    
Have you loaded the background package? Can you provide a minimal working example (MWE)? For the shading like that you can use the radial shading and specify the inner color as well as the outer color. –  Qrrbrbirlbel Oct 11 '13 at 18:16
    
I was trying to build the answer from the linked question. I didn't think it was worth pasting the whole thing into my question as well. –  Andrew Myers Oct 11 '13 at 18:17
add comment

1 Answer

up vote 6 down vote accepted

With beamer, you don’t need the background package, the \usebackgroundtemplate macro offers the possibility to set the background.

Code

\documentclass{beamer}
\usepackage{tikz}
\usebackgroundtemplate{
  \begin{tikzpicture}
    \path [outer color = green!20, inner color = blue!10]
      (0,0) rectangle (\paperwidth,\paperheight);
  \end{tikzpicture}}
\title{This is the title.}
\begin{document}
\maketitle
\end{document}
share|improve this answer
    
Perfect, exactly what I was looking for. –  Andrew Myers Oct 11 '13 at 18:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.