]> mj.ucw.cz Git - diplomky.git/blobdiff - macros.tex
Custom captions
[diplomky.git] / macros.tex
index fcf179a911614bf9b0b8488293f5711d79331f9c..64bfb4a7f25f384c56472d833dcc5103e75bdb42 100644 (file)
@@ -1,6 +1,45 @@
 %%% Tento soubor obsahuje definice různých užitečných maker a prostředí %%%
 %%% Další makra připisujte sem, ať nepřekáží v ostatních souborech.     %%%
 
+%%% Přepínače podle typu práce
+
+\def\TypeBc{bc}
+\def\TypeMgr{mgr}
+\def\TypePhD{phd}
+\def\TypeRig{rig}
+
+\ifx\ThesisType\TypeBc
+\def\ThesisTypeName{bakalářská}
+\def\ThesisTypeGenitive{bakalářské}
+\def\ThesisTypeAccusative{bakalářskou}
+\def\ThesisTypeTitle{BAKALÁŘSKÁ PRÁCE}
+\fi
+
+\ifx\ThesisType\TypeMgr
+\def\ThesisTypeName{diplomová}
+\def\ThesisTypeGenitive{diplomové}
+\def\ThesisTypeAccusative{diplomovou}
+\def\ThesisTypeTitle{DIPLOMOVÁ PRÁCE}
+\fi
+
+\ifx\ThesisType\TypePhD
+\def\ThesisTypeName{disertační}
+\def\ThesisTypeGenitive{disertační}
+\def\ThesisTypeAccusative{disertační}
+\def\ThesisTypeTitle{DISERTAČNÍ PRÁCE}
+\fi
+
+\ifx\ThesisType\TypeRig
+\def\ThesisTypeName{rigorozní}
+\def\ThesisTypeGenitive{rigorozní}
+\def\ThesisTypeAccusative{rigorozní}
+\def\ThesisTypeTitle{RIGOROZNÍ PRÁCE}
+\fi
+
+\ifx\ThesisTypeName\undefined
+\PackageError{thesis}{Neznámý typ práce.}{Zkontrolujte prosím definici makra ThesisType v souboru metadata.tex.}
+\fi
+
 %%% Drobné úpravy stylu
 
 % Tato makra přesvědčují mírně ošklivým trikem LaTeX, aby hlavičky kapitol
@@ -40,8 +79,6 @@
 \newtheorem{veta}{Věta}
 \newtheorem{lemma}[veta]{Lemma}
 \newtheorem{tvrz}[veta]{Tvrzení}
-
-\theoremstyle{plain}
 \newtheorem{definice}{Definice}
 
 \theoremstyle{remark}
 \rightline{$\qedsymbol$}
 }
 
+%%% Styl popisek obrázků
+
+\ifcsname DeclareCaptionStyle\endcsname
+\DeclareCaptionStyle{thesis}{style=base,font=small,labelfont=bf,labelsep=quad}
+\captionsetup{style=thesis}
+\captionsetup[algorithm]{style=thesis,singlelinecheck=off}
+\captionsetup[listing]{style=thesis,singlelinecheck=off}
+\fi
+
 %%% Prostředí pro sazbu kódu, případně vstupu/výstupu počítačových
 %%% programů. (Vyžaduje balíček fancyvrb -- fancy verbatim.)
 
 %%% Příkaz pro transpozici vektoru/matice
 \newcommand{\T}[1]{#1^\top}
 
+%%% Asymptotické "O"
+\def\O{\mathcal{O}}
+
 %%% Vychytávky pro matematiku
 \newcommand{\goto}{\rightarrow}
 \newcommand{\gotop}{\stackrel{P}{\longrightarrow}}
 %%% Vychytávky pro tabulky
 \newcommand{\pulrad}[1]{\raisebox{1.5ex}[0pt]{#1}}
 \newcommand{\mc}[1]{\multicolumn{1}{c}{#1}}
+
+%%% Zvýraznění údajů, které je potřeba doplnit: před odevzdáním práce odstraňte :)
+\newcommand{\xxx}[1]{\textcolor{red!}{#1}}