%% N�vod k pou�it�, viz n��e.

\chyph %  Pou�it� form�t: csplain

\advance\vsize by1in \voffset=-.5in
\overfullrule=0pt
\newcount\unum
\newcount\cisloulohy
\let\oristrut=\strut
\newif\ifstitky \stitkyfalse \let\stitky=\stitkytrue

% Pomocna makra
\def\ZA{\par\removelastskip\bigskip \global\advance\unum by1
   \noindent\hbox to\parindent{\hfil\bf\the\unum.\ }}
\def\oriVY#1\par{#1}
\let\VY=\oriVY
\def\hod{\mathop{\rm hod}}
\def\R{{\bf R}}
\def\A{{\bf A}}
\def\B{{\bf B}}
\def\C{{\bf C}}
\def\E{{\bf E}}
\def\X{{\bf X}}
\def\Vec#1{\overrightarrow{#1}}     % vektor dany dvema body
\def\pri#1{\overleftrightarrow{#1}} % primka dana dvema body

% Makro na dvojsipku
\def\overleftrightarrow #1{\vbox{\halign{$##$\crcr
  \mathord\leftarrow\mkern-6mu
  \cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
  \mkern-6mu\mathord\rightarrow \cr
  \noalign{\kern-1pt \nointerlineskip}
  \hfil\displaystyle{#1}\hfil\crcr}}}

% Makro pro matice
\newtoks\schemata \newdimen\tbs
\def\addschema#1{\schemata\expandafter{\the\schemata#1}}
\def\addseparator{\ifx\params\empty \else \addschema&\fi}
\def\vemznak#1#2;{\def\params{#2}\csname P:#1\endcsname}
\expandafter\def\csname P:c\endcsname{%
   \addschema{\hfil$##$\hfil}\addseparator}
\expandafter\def\csname P:r\endcsname{%
   \addschema{\hfil$##$}\addseparator}
\expandafter\def\csname P:|\endcsname{%
   \addschema{\vrule\hskip2\tbs}}
\def\genschemata{\ifx\params\empty
   \else\expandafter\vemznak\params;\expandafter\genschemata\fi}
\tbs=.4em \let\\=\cr
\def\matice#1#2{\left(\vcenter{\offinterlineskip
   \ifx\strut\oristrut \else \tbs=.5em \fi  
   \schemata={\tabskip=2\tbs \strut}
   \def\params{#1}\genschemata \tabskip=\tbs
   \halign{\span\the\schemata \tabskip=\tbs \cr #2\crcr}}\right)}
\let\\=\cr

% LaTeXovske \begin{cosi}...\end{cosi}
\def\begin #1{\csname beg:#1\endcsname}
\expandafter\def\csname beg:alignat*\endcsname#1#2\end#3{% \begin{alignat*}
   $$ \vbox{\halign{&\hfil$\displaystyle##$&$\displaystyle{}##{}$\hfil\cr
   #2\crcr}} $$}

% Dalsi LaTeXovstiny:
\def\frac #1#2{{#1\over#2}}

% Globalni nacteni database
\def\database #1 {\global\unum=0 \bigskip\line{\hrulefill\ #1 \hrulefill}
   \mark{#1}
   \footline={\rlap{\it \edef\tempa{\firstmark}\edef\tempb{\botmark}%
                        \ifx\tempa\tempb\else \firstmark\ ---
                        \fi \botmark}\hfil\bf\folio}
   \input u#1 \mark{#1}}

% Prepinani velikosti fontu
\def\scalefonts#1 {
  \font\tenrm=csbx10 scaled#1
  \font\teni=cmmib10 scaled#1
  \font\tensy=cmbsy10 scaled#1
  \font\tenex=cmex10 scaled#1
  \font\tenbf=csbx10 scaled#1
  \font\tenit=csbxti10 scaled#1
  \font\tenbf=csbx10 scaled#1
  \font\sevenrm=csbx7 scaled#1
  \font\seveni=cmmi7 scaled#1
  \font\sevensy=cmsy7 scaled#1
  \font\sevenbf=csbx7 scaled#1
  \font\sf=csssbx10 scaled#1
  \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
  \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei
  \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
  \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
  \scriptscriptfont\bffam=\fivebf
  \baselineskip=12pt \divide\baselineskip by1000 \multiply\baselineskip by#1
  \count255=#1
  \ifnum \count255=1000
    \rm \let\strut=\oristrut
  \else
    \sf \def\strut{\vrule height17pt depth7pt width0pt}
  \fi}

% Tisk jedne pisemky
\def\p #1 -- #2;{\cisloulohy=0 \nopagenumbers
  \vglue .5in
  \noindent Zkou�ka z �vodu do algebry, #1 \par
  #2 \vfil\break
  \ifstitky
    \setbox0=\vbox to.45\vsize{\hsize=.5\hsize
    \noindent Zkou�ka z �vodu do algebry, #1 \par \bigskip
    \cisloulohy=0
    \emergencystretch=4em
    \def\VY{\ifmmode .$$\fi \par \skipZA}
    #2 \vfil}
    \moveleft.3in\hbox{\copy0\kern2cm\copy0}
    \vskip.07\vsize \vskip0.75cm
    \moveleft.3in\hbox{\copy0\kern2cm\box0}
    \vfil\break
  \else
    {\noindent Zkou�ka z �vodu do algebry, #1 \par \vskip1cm \null
    \scalefonts \magstep4 \cisloulohy=0
    \emergencystretch=4em
    \def\VY{\ifmmode .$$\fi \par \skipZA}
    #2 \vfil\break }
  \fi
  }
\def\u#1 #2 {\global\unum=0 \def\databasename{#2}
  \def\ZA{\par\global\advance\unum by1
     \ifnum\unum=#1 \expandafter \tiskZA \else \expandafter \skipZA \fi}
  \input u#2 }

\def\skipZA #1\par{}
\def\tiskZA{\par\removelastskip\bigskip \global\advance\cisloulohy by1
   \noindent\llap{\hfil\bf\the\cisloulohy.\ }%
   \ifx\VY\oriVY (\databasename, �. \the\unum)\quad\fi
   \def\ZA ##1\par{\par\endinput}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% N�vod k pou�it� maker a datab�z� k p�semk�m z �vodu do Algebry.
% ===============================================================
% Petr Ol��k                                          19. 1. 1997
%
% Pokud okomentujete v�e, co n�sleduje a� po prvn� \end, bude \TeX ��st
% v�echny datab�ze a souhrnn� vytiskne v�echny �lohy z datab�z� v�etn� �e�en�
% a v�etn� ��sel (viz z�v�re�n� ��st souboru s p��kazy \database. Za datab�zi
% pova�ujeme soubor s p��ponou .ol nebo .te (nebo dal�� -- podle autora
% datab�ze), kter� dodr�uje stanoven� pravidla:
%
% - Soubor za��n� p�smenem u, kter� ve jm�nu datab�ze neuv�d�me.
% - P��klady jsou odd�leny pr�zdn�m ��dkem a pr�zdn� ��dek ani \par
%   neexistuje uvnit� cel�ho p��kladu v�etn� �e�en�.
% - P��klad je uvozen pomoc� \ZA a �e�en� p��kladu pomoc� \VY.
% - \VY m��e b�t uvedeno i uvnit� display m�du. Pak �e�en� navazuje
%   na zad�n� uvnit� jedin� rovnice.
% - Matice pi�te nap��klad jako \matice {ccr|r}{a&b&c&r_1\\ d&e&f&r_2}.
% - Ka�d� zat�m nepou�it� LaTeXov� obrat (nap��klad \begin{n�co})
%   se bude muset zde do t�chto maker doprogramovat, proto�e jsou psan�
%   v plainu.
%
% Po vyti�t�n� v�ech �loh ze v�ech datab�z� si pozna�te vybran� �lohy pro
% dan� term�n a pi�te:
%
% \p <datum> --
% \u<�1> <dat1> \u<�2> <dat2> \u<�3> <dat3> \u<�4> <dat4> \u<�5> <dat5> ;
%
% (na z�v�re�n� st�ed�k nezapome�te). T�m je �e�eno, �e na zkou�ku o term�nu
% <datum> jste vybrali jako prvn� �lohu ��slo �1 z datab�ze dat1, druh� �loha
% je br�na jako ��slo �2 v datab�zi <dat2> atd.
%
% TeX vytiskne ka�dou p�semku \p automaticky na dv� str�nky ve dvou
% variant�ch. Na prvn� str�nce jsou drobn�ji vyti�t�ny vybran� �lohy v�etn�
% �e�en� a na druh� str�nce je tot�, ale bez �e�en� a ve velikosti vhodn�
% pro zp�tn� projektor.
% 
% P�i zapnutem makru \stitky se varianta bez �e�en� vytiskne na stran�
% A4 �ty�ikr�t drobn�, abyste to mohli rozst��hat a rozdat student�m.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% P�i �innosti t�to ��sti souboru tiskneme p�semky s vybran�mi �lohami:

\mathcode`[=\mathcode`(  % preferuji kulat� z�vorky pro vektory z R^n
\mathcode`]=\mathcode`)  

%\raggedright

\p 20. 2. 2003 --
\u4 matice.ol \u2 soulin.te \u19 linpro.te \u35 teorie.ol \u8 teorie.kr ;
\p 19. 2. 2003 --
\u10 linpro.te \u1 soulin.te \u56 geoanal.te \u2 teorie.ol \u21 teorie.ol ;
\p 17. 2. 2003 --
\u1 matice.ol \u3 soulin.ne \u1 geoanal.te \u32 teorie.ol \u3 teorie.kr ;
\p 10. 2. 2003 --
\u14 matice.ol \u3 linpro.te \u13 geoanal.te \u7 teorie.te \u28 teorie.ol ;
\p 6. 2. 2003 --
\u1 matice.te \u7 linpro.te \u38 geoanal.te \u50 teorie.ol \u52 teorie.ol ;
\p 5. 2. 2003 --
\u9 linpro.te \u14 linpro.te \u29 geoanal.te \u11 teorie.te \u23 teorie.ol ;
\p 3. 2. 2003 --
\u3 matice.te \u18 soulin.ol \u26 linpro.te \u1 teorie.kr \u17 teorie.ol ;
\p 30. 1. 2003 --
\u3 matice.ol \u3 linpro.te \u6 geoanal.te \u2 teorie.te \u12 teorie.te ;
\p 29. 1. 2003 --
\u5 matice.te \u6 soulin.ol \u59 geoanal.te \u12 teorie.ol \u48 teorie.ol ;


\end

%% P�i �innosti t�to ��sti souboru se tisknou v�echny �lohy najednou:

\database fcerac.ol
\database fcerac.te

\database matice.ol
\database matice.te
\database matice.kr

\database soulin.ol
\database soulin.te
\database soulin.kr
\database soulin.ne

\database linpro.te
\database linpro.kr

\database geoanal.te
\database geoanal.kr

\database teorie.te
\database teorie.kr
\database teorie.ol

\end

