% Makra pro sazbu skripticek o grafovych algoritmech
\input mjmac.tex
-\input epsf.tex
\input btxmac.tex
+\input amssym.tex
\language=\czech
\chyph
+\lefthyphenmin=2
+\righthyphenmin=2
% A4 s 0.5in okraji
-\hsize=184.6mm
-\vsize=271.6mm
-
-\parindent=0.25in
+%\hsize=184.6mm
+%\vsize=271.6mm
+%\parindent=0.25in
+
+% A5 s 1cm okraji, dolni rozsiren o 10pt, aby se tam veslo cislo stranky
+\pdfpagewidth=148mm
+\pdfpageheight=210mm
+\pdfvorigin=10mm
+\pdfhorigin=10mm
+\hsize=128mm
+\vsize=190mm
+\advance\vsize by -10pt
+\parindent=0.8cm
% Zacatek prednasky {cislo prednasky}{jmeno prednasky}{jmeno zapisovatele}
\def\prednaska#1#2#3{%
+\prechapter{#1}{#2}
+\vbox{%
\line{{\Large\bf #1. #2} \hfil {\it #3}}
-\medskip
-\hrule
+\vskip 4pt
+\hrule}
\medskip
}
+\def\prechapter#1#2{}
% 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:} }
+
% Ctverecek na konci dukazu
%\def\qed{{\parfillskip=0pt\quad\hfil\hbox{\I QED} \par}}
-\def\qed{\hfill\allowbreak\hfill\nobreak $\heartsuit$\par}
+\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
\begingroup
\let\:=\algoitem
\let\*=\algohang
-\parskip=1pt plus 1pt minus 0.3pt
+\parskip=1pt plus 0.2pt minus 0.3pt
\rightskip=2em
\itemcount=0
}
\def\algohang:{\advance\hangindent by 2em \hskip 2em\futurelet\next\algoitemh}
% Nekolikapismenkova promenna (mozno pouzit v textovem i math modu)
-\def\<#1>{\hbox{\it #1\/}}
+\def\<#1>{\leavevmode\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}
-\def\fig#1#2{\medskip\centerline{\epsfxsize=#2\epsfbox{#1}}\medskip}
+% Vlozeni obrazku {obrazek}{popisek}{width sirka}
+\def\putepdf#1#2{\hbox{\pdfximage #1{#2}\pdfrefximage\pdflastximage}}
+\def\figure#1#2#3{\bigskip\vbox{\centerline{\putepdf{#3}{#1}}\smallskip\centerline{#2}}\bigskip}
+
+% Varianta bez popisku
+\def\fig#1#2{\medskip\centerline{\putepdf{#2}{#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
+\putepdf{#3}{#1}&\putepdf{#6}{#4}\cr
+\noalign{\smallskip}
+#2\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{\putepdf{#2}{#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}\vss}
+\nointerlineskip
+}
% Todo
\def\todo#1{{\bf TODO: \it #1}}
% Blackboard bold font
\newfam\bbfam
-\font\bbten=bbold10
+\font\bbten=bbm10
\textfont\bbfam=\bbten
\def\bb{\bbten\fam\bbfam}
% Reference na konci kapitoly
\bibliographystyle{abbrv}
-\def\references{
-\h{Literatura}
+\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}}
+
+% Ujisti se, ze na strance je dostatek mista, pripadne zacne novou stranku
+\def\checkroom#1{\vskip 0pt plus #1\goodbreak\vskip 0pt plus -#1}
+
+% Hacky pro finalni sazbu
+\def\separatefix#1{#1}
+\def\finalfix#1{}
+
+% Cislovani verzi
+\def\currentversion{%
+\the\year
+-\ifnum\month<10\relax 0\fi\the\month
+-\ifnum\day<10\relax 0\fi\the\day
+}
+
+\footline={\hfil {\tenrm\the\count0}\hfil \llap{\sevenrm\currentversion}}