% K�dov�n� iso-8859-2
\documentclass[10pt]{article}
\usepackage{czech,a4wide,landscape}

\pagestyle{empty}

% Konstanty
\def\mz{\kern1pt}
\def\oddelovnik{,}

% Parametry
\def\jmeno{Petr Kov��}
\def\cislo{kov16}

% Datum
\newcount\prichodhod
\newcount\prichodmin
\newcount\odchodhod
\newcount\odchodmin
\newcount\datum
\newcount\denhod
\newcount\denmin
\newcount\mesichod
\newcount\mesicmin

% Nic
\def\nic{%
\noalign{\hrule}
  \global\advance\datum by 1
  \the\datum. & & & & & \cr
}

% Nemoc
\def\nemoc{%
\noalign{\hrule}
  \global\advance\datum by 1
  \global\advance\mesichod by 8
  \the\datum. & nemoc & & & & 8\oddelovnik00\cr
%  \the\datum. & nemoc & & & & \cr
}

% Dovolen�
\def\dovolena{%
\noalign{\hrule}
  \global\advance\datum by 1
  \global\advance\mesichod by 8
  \the\datum. & dovolen� & & & & 8\oddelovnik00\cr
}

% Semin��
\def\seminar{%
\noalign{\hrule}
  \global\advance\datum by 1
  \global\advance\mesichod by 8
  \the\datum. & semin�� & & & & 8\oddelovnik00\cr
}

% Sobota, ned�le
\def\volno{%
\noalign{\hrule}
  \global\advance\datum by 1
  \the\datum. & & & & & \cr
}

% Sv�tek
\def\svatek{%
\noalign{\hrule}
  \global\advance\datum by 1
  \the\datum. & sv�tek & & & & \cr
}

% Jeden den
\def\den #1:#2 #3:#4 {%
\noalign{\hrule}
  \global\prichodhod#1%
  \global\prichodmin#2%
  \global\odchodhod#3%
  \global\odchodmin#4%
  % kolik hodin za den?
  \global\denhod\odchodhod%
  \global\advance\denhod by -\prichodhod%
  \global\denmin\odchodmin%
  % od odchodu ode�ti p��chod
  \ifnum\odchodmin<\prichodmin
    \global\advance\denmin by 60%
    \global\advance\denhod by -1%
    \global\advance\denmin by -\prichodmin%
  \else
    \global\advance\denmin by -\prichodmin%
  \fi
  % z�konn� p�est�vka 4:30 hod
  % vice ne� 5 hod
  \ifnum\denhod<5%
    \relax% nic
  \else
    \ifnum\denmin<30
      \global\advance\denmin by 60%
      \global\advance\denhod by -1%
      \global\advance\denmin by -30%
    \else 
      \global\advance\denmin by -30%
    \fi
  \fi
  % v�ce ne� 9 hod
  \ifnum\denhod<9%
    \relax% nic
  \else
    \ifnum\denmin<30
      \global\advance\denmin by 60%
      \global\advance\denhod by -1%
      \global\advance\denmin by -30%
    \else 
      \global\advance\denmin by -30%
    \fi
  \fi
  % Hodiny m�s��n�
  \global\advance\mesichod by \denhod%
  \global\advance\mesicmin by \denmin%
  \ifnum\mesicmin<60
    \relax% nic
  \else
    \global\advance\mesicmin by -60%
    \global\advance\mesichod by 1%
  \fi
  % Datum
  \global\advance\datum by 1
  \the\datum. & \hss\the\prichodhod\oddelovnik\ifnum\prichodmin<10 0\fi\the\prichodmin\hss & \hss\the\odchodhod\oddelovnik\ifnum\odchodmin<10 0\fi\the\odchodmin\hss & & & \the\denhod\oddelovnik\ifnum\denmin<10 0\fi\the\denmin\cr
}

% Tabulka m�s�ce
\def\tabulka#1#2{%
\datum=0% nuluj ��ta� m�s�ce
\mesichod=0% nuluj ��ta�e hodin
\mesicmin=0% nuluj ��ta�e minut
\bgroup\offinterlineskip
\def\strut{\vrule height 7.1pt depth 2pt width 0pt}
\vbox{\hbox{\hss m�s�c:\hbox to 5cm{ #1\hss}\hss}\vskip2mm%
\halign{\vrule\ ##\vrule&\ ##\vrule&\ ##\vrule&\ ##\vrule&\ ##\vrule&\hss##\hss\vrule\strut\cr 
% hlavi�ka
\noalign{\hrule}
  & \hss 1\hss & \hss 2\hss & \hss 3\hss & \hss 4\hss & \hss 5\hss \cr
 Dat.\mz & Zah�jen� & Ukon�en� & \multispan2\ P�eru�en� pr�ce \vrule& Prac. \crcr
  \omit\vrule\hss\vrule & & & \multispan2\hrulefill\vrule\cr
  & pr�ce\hss & pr�ce\hss & & & \ \cr
  & (p��chod)\hss & (odchod)\hss & za��tek & konec & *) \cr
% t�lo
#2
% pati�ka
\noalign{\hrule}
 \multispan5\vrule \hskip 0pt plus 5fil Celkem\hfil\vrule & \the\mesichod\oddelovnik\the\mesicmin \cr
\noalign{\hrule}%
}}
\egroup}

