X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=macros.tex;h=a4c7bb629429ed5d7b2925a4e73f9f2b89367ab9;hb=0a465f6178b771ea49824330fb7ee440dcc67a93;hp=a3971e051c9e9439a577f1a8221b167f290c0719;hpb=777673b64cc6029c6b0bf8a3bce1b61695201b62;p=diplomky.git diff --git a/macros.tex b/macros.tex index a3971e0..a4c7bb6 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} @@ -88,21 +86,43 @@ \newtheorem*{pozn}{Poznámka} \newtheorem*{prikl}{Příklad} -%%% Prostředí pro důkazy +% Alias pro prostředí proof s českým názvem +\newenvironment{dukaz}{\begin{proof}}{\end{proof}} -\newenvironment{dukaz}{ - \par\medskip\noindent - \textit{Důkaz}. -}{ -\newline -\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 +136,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}} @@ -130,12 +153,3 @@ %%% Zvýraznění údajů, které je potřeba doplnit: před odevzdáním práce odstraňte :) \newcommand{\xxx}[1]{\textcolor{red!}{#1}} - -%% SPECIMEN -% Takto označená část slouží pro tvorbu vzorového PDF vystaveného na webu. -% Během generování oficiální šablony skriptem ../mkdist se automaticky smaže, -% stejně jako všechna volání maker \X a \XXX. -\def\X#1{\textcolor{red}{[#1]}} -\def\XXX#1{\par\smallskip\noindent \textcolor{red}{[#1]}} -\def\XOverlap#1{\dimen0=\prevdepth\nointerlineskip{\vbox to 0pt{\XXX{#1}\vss}}\prevdepth=\dimen0} -%% NEMICEPS