X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=macros.tex;h=64bfb4a7f25f384c56472d833dcc5103e75bdb42;hb=2ca40e8da3b05cbe8db7c582cfac326650d18890;hp=d1ecf27e1deeb33c98af09672bad56a4f58a7628;hpb=1c63795413f64b8b0f880a6f09c202424907eccb;p=diplomky.git diff --git a/macros.tex b/macros.tex index d1ecf27..64bfb4a 100644 --- a/macros.tex +++ b/macros.tex @@ -1,7 +1,7 @@ -%%% This file contains definitions of various useful macros and environments %%% -%%% Please add more macros here instead of cluttering other files with them. %%% +%%% 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. %%% -%%% Switches based on thesis type +%%% Přepínače podle typu práce \def\TypeBc{bc} \def\TypeMgr{mgr} @@ -9,44 +9,41 @@ \def\TypeRig{rig} \ifx\ThesisType\TypeBc -\def\ThesisTypeName{bachelor} -\def\ThesisTypeTitle{BACHELOR THESIS} +\def\ThesisTypeName{bakalářská} +\def\ThesisTypeGenitive{bakalářské} +\def\ThesisTypeAccusative{bakalářskou} +\def\ThesisTypeTitle{BAKALÁŘSKÁ PRÁCE} \fi \ifx\ThesisType\TypeMgr -\def\ThesisTypeName{master} -\def\ThesisTypeTitle{MASTER THESIS} +\def\ThesisTypeName{diplomová} +\def\ThesisTypeGenitive{diplomové} +\def\ThesisTypeAccusative{diplomovou} +\def\ThesisTypeTitle{DIPLOMOVÁ PRÁCE} \fi \ifx\ThesisType\TypePhD -\def\ThesisTypeName{doctoral} -\def\ThesisTypeTitle{DOCTORAL THESIS} +\def\ThesisTypeName{disertační} +\def\ThesisTypeGenitive{disertační} +\def\ThesisTypeAccusative{disertační} +\def\ThesisTypeTitle{DISERTAČNÍ PRÁCE} \fi \ifx\ThesisType\TypeRig -\def\ThesisTypeName{rigorosum} -\def\ThesisTypeTitle{RIGOROSUM THESIS} +\def\ThesisTypeName{rigorozní} +\def\ThesisTypeGenitive{rigorozní} +\def\ThesisTypeAccusative{rigorozní} +\def\ThesisTypeTitle{RIGOROZNÍ PRÁCE} \fi \ifx\ThesisTypeName\undefined -\PackageError{thesis}{Unknown thesis type.}{Please check the definition of ThesisType in metadata.tex.} +\PackageError{thesis}{Neznámý typ práce.}{Zkontrolujte prosím definici makra ThesisType v souboru metadata.tex.} \fi -%%% Switches based on study program language +%%% Drobné úpravy stylu -\def\LangCS{cs} -\def\LangEN{en} - -\ifx\StudyLanguage\LangCS -\else\ifx\StudyLanguage\LangEn -\else\PackageError{thesis}{Unknown study language.}{Please check the definition of StudyLanguage in metadata.tex.} -\fi\fi - -%%% Minor tweaks of style - -% These macros employ a little dirty trick to convince LaTeX to typeset -% chapter headings sanely, without lots of empty space above them. -% Feel free to ignore. +% Tato makra přesvědčují mírně ošklivým trikem LaTeX, aby hlavičky kapitol +% sázel příčetněji a nevynechával nad nimi spoustu místa. Směle ignorujte. \makeatletter \def\@makechapterhead#1{ {\parindent \z@ \raggedright \normalfont @@ -62,60 +59,74 @@ }} \makeatother -% This macro defines a chapter, which is not numbered, but is included -% in the table of contents. +% Toto makro definuje kapitolu, která není očíslovaná, ale je uvedena v obsahu. \def\chapwithtoc#1{ \chapter*{#1} \addcontentsline{toc}{chapter}{#1} } -% Draw black "slugs" whenever a line overflows, so that we can spot it easily. -\overfullrule=1mm +% Trochu volnější nastavení dělení slov, než je default. +\lefthyphenmin=2 +\righthyphenmin=2 -%%% Macros for definitions, theorems, claims, examples, ... (requires amsthm package) +% Zapne černé "slimáky" na koncích řádků, které přetekly, abychom si +% jich lépe všimli. +\overfullrule=1mm -\theoremstyle{plain} -\newtheorem{thm}{Theorem} -\newtheorem{lemma}[thm]{Lemma} -\newtheorem{claim}[thm]{Claim} +%%% Makra pro definice, věty, tvrzení, příklady, ... (vyžaduje baliček amsthm) \theoremstyle{plain} -\newtheorem{defn}{Definition} +\newtheorem{veta}{Věta} +\newtheorem{lemma}[veta]{Lemma} +\newtheorem{tvrz}[veta]{Tvrzení} +\newtheorem{definice}{Definice} \theoremstyle{remark} -\newtheorem*{cor}{Corollary} -\newtheorem*{rem}{Remark} -\newtheorem*{example}{Example} +\newtheorem*{dusl}{Důsledek} +\newtheorem*{pozn}{Poznámka} +\newtheorem*{prikl}{Příklad} -%%% An environment for proofs +%%% Prostředí pro důkazy -\newenvironment{myproof}{ +\newenvironment{dukaz}{ \par\medskip\noindent - \textit{Proof}. + \textit{Důkaz}. }{ \newline \rightline{$\qedsymbol$} } -%%% An environment for typesetting of program code and input/output -%%% of programs. (Requires the fancyvrb package -- fancy verbatim.) +%%% 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.) \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small, frame=single} -%%% The field of all real and natural numbers +%%% Prostor reálných, resp. přirozených čísel \newcommand{\R}{\mathbb{R}} \newcommand{\N}{\mathbb{N}} -%%% Useful operators for statistics and probability +%%% Užitečné operátory pro statistiku a pravděpodobnost \DeclareMathOperator{\pr}{\textsf{P}} \DeclareMathOperator{\E}{\textsf{E}\,} \DeclareMathOperator{\var}{\textrm{var}} \DeclareMathOperator{\sd}{\textrm{sd}} -%%% Transposition of a vector/matrix +%%% Příkaz pro transpozici vektoru/matice \newcommand{\T}[1]{#1^\top} -%%% Various math goodies +%%% Asymptotické "O" +\def\O{\mathcal{O}} + +%%% Vychytávky pro matematiku \newcommand{\goto}{\rightarrow} \newcommand{\gotop}{\stackrel{P}{\longrightarrow}} \newcommand{\maon}[1]{o(n^{#1})} @@ -123,9 +134,9 @@ \newcommand{\dint}{\int_0^\tau\!\!\int_0^\tau} \newcommand{\isqr}[1]{\frac{1}{\sqrt{#1}}} -%%% Various table goodies +%%% Vychytávky pro tabulky \newcommand{\pulrad}[1]{\raisebox{1.5ex}[0pt]{#1}} \newcommand{\mc}[1]{\multicolumn{1}{c}{#1}} -%%% TODO items: remove before submitting :) +%%% Zvýraznění údajů, které je potřeba doplnit: před odevzdáním práce odstraňte :) \newcommand{\xxx}[1]{\textcolor{red!}{#1}}