% This file defines several colors, enviroments and commands for slides
% for the Unix-AG's LaTeX course.
%
% This file shound not be modified unless absolutely neccessary. Please
% contact Thomas Fischer <fischer@unix-ag.uni-kl.de> if you want to
% propagate your changes to the original file.
%
% This work is licensed under a Creative Commons Attribution 2.5 License.
% http://creativecommons.org/licenses/by/2.5/
% The original author is   Thomas Fischer <fischer@unix-ag.uni-kl.de>

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{latexkursfolien}[2007/04/01 LaTeX-Kurs-Folien]

\definecolor{mathmodecolor}{RGB}{0,102,0}
\definecolor{keywordcolor}{RGB}{0,51,151}
\definecolor{sourcebackgroundcolor}{RGB}{255,247,223}
\definecolor{unixagred}{RGB}{255,0,0}
\definecolor{lightgray}{RGB}{191,191,191}

\setbeamercolor{structure}{fg=unixagred}
\setbeamercolor*{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor*{palette secondary}{use=structure,fg=black,bg=lightgray}
\setbeamercolor*{palette tertiary}{use=structure,fg=black,bg=lightgray!25!white}
\setbeamercolor*{palette quaternary}{use=structure,fg=black,bg=lightgray!50!white}

\setbeamercolor*{titlelike}{parent=palette primary}

\setbeamercolor*{separation line}{}
\setbeamercolor*{fine separation line}{}

\setbeamercolor*{frametitle}{parent=palette tertiary}

\setbeamercolor*{title}{parent=palette tertiary}


\lstset{language=[LaTeX]TeX,postbreak=\space, breakindent=5pt, backgroundcolor=\color{sourcebackgroundcolor},
    captionpos=b,
    breaklines,
    basicstyle=\ttfamily\footnotesize,keywordstyle=\color{keywordcolor}\textbf,morecomment=[s][\color{mathmodecolor}]{\$}{\$},
    floatplacement=t,
    numbers=left,
    numberstyle=\tiny,
    numberblanklines=false,
    numbersep=1em,
    xleftmargin=1em}

\usetheme{default}
\usefonttheme{professionalfonts,serif,structurebold}
\setbeamerfont{frametitle}{series=\bfseries,size=\large}
\setbeamertemplate{navigation symbols}{}

\newcommand{\code}[1]{\texttt{#1}}

% Title page: default

\defbeamertemplate*{title page}{simple}[1][]
{
  \vbox{}
  \vfill
  \begin{centering}
    \begin{beamercolorbox}[center,#1]{title}
      \hbox{%
      \begin{beamercolorbox}[wd=\linewidth,ht=.25em,dp=1ex,center]{section in head/foot}%
      % nothing
      \end{beamercolorbox}}\par%
      \vspace*{1em}%
      \usebeamerfont{title}\inserttitle\par%
      \ifx\insertsubtitle\@empty%
      \else%
        \vskip0.25em%
        {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
      \fi%
      \vspace*{1em}%
    \end{beamercolorbox}%
    \vskip1em\par
    \begin{beamercolorbox}[sep=8pt,center,#1]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center,#1]{date}
      \usebeamerfont{date}\insertdate
    \end{beamercolorbox}\vskip1em
    {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
  \end{centering}
  \vfill
}



\newcommand{\komma}{\text{,}}
\renewcommand{\emph}[1]{\textbf{\color{structure}#1}}

\pgfdeclareimage[width=6em]{UnixAG}{UnixAG}
\pgfdeclareimage[width=2em]{AStA-CD-Logo}{AStA-CD-Logo}

\subtitle{\LaTeX-Kurs der Unix-AG}
% \institute{Unix-AG}
\titlegraphic{\pgfuseimage{UnixAG}}
% \titlegraphic{\pgfuseimage{UnixAG}\\\vspace*{0.5em}\scriptsize{}Mit freundlicher Unterst{\"u}tzung des AStAs der TU Kaiserslautern\\\pgfuseimage{AStA-CD-Logo}}
% \titlegraphic{\pgfuseimage{UnixAG}\\\vspace*{1em}\pgfuseimage{TU-KL-SW}}


\mode<presentation>

\setbeamercolor*{author in head/foot}{parent=palette tertiary}
\setbeamercolor*{title in head/foot}{parent=palette tertiary}
\setbeamercolor*{date in head/foot}{parent=palette tertiary}
\setbeamercolor*{section in head/foot}{parent=palette primary}

\defbeamertemplate*{footline}{simple theme}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,left]{author in head/foot}%
    \usebeamerfont{author in head/foot}\hspace*{2ex}\insertshortauthor
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}\par%
  \hbox{%
  \begin{beamercolorbox}[wd=\paperwidth,ht=.25ex,dp=1ex,center]{section in head/foot}%
  % nothing
  \end{beamercolorbox}}%
  \vskip0pt%
}

\defbeamertemplate*{headline}{simple theme}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=\paperwidth,ht=.25ex,dp=1ex,center]{section in head/foot}%
  % nothing
  \end{beamercolorbox}}%
  \vskip0pt%
}

\setbeamersize{text margin left=1em,text margin right=1em}

\mode
<all>

