%%
% HISTORY:
%
% Daniel Sykora (26.12.2004)
%
% Pavel Tvrdik  (17.12.2004)
%
% Michal Valenta (7.5. 2008)

%preamble declarations

%%%% 7.5.2009
%=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
\setlength\hoffset{-10pt}
\setlength\voffset{-\baselineskip}
\normalsize
\setlength\textwidth{40em}
%
\setlength\topmargin{0pt}
\setlength\headheight{\baselineskip}
\setlength\headsep{2\baselineskip}
\setlength\topskip{\baselineskip}
\setlength\textheight{45\baselineskip}
\addtolength\textheight{\topskip}       %calc.sty avoided
\setlength\footskip{3\baselineskip}
%
\if@twoside
  \typeout{Two side layout redefined.}
  %
  \setlength\evensidemargin{0pt}
  \setlength\oddsidemargin{37.5pt}
  \setlength\marginparsep{0pt}
  \setlength\marginparwidth{0pt}
\else
  \typeout{One side layout redefined.}
  %
  \setlength\evensidemargin{0pt}
  \setlength\oddsidemargin{19pt}
  \setlength\marginparsep{0pt}
  \setlength\marginparwidth{0pt}
\fi
%=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\def\ifndef#1{\expandafter\ifx\csname#1\endcsname\relax} % check whether macro is defined




\newcommand\coverpagestarts
{\cleardoublepage
\pagenumbering{roman}\thispagestyle{empty}\setcounter{page}{3}
\begin{center}
\large\rmfamily
\University\\
\Faculty\\
\Department\\
\vglue 10mm
\includegraphics[width=50mm]{figures/LogoCVUT}
\vglue 30mm
{\large \TypeOfWork}\\
\bigskip
{\Large\bf \WorkTitle}\\
\bigskip
\bigskip
{\Large\it \FirstandFamilyName}\\
\vfill
\item[\labelSupervisor:]\ \Supervisor\\
\vglue 15mm
{\labelStudProgram: \StudProgram}\\
\bigskip
{\labelStudBranch: \StudBranch}\\
\bigskip
\today
\end{center}
\newpage
}

\newcommand\mainbodystarts{
\cleardoublepage
\pagestyle{headings}\pagenumbering{arabic}\setcounter{page}{1}
}

%A list of user hyphenations.
\input{hyphen.tex}

%Chapters start at odd pages if you include:
%\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
% into /usr/lib/texmf/tex/latex/latex/book.cls

%your specific macros

\newcommand{\bcen}{\begin{center}}
\newcommand{\ecen}{\end{center}}
\newcommand{\blem}{\begin{lemma}\sl}
\newcommand{\elem}{\end{lemma}\rm}
\newcommand{\bnote}{\begin{note}\rm}
\newcommand{\enote}{\end{note}}
\newcommand{\bcor}{\begin{corollary}\sl}
\newcommand{\ecor}{\end{corollary}\rm}
\newcommand{\bdefi}{\begin{definition}\rm}
\newcommand{\edefi}{\end{definition}}
\newcommand{\btheo}{\begin{theorem}\sl}
\newcommand{\etheo}{\end{theorem}\rm}
\newcommand{\bprop}{\begin{proposition}\sl}
\newcommand{\eprop}{\end{proposition}\rm}
\newcommand{\bexam}{\begin{example}\rm}
\newcommand{\eexam}{\end{example}}
%
\newcommand{\bfig}{\begin{figure}\begin{center}}
\newcommand{\efig}{\end{center}\end{figure}}
\newcommand{\btab}{\begin{table}\begin{center}}
\newcommand{\etab}{\end{center}\end{table}}
\newcommand{\benum}{\begin{enumerate}}
\newcommand{\eenum}{\end{enumerate}}
\newcommand{\bitem}{\begin{itemize}}
\newcommand{\eitem}{\end{itemize}}
\newcommand{\bflushr}{\begin{flushright}}
\newcommand{\eflushr}{\end{flushright}}
% ceske uvozovky
\chardef\clqq=18 \sfcode18=0
\chardef\crqq=16 \sfcode16=0
\def\uv#1{\clqq#1\crqq}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\acknowledgements}{
\cleardoublepage
\vspace*{\fill}
\noindent
{\huge \textbf{%
\iflanguage{czech}{Poděkování}{Aknowledgements}%
}}
\vspace{3ex}\par
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\declaration}[1]{
\cleardoublepage
\vspace*{\fill}
\noindent
{\huge \textbf{%
\iflanguage{czech}{Prohlášení}{Declaration}%
}}
\vspace{3ex}\par
\noindent
\iflanguage{czech}{%
Prohlašuji, že jsem práci vypracoval samostatně a použil jsem pouze podklady uvedené v~přiloženém seznamu.\\
Nemám závažný důvod proti užití tohoto školního díla ve smyslu \S 60 Zákona č.~121/2000 Sb., o právu autorském, o právech souvisejících s právem autorským a o změně některých zákonů (autorský zákon).%
}{%
\noindent
I hereby declare that I have completed this thesis independently and that I have listed all the literature and publications used.\\
I have no objection to usage of this work in compliance with the act \S 60 Zákon č.~121/2000Sb. (copyright law), and with the rights connected with the copyright act including the changes in the act.%
}
\\[15mm]
#1 \hfill \hbox to 70mm{\tiny\dotfill}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\abstractpage}{
\cleardoublepage
\noindent
%{\Huge \textbf{Abstract}}
%\vspace{8ex}
\chapter*{Abstract}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% zada kapitolu s Literaturou do obsahu
\def\@openbib@code{\addcontentsline{toc}{chapter}{\bibname}}