% Zkratky
\let\dn\den
\let\vo\volno
\let\sm\seminar
\let\nc\nic

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{centerline}
{\large\bf EVIDEN�N� LIST PRACOVN� DOBY}
\end{centerline}
\vskip2.5mm

\centerline{\hss Jm�no a p��jmen�:\hbox to 3cm{ \jmeno\hss}\hss �tvar: 714\hss rok: 2001\hss z�kladn� pracovn� doba: 8,00~--~13,30\hss �.:\hbox to 1cm{ \cislo\hss}\hss}
\vskip2.5mm

% Mal�m p�smem
\noindent\small

% Centruj t�i tabulky
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \dn = \den hod:min hod:min
% \vo = \volno 
% \sm = \seminar
% \nc = \nic 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hfill
\tabulka{��jen}{% jm�no m�s�ce
% 1 - 7
\den 7:00 18:00
\den 8:00 16:00
\den 8:00 15:00
\den 7:00 18:00
\den 8:00 16:30
\volno\volno
% 8 - 14
\den 8:00 18:00
\dovolena
%\den 8:00 16:00
\den 8:00 15:00
\den 7:00 18:00
\den 8:00 16:30
\volno\volno
% 15 - 21
\den 8:00 18:00
\den 8:00 15:00
\den 8:00 16:00
\den 7:00 18:00
\den 8:00 16:30
\volno\volno
% 22 - 28
\den 8:00 18:00
\dovolena
\den 8:00 15:00
\den 7:00 20:00
\den 8:00 16:30
\volno\volno
% 29 - 31
\den 8:00 18:00
\den 8:00 16:00
\den 8:00 15:00
}%
\hfill
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tabulka{listopad}{% jm�no m�s�ce
% 1 - 7
\den 7:00 18:00
\den 8:00 16:30
\volno\volno
\den 8:00 18:00
\den 8:00 18:00
\den 8:00 16:00
% 8 - 14
\den 7:00 18:00
\den 8:00 16:30
\volno\volno
\den 8:00 18:00
\den 8:00 18:00
\den 8:00 16:30
% 15 - 21
\den 7:00 18:00
\den 8:00 16:30
\volno\volno
\den 8:00 18:00
\den 8:00 15:00
\den 8:00 16:00
% 22 - 28
\den 7:00 18:00
\den 8:00 16:30
\volno\volno
\den 8:00 16:30
\den 8:00 16:30
% 29 - 31
\den 8:00 18:00
\den 7:00 20:00
\den 8:00 16:30
\nic
}%
\hfill
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tabulka{prosinec}{%
% 1 - 7
\volno
\volno
\den 8:00 18:00
\den 8:00 16:30
\den 8:00 16:30
\den 7:00 16:00
\den 8:00 16:00
% 8 - 14
\volno\volno
\den 8:00 18:00
\den 8:00 16:30
\den 8:00 18:00
\den 7:00 15:00
\den 8:00 16:00
% 15 - 21
\volno\volno
\den 8:00 18:00
\den 8:00 16:30
\den 8:00 18:00
\den 7:00 15:00
\den 8:00 20:00
% 22 - 28
\volno\volno
\svatek
\svatek
\svatek
\dovolena
\dovolena
% 29 - 31
\volno\volno
\dovolena
}%
\hfill
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\vskip3mm
\noindent

\centerline{\parbox[t]{.3\textwidth}{*) Pracovn� doba se vypo��t� n�sledovn�:\\
\hbox{}\hskip5mm 5 = (2 - 1) - (4 - 3) - 30~min.}%
\hss Podpis zam�stnance: \hbox to 3cm{\hss}\hss Podpis vedouc�ho katedry:\hbox to 3cm{\hss}\hss }

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 1 - 7
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\volno\volno
% 8 - 14
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\volno\volno
% 15 - 21
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\volno\volno
% 22 - 28
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
\volno\volno
% 29 - 31
\den 8:00 16:00
\den 8:00 16:00
\den 8:00 16:00
