% Uk�zka zpracov�n� studentsk� datab�ze

% Tvar vstupn�ho souboru:

% K�d,N�zev,Paralelka,Login,Rodn�_��slo,P��jmen�,Jm�no,Ro�n�k,Skupina,E-mail_adresa
% "01M2A","Matematika II A",1,"NOVAKK","1234567","Nov�k","Karel",1,1,""
% ... dal�� ��dky analogicky ...

\special{landscape}  \hsize=\vsize \voffset=-.5cm
\offinterlineskip  \nopagenumbers

\newcount\linenum \newcount\tempnum

\parindent=0pt  \parskip=0pt
\def\\#1 #2|{\leavevmode\hbox to#1{\enspace #2\hss}\cara}
\def\cara{\kern-0.4pt\vrule}
\def\radek #1|#2|{\vrule height4.5mm depth1.5mm
   \\10mm \hfill #1\enspace|\\52mm #2|\\11mm |\\11mm |\\2pt |%
   \zbytek{}\par \hrule}
\def\zbytek #1{\tempnum=0
   \loop 
     \advance\tempnum by1
     \hfill\hbox to0pt{\hss#1\hss}\hfill\cara
     \ifnum\tempnum<15 \repeat
   \hbox{}}
\def\dodelej{%
   \loop 
      \advance\linenum by1 
      \ifnum\linenum<26 {\radek\the\linenum.||}\repeat 
   \vfil\break \linenum=0 }

\catcode`\^^X=13 \def^^X{}
\def\p "#1","#2",#3,"#4","#5","#6","#7",#8,#9,{% 
   %  #1=k�d, #2=n�zev, #3=cvi�.paralelka, #4=login
   %  #5=R�, #6=p��jmen�, #7=jm�no, #8=ro�n�k, #9=skupina
   \def\temp{#3}\def\head{#2}%
   \ifx\temp\skupina\else\novaskupina\fi 
   \advance\linenum by1 
   \radek\the\linenum.|#6 #7 \hfill (#8,#9) |\ignorujzbytek}
\def\ignorujzbytek#1^^X{}
\def\novaskupina{\everypar={}%
   \ifnum\linenum>0 \dodelej \fi 
   \edef\skupina{\temp}%
   \vrule height5mm depth2mm width0mm 
   {\let\cara=\relax \\84mm \bf \vrule width0pt depth4pt 
    \head , \quad Cvi�ebn� paralelka \skupina|%
    \zbytek{\the\tempnum}}%
   \par \hrule \noindent\everypar={\p}}
\def\skupina{}
\everypar={\p}\def\temp{}
\def\nactibasi #1 {\begingroup \linenum=0 
   \everypar={\p} \endlinechar=`\^^X
   \expandafter\ignorujzbytek\input #1 
   \everypar={} \dodelej \endgroup}

\input cpalatin
\nactibasi m2a.txt
\end









