4

I would like to add a shaded bar at the bottom of a beamer presentation, with my name and the frame number.

Eventually I'd like to center the frametitle with a line below to separate from the main part.

Look at the image to see what I mean. enter image description here

I can add the background image, but I cannot do the bar at the bottom. I tried to define the footline myself, failed so I tried with an existing outertheme.

Here is my code :

\documentclass{beamer}

\setbeamercovered{invisible}
\usefonttheme{serif,professionalfonts}

\definecolor{orangeiut}{RGB}{247,158,4} 

\setbeamertemplate{navigation symbols}{}
\pgfdeclareimage[height=96mm,width=128mm]{nombidon}{fond}
\setbeamertemplate{background}{\pgfuseimage{nombidon}}

\setbeamercolor{itemize item}{fg=orangeiut}
\setbeamerfont{itemize item}{size=\large}
\setbeamertemplate{itemize item}{\ding{226}}

\useoutertheme{infolines}

\usepackage[french]{babel}
\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{multimedia}
\usepackage{graphicx}
\usepackage{array}
\usepackage{tikz}
\usepackage{manfnt}
\usepackage{pifont}

Anybody knows how to solve that problem ?

5

Here's one possibility:

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{pifont}
\usepackage{tikz}

\tikzset{
    every picture/.prefix style={
        execute at begin picture=\shorthandoff{;}
    }
}

\setbeamercovered{invisible}
\usefonttheme{serif,professionalfonts}

\definecolor{orangeiut}{RGB}{247,158,4} 

\setbeamertemplate{frametitle}[default][center]
\addtobeamertemplate{frametitle}{}{%
  \makebox[\linewidth][c]{\rule{\paperwidth}{1pt}}}
\setbeamerfont{frametitle}{size=\huge}
\setbeamercolor{frametitle}{fg=black}

\setbeamertemplate{navigation symbols}{}
\pgfdeclareimage[height=96mm,width=128mm]{nombidon}{fond}
\setbeamertemplate{background}{\pgfuseimage{nombidon}}

\setbeamercolor{itemize item}{fg=orangeiut}
\setbeamerfont{itemize item}{size=\large}
\setbeamertemplate{itemize item}{\ding{226}}

\setbeamertemplate{footline}
{%
  \leavevmode
  \raisebox{-1pt}[0pt][0pt]{\rule{\textwidth}{1pt}}\par\nointerlineskip%
  \hspace*{0.6pt}\tikz[]\node[,anchor=south,text width=\the\dimexpr\paperwidth-13.2pt\relax,top color=orangeiut!10,bottom color=orangeiut!90!black,inner xsep=6pt,inner ysep=10pt,fill opacity=0.75]%
    {\insertshortauthor\hfill%
    \insertframenumber};%
}

\author{The author}

\begin{document}

\begin{frame}
\frametitle{A test title}
test
\begin{itemize}
\item First.
\item Second.
\end{itemize}
\end{frame}

\end{document}

enter image description here

The bottom bar was built using a node with shading; I also used a redefinition of the frametitle attributes.

The lines

\tikzset{
    every picture/.prefix style={
        execute at begin picture=\shorthandoff{;}
    }
}

are needed since the french module for babel is used; this module makes ; active, so it is necessary to deactivate this shorthand in tikzpictures. For other babel modules those lines are not required.

  • Really nice solution. – Svend Tveskæg Feb 11 '14 at 1:05
  • I get an error - ! Argument of \tikz@next has an extra }. when I try to compile that code. I tried clearing all generated files but the error persists. I'm using pdflatex to compile. – cfr Feb 11 '14 at 2:19
  • @cfr Ah, I forget that I'm using version 3.0 of PGF. With version 2.10 you need to append \the to \dimexpr (I've edited my answer with this change). Please let me know if that fixes the problem. – Gonzalo Medina Feb 11 '14 at 2:21
  • I'm afraid it doesn't fix it here. I still get the same error (and if I try to continue it complains of a runaway argument). – cfr Feb 11 '14 at 2:49
  • @cfr Fixed! (I hope). The problem is the french module for babel which makes ; active. Deactivating the shorthand for every tikzpicture solved the problem. Thanks for noticing the problem! – Gonzalo Medina Feb 11 '14 at 2:59

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.