Hi I'm building from scratch a new beamer theme. I would like to define an option in the theme where I can define the conference name which can be used afterwards for the footline. Up to now I've done the following. In the main theme I've defined
\DeclareOptionBeamer{conference}{\PassOptionsToPackage{conference=#1}{beamerouterthememytheme}}
and in the beameroutermytheme.sty I've defined the following
\def\beamer@mytheme@conference{}
\DeclareOptionBeamer{conference}{\def\beamer@mytheme@conference{#1}}
In the footline I've done the following
\defbeamertemplate*{footline}{mytheme}[1]{
\begin{beamercolorbox}[ht=0.15\paperwidth,leftskip=.3cm,rightskip=.3cm,sep=0.1cm]{footlinecolor}
\usebeamerfont{section in head/foot}%
\insertshortauthor~-~\@date~-~\beamer@mytheme@conference \hfill
\insertframenumber{}/\inserttotalframenumber{}
\end{beamercolorbox}%
}
Unfortunately it does not work although I can't understand why.
Any suggestion?
As asked I try to provide a working example. Actually I hope it works as I've done definition for all inner,outer,color and main theme. In any case the file theme beamerthemeMytheme.sty sounds like
\mode<presentation>
\RequirePackage{pgf}
\DeclareOptionBeamer{conference}{\PassOptionsToPackage{conference=#1}{beamerouterthememytheme}}
\DeclareOptionBeamer{pageofpages}
{\PassOptionsToPackage{pageofpages=#1}
{beamerouterthememytheme}}
\ProcessOptionsBeamer
\useoutertheme{mytheme}
\mode
<all>
The file beameroutermytheme.sty sounds like
\mode<presentation>
\RequirePackage{pgf}
% efda colors
\definecolor{eblue}{rgb}{.258,.38,0.63}
\definecolor{e2blue}{rgb}{0.411,0.521,0.709}
% horizontal shading for footer
\pgfdeclarehorizontalshading{beamer@topshade}{\paperwidth}{%
color(0pt)=(eblue);
color(0.5\paperwidth)=(eblue!50);
color(\paperwidth)=(e2blue!50)}
% define the heigth of the footer
\newlength{\beamer@mytheme@headheight}
\setlength\beamer@mytheme@headheight{0.13\paperwidth}
%for date definition
\def\date#1{\def\@date{#1}}
% for page counting
\def\beamer@mytheme@pageofpages{of}
\DeclareOptionBeamer{pageofpages}
{\def\beamer@mytheme@pageofpages{#1}}
\ExecuteOptionsBeamer{pageofpages=of}
\ProcessOptionsBeamer
\def\beamer@mytheme@conference{}
\DeclareOptionBeamer{conference}{\def\beamer@mytheme@conference{#1}}
\defbeamertemplate*{footline}{mytheme}[1]
{%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}
{0.3\beamer@mytheme@headheight}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}
{0.3\beamer@mytheme@headheight}} \pgfusepath{clip}
\pgftext [ left , base ]{\pgfuseshading{beamer@topshade}}
\end{pgfpicture}
\vskip-0.3\beamer@mytheme@headheight
\begin{beamercolorbox} [ht=0.3\beamer@mytheme@headheight,leftskip=.3cm,rightskip=.3cm,sep=0.1cm]{footlinecolor}
\usebeamerfont{section in head/foot}%
\insertshortauthor~-~\@date~-~\beamer@mytheme@conference \hfill
\insertframenumber{}\hskip1pt\beamer@mytheme@pageofpages{}
\hskip1pt\inserttotalframenumber{}
\end{beamercolorbox}%
}
Finally the example is the following
\documentclass[12pt]{beamer}
\usetheme[conference=Prova]{mytheme}
\title[Prova]{Prova}
\author[myself]{Io}
\date{\today}
\begin{document}
\begin{frame}{Prerequisites \& Goals}
\begin{block}{LaTeX}
\begin{itemize}
\item Obviously some basic LaTeX knowledge is necessary
\item Some more features will be provided here
\end{itemize}
\end{block}
\end{frame}
\end{document}
\beamer@jet@conferenceand later you tried to use it as\beamer@mytheme@conference– Claudio Fiandrino Apr 12 '12 at 13:01\beamer@mytheme@conference{}and the consequent option after\ProcessOptionsBeamerin your outer theme. – Claudio Fiandrino Apr 12 '12 at 13:40