%%% This file contains definitions of various useful macros and environments %%%
%%% Please add more macros here instead of cluttering other files with them. %%%
+%%% Switches based on thesis type
+
+\def\TypeBc{bc}
+\def\TypeMgr{mgr}
+\def\TypePhD{phd}
+\def\TypeRig{rig}
+
+\ifx\ThesisType\TypeBc
+\def\ThesisTypeName{bachelor}
+\def\ThesisTypeTitle{BACHELOR THESIS}
+\fi
+
+\ifx\ThesisType\TypeMgr
+\def\ThesisTypeName{master}
+\def\ThesisTypeTitle{MASTER THESIS}
+\fi
+
+\ifx\ThesisType\TypePhD
+\def\ThesisTypeName{doctoral}
+\def\ThesisTypeTitle{DOCTORAL THESIS}
+\fi
+
+\ifx\ThesisType\TypeRig
+\def\ThesisTypeName{rigorosum}
+\def\ThesisTypeTitle{RIGOROSUM THESIS}
+\fi
+
+\ifx\ThesisTypeName\undefined
+\PackageError{thesis}{Unknown thesis type.}{Please check the definition of ThesisType in metadata.tex.}
+\fi
+
+%%% Switches based on study program language
+
+\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
%%% Various table goodies
\newcommand{\pulrad}[1]{\raisebox{1.5ex}[0pt]{#1}}
\newcommand{\mc}[1]{\multicolumn{1}{c}{#1}}
+
+%%% TODO items: remove before submitting :)
+\newcommand{\xxx}[1]{\textcolor{red!}{#1}}
--- /dev/null
+%%% Please fill in basic information on your thesis, which will be automatically
+%%% inserted at the right places.
+
+% Type of your thesis:
+% "bc" for Bachelor's
+% "mgr" for Master's
+% "phd" for PhD
+% "rig" for rigorosum
+\def\ThesisType{bc}
+
+% Language of your study programme:
+% "cs" for Czech
+% "en" for English
+\def\StudyLanguage{cs}
+
+% Thesis title in English (exactly as in the formal assignment)
+% (Note: \xxx is a "ToDo label" which makes the unfilled visible. Remove it.)
+\def\ThesisTitle{\xxx{Thesis title} \X{as in the formal assignment}}
+
+% Author of the thesis (you)
+\def\ThesisAuthor{\xxx{Name Surname}}
+
+% Year when the thesis is submitted
+\def\YearSubmitted{\xxx{YEAR}}
+
+% Name of the department or institute, where the work was officially assigned
+% (according to the Organizational Structure of MFF UK in English,
+% or a full name of a department outside MFF)
+\def\Department{\xxx{Name of the department} \X{as per Organizational Structure of MFF UK in English}}
+
+% Is it a department (katedra), or an institute (ústav)?
+\def\DeptType{\xxx{Department}}
+
+% Thesis supervisor: name, surname and titles
+\def\Supervisor{\xxx{Supername Supersurname} \X{+titles}}
+
+% Supervisor's department (again according to Organizational structure of MFF)
+\def\SupervisorsDepartment{\xxx{department}}
+
+% Study programme
+\def\StudyProgramme{\xxx{study programme}}
+
+% An optional dedication: you can thank whomever you wish (your supervisor,
+% consultant, who provided you with tea and pizza, etc.)
+\def\Dedication{%
+\xxx{Dedication.}
+\X{You can thank whomever you wish (your supervisor, consultant, who provided you with tea and pizza, etc.)}
+}
+
+% Abstract (recommended length around 80-200 words; this is not a copy of your thesis assignment!)
+\def\Abstract{%
+\xxx{Use the most precise, shortest sentences that state what problem the
+thesis addresses, how it is approached, pinpoint the exact result achieved, and
+describe the applications and significance of the results. Highlight anything
+novel that was discovered or improved by the thesis. Maximum length is 200
+words, but try to fit into 120. Abstracts are often used for deciding if
+a reviewer will be suitable for the thesis; a well-written abstract thus
+increases the probability of getting a reviewer who will like the thesis.}
+\X{This is not a~copy of your thesis assignment!}
+}
+
+% 3 to 5 keywords (recommended), each enclosed in curly braces.
+% Keywords are useful for indexing and searching for the theses by topic.
+\def\Keywords{%
+\xxx{{key} {words}}
+\X{usually 3 to~5 key words or phrases}
+}
+
+% If your abstracts are long and do not fit in the infopage, you can make the
+% fonts a bit smaller by this setting. (Also, you should try to compress your abstract more.)
+\def\InfoPageFont{}
+%\def\InfoPageFont{\small} % uncomment to decrease font size
+
+% If you are studing in a Czech program, you also need to provide metadata in Czech:
+% (in English programs, this is not used anywhere)
+
+\def\ThesisTitleCS{\xxx{Název práce česky}}
+\def\DepartmentCS{\xxx{Název katedry česky} \X{podle oficiální organizační struktury MFF UK}}
+\def\DeptTypeCS{\xxx{Katedra}}
+\def\SupervisorsDepartmentCS{\xxx{katedra vedoucího}}
+\def\StudyProgrammeCS{\xxx{studijní program}}
+
+\def\KeywordsCS{%
+\xxx{{klíčová} {slova}}
+}
+
+\def\AbstractCS{%
+\xxx{Abstrakt práce přeložte také do češtiny.}
+}
\def\XXX#1{\par\smallskip\noindent \textcolor{red}{[#1]}}
%% NEMICEPS
-%%% Basic information on the thesis
-
-% Thesis title in English (exactly as in the formal assignment)
-\def\ThesisTitle{Thesis title \X{as in the formal assignment}}
-
-% Author of the thesis
-\def\ThesisAuthor{Name Surname}
-
-% Year when the thesis is submitted
-\def\YearSubmitted{YEAR}
-
-% Name of the department or institute, where the work was officially assigned
-% (according to the Organizational Structure of MFF UK in English,
-% or a full name of a department outside MFF)
-\def\Department{Name of the department \X{as per Organizational Structure of MFF UK in English}}
-
-% Is it a department (katedra), or an institute (ústav)?
-\def\DeptType{Department}
-
-% Thesis supervisor: name, surname and titles
-\def\Supervisor{Supervisor's Name \X{+titles}}
-
-% Supervisor's department (again according to Organizational structure of MFF)
-\def\SupervisorsDepartment{department}
-
-% Study programme and specialization
-\def\StudyProgramme{study programme}
-\def\StudyBranch{study branch}
-
-% An optional dedication: you can thank whomever you wish (your supervisor,
-% consultant, a person who lent the software, etc.)
-\def\Dedication{%
-Dedication.
-}
-
-% Abstract (recommended length around 80-200 words; this is not a copy of your thesis assignment!)
-\def\Abstract{%
-Abstract. \X{Recommended length around 80--200 words. This is not a~copy of your thesis assignment!}
-}
-
-% 3 to 5 keywords (recommended), each enclosed in curly braces
-\def\Keywords{%
-{key} {words} \X{usually 3 to~5 key words or phrases}
-}
-
%% The hyperref package for clickable links in PDF and also for storing
%% metadata to PDF (including the table of contents).
%% Most settings are pre-set by the pdfx package.
\hypersetup{unicode}
\hypersetup{breaklinks=true}
+% Meta-data of your thesis (please edit)
+\include{metadata.tex}
+
% Definitions of macros (see description inside)
\include{macros}
\chapwithtoc{List of Abbreviations}
\XXX{In mathematical theses, it could be better to move the list of abbreviations to the beginning of the thesis.}
-%% PHDONLY
%%% Doctoral theses must contain a list of author's publications
+\ifx\ThesisType\TypePhD
\chapwithtoc{List of publications}
\XXX{Doctoral theses must contain a list of author's publications.}
-%% ONLYPHD
+\fi
%%% Attachments to the bachelor thesis, if any. Each attachment must be
%%% referred to at least once from the text of the thesis. Attachments
%%% Title page of the thesis and other mandatory pages
-%%% SPECIMEN
-%%% Inscriptions at the opening page of the hard cover
+%%% Inscriptions at the opening page of the hard cover (PhD thesis only)
+
+\ifx\ThesisType\TypePhD
\pagestyle{empty}
\hypersetup{pageanchor=false}
\vfill
-{\huge\bf BACHELOR THESIS}
+{\huge\bf\ThesisTypeTitle}
\vfill
\newpage\openright
-%%% NEMICEPS
+\fi
%%% Title page of the thesis
\vspace{-8mm}
\vfill
-{\bf\Large BACHELOR THESIS}
+{\bf\Large\ThesisTypeTitle}
\vfill
Supervisor of the bachelor thesis:&\Supervisor \cr
\noalign{\vspace{2mm}}
Study programme:&\StudyProgramme \cr
-\noalign{\vspace{2mm}}
-Study branch:&\StudyBranch \cr
}}}}
\vfill
-% Zde doplňte rok
Prague \YearSubmitted
\end{center}
\newpage
-%%% NOPHD
-%%% Here should be a bound sheet included -- a signed copy of the "bachelor
-%%% thesis assignment". This assignment is NOT a part of the electronic
-%%% version of the thesis. DO NOT SCAN.
-\XXX{Bound into the introductory part must be the form with signed approval of the thesis topic (a photocopy suffices). This is not a~part of the electronic version of the thesis, do not scan!}
-%%% PHDNO
-
%%% A page with a solemn declaration to the bachelor thesis
\openright
%%% Mandatory information page of the thesis
\openright
+{\InfoPageFont
\vbox to 0.5\vsize{
\setlength\parindent{0mm}
\XXX{This information must be stored as PDF meta-data, too. Please refer to the {\tt README} file.}
\vss}
+% In Czech study programmes, it is mandatory to include Czech meta-data:
+
+\ifx\StudyLanguage\LangCS
+
+\vbox to 0.49\vsize{
+\setlength\parindent{0mm}
+\setlength\parskip{5mm}
+
+Název práce:
+\ThesisTitleCS
+
+Autor:
+\ThesisAuthor
+
+\DeptTypeCS:
+\DepartmentCS
+
+Vedoucí bakalářské práce:
+\Supervisor, \SupervisorsDepartment
+
+Abstrakt:
+\AbstractCS
+
+Klíčová slova:
+\KeywordsCS
+}
+
+\fi
+
+}
+
\newpage
+%%% From this point on, pages shall be numbered
+
\openright
\pagestyle{plain}
\pagenumbering{arabic}