2020-05-10 10:03:14 +00:00
|
|
|
|
|
|
|
% use this for typesetting a chapter without a number, e.g. intro and outro
|
2023-04-13 19:32:25 +00:00
|
|
|
\def\chapwithtoc#1{\chapter*{#1}\addcontentsline{toc}{chapter}{#1}}
|
2020-05-10 10:03:14 +00:00
|
|
|
|
|
|
|
% If there is a line/figure overflowing into page margin, this will make the
|
|
|
|
% problem evident by drawing a thick black line at the overflowing spot. You
|
|
|
|
% should not disable this.
|
|
|
|
\overfullrule=3mm
|
|
|
|
|
|
|
|
% The maximum stretching of a space. Increasing this makes the text a bit more
|
|
|
|
% sloppy, but may prevent the overflows by moving words to next line.
|
|
|
|
\emergencystretch=1em
|
|
|
|
|
|
|
|
\ifEN
|
|
|
|
\theoremstyle{plain}
|
|
|
|
\newtheorem{thm}{Theorem}
|
|
|
|
\newtheorem{lemma}[thm]{Lemma}
|
|
|
|
\newtheorem{claim}[thm]{Claim}
|
|
|
|
\newtheorem{defn}{Definition}
|
|
|
|
\theoremstyle{remark}
|
|
|
|
\newtheorem*{cor}{Corollary}
|
|
|
|
\else
|
|
|
|
\theoremstyle{plain}
|
|
|
|
\newtheorem{thm}{Věta}
|
|
|
|
\newtheorem{lemma}{Lemma}
|
|
|
|
\newtheorem{claim}{Tvrzení}
|
|
|
|
\newtheorem{defn}{Definice}
|
|
|
|
\theoremstyle{remark}
|
|
|
|
\newtheorem*{cor}{Důsledek}
|
|
|
|
\fi
|
|
|
|
|
|
|
|
\newenvironment{myproof}{
|
|
|
|
\par\medskip\noindent
|
|
|
|
\textit{\ifEN Proof \else Důkaz \fi}.
|
|
|
|
}{
|
|
|
|
\newline
|
|
|
|
\rightline{$\qedsymbol$}
|
|
|
|
}
|
|
|
|
|
|
|
|
% real/natural numbers
|
|
|
|
\newcommand{\R}{\mathbb{R}}
|
|
|
|
\newcommand{\N}{\mathbb{N}}
|
|
|
|
|
|
|
|
% asymptotic complexity
|
|
|
|
\newcommand{\asy}[1]{\mathcal{O}(#1)}
|
|
|
|
|
|
|
|
% listings and default lstlisting config (remove if unused)
|
2020-08-25 14:28:10 +00:00
|
|
|
\DeclareNewFloatType{listing}{}
|
|
|
|
\floatsetup[listing]{style=ruled}
|
|
|
|
|
|
|
|
\DeclareCaptionStyle{thesis}{style=base,font={small,sf},labelfont=bf,labelsep=quad}
|
|
|
|
\captionsetup{style=thesis}
|
|
|
|
\captionsetup[algorithm]{style=thesis,singlelinecheck=off}
|
|
|
|
\captionsetup[listing]{style=thesis,singlelinecheck=off}
|
2021-07-20 09:31:37 +00:00
|
|
|
|
2022-07-19 08:55:01 +00:00
|
|
|
% Customization of algorithmic environment (comment style)
|
|
|
|
\renewcommand{\algorithmiccomment}[1]{\textcolor{black!25}{\dotfill\sffamily\itshape#1}}
|
|
|
|
|
2021-07-20 09:31:37 +00:00
|
|
|
% Uncomment for table captions on top. This is sometimes recommended by the
|
|
|
|
% style guide, and even required for some publication types.
|
|
|
|
%\floatsetup[table]{capposition=top}
|
|
|
|
%
|
|
|
|
% (Opinionated rant:) Captions on top are not "compatible" with the general
|
|
|
|
% guideline that the tables should be formatted to be quickly visually
|
|
|
|
% comprehensible and *beautiful* in general (like figures), and that the table
|
|
|
|
% "head" row (with column names) should alone communicate most of the content
|
|
|
|
% and interpretation of the table. If you just need to show a long boring list
|
|
|
|
% of numbers (because you have to), either put some effort into showing the
|
|
|
|
% data in an attractive figure-table, or move the data to an attachment and
|
|
|
|
% refer to it, so that the boredom does not impact the main text flow.
|
|
|
|
%
|
|
|
|
% You can make the top-captions look much less ugly by aligning the widths of
|
|
|
|
% the caption and the table, with setting `framefit=yes`, as shown below. This
|
|
|
|
% additionally requires some extra markup in your {table} environments; see the
|
|
|
|
% comments in the example table in `ch2.tex` for details.
|
|
|
|
%\floatsetup[table]{capposition=top,framefit=yes}
|
2020-08-25 14:28:10 +00:00
|
|
|
|
2020-05-10 10:03:14 +00:00
|
|
|
\ifEN\floatname{listing}{Listing}
|
|
|
|
\else\floatname{listing}{Výpis kódu}\fi
|
2021-07-20 09:31:37 +00:00
|
|
|
\lstset{ % use this to define styling for any other language
|
2020-05-10 10:03:14 +00:00
|
|
|
language=C++,
|
|
|
|
tabsize=2,
|
|
|
|
showstringspaces=false,
|
|
|
|
basicstyle=\footnotesize\tt\color{black!75},
|
2020-05-11 19:43:55 +00:00
|
|
|
identifierstyle=\bfseries\color{black},
|
2020-05-10 10:03:14 +00:00
|
|
|
commentstyle=\color{green!50!black},
|
|
|
|
stringstyle=\color{red!50!black},
|
|
|
|
keywordstyle=\color{blue!75!black}}
|
|
|
|
|
|
|
|
% Czech versions of the used cleveref references (It's not as convenient as in
|
|
|
|
% English because of declension, cleveref is limited to sg/pl nominative. Use
|
|
|
|
% plain \ref to dodge that.)
|
|
|
|
\ifEN\relax\else
|
|
|
|
\crefname{chapter}{kapitola}{kapitoly}
|
|
|
|
\Crefname{chapter}{Kapitola}{Kapitoly}
|
|
|
|
\crefname{section}{sekce}{sekce}
|
|
|
|
\Crefname{section}{Sekce}{Sekce}
|
|
|
|
\crefname{subsection}{sekce}{sekce}
|
|
|
|
\Crefname{subsection}{Sekce}{Sekce}
|
|
|
|
\crefname{subsubsection}{sekce}{sekce}
|
|
|
|
\Crefname{subsubsection}{Sekce}{Sekce}
|
|
|
|
\crefname{figure}{obrázek}{obrázky}
|
|
|
|
\Crefname{figure}{Obrázek}{Obrázky}
|
|
|
|
\crefname{table}{tabulka}{tabulky}
|
|
|
|
\Crefname{table}{Tabulka}{Tabulky}
|
|
|
|
\crefname{listing}{výpis}{výpisy}
|
|
|
|
\Crefname{listing}{Výpis}{Výpisy}
|
|
|
|
\floatname{algorithm}{Algoritmus}
|
|
|
|
\crefname{algorithm}{algoritmus}{algoritmy}
|
|
|
|
\Crefname{algorithm}{Algoritmus}{Algoritmy}
|
|
|
|
\newcommand{\crefpairconjunction}{ a~}
|
|
|
|
\newcommand{\crefrangeconjunction}{ a~}
|
|
|
|
\fi
|