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 want to draw different backgrounds for the title frame and normal frames in beamer, using tikz. Doing this for the normal frames was straight forward, but that background now also shows up on the title frame (shifted to the bottom), which is not desired:

\documentclass{beamer} 
\useoutertheme[subsection=true]{miniframes}%{miniframes}
\defbeamertemplate*{background}{miniframes theme}
{%
  \begin{beamercolorbox}{background}
  \begin{tikzpicture}
    \fill[red] (current page.north west) rectangle ++(0.5cm,-0.5cm);
  \end{tikzpicture}
  \end{beamercolorbox}
}

\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\usepackage{blindtext}

\title{new template} 
\author{Christoph} 

\setbeamertemplate{title page}{
  \insertauthor

  \insertdate

  \insertinstitute

  \inserttitlegraphic
}
\setbeamertemplate{navigation symbols}{}
\begin{document} 
\frame[plain]{\titlepage}
\section{a section}
\subsection{a subsection}
\begin{frame}
 \frametitle{Frame 1}
\blindtext
\end{frame}
\begin{frame}
 \frametitle{Frame 2}
\end{frame}
\subsection{another subsection}
\begin{frame}
 \frametitle{Frame 1}
\blindtext
\end{frame}
\begin{frame}
 \frametitle{Frame 2}
\end{frame}
\end{document}

(my example just uses a red rectangle for simplicity)

I have tried adding the tikzpicture to the header template, which resulted in a shifted navigation (without tikzpicture[overlay]), or the picture not showing up at all (with tikzpicture[overlay]). If this can be solved with the headline template, I'll use that.

Text added to the frame should not be covered by the background picture.

share|improve this question

1 Answer 1

I used a command to store the image that will be used in the pages that are not the title page. Just before the title page I locally redefined the command to use the image for the title page:

\documentclass{beamer} 
\useoutertheme[subsection=true]{miniframes}%{miniframes}

\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\usepackage{blindtext}

% The command will contain the image used in most of the frames
\newcommand\MyBgImage{%
  \begin{tikzpicture}
    \fill[red] (current page.north west) rectangle ++(0.5cm,-0.5cm);
  \end{tikzpicture}
}

\defbeamertemplate*{background}{miniframes theme}
{%
  \begin{beamercolorbox}{background}
    \MyBgImage
  \end{beamercolorbox}
}

\title{new template} 
\author{Christoph} 

\setbeamertemplate{title page}{
  \insertauthor

  \insertdate

  \insertinstitute

  \inserttitlegraphic
}
\setbeamertemplate{navigation symbols}{}

\begin{document} 

% local redefinition of the image. To be used in the titlepage
\begingroup
\renewcommand\MyBgImage{%
\vskip-1cm% adjust according to the image
\begin{tikzpicture}
    \fill[green] (current page.north west) circle[radius=0.5cm];
  \end{tikzpicture}%
}
\frame[plain]{\titlepage}
\endgroup

\section{a section}
\subsection{a subsection}
\begin{frame}
 \frametitle{Frame 1}
\blindtext
\end{frame}
\begin{frame}
 \frametitle{Frame 2}
\end{frame}
\subsection{another subsection}
\begin{frame}
 \frametitle{Frame 1}
\blindtext
\end{frame}
\begin{frame}
 \frametitle{Frame 2}
\end{frame}
\end{document}
share|improve this answer
    
Thank Gonzalo, this allows for different backgrounds. Why is the background image on the title page shifted? Any by what amount? (I'm not talking about the vskip you included, but about the amount the background is shifted without manual adjustment) –  Christoph Oct 13 '11 at 9:32

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.