\ProvidesPackage{beamerthemekaldi1}  % this style was created by Daniel Povey,
% modified from a design by Thomas Deselaers an Philippe Dreuw

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\RequirePackage{tangocolors}

% I figured out the colors by looking at the kaldi logo in Paint, getting the
% color with the dropper, and doing 'edit colors', which gives RGB values you
% can divide by 256 to get values suitable for here.
%\definecolor{kaldibrown}{rgb}{0.546875,0.390625,0.1953125}

%\definecolor{kaldibrown}{RGB}{140,100,50} %% rgb}{0.546875,0.390625,0.1953125}
% got:
% 157, 136, 108
\definecolor{kaldibrown}{RGB}{140,100,50} %% rgb}{0.546875,0.390625,0.1953125}

\definecolor{kaldibrowngray}{RGB}{217,201,171} % neutral mid-range color for background, actually a bit brownish.
\definecolor{kaldilightgray}{RGB}{249,250,218} % Light gray that's tilted to brown

\definecolor{kaldigray}{rgb}{0.309,0.309,0.309}
\definecolor{kaldiblack}{rgb}{0.19,0.19,0.19} % Define a darker gray; this
 % doesn't appear in the logo but will be a theme color, used for
 % content text



%%\selectcolormodel{cmyk}
\mode<presentation>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setbeamercolor{headline}{fg=kaldigray,bg=white}
\setbeamercolor{footline}{fg=kaldigray, bg=white}
\setbeamerfont{footline}{size=\large,series=\tt}
\setbeamercolor{separation line}{bg=kaldigray}
\setbeamercolor{title in headline}{fg=kaldibrown}
\setbeamercolor{author in headline}{fg=kaldigray}
\setbeamercolor{institute in headline}{fg=kaldibrown}

\setbeamercolor{framesubtitle}{fg=kaldibrown, bg=kaldilightgray} % may not matter
\setbeamercolor{author in head/foot}{fg=kaldibrown, bg=white}
\setbeamercolor{title in head/foot}{fg=kaldigray, bg=white}

\setbeamercolor*{normal text}{fg=black, bg=kaldibrowngray}
\setbeamercolor*{block body}{fg=black,bg=white}
\setbeamercolor*{block title}{fg=kaldibrown,bg=kaldilightgray}
\setbeamerfont{block title}{size=\large,series=\bf}
\setbeamercolor{upper separation line head}{fg=kaldigray}

\setbeamercolor*{example body}{fg=kaldiblack,bg=white} % dont' know what used for.
\setbeamercolor*{example text}{fg=kaldiblack,bg=white}
\setbeamercolor*{example title}{bg=kaldilightgray,fg=black}

%\setbeamercolor{alerted text}{fg=ta3gray}

%\setbeamercolor{example text}{fg=taorange}
\setbeamercolor{structure}{fg=kaldigray}

\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{navigation symbols}{}  % no navigation on a poster

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{block begin}{
  \vskip.75ex
  \begin{beamercolorbox}[ht=3.5ex,dp=0.5ex,center,leftskip=-1em,colsep*=.75ex]{block title}%
    \usebeamerfont*{block title}%
    {\phantom{Gg}\insertblocktitle}% phantom because of baseline problem
  \end{beamercolorbox}%
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[leftskip=1em,colsep*=.75ex,sep=0.5ex,vmode]{block body}%
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
  }
  \setbeamertemplate{block end}{
  \end{beamercolorbox}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{headline}{  
  \leavevmode

  \begin{beamercolorbox}[wd=\paperwidth]{headline}
    \begin{columns}[T]
      \begin{column}{.02\paperwidth}
      \end{column}
      \begin{column}{.7\paperwidth}
        \vskip4ex
        \raggedleft
        \usebeamercolor{title in headline}{\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}
        \usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]}
        \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}     
      \end{column}
      \begin{column}{.01\paperwidth}
      \end{column}
      \begin{column}{.27\paperwidth}
        \vskip8ex
        \begin{center}
          \includegraphics[width=\linewidth]{figures/KaldiTextAndLogo.png}
        \end{center}
        \vskip2ex
	\flushright {\tt \Large http://kaldi.sf.net} \hspace{0.015\paperwidth}
      \end{column}
      \begin{column}{.01\paperwidth}
      \end{column}
    \end{columns}
    \vskip2ex
  \end{beamercolorbox}

  \begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
    \rule{0pt}{3pt}
  \end{beamercolorbox}
}

%  \setbeamertemplate{headline}{  
%    \leavevmode
%    \begin{beamercolorbox}[sep=0.5cm,wd=.8\paperwidth]{headline}
%      \usebeamercolor{title in headline}{\raggedleft\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}
%      \usebeamercolor{author in headline}{\raggedleft\color{fg}\large{\insertauthor}\\[1ex]}
%      \usebeamercolor{institute in headline}{\raggedleft\color{fg}\large{\insertinstitute}\\[1ex]}     
%    \end{beamercolorbox}%
%    \begin{beamercolorbox}[wd=.2\paperwidth]{logo in headline}
%      \centering
%      \LARGE{LOGO}
%    \end{beamercolorbox}  


%}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{footline}{
  \begin{beamercolorbox}[wd=\paperwidth]{upper separation line foot}
    \rule{0pt}{3pt}
  \end{beamercolorbox}
  
  \leavevmode%
   \begin{beamercolorbox}[ht=4ex,leftskip=1em,rightskip=1em]{author in head/foot}%
     \texttt{http://kaldi.sf.net}
     \hfill
     \texttt{kaldi-developers@lists.sourceforge.net}
     \vskip1ex
   \end{beamercolorbox}
  \vskip0pt%
  \begin{beamercolorbox}[wd=\paperwidth]{lower separation line foot}
    \rule{0pt}{3pt}
  \end{beamercolorbox}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Display a grid to help align images ... and it looks nice with this color scheme
%\beamertemplategridbackground[1cm]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<all>

% adapt height of imtemize rectangles
\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{itemize item}{\raisebox{0.12ex}{$\blacktriangleright$}\hskip0.1em}
\setbeamertemplate{itemize subitem}{\raisebox{0.12ex}{$\triangleright$}\hskip0.1em}
% or define your own template using \defbeamertemplate{itemize item}, see beameruserguide.pdf

% equal font sizes for all levels
\setbeamerfont{itemize/enumerate body}{size=\normalsize}
\setbeamerfont{itemize/enumerate subbody}{size=\normalsize}
\setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Local Variables: 
%%% mode: latex
%%% TeX-PDF-mode: t
%%% TeX-master: "poster-surf"
%%% End: 
