6

I am using Singapore theme and want to use a background texture image for my slides. Is there a way to set the gradient in the title background to go 'from title background color to transparent' instead of 'from title background color to slide background'?

enter image description here

6

New Answer

This answer now uses the Singapore theme, (downloaded from here) and a proper definition of fading. The new beamerthemeSingapore2.sty

\ProvidesPackageRCS $Header: /Users/joseph/Documents/LaTeX/beamer/base/themes/theme/beamerthemeSingapore.sty,v d02a7cf4d8ae 2010/06/17 09:11:41 rivanvx $

\RequirePackage{tikz}
\usetikzlibrary{fadings}

\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer

\tikzfading[name=fade bottom, top color=transparent!0, bottom color=transparent!100]

\mode<presentation>

\setbeamercolor{section in head/foot}{use=structure,bg=structure.fg!25!bg}

\useoutertheme[subsection=false]{miniframes}

\setbeamertemplate{frametitle}[default][center]

\AtBeginDocument{%

 \newcommand\shading{\tikz\fill[path fading= fade bottom, structure.fg!25!bg] (0cm,0cm) rectangle
 (\paperwidth,1.3cm);}

  \setbeamercolor{section in head/foot}{bg=}
}

\addtoheadtemplate{\shading\vskip-1.3cm}{}

\setbeamertemplate{background canvas}{%
 \includegraphics[width=\paperwidth,height=\paperheight]{lighthouse.jpg}}


\beamertemplatedotitem

\mode
<all>

I made the header slightly larger, such that it contains the frame title.

The main file mwe.tex

\documentclass[xcolor={dvipsnames}]{beamer}

\usecolortheme[named=Yellow]{structure}

\usetheme{Singapore2}

\begin{document}

\section{Introduction}
\subsection{The questions}
\begin{frame}{Title}
Test
\end{frame}

\end{document}

which produces

new fading in headline to image

The image is from wikimedia (Renamed to lighthouse.jpg).

Old Answer

Sorry, this answer does not use the Singapore theme, but a custom headline (which I actually prefer to the Singapore one).

I have combined answers from here and the tikz-manual (20.3 Fadings, page 236f). I think I am not properly setting up the \shade rectangle, as there is a small gap on the right side. Better use the \tikzfading from above.

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{fadings}

\setbeamercolor{secsubsec}{fg=orange,bg=black}

\begin{tikzfadingfrompicture}[name=fade bottom]
  \shade[top color=transparent!0,
  bottom color=transparent!100] (0,0) rectangle (2,2);
\end{tikzfadingfrompicture}


\setbeamertemplate{headline}
{
  \leavevmode%                                                                                                                                                                                                      
  \hbox{%                                                                                                                                                                                                           
  \begin{beamercolorbox}[wd=\paperwidth,ht=8.25ex,dp=3.5ex]{secsubsec}%                                                                                                                                             
    \raggedright
    \hspace*{2em}%                                                                                                                                                                                                  
    {\sffamily\Large\color{orange}\thesection.~\insertsection\hfill\insertsubsection}%                                                                                                                              
    \hspace*{2em}%                                                                                                                                                                                                  
  \end{beamercolorbox}%                                                                                                                                                                                             
  }\vskip-0.5pt%                                                                                                                                                                                                    
  \hbox{%                                                                                                                                                                                                           
    \tikz\fill[path fading= fade bottom, black] (0,0) rectangle (\paperwidth,0.5);                                                                                                                                                 
  }%                                                                                                                                                                                                                
}

\setbeamertemplate{background canvas}{%                                                                                                                                                                             
 \includegraphics[width=\paperwidth,height=\paperheight]{lighthouse.jpg}}

\begin{document}

\section{Introduction}
\subsection{The questions}
\begin{frame}
Test
\end{frame}

\end{document}

which produces

fading in headline to image

  • Great! Thanks! One comment: the first line in sty-file doesn't seem to be needed. Is it supposed to register the new style? Anyway, I skipped it and it works exactly as I needed. – shalabuda Oct 22 '13 at 14:43
  • Actually I didn't have a clue what the command \ProvidesPackageRCS does, but a quick search on Tex.SX solved the case (link). Thanks for raising the question. – Jost Oct 22 '13 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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