% Von http://www.noch-mehr-davon.de/aprak.shtml geklaut!
% Festlegen des Dokumententyps
\documentclass[11pt,a4paper,twoside]{article}

% Papierformat
\usepackage{a4}

% Deutsche Sprache (Silbentrennung, usw.)
\usepackage[ngerman]{babel}

% Schrifteneinstellungen
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

% bessere Matheunterstützung
\usepackage{amsfonts}
\usepackage{amstext}
\usepackage{amsmath}

% Kodierung
\usepackage{ucs}
\usepackage[utf8x]{inputenc}

% Grafiken einbinden
\usepackage{graphicx}
\usepackage{color}

% Floats inside Floats
\usepackage{subfig}

\usepackage[top=2cm, left=1.5cm, right=1.5cm, bottom=2cm]{geometry} 
% to change the page dimensions
% this gives us a bit more space

\geometry{a4paper} % or letterpaper (US) or a5paper or....
% \geometry{margin=2in} % for example, change the margins to 2 inches all round
% \geometry{landscape} % set up the page for landscape
%   read geometry.pdf for detailed page layout information

%%% PACKAGES
\usepackage{booktabs} % for much better looking tables

% Proper units
\usepackage{units}

%%% HEADERS & FOOTERS
\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
\pagestyle{fancy} % options: empty , plain , fancy
\renewcommand{\headrulewidth}{0pt} % customise the layout...
\lhead{}\chead{}\rhead{}
\lfoot{}\cfoot{\thepage}\rfoot{}

%%% SECTION TITLE APPEARANCE
\usepackage{sectsty}
\allsectionsfont{\sffamily\mdseries\upshape} % (See the fntguide.pdf for font help)
% (This matches ConTeXt defaults)

%%% Modifications
\renewcommand{\arraystretch}{1.5} % Give tabular cells more vertical space

% Einfach am Ende jeder Seite
% \formular
%und eventuell \newpage
% schreiben - praktisch!

\newcommand{\formular}{
\begin{table}[!h]
\subfloat{
\begin{tabular}{ll}
Praktikanten: &Julius Strake\\
              &Niklas Bölter\\
Gruppe: &17\\
\end{tabular}
}
\subfloat{\hspace{3cm}}
\subfloat{
\begin{tabular}{ll}
Betreuer: & Hendrik Schmidt\\
Datum: &29.05.2012\\
Unterschrift: &\hspace{3cm} \\
\cline{2-2}
\end{tabular}
}
\end{table}
}

%%% END Article customizations

\begin{document}
\section*{Messprotokoll}
\subsection*{A-Praktikum \\ Versuch 9 - Diffusion}
% Mark all tables as [!h], so that the order is preserved. 
\subsubsection*{Messung 1 - x(t) ($c_0/16$)}

\newcounter{reihe}
\newcommand{\freispb}[0]{}

\newcounter{zeilen}
\newcounter{endezeilen}
\addtocounter{endezeilen}{17}
\newcommand{\zeile}[0]{}

\newcounter{spalten}
\newcounter{endespalten}
\addtocounter{endespalten}{4}

\setcounter{zeilen}{0}
\setcounter{spalten}{0}
\setcounter{reihe}{0}

\begin{table}[!h]
\subfloat{
\whiledo{\value{spalten} < \value{endespalten}}{
\setcounter{zeilen}{0}
\begin{tabular}{|r|l|}
\hline
$t \; [s]$& $x \; [ \hspace{1cm} ]$ \freispb \\
\hline
\hline
\whiledo{\value{zeilen} < \value{endezeilen}}{

        \renewcommand{\zeile}{\arabic{reihe}\addtocounter{reihe}{30} & \\\hline}
        \zeile
        \stepcounter{zeilen}
}
\arabic{reihe}\addtocounter{reihe}{30} & \\\hline
\end{tabular}
\stepcounter{spalten}}}
\end{table}

\subsubsection*{Messung 4 - c(x) (100min)}

\begin{table}[!h]
\subfloat{

    \begin{tabular}{|c|c|c|c|c|}
    \hline
    \multicolumn{5}{|c|}{x [\hspace{1cm}]} \\
    \hline
	$c_0/2$ & $c_0/4$& $c_0/8$ & $c_0/16$ & $c_0/32$ \\
	\hline
	\hspace{2cm} & \hspace{2cm} & \hspace{2cm} & \hspace{2cm} & \hspace{2cm} \\
	\hline	
	\hline
	$c_0/2$ & $c_0/4$& $c_0/8$ & $c_0/16$ & $c_0/32$ \\
	\hline	
	\hspace{2cm} & \hspace{2cm} & \hspace{2cm} & \hspace{2cm} & \hspace{2cm} \\
	\hline	
    \end{tabular}
}
\end{table}
Benötigte Zeit: 

\newpage

\subsubsection*{Messung 2 - x(t) ($c_0/32$)}

\setcounter{zeilen}{0}
\setcounter{spalten}{0}
\setcounter{reihe}{0}

\begin{table}[!h]
\subfloat{
\whiledo{\value{spalten} < \value{endespalten}}{
\setcounter{zeilen}{0}
\begin{tabular}{|r|l|}
\hline
$t \; [s]$& $x \; [ \hspace{1cm} ]$ \freispb \\
\hline
\hline
\whiledo{\value{zeilen} < \value{endezeilen}}{

        \renewcommand{\zeile}{\arabic{reihe}\addtocounter{reihe}{30} & \\\hline}
        \zeile
        \stepcounter{zeilen}
}
\arabic{reihe}\addtocounter{reihe}{30} & \\\hline
\end{tabular}
\stepcounter{spalten}}}
\end{table}

\subsubsection*{Messung 3 - c(x) (40min)}

\begin{table}[!h]
\subfloat{

    \begin{tabular}{|c|c|c|c|c|}
    \hline
    \multicolumn{5}{|c|}{x [\hspace{1cm}]} \\
    \hline
	$c_0/2$ & $c_0/4$& $c_0/8$ & $c_0/16$ & $c_0/32$ \\
	\hline
	\hspace{2cm} & \hspace{2cm} & \hspace{2cm} & \hspace{2cm} & \hspace{2cm} \\
	\hline	
	\hline
	$c_0/2$ & $c_0/4$& $c_0/8$ & $c_0/16$ & $c_0/32$ \\
	\hline	
	\hspace{2cm} & \hspace{2cm} & \hspace{2cm} & \hspace{2cm} & \hspace{2cm} \\
	\hline	
    \end{tabular}
}
\end{table}
Benötigte Zeit: 

\formular


\end{document}
