% Makra pro sazbu zapisku z prednasky

\input mjmac.tex
\input epsf.tex
%%\input btxmac.tex

\language=\czech
\chyph
\lefthyphenmin=2
\righthyphenmin=2

% A4 s 0.5in okraji
%\hsize=184.6mm
%\vsize=271.6mm
%\parindent=0.25in

% A5 s 1cm okraji, dolni rozsiren o 10pt, aby se tam veslo cislo stranky
\hsize=128mm
\vsize=190mm
\advance\vsize by -10pt
\parindent=0.8cm

% Zacatek prednasky {cislo prednasky}{jmeno prednasky}{jmeno zapisovatele}
\def\prednaska#1#2#3{%
\line{{\Large\bf #1. #2} \hfil {\it #3}}
\vskip 4pt
\hrule
\medskip
}

% Nadpis {text}
\def\h#1{\medbreak\leftline{\bf #1}\nobreak\smallskip\nobreak}

% Zvyrazneny zacatek odstavce coby podnadpis (napr. vety apod.)
\def\s#1{\noindent {\bo #1}}

% A kdyz stoji samostatne (aby se naodlamoval)
\def\ss#1{\noindent {\bo #1}\par\nobreak}

% Dùkaz
\def\proof{\noindent {\sl Dùkaz:} }

% Srdicko na konci dukazu
\def\qed{{\parfillskip=0pt\allowbreak\hfill\nobreak $\heartsuit$\par}}

% pokud je v seznamu:
\def\qeditem{{\parfillskip=0pt\hfill\rlap{\hskip\rightskip\llap{$\heartsuit$}}\par}}

% Poznamky pod carou
\newcount\footcnt
\footcnt=0
\def\foot#1{\global\advance\footcnt by 1{\parindent=0.25in\parskip=0pt\footnote{$^{\left<\the\footcnt\right>}$}{#1}}}

% \noindent se casto hodi, tak na nej mame zkratku
\let\>=\noindent

% Sazba algoritmu:
%	\algo
%	\algin popis vstupu
%	\:krok
%	\:krok
%	\::vnoreny krok
%	\algout pop
%	\endalgo

\def\algo{
\interlistskip
\begingroup
\let\:=\algoitem
\parskip=1pt plus 1pt minus 0.3pt
\rightskip=2em
\itemcount=0
}
\def\endalgo{\interlistskip\endgroup}
\def\algopar{\par
\parindent=2em
\hangindent=4em
\hangafter=1
\leavevmode
}
\def\algoitem{\algopar\advance\itemcount by 1
\hbox to 2em{\hss \the\itemcount. }%
\futurelet\next\algoitemh}
\def\algoitemh{\ifx\next:\let\next=\algohang\else\let\next=\relax\fi\next}
\def\algohang:{\advance\hangindent by 2em \hskip 2em\futurelet\next\algoitemh}
\def\algin{\:{\I Vstup:} }
\def\algout{\:{\I Výstup:} }

% Nekolikapismenkova promenna (mozno pouzit v textovem i math modu)
\def\<#1>{\hbox{\it #1\/}}

% Asymptoticke O-cko
\def\O{{\cal O}}

% Vlozeni obrazku {obrazek}{popisek}{sirka}
\def\figure#1#2#3{\bigskip\vbox{\centerline{\epsfxsize=#3\epsfbox{#1}}\smallskip\centerline{#2}}\bigskip}

% Varianta bez popisku
\def\fig#1#2{\medskip\centerline{\epsfxsize=#2\epsfbox{#1}}\medskip}

% Dva obrazky vedle sebe s popiskami
\def\twofigures#1#2#3#4#5#6{\bigskip\centerline{\vbox{\halign{\hfil##\hfil\hskip 4em&\hfil##\hfil\cr
\epsfxsize=#3\epsfbox{#1}&\epsfxsize=#6\epsfbox{#4}\cr
\noalign{\smallskip}
#2&#5\cr}}}\bigskip}

% Obrazek vlozeny do praveho okraje odstavce {obrazek}{sirka}
% Pouzit na zacatku odstavce a nejlepe celou konstrukci zavrit do vboxu, aby se nerozlomila
\def\inlinefig#1#2{
\setbox0=\hbox{\epsfxsize=#2\epsfbox{#1}}
\hangindent=-\wd0
\advance\hangindent by -3em
\dimen0=\ht0
\advance\dimen0 by 8ex
\advance\dimen0 by \normalbaselineskip
\count0=\dimen0
\divide\count0 by \normalbaselineskip
\hangafter=-\count0
\dimen0=\normalbaselineskip
\multiply\dimen0 by \count0
\vbox to 0pt{}
\nointerlineskip
\vbox to 0pt{\vbox to \dimen0{\vss\rightline{\box0\hskip 1em}\vss}}
\nointerlineskip
}

% Todo
\def\todo#1{{\bf TODO: \it #1}}

% Blackboard bold font
\newfam\bbfam
\font\bbten=bbold10
\font\bbseven=bbold7
\font\bbfive=bbold5
\textfont\bbfam=\bbten
\scriptfont\bbfam=\bbseven
\scriptscriptfont\bbfam=\bbfive
\def\bb{\bbten\fam\bbfam}

% Reference na konci kapitoly
%\bibliographystyle{abbrv}
%\def\references{\h{Literatura}\dumprefs}
%\def\dumprefs{
%\def\bblhook{\parskip=2pt plus 1pt minus 0.5pt}
%\bibliography{../ga}
%}

% Predefinujeme odsazovani odrazek z mjmacu
\def\itemspacingrules{\ifitem\advance\leftskip by \parindent\parindent=0pt\itemfalse\else
\advance\leftskip by 2.5em\fi\rightskip=\leftskip}

% Matematicke symboly
\def\symdiff{\mathop{\Delta}}
