]> mj.ucw.cz Git - ga.git/blob - sgr.tex
3347f16a301071d8857de3025374deef428f2e4d
[ga.git] / sgr.tex
1 % Makra pro sazbu skripticek o grafovych algoritmech
2
3 \input mjmac.tex
4 \input epsf.tex
5 \input btxmac.tex
6
7 \language=\czech
8 \chyph
9 \lefthyphenmin=2
10 \righthyphenmin=2
11
12 % A4 s 0.5in okraji
13 %\hsize=184.6mm
14 %\vsize=271.6mm
15 %\parindent=0.25in
16
17 % A5 s 1cm okraji, dolni rozsiren o 10pt, aby se tam veslo cislo stranky
18 \hsize=128mm
19 \vsize=190mm
20 \advance\vsize by -10pt
21 \parindent=0.8cm
22
23 % Zacatek prednasky {cislo prednasky}{jmeno prednasky}{jmeno zapisovatele}
24 \def\prednaska#1#2#3{%
25 \line{{\Large\bf #1. #2} \hfil {\it #3}}
26 \medskip
27 \hrule
28 \medskip
29 }
30
31 % Nadpis {text}
32 \def\h#1{\medbreak\leftline{\bf #1}\nobreak\smallskip\nobreak}
33
34 % Zvyrazneny zacatek odstavce coby podnadpis (napr. vety apod.)
35 \def\s#1{\noindent {\bo #1}}
36
37 % A kdyz stoji samostatne (aby se naodlamoval)
38 \def\ss#1{\noindent {\bo #1}\par\nobreak}
39
40 % Dùkaz
41 \def\proof{\noindent {\sl Dùkaz:} }
42
43 % Ctverecek na konci dukazu
44 %\def\qed{{\parfillskip=0pt\quad\hfil\hbox{\I QED} \par}}
45 \def\qed{{\parfillskip=0pt\allowbreak\hfill\nobreak $\heartsuit$\par}}
46
47 % pokud je v seznamu:
48 \def\qeditem{{\parfillskip=0pt\hfill\rlap{\hskip\rightskip\llap{$\heartsuit$}}\par}}
49
50 % Poznamky pod carou
51 \newcount\footcnt
52 \footcnt=0
53 \def\foot#1{\global\advance\footcnt by 1{\parindent=0.25in\parskip=0pt\footnote{$^{\left<\the\footcnt\right>}$}{#1}}}
54
55 % \noindent se casto hodi, tak na nej mame zkratku
56 \let\>=\noindent
57
58 % Sazba algoritmu:
59 %       \algo
60 %       \:krok
61 %       \:krok
62 %       \::vnoreny krok
63 %       \endalgo
64
65 \def\algo{
66 \interlistskip
67 \begingroup
68 \let\:=\algoitem
69 \let\*=\algohang
70 \parskip=1pt plus 1pt minus 0.3pt
71 \rightskip=2em
72 \itemcount=0
73 }
74 \def\endalgo{\interlistskip\endgroup}
75 \def\algoitem{\par
76 \parindent=2em
77 \hangindent=4em
78 \hangafter=1
79 \advance\itemcount by 1
80 \leavevmode\hbox to 2em{\hss \the\itemcount. }%
81 \futurelet\next\algoitemh}
82 \def\algoitemh{\ifx\next:\let\next=\algohang\else\let\next=\relax\fi\next}
83 \def\algohang:{\advance\hangindent by 2em \hskip 2em\futurelet\next\algoitemh}
84
85 % Nekolikapismenkova promenna (mozno pouzit v textovem i math modu)
86 \def\<#1>{\hbox{\it #1\/}}
87
88 % Asymptoticke O-cko
89 \def\O{{\cal O}}
90
91 % Vlozeni obrazku {obrazek}{popisek}{sirka}
92 \def\figure#1#2#3{\bigskip\vbox{\centerline{\epsfxsize=#3\epsfbox{#1}}\smallskip\centerline{#2}}\bigskip}
93
94 % Varianta bez popisku
95 \def\fig#1#2{\medskip\centerline{\epsfxsize=#2\epsfbox{#1}}\medskip}
96
97 % Dva obrazky vedle sebe s popiskami
98 \def\twofigures#1#2#3#4#5#6{\bigskip\centerline{\vbox{\halign{\hfil##\hfil\hskip 4em&\hfil##\hfil\cr
99 \epsfxsize=#3\epsfbox{#1}&\epsfxsize=#6\epsfbox{#4}\cr
100 \noalign{\smallskip}
101 #2&#5\cr}}}\bigskip}
102
103 % Todo
104 \def\todo#1{{\bf TODO: \it #1}}
105
106 % Blackboard bold font
107 \newfam\bbfam
108 \font\bbten=bbold10
109 \textfont\bbfam=\bbten
110 \def\bb{\bbten\fam\bbfam}
111
112 % Reference na konci kapitoly
113 \bibliographystyle{abbrv}
114 \def\references{\h{Literatura}\dumprefs}
115 \def\dumprefs{
116 \def\bblhook{\parskip=2pt plus 1pt minus 0.5pt}
117 \bibliography{../ga}
118 }
119
120 % Predefinujeme odsazovani odrazek z mjmacu
121 \def\itemspacingrules{\ifitem\advance\leftskip by \parindent\parindent=0pt\itemfalse\else
122 \advance\leftskip by 2.5em\fi\rightskip=\leftskip}