X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=macros.tex;h=6d82c71349865351db12976bf5ea57b645edfb74;hb=88a6305940fd7137d6738d5b3a38b142db89f1d3;hp=249b2d2a84cdc0fa2ddb8e8ce7808e9838fdfb1c;hpb=93742c924c21d090b5e169fac21145237c8adca7;p=diplomky.git diff --git a/macros.tex b/macros.tex index 249b2d2..6d82c71 100644 --- a/macros.tex +++ b/macros.tex @@ -79,8 +79,6 @@ \newtheorem{veta}{Věta} \newtheorem{lemma}[veta]{Lemma} \newtheorem{tvrz}[veta]{Tvrzení} - -\theoremstyle{plain} \newtheorem{definice}{Definice} \theoremstyle{remark} @@ -98,11 +96,40 @@ \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.) +%%% programů. \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small, frame=single} +% Nastavení pro lstlisting -- výpisy programů se zvýrazňováním syntaxe +\ifcsname lstset\endcsname +\lstset{ + language=C++, + tabsize=2, + showstringspaces=false, + basicstyle=\footnotesize\tt\color{black!75}, + identifierstyle=\bfseries\color{black}, + commentstyle=\color{green!50!black}, + stringstyle=\color{red!50!black}, + keywordstyle=\color{blue!75!black}} +\fi + +% Plovoucí výpisy kódu, používá se stejně jako figure +\ifcsname DeclareNewFloatType\endcsname +\DeclareNewFloatType{listing}{} +\floatsetup[listing]{style=ruled} +\floatname{listing}{Výpis kódu} +\fi + %%% Prostor reálných, resp. přirozených čísel \newcommand{\R}{\mathbb{R}} \newcommand{\N}{\mathbb{N}} @@ -116,6 +143,9 @@ %%% 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}}