1 % Makra pro sazbu zapisku z prednasky
14 % A5 s 1cm okraji, dolni rozsiren o 10pt, aby se tam veslo cislo stranky
16 \advance\bottommargin by 10pt
20 % Zacatek prednasky {cislo prednasky}{jmeno prednasky}{jmeno zapisovatele}
21 \def\prednaska#1#2#3{%
22 \line{{\setfonts[/14]\bf #1. #2} \hfil {\it #3}}
29 \def\h#1{\medbreak\leftline{\bf #1}\nobreak\smallskip\nobreak}
31 % Zvyrazneny zacatek odstavce coby podnadpis (napr. vety apod.)
32 \def\s#1{\smallskip\noindent {\bo #1}}
34 % A kdyz stoji samostatne (aby se naodlamoval)
35 \def\ss#1{\smallskip\noindent {\bo #1}\par\nobreak}
38 \def\proof{\nobreak\noindent {\sl Dùkaz:} }
40 % Srdicko na konci dukazu
41 \def\qed{{\parfillskip=0pt\allowbreak\hfill\nobreak $\heartsuit$\par}}
43 % ... pokud je v seznamu:
44 \def\qeditem{{\parfillskip=0pt\hfill\rlap{\hskip\rightskip\llap{$\heartsuit$}}\par}}
52 \def\foot#1{\global\advance\footcnt by 1{\parindent=0.25in\parskip=0pt\footnote{$^{\left<\the\footcnt\right>}$}{#1}}}
54 % \noindent se casto hodi, tak na nej mame zkratku
57 %%% Sazba algoritmu %%%
59 % \algon{jmeno algoritmu}
64 % \algout popis vystupu
71 \parskip=1pt plus 1pt minus 0.3pt
76 \def\algo#1{\typedalgo{Algoritmus}{#1}}
77 \def\proc#1{\typedalgo{Procedura}{#1}}
78 \def\endalgo{\vskip\postitemizeskip\endgroup}
87 \ifnum\itemcount=0\smallskip\fi
88 \algopar\advance\itemcount by 1
89 \hbox to 2em{\hss \the\itemcount. }%
90 \futurelet\next\algoitemh}
91 \def\algoitemh{\ifx\next:\let\next=\algohang\else\let\next=\relax\fi\next}
92 \def\algohang:{\advance\hangindent by 2em \hskip 2em\futurelet\next\algoitemh}
93 \def\algin{\par{\it Vstup:\/} }
94 \def\algout{\par\smallskip{\it Výstup:\/} }
96 % Jmeno algoritmu v textu nebo ve formuli
97 \def\alg#1{\hbox{\csc #1}}
99 %%% Konstrukce pouzivane v algoritmech %%%
105 \def\cmt#1{~~{\sl (#1)}}
107 % Nekolikapismenkova promenna (mozno pouzit v textovem i math modu)
108 \def\<#1>{\leavevmode\hbox{\it #1\/}}
113 % Vlozeni obrazku {obrazek}{popisek}{sirka}
114 \def\figure#1#2#3{\bigskip\vbox{\centerline{\epsfxsize=#3\epsfbox{#1}}\smallskip\centerline{#2}}\bigskip}
116 % Varianta bez popisku
117 \def\fig#1#2{\medskip\centerline{\epsfxsize=#2\epsfbox{#1}}\medskip}
119 % Dva obrazky vedle sebe s popiskami
120 \def\twofigures#1#2#3#4#5#6{\bigskip\valign{\vfil##\vfil\cr
121 \halign{\hfil##\hfil\cr
122 \epsfxsize=#3\epsfbox{#1} \cr
127 \halign{\hfil##\hfil\cr
128 \epsfxsize=#6\epsfbox{#4} \cr
134 % Obrazek vlozeny do praveho okraje odstavce {obrazek}{sirka}
135 % Pouzit na zacatku odstavce a nejlepe celou konstrukci zavrit do vboxu, aby se nerozlomila
137 \setbox0=\hbox{\epsfxsize=#2\epsfbox{#1}}
139 \advance\hangindent by -3em
141 \advance\dimen0 by 8ex
142 \advance\dimen0 by \normalbaselineskip
144 \divide\count0 by \normalbaselineskip
146 \dimen0=\normalbaselineskip
147 \multiply\dimen0 by \count0
150 \vbox to 0pt{\vbox to \dimen0{\vss\rightline{\box0\hskip 1em}\vss}}
155 \def\todo#1{{\bf TODO: \it #1}}
157 % Matematicke symboly
158 \def\symdiff{\mathop{\Delta}}
161 \def\cc#1{\hbox{\setfonts[CMSans/]\bf #1}}
165 %%% Cislovani verzi %%%
167 \def\currentversion{%
169 -\ifnum\month<10\relax 0\fi\the\month
170 -\ifnum\day<10\relax 0\fi\the\day
173 \footline={\hfil {\tenrm\the\count0}\hfil \llap{\sevenrm\currentversion}}
179 \def\exercises{\medskip
184 \advance\leftskip by 1.5em
188 \def\endexercises{\endgroup}
190 \long\def\exwith#1#2{\par
191 \advance\excount by 1
192 \>\llap{\hbox to 1.5em{\the\excount\rlap{#1}.\hfil}}%
195 % Cviceni obycejne a tezsi
198 \def\exxx{\exwith{*\kern-0.1em*}}
200 % Napovedy (pise se pod cviceni, sazi se samostatne pomoci \hints)
203 \immediate\openout\hintaux=hints.aux
206 % \par\>\em{Hint:} #1
207 \immediate\write\hintaux{\noexpand\realhint{\the\excount}{\unexpanded{#1}}
210 \def\realhint#1#2{\par
211 \>\llap{\hbox to 1.5em{#1.\hfil}}%
215 \immediate\closeout\hintaux
216 \h{Nápovìdy ke cvièením}
219 \advance\leftskip by 1.5em
226 % Reseni cviceni, pise pod cviceni (a pripadne pod \hint)
227 %\long\def\solution#1{\par
230 %%% Odkazy na kapitoly a jine objekty %%%
232 % Poridime si soubor, do ktereho budeme zapisovat identifikatory
234 \def\writeid#1#2{\immediate\write\ids{\string\def\expandafter\string\csname id#1\endcsname{#2}}}
236 \immediate\openin\ids=ids.aux
241 \immediate\closein\ids
242 \immediate\openout\ids=ids.aux
244 \def\ref#1{\expandafter\ifx\csname id#1\endcsname\relax
246 \immediate\write16{*** Warning: Reference #1 undefined ***}%
248 \csname id#1\endcsname