%% LaTeX Beamer presentation template (requires beamer package)
%% see http://bitbucket.org/rivanvx/beamer/wiki/Home
%% idea contributed by H. Turgut Uyar
%% template based on a template by Till Tantau
%% this template is still evolving - it might differ in future releases!

\documentclass{beamer}

\mode<presentation>
{
\usetheme{Boadilla}

\setbeamercovered{transparent}
}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}

% font definitions, try \usepackage{ae} instead of the following
% three lines if you don't like this look
\usepackage{mathptmx}
\usepackage[scaled=.90]{helvet}
\usepackage{courier}

\usepackage{tikz}
\usetikzlibrary{positioning,fit,calc}

\tikzset{
  hvh/.style={to path={
    -| ($(\tikztostart)!#1!(\tikztotarget)$) \tikztonodes |- (\tikztotarget)
  }},
  vhv/.style={to path={
    |- ($(\tikztostart)!#1!(\tikztotarget)$) \tikztonodes -| (\tikztotarget)
  }}
}


\usepackage[T1]{fontenc}


\title{}

%\subtitle{}

% - Use the \inst{?} command only if the authors have different
%   affiliation.
%\author{F.~Author\inst{1} \and S.~Another\inst{2}}
\author{Alina\inst{2}, Anselm\inst{1} und Fritz\inst{2}}

% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.
\institute[Fachrat Informatik]
{
\inst{1}%
Department of Nonsense\\
Universität den Haak
\and
\inst{2}%
Department of Chaos\\
University of Anywhere}

\date{26.10.2012 / Klausurtagung}


% This is only inserted into the PDF information catalog. Can be left
% out.
\subject{Talks}



% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

% \pgfdeclareimage[height=0.5cm]{university-logo}{university-logo-filename}
% \logo{\pgfuseimage{university-logo}}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command:

%\beamerdefaultoverlayspecification{<+->}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}<1>[label=outline]
\frametitle{Outline}
\tableofcontents[pausesections]
\end{frame}


\section{Übersicht}


\def\last{50}

\begin{frame}<\last>[fragile, label=diagramm]
%\frametitle{Übersicht}
\scriptsize

\begin{tikzpicture}[
  >=stealth,
  inside/.style={below right=0pt of #1, shift={(0.5em,-0.5em)}},
  mylabel/.style={label={[yshift=1.4em]below:#1}},
]

% Studenten
\visible<21->{
  \node[draw,minimum width=\linewidth,,minimum
    height=6em,mylabel={Alle Studierenden der
    Universität}] (studis) {};
}

% Andere Statusgruppen
\visible<10->{
  \node[draw, gray, rotate=90, anchor=south west, xshift=13em]
    at (studis.north east) (wimis) {WiMis};
  \node[draw, gray, rotate=90, anchor=south west, xshift=0.5em]
    at (wimis.south east) (profs) {Profs};
  \node[draw, gray, rotate=90, anchor=south west, xshift=0.5em]
    at (profs.south east) (mtvs) {MTVs};
}

% Fakultätsinterne Gremien
%% Studentische Selbstverwaltung

\visible<2->{    % Fachschaften
  \node[draw, inside=studis.north west, minimum height=4em,minimum
  width=20em,mylabel=Fachschaft Elektrotechnik und Informatik] (fs-etinf) {};
}
\visible<20->{
  \node[right=6.5em of fs-etinf,minimum width=3em] (dots) {$\ldots$};
  \node[draw, right=6.5em of dots, minimum height=4em, minimum
  width=\linewidth-33em-3em-1em] (fs-andere) {Andere Fachschaft};
}
\visible<1->{    % Fachgruppen
  \node[draw, inside=fs-etinf.north west, minimum width=8em, minimum
  height=2em] (fg-inf) {Fachgruppe Inf};
}
\visible<3->{
  \node[draw, right=0.5em of fg-inf, minimum height=2em,minimum width=5em]
  (fg-et) {FG ET};
  \node[draw, right=0.5em of fg-et, minimum height=2em,minimum width=5em]
  (fg-mec) {FG Mec*};
}

% Fachräte
\visible<4-19,\last->{
  \node[draw, right, yshift=7em] at(studis.west) (fr-inf) {Fachrat Inf}
    edge[<-] node[fill=white,pos=0.4] {bildet} (fr-inf |- fg-inf.north);
}
\visible<5-19,\last->{
  \node[draw, right=0.5em of fr-inf] (fr-et) {Fachrat ET}
    edge[<-,vhv=0.5] node[fill=white,pos=0.3] {bildet} (fg-et);
  \node[draw, right=0.5em of fr-et] (fr-mec) {Fachrat Mec}
    edge[<-,vhv=0.5] node[fill=white,pos=0.3] {bildet} (fg-mec);
}

% Fachschaftsrat
\visible<6->{
  \node[draw, fit=(fr-inf) (fr-mec), inner sep=-0.5\pgflinewidth, yshift=6em,
    label=center:Fachschaftsrat ET und Inf] (fsr-etinf) {};
  \path (studis.north |- fs-etinf.north) +(-2em,0) coordinate (temp);
  \draw[->] (fs-etinf.3) -| (temp) |- (fsr-etinf.east);
}

%% Akademische Selbstverwaltung

\visible<10->{    % Fakultätsrat
  \node[draw] at ($(studis.25)+(0,12em)$) (fakrat) {Fakultätsrat};
  \path (studis.north |- fs-etinf.north) +(2em,0) coordinate (temp);
  \draw[->] (fs-etinf.-3) -| (temp) |- (fakrat.west);
}

\visible<11-19,\last->{    % Dekanat
\node[draw, right=6em of fakrat] (dekanat) {Dekanat}
  edge[<-] node[fill=white] {wählt} (fakrat);
}

\visible<12-19,\last->{    % Andere Gremien
  \node[draw, below=3em of dekanat.east, anchor=east]
    (stuko) {Studienkommissionen};
  \node[draw, below=2em of stuko.east, anchor=east]
    (praus) {Prüfungsausschüsse};
  \node[draw, below=2em of praus.east, anchor=east]
    (zulaus) {Zulassungsausschüsse};
  \node[draw, below=2em of zulaus.east, anchor=east]
    (berufko) {Berufungskommissionen};

  \draw[->] (fakrat.220 |- stuko) -- (stuko.west);
  \draw[->] (fakrat.220 |- praus) -- (praus.west);
  \draw[->] (fakrat.220 |- zulaus) -- (zulaus.west);
  \draw[->] (fakrat.220) |- node[fill=white,pos=0.07]
    (benennt) {benennt} (berufko.west);
}

% Benennungen
\visible<13-19,\last->{
  \path ($(fsr-etinf)!0.5!(fr-et)$) coordinate (temp);
  \draw[->] (fr-inf.north) |- (temp) -| (benennt.210);
  \draw (fr-et.north) -- (fr-et.north |- temp);
  \draw (fr-mec.north) -- (fr-mec.north |- temp);
  \draw (fsr-etinf.south) -- (fsr-etinf.south |- temp);
}



% Universitätsweite Gremien
%% Studentische Selbstverwaltung

\visible<22->{    % StuRa
  \node[draw, above=6em of fsr-etinf] (stura) {StuRa};
  \draw[->] (studis.north) ++(-1em,0) -- ++(0,15em) -| (stura.310);
  \draw[<-] (stura.230) -- node[fill=white,pos=0.6] {delegiert}
    (stura.230 |- fsr-etinf.north);
}

\visible<23->{    % AStA
  \node[draw, left=4em of stura] (asta) {AStA};
  \draw[->] (stura.west) -- node[above,pos=0.45]
    {wählt} (asta.east);
}

\visible<24->{    % Ältestenrat
  \node[draw, right=4em of stura] (aer) {Ältestenrat};
  \draw[->] (stura.east) -- node[above,pos=0.45]
    {wählt} (aer.west);
}

\visible<25->{    % Vollversammlung
\node[draw, above=4em of stura] (vv) {Vollversammlung}
  edge[->] node[fill=white,pos=0.5] {empfiehlt} (stura);
}


%% Akademische Selbstverwaltung

\visible<30->{    % Senat
  \node[draw, anchor=west] at (vv -| fakrat.west) (senat) {Senat};
  \draw[->] (studis.north) ++(1em,0) |- (senat.west);
}

\visible<31->{    % Präsidium
  \node[draw, anchor=east] at (senat -| dekanat.east) (praesi) {Präsidium}
    edge[<-] node[fill=white] {wählt} (senat);
}

\visible<32->{    % Senatskommissionen
  \node[draw, below=3em of praesi.east, anchor=east]
    (lehrko) {Lehrkommission};
  \node[draw, below=2em of lehrko.east, anchor=east]
    (hausko) {Haushaltskommission};
  \node[draw, below=2em of hausko.east, anchor=east]
    (forschko) {Forschungskommission};

  \draw[->] (senat.south |- lehrko) -- (lehrko.west);
  \draw[->] (senat.south |- hausko) -- (hausko.west);
  \draw[->] (senat.south) |- node[fill=white,pos=0.09] {benennt} (forschko.west);
}

% Ganz oben über allen anderen Linien und Kästen:
\visible<10->{
  \draw[dashed] (studis.north) ++(0,0.5em) -- ++(0,26.5em);
}
\visible<6->{
  \node[draw, dashed, fill=white, above=2em of studis.north] {Uniwahlen};
}

\visible<10->{
  \node[above=25em] at ($(studis.north west)!0.5!(studis.north)$)
    {\normalsize Studentische Selbstverwaltung};
  \node[above=25em] at ($(studis.north east)!0.5!(studis.north)$)
    {\normalsize Akademische Selbstverwaltung};
}

\end{tikzpicture}
\end{frame}

\section{Fakultätsinterne Gremien}

\subsection{Studentische Selbstverwaltung}
\againframe<2>{outline}
\againframe<1-6>{diagramm}

\subsection{Akademische Selbstverwaltung}
\againframe<10-13>{diagramm}


\section{Universitätsweite Gremien}
\subsection{Studentische Selbstverwaltung}
\againframe<3>{outline}
\againframe<19,20-25>{diagramm}

\subsection{Akademische Selbstverwaltung}
\againframe<30-32,\last>{diagramm}


\section{Vollversammlungen}
\againframe<4>{outline}


\begin{frame}
\frametitle<presentation>{Vollversammlungen}

\begin{itemize}
  \item Vollversammlung
  \pause
  \item Fachschaftsvollversammlung
  \pause
  \item Fachgruppenvollversammlung
  \pause
  \begin{itemize}
    \item Nötig zur Konstituierung eines Fachrats
    \item Die Konstituierende Sitzung ist eigentlich eine Vollversammlung
  \end{itemize}
\end{itemize}
\end{frame}

\begin{frame}
\begin{center}
kthxbye :-)
\end{center}
\end{frame}

\end{document}
