Newer
Older
% \iffalse
%<*base>
% \fi\file{style/mu/fithesis-base.sty}\label{sec:fithesis-mu-base}
% \changes{v1.0.0}{2021/03/19}{File were renamed after
% breaking changes in package loading after PR 438 in \LaTeXe. [VN]}
% This is the base style file for theses written at the Masaryk
% University in Brno. When inheritance is enabled for style files,
% this file is always the second style file to be loaded right
% after \texttt{style/fithesis-base.sty}, regardless of the value
% of the |\thesis@style| macro.
% \begin{macrocode}
\ProvidesPackage{fithesis/style/mu/fithesis-mu-base}[2021/02/26]
\NeedsTeXFormat{LaTeX2e}
% \end{macrocode}
% The file recognizes the following options: \begin{itemize}
% \item\texttt{10pt}, \texttt{11pt}, \texttt{12pt} -- Sets the
% type size to 10, 11 or 12 points respectively.
% \begin{macrocode}
\DeclareOption{10pt}{\def\thesis@ptsize{0}}
\DeclareOption{11pt}{\def\thesis@ptsize{1}}
\DeclareOption{12pt}{\def\thesis@ptsize{2}}
% \end{macrocode}
% \item\texttt{oneside}, \texttt{twoside} -- The document is
% going to be either single- or double-sided, respectively. In
% a double-sided document, headers, page numbering, margin
% notes and several other elements will be arranged based on
% the parity of the page. Blank pages will also be inserted
% prior the beginning of each chapter to ensure that it starts
% on a right-hand (odd-numbered) page. The
% \DescribeMacro{\ifthesis@twoside@}|\ifthesis@twoside@|
% conditional is set to either \texttt{false} or \texttt{true},
% respectively.
% \begin{macrocode}
\newif\ifthesis@twoside@
\DeclareOption{oneside}{%
\thesis@twoside@false\@twosidefalse\@mparswitchfalse}
\DeclareOption{twoside}{%
\thesis@twoside@true \@twosidetrue \@mparswitchtrue}
% \end{macrocode}
% \item\texttt{onecolumn}, \texttt{twocolumn} -- The document
% is going to be set in either a single column or in two
% columns, respectively.
% \begin{macrocode}
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
% \end{macrocode}
% \item\texttt{draft}, \texttt{final} -- Overful lines either are
% or aren't marked within the document, respectively, and
% graphics either aren't or are inserted into the document,
% \begin{macrocode}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
% \end{macrocode}
% \item\texttt{palatino}, \texttt{nopalatino} -- The roman
% text font family and the math font family is going to be
% either set to Palatino or left untouched, respectively. The
% \DescribeMacro{\ifthesis@palatino@}|\ifthesis@|^^A
% \discretionary{}{}{}|palatino@| conditional is set to either
% \texttt{true} or \texttt{false}, respectively. The
% Palatino font is a part of the visual identity of the Faculty
% of Informatics at which the document class was created.
% \begin{macrocode}
\newif\ifthesis@palatino@
\DeclareOption{palatino}{\thesis@palatino@true}
\DeclareOption{nopalatino}{\thesis@palatino@false}
% \end{macrocode}
% \item\texttt{color}, \texttt{monochrome} -- Certain
% typographical elements either are or aren't going to be
% typeset in color, respectively. The
% \DescribeMacro{\ifthesis@color@}|\ifthesis@color@|
% conditional is set to either \texttt{true} or \texttt{false},
% \begin{macrocode}
\newif\ifthesis@color@
\DeclareOption{monochrome}{\thesis@color@false}
\DeclareOption{color}{\thesis@color@true}
% \end{macrocode}
% \item\texttt{microtype}, \texttt{nomicrotype} -- The
% microtypographic extension of modern \TeX\ engines -- such as
% \hologo{pdfTeX}, \Hologo{XeTeX}, or \Hologo{LuaTeX} -- is or isn't
% going to be enabled, respectively. The
% \DescribeMacro{\ifthesis@microtype@}|\ifthesis@microtype@|
% conditional is set to either \texttt{true} or \texttt{false},
% respectively.
% \begin{macrocode}
\newif\ifthesis@microtype@
\DeclareOption{microtype}{\thesis@microtype@true}
\DeclareOption{nomicrotype}{\thesis@microtype@false}
% \end{macrocode}
% \item\texttt{table}, \texttt{oldtable} -- If the
% |\ifthesis@color@| conditional is \texttt{true}, then the
% definitions of the \texttt{tabular}, \texttt{tabularx}, and
% \texttt{tabu} commands either are or aren't going to be
% altered to better match the style, respectively. The
% \DescribeMacro{\ifthesis@newtable@}|\ifthesis@newtable@|
% conditional is set to either \texttt{true} or \texttt{false},
% respectively.
% \begin{macrocode}
\newif\ifthesis@newtable@
\DeclareOption{table}{\thesis@newtable@true}
\DeclareOption{oldtable}{\thesis@newtable@false}
% \end{macrocode}
%
% The choice of the option name is deliberate -- the
% redefinition of the table environments depends on the
% \textsf{xcolor} package, which needs to be loaded with the
% \texttt{table} option. Since so many other packages depend on
% the \textsf{xcolor} package and this style file is loaded at
% the very end of the preamble, there would either be a great
% chance of an option clash, or the option would have to be
% passed to the \textsf{xcolor} package before the preamble
% from the body of the \textsf{fithesis4} class thus breaking
% the encapsulation. Naming the option \texttt{table} forces
% the option to be processed by the \textsf{xcolor} package as
% well and it is therefore an elegant solution to the problem
% at hand.
% \item\texttt{lot}, \texttt{nolot} -- The \DescribeMacro{^^A
% \thesis@blocks@lot}|\thesis@blocks@lot| macro will be defined
% as either |\listoftables| or |\relax|, respectively. As a
% side effect, the |\listoftables| either is or isn't going to
% be included in the \DescribeMacro{\thesis@blocks@tables}^^A
% |\thesis@|\discretionary{}{}{}|blocks@tables| block,
% respectively.
% \begin{macrocode}
\DeclareOption{nolot}{\let\thesis@blocks@lot\relax}
\DeclareOption{lot}{\let\thesis@blocks@lot\listoftables}
% \end{macrocode}
% \item\texttt{lot}, \texttt{nolot} -- The \DescribeMacro{^^A
% \thesis@blocks@lof}|\thesis@blocks@lof| macro will be defined
% as either |\listoffigures| or |\relax|, respectively. As a
% side effect, the |\listoffigures| either is or isn't going to
% be included in the \DescribeMacro{\thesis@blocks@tables}^^A
% |\thesis@|\discretionary{}{}{}|blocks@tables| block,
% respectively.
% \begin{macrocode}
\DeclareOption{nolof}{\let\thesis@blocks@lof\relax}
\DeclareOption{lof}{\let\thesis@blocks@lof\listoffigures}
% \end{macrocode}
% \item\texttt{cover}, \texttt{nocover} -- The
% \DescribeMacro{\thesis@blocks@cover}|\thesis@blocks@cover|
% either is going to expand to either the thesis cover or
% produces no output, respectively. The
% \DescribeMacro{\ifthesis@cover@}|\ifthesis@cover@|
% conditional is set to \texttt{false} or \texttt{true},
% \begin{macrocode}
\newif\ifthesis@cover@
\DeclareOption{nocover}{\thesis@cover@false}
\DeclareOption{cover}{\thesis@cover@true}
% \item\texttt{digital}, \texttt{printed} -- These macrooptions
% set the options that are appropriate for either the printed or
% for the digital version of the document, respectively. The
% \DescribeMacro{\ifthesis@digital@}|\ifthesis@digital@|
% conditional is set to \texttt{true} or \texttt{false},
% respectively.
% \begin{macrocode}
\newif\ifthesis@digital@
\DeclareOption{digital}{%
\ExecuteOptions{color,cover}%
\thesis@digital@true}
\DeclareOption{printed}{%
\ExecuteOptions{monochrome,nocover}%
\thesis@digital@false}
% \end{macrocode}
% \end{itemize}
% These are the default options:
% \begin{macrocode}
\ExecuteOptions{%
printed,12pt,twoside,final,microtype,palatino,oldtable,lot,lof}
\ProcessOptions*
% \end{macrocode}
% The file uses English locale strings within the macros.
% \begin{macrocode}
\thesis@requireLocale{english}
% \end{macrocode}
% The file loads the following packages: \begin{itemize}
% \item\textsf{xcolor} -- Adds support for color.
% The \cs{bfseries} command switches to the sans serif typeface
% and to the secondary color in the style files of the Masaryk
% University in Brno, Czech Republic. [VN]}
% \item\textsf{caption} -- Adds support for changing the
% formatting of float captions.
% \item\textsf{ifxetex} -- Used to detect the \Hologo{XeTeX}
% engine.
% \item\textsf{ifluatex} -- Used to detect the \Hologo{LuaTeX}
% engine.
% \item\textsf{graphix} -- Adds support for the inclusion of
% graphics files.
% \item\textsf{pdfpages} -- Adds support for the injection of PDF
% documents into the resulting document, namely the thesis
% assignment.
% \item\textsf{hyperref} -- Adds support for the injection of
% metadata into the resulting PDF document.
% \item\textsf{keyval} -- Adds support for parsing
% comma-delimited lists of key-value pairs.
% \item\textsf{tabularx} -- Provides the \texttt{tabularx}
% environment, which enables the typesetting of tables with
% flexible-width columns.
% The packages \textsf{tabularx}, \textsf{tabu}, and
% \textsf{booktabs} are loaded by default, not only when
% the \texttt{table} class option has been specified. [VN]}
% \item\textsf{tabu} -- Provides the \texttt{tabu} environment,
% which enables the typesetting of complex tables.
% \item\textsf{booktabs} -- A package, which allows the creation
% of publication-quality tables in \LaTeX.
% \changes{v1.0.0}{2021/03/04}{Added required package tikz
% for bibEntry. [TV]}
% \begin{macrocode}
\RequirePackage[labelfont=bf]{caption}
\thesis@require{graphicx}
\thesis@require{pdfpages}
\thesis@require{keyval}
\thesis@require{tabularx}
\thesis@require{tabu}
\thesis@require{booktabs}
% If the |\thesis@microtype@| is set to true, then the
% \textsf{microtype} package gets loaded.
% \begin{macrocode}
\ifthesis@microtype@
\thesis@require[final,babel]{microtype}
\fi
% \end{macrocode}
% Using the |\ifxetex| and |\ifluatex| conditionals, a compound
% \DescribeMacro{\ifthesis@xeluatex}|\ifthesis@xeluatex|
% conditional was constructed. This conditional can be used by
% subsequently loaded style files to test, whether either the
% \Hologo{XeTeX} or the \Hologo{LuaTeX} engine is being used.
\x\global\x\let\x\ifthesis@xeluatex\csname if%
\ifxetex true\else
\ifluatex\x\x\x t\x\x\x r\x\x\x u\x\x\x e%
\else f\x\x\x a\x\x\x l\x\x\x s\x\x\x e%
% \end{macrocode}
% The following packages get only loaded, when the document is
% being typeset using the \Hologo{XeTeX} or \Hologo{LuaTeX}
% engine: \begin{itemize}
% \item\textsf{fontspec} -- Allows the selection of
% \item\textsf{unicode-math} -- Allows the selection of
% Under \Hologo{XeTeX} or \Hologo{LuaTeX}, the \textsf{\TeX{} Gyre
% Pagella} and \textsf{\TeX{} Gyre Pagella Math} fonts are also
% selected as the main text and math fonts and the \textsf{\TeX{}
% Gyre Heros} font is selected as the main sans serif font.
% The \TeX{} Gyre Heros is used as the main sans serif font
% instead of Latin Modern. [VN]}
\ifthesis@xeluatex
\ifthesis@palatino@
\thesis@require{fontspec}
\thesis@require{unicode-math}
\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
\setsansfont[Ligatures=TeX,Scale=MatchLowercase]{TeX Gyre Heros}
\setmathfont[math-style=ISO,bold-style=ISO]{texgyrepagella-math.otf}
% The following packages get only loaded, when the document is not
% being typeset using the \Hologo{XeTeX} or \Hologo{LuaTeX} engine
% and the |\ifthesis@palatino@| conditional is \texttt{true}:
% \item\textsf{cmap} -- Places an explicit \texttt{ToUnicode}
% map in the resulting PDF file, allowing for the extraction of
% the text from the document.
% \item\textsf{mathpazo} -- Changes the default math font family
% to \texttt{mathpazo}.
% \item\textsf{tgpagella} -- Changes the default roman font
% family to \TeX\ Gyre Pagella.
% \item\textsf{tgheros} -- Changes the default sans-serif font
% face to \TeX{} Gyre Heros.
% The \TeX{} Gyre Heros is used as the main sans serif font
% instead of Latin Modern. [VN]}
% \item\textsf{lmodern} -- Changes the default sans-serif and
% monotype font faces to Latin Modern instead of the default
% Computer Modern font family.
% \item\textsf{fontenc} -- The font encoding is set to Cork.
% \end{itemize}
% \begin{macrocode}
\RequirePackage[resetfonts]{cmap}
\thesis@require{lmodern}
\thesis@require{mathpazo}
\thesis@require{tgpagella}
\thesis@require[scale=0.863]{tgheros}
\RequirePackage[T1]{fontenc}
\fi
% If the |\thesis@newtable@| conditional is \texttt{true}, then
% some of the dimensions associated with tables are modified in
% preparation for the coloring of the table cells.
% \begin{macrocode}
\let\thesis@newtable@old\tabular
\let\endthesis@newtable@old\endtabular
\ifthesis@newtable@
% Adjust the measurements.
\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\setlength{\extrarowheight}{.75ex}
% \end{macrocode}
% When both the |\thesis@newtable@| and |\thesis@color@| conditionals are
% \texttt{true}, then the \texttt{tabular} and \texttt{tabularx}
% environments are redefined to better match the style of the given
% faculty.
%
% The \DescribeMacro{\thesis@newtable@old}|\thesis@newtable@old|
% and \DescribeMacro{\endthesis@newtable@old}
% |\endthesis@newtable@old| macros containing the original
% definition of the |tabular| environment are always defined and
% are available for subsequently loaded styles in case the
% typesetting of unaltered tables is required. Similarly, the
% \DescribeMacro{\thesis@newtable@oldx}|\thesis@newtable@oldx| and
% \DescribeMacro{\endthesis@newtable@oldx}|\endthesis@newtable@oldx|
% macros are defined for the |tabularx| environment and the
% \DescribeMacro{\thesis@newtable@oldtabu}|\thesis@newtable@oldtabu|
% and \DescribeMacro{\endthesis@newtable@oldtabu}
% |\endthesis@newtable@oldtabu| for the |tabu| environment.
\ifthesis@color@
% The redefinition of `tabular`
\renewenvironment{tabular}%
{\rowcolors{1}{thesis@color@tableOdd}%
{thesis@color@tableEven}%
\thesis@newtable@old}%
{\endthesis@newtable@old}
% The redefinition of `tabularx`
\let\thesis@newtable@oldx\tabularx
\let\endthesis@newtable@oldx\endtabularx
\renewenvironment{tabularx}%
{\rowcolors{1}{thesis@color@tableEven}%
{thesis@color@tableOdd}%
\thesis@newtable@oldx}%
{\endthesis@newtable@oldx}
% The redefinition of `tabu`
\let\thesis@newtable@oldtabu\tabu
\let\endthesis@newtable@oldtabu\endtabu
\renewenvironment{tabu}%
{\rowcolors{1}{thesis@color@tableEven}%
{thesis@color@tableOdd}%
\thesis@newtable@oldtabu}%
{\endthesis@newtable@oldtabu}
\fi
\fi
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
% \begin{macro}{\ifthesis@bibliography@}
% A new conditional, |\ifthesis@bibliography@|, is defined. This
% conditional is true, when |\thesis@bibFiles| expands to a
% non-empty token list.
% \begin{macrocode}
\newif\ifthesis@bibliography@
\thesis@bibliography@false
\ifx\thesis@bibFiles\undefined\else
{\edef\@bibList{\thesis@bibFiles}%
\ifx\@bibList\empty\else
\global\thesis@bibliography@true
\fi}
\fi
% \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@bibliography@setup}
% The file defines the |\thesis@bibliography@setup|\marg{options}
% command, where \textit{options} is a comma-delimited list of
% key-value pairs as defined by the \textsf{keyval} package. The
% command can be invoked by the subsequently loaded style
% files to define the bibliography options.
% \begin{macrocode}
\def\thesis@bibliography@setup#1{%
\setkeys{thesis@bibliography}{#1}}
% \end{macrocode}
% The following key-value pairs are supported:
% \begin{enumerate}
% \item\marg{\texttt{style}=style} -- Stores \texttt{style} in
% \DescribeMacro{\thesis@bibliography@style}^^A
% |\thesis@bibliography@style|, unless it has already been
% defined (presumably by the user).
% \item\marg{\texttt{sorting}=mode} -- Stores \texttt{mode} in
% \DescribeMacro{\thesis@bibliography@sorting}^^A
% |\thesis@bibliography@sorting|, unless it has already been
% defined (presumably by the user).
% \end{enumerate}
% \begin{macrocode}
\define@key{thesis@bibliography}{style}{%
\ifx\thesis@bibliography@style\undefined
\def\thesis@bibliography@style{#1}%
\fi}
\define@key{thesis@bibliography}{sorting}{%
\ifx\thesis@bibliography@sorting\undefined
\def\thesis@bibliography@sorting{#1}%
\fi}
% \end{macrocode}
% \changes{v0.3.51}{2018/06/15}{^^A
% Added the \texttt{bibliography} extra field to the style files
% of the Masaryk University in Brno, Czech Republic}
% The following extra data field is defined for the macro:
% \begin{itemize}
% \item|bibliography| -- the comma-delimited list of key-value
% pairs accepted by |\thesis@bibliography@setup|. If the data
% field was specified, it is immediately passed to
% |\thesis@bibliography@setup| and it overrides any defaults
% specified in faculty style files.
% \end{itemize}
% \begin{macrocode}
\thesis@def@extra[]{bibliography}
\ifx\thesis@extra@bibliography
\thesis@placeholder@extra@bibliography\else
\expandafter\thesis@bibliography@setup\expandafter{%
\thesis@extra@bibliography}%
\fi
% \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@bibliography@load}
% When |\ifthesis@bibliography@| is true and
% |\ifthesis@bibliography@loaded@| is false, the
% |\thesis@bibliography@load| macro loads the \textsf{csquotes} and
% Bib\LaTeX\ packages with the bibliography databases specified in
% |\thesis@bibFiles|. The macro also sets the
% \DescribeMacro{\thesis@bibliography@loaded}^^A
% |\ifthesis@bibliography@loaded@| conditional to true.
% \begin{macrocode}
\newif\ifthesis@bibliography@loaded@
\thesis@bibliography@loaded@false
\newif\ifthesis@bibliography@included@
\thesis@bibliography@included@false
\def\thesis@bibliography@load{%
\ifthesis@bibliography@
\ifthesis@bibliography@loaded@\else
\thesis@bibliography@loaded@true
% Load csquotes and BibLaTeX.
\thesis@require{csquotes}
% \end{macrocode}
% If |\thesis@bibliography@style| is undefined, the bibliography
% and citation styles default to |iso-numeric|. If
% |\thesis@bibliography@sorting| is undefined, the sorting scheme
% defaults to |none|.
% \begin{macrocode}
\thesis@bibliography@setup{
style = iso-numeric,
sorting = none}
% FIXME: This is a hotfix for biblatex.
% It should be removed after v3.17 has been released.
% See https://tex.stackexchange.com/a/581469/70941.
\thesis@require{expl3}
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
\thesis@require[
backend=biber,
style=\thesis@bibliography@style,
sorting=\thesis@bibliography@sorting,
autolang=other,
sortlocale=auto]{biblatex}
% Load the bibliography databases.
{\edef\@bibList{\thesis@bibFiles}%
\def\@inject##1,{%
\def\@args{##1}\def\@relax{\relax}%
\ifx\@args\@relax\else
% Trim leading spaces.
\edef\@trimmed{\romannumeral-`\.##1}%
\addbibresource\@trimmed
\expandafter\@inject\fi}%
\expandafter\@inject\@bibList,\relax,}%
% \end{macrocode}
% \begin{macro}{\ifthesis@bibliography@included@}
% The |\ifthesis@bibliography@included@| conditional is true, when
% the user has manually included a bibliography into their
% document. The default value of the conditional is false and
% |\printbibliography| is patched to set the conditional to true on
% expansion. This enables the user to place the bibliography
% manually without it appearing in the autolayout. The original
% macro is stored in the
% \DescribeMacro{\thesis@printbibliography@old}^^A
% |\thesis@printbibliography@old| macro.
% \begin{macrocode}
\let\thesis@printbibliography@old\printbibliography
\def\printbibliography{%
\global\thesis@bibliography@included@true
\thesis@printbibliography@old}
\fi
\fi}
% \end{macrocode}
% \end{macro} ^^A The nested \ifthesis@bibliography@included@ def
% \end{macro} ^^A The \thesis@bibliography@load macro definition
% In the digital version, the \textsf{hyperref} package is configured to
% decorate hyperlinks with an underline instead of a rectangular box.
% In the printed version, the \textsf{hyperref} package is configured to
% hide links.
% \changes{v0.3.51}{2018/12/25}{^^A
% In the printed version, the \textsf{hyperref} package is configured to
% hide links. [VN]}
\ifthesis@digital@
\hypersetup{pdfborderstyle={/S/U/W 1}}
\else
\hypersetup{hidelinks}
\fi
% \end{macrocode}
% Clubs and widows are set to be infinitely bad.
% \begin{macrocode}
\widowpenalty 10000
\clubpenalty 10000
% \end{macrocode}
% \begin{macro}{\thesis@color@setup}
% The file defines the |\thesis@color@setup|\marg{colors} command,
% where \textit{colors} is a comma-delimited list of key-value
% pairs as defined by the \textsf{keyval} package. The command can
% be invoked either by the subsequently loaded style files or by
% the user to define which colors will be used, when the
% \texttt{color} option is specified.
% \begin{macrocode}
\def\thesis@color@setup#1{%
\setkeys{thesis@color}{#1}}
% \end{macrocode}
% \end{macro}
% The following key-value pairs are supported:
% \begin{enumerate}
% \item\marg{\texttt{links}=color} -- Sets the color of hyperref
% links to \textit{color} and stores it under the name
% \texttt{thesis@color@links}. The default color of links is
% specified by the \textsf{hyperref} package.
% \item\marg{\texttt{secondary}=color} -- Stores the secondary
% color that is used with the bold type face under the name
% \texttt{thesis@color@secondary}. The default secondary color
% for the Masaryk University is RGB 0, 0, 220.
% The \cs{bfseries} command switches to the sans serif typeface
% and to the secondary color in the style files of the Masaryk
% University in Brno, Czech Republic. [VN]}
% \item\marg{\texttt{tableOdd}=color} -- Stores the color of the
% odd rows of the redefined \texttt{tabular} and
% \texttt{tabularx} environments under the name
% \texttt{thesis@color@tableOdd}.
% \item\marg{\texttt{tableEven}=color} -- Stores the color of the
% even rows of the redefined \texttt{tabular} and
% \texttt{tabularx} environments under the name
% \texttt{thesis@color@tableEven}.
% \item\marg{\texttt{tableEmph}=color} -- Stores the color of an
% emphasized cell in a table user under the name
% \texttt{thesis@color@tableEmph}. This color is meant to be
% used manually by the user.
% \end{enumerate}
% \begin{macrocode}
\define@key{thesis@color}{links}{%
\definecolor{thesis@color@links}#1
\hypersetup{linkbordercolor=thesis@color@links}}
\define@key{thesis@color}{secondary}{%
\definecolor{thesis@color@secondary}#1}
\thesis@color@setup{secondary={RGB}{0, 0, 220}}
\define@key{thesis@color}{tableOdd}{%
\definecolor{thesis@color@tableOdd}#1}
\define@key{thesis@color}{tableEven}{%
\definecolor{thesis@color@tableEven}#1}
\define@key{thesis@color}{tableEmph}{%
\definecolor{thesis@color@tableEmph}#1}
% \end{macrocode}
% The \cs{bfseries} command switches to the sans serif typeface
% and to the secondary color in the style files of the Masaryk
% University in Brno, Czech Republic. [VN]}
% The |\bfseries| macro is redefined to switch to the sans serif
% type face in the secondary color. The original definition of
% |\bfseries| is stored in the
% \DescribeMacro{\thesis@bfseries@old}|\thesis@bfseries@old|
% macro.
% \begin{macrocode}
\let\thesis@bfseries@old\bfseries
\def\bfseries{%
\sffamily\color{thesis@color@secondary}\thesis@bfseries@old}
% \end{macrocode}
% The file defines several blocks to be used in the redefinitions
% of the |\thesis@blocks@preamble| and |\thesis@blocks@postamble|
% macros by the subsequently loaded style files.
% \begin{macro}{\thesis@blocks@coverMatter}
% The |\thesis@blocks@coverMatter| macro sets up the style
% of the cover and the title page of the thesis. This amounts
% to disabling the page numbering, so that hyperref links do not
% point to the cover page and the title page instead of the
% initial pages of the main matter.
% \begin{macrocode}
\def\thesis@blocks@coverMatter{%
\pagenumbering{gobble}}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@frontMatter}
% The |\thesis@blocks@frontMatter| macro sets up the style
% of the front matter of the thesis.
\def\thesis@blocks@frontMatter{%
\pagestyle{plain}
\parindent 1.5em
\setcounter{page}{1}
\pagenumbering{roman}}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@clear}
% The |\thesis@blocks@clear| macro clears the current page.
% It also clears the next left-hand (even-numbered) page, when
% double-sided typesetting is enabled.
Vít Starý Novotný
committed
% \changes{v0.3.45}{2017/05/24}{\cs{thesis@blocks@clear} now only
% sets the pagestyle to |empty|, when there is a left-hand
% (even-numbered) page to clear. [VN]}
% \begin{macrocode}
\def\thesis@blocks@clear{%
\ifthesis@twoside@
\clearpage
Vít Starý Novotný
committed
\ifodd\value{page}\else%
\thispagestyle{empty}%
\hbox{}%
\newpage
\fi
\else
\newpage
% \end{macro}\begin{macro}{\thesis@blocks@clearRight}
% The |\thesis@blocks@clearRight| macro clears the current
% page. It also clears the next right-hand (odd-numbered) page,
% when double-sided typesetting is enabled.
% \begin{macrocode}
\def\thesis@blocks@clearRight{%
\ifthesis@twoside@
\clearpage
\ifodd\value{page}%
\thispagestyle{empty}%
\hbox{}%
\newpage
\fi
\else
\newpage
\fi}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@facultyLogo@monochrome}
% The |\thesis@blocks@facultyLogo@monochrome|\oarg{options}
% macro typesets the |\thesis@logopath\thesis@facultyLogo| logo
% with the given \textit{options} passed to |\includegraphics|.
% \begin{macrocode}
\newcommand{\thesis@blocks@facultyLogo@monochrome}[1]%
[width=40mm]{{%
\edef\@path{\thesis@logopath\thesis@facultyLogo}%
\includegraphics[#1]{\@path}}}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@facultyLogo@color}
% The |\thesis@blocks@facultyLogo@color|\oarg{options}
% macro typesets either the |\thesis@logopath\thesis@facultyLogo|
% logo, if the |\ifthesis|\discretionary{}{}{}|@color@| conditional
% |\thesis@logopath\thesis@facultyLogo-color| logo
% otherwise with the given \textit{options} passed to
% |\includegraphics|.
% \begin{macrocode}
\newcommand{\thesis@blocks@facultyLogo@color}[1]%
[width=40mm]{{%
\edef\@path{\thesis@logopath\thesis@facultyLogo
\includegraphics[#1]{\@path}}}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@universityLogo@monochrome}
% The |\thesis@blocks@universityLogo@monochrome|\oarg{options}
% |\thesis@logopath\thesis@universityLogo| logo
% with the given \textit{options} passed to |\includegraphics|.
% \changes{v1.0.0}{2021/03/19}{^^A
% Change \cs{thesis@universityLogo},
% \cs{thesis@blocks@universityLogo@monochrome}, and
% \cs{thesis@blocks@universityLogo@color} to use the new logotype
% of the Masaryk University in Brno in the correct size and
% localization. [VN]}
% \begin{macrocode}
\newcommand{\thesis@blocks@universityLogo@monochrome}[1]%
\edef\@path{\thesis@logopath\thesis@universityLogo}%
\includegraphics[#1]{\@path}}}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@universityLogo@color}
% The |\thesis@blocks@universityLogo@color|\oarg{options}
% macro typesets either the |\thesis@logopath\thesis@universityLogo|
% logo, if the |\ifthesis|\discretionary{}{}{}|@color@| conditional
% is \texttt{false}, or the
% |\thesis@logopath\thesis@universityLogo|\discretionary{}{}{}|-color|
% logo otherwise with the given \textit{options} passed to
% |\includegraphics|.
% \changes{v1.0.0}{2021/03/19}{^^A
% Change \cs{thesis@universityLogo},
% \cs{thesis@blocks@universityLogo@monochrome}, and
% \cs{thesis@blocks@universityLogo@color} to use the new logotype
% of the Masaryk University in Brno in the correct size and
% localization. [VN]}
% \begin{macrocode}
\newcommand{\thesis@blocks@universityLogo@color}[1]%
\edef\@path{\thesis@logopath\thesis@universityLogo
\includegraphics[#1]{\@path}}}
% \end{macrocode}
% The |\thesis@department@name| and |\thesis@field@name| macros and
% their English counterparts provide a level of indirection that
% allows the subsequently loaded style files to parse the values of
% |\thesis@department| and |\thesis@field| (and their English
% counterparts) and map them to human-readable names, which will
% then be typeset.
% \begin{macrocode}
\let\thesis@department@name\thesis@department
\let\thesis@departmentEn@name\thesis@departmentEn
\let\thesis@field@name\thesis@field
\let\thesis@fieldEn@name\thesis@fieldEn
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@cover}
% The |\thesis@blocks@cover| macro typesets the thesis
% cover. It is composed of three macros:
% \begin{itemize}
% \item\DescribeMacro{\thesis@blocks@cover@header}^^A
% |\thesis@blocks@cover@header| -- The header of the cover
% page
% \item\DescribeMacro{\thesis@blocks@cover@content}^^A
% |\thesis@blocks@cover@content| -- The content of the cover
% page
% \item\DescribeMacro{\thesis@blocks@cover@footer}^^A
% |\thesis@blocks@cover@footer| -- The footer of the cover
% page
% \end{itemize}
% This allows the subsequently loaded style files to only redefine
% certain parts of the cover page.
% The \cs{bfseries} command switches to the sans serif typeface
% and to the secondary color in the style files of the Masaryk
% University in Brno, Czech Republic. [VN]}
\def\thesis@blocks@cover{%
\ifthesis@cover@
\thesis@blocks@clear
\colorlet{thesis@color@secondary}{black}%
\thispagestyle{empty}%
\begin{center}%
\thesis@blocks@cover@header
\thesis@blocks@facultyLogo@monochrome\\[0.4in]%
\let\footnotesize\small
\thesis@blocks@cover@content
\par\vfill
\thesis@blocks@cover@footer
\end{center}%
\end{alwayssingle}%
% \end{macrocode}
% The output of the |\thesis@blocks@cover@header| macro is
% controlled by the following conditionals:
% \begin{enumerate}
% \item|\ifthesis@blocks@cover@university@| -- This
% conditional expression determines, whether the university
% name is going to be included in the header of the cover.
% The default value of this conditional is \texttt{true}.
% \item|\ifthesis@blocks@cover@faculty@| -- This
% conditional expression determines, whether the faculty
% name is going to be included in the header of the cover.
% The default value of this conditional is \texttt{true}.
% \item|\ifthesis@blocks@cover@department@| -- This
% conditional expression determines, whether the department
% name is going to be included in the header of the cover.
% The default value of this conditional is \texttt{false}.
% \item|\ifthesis@blocks@cover@field@| -- This
% conditional expression determines, whether the field of
% study is going to be included in the header of the cover.
% The default value of this conditional is \texttt{false}.
% \end{enumerate}
% The sebsequently loaded style files can modify the value of these
% conditionals to alter the output of the
% |\thesis@blocks@cover@header| macro without altering its
% definition.
% \begin{macrocode}
\newif\ifthesis@blocks@cover@university@
\thesis@blocks@cover@university@true
\newif\ifthesis@blocks@cover@faculty@
\thesis@blocks@cover@faculty@true
\newif\ifthesis@blocks@cover@department@
\thesis@blocks@cover@department@false
\newif\ifthesis@blocks@cover@field@
\thesis@blocks@cover@field@false
{\sc\ifthesis@blocks@cover@university@
\thesis@titlePage@LARGE\thesis@@{universityName}\\%
\fi\ifthesis@blocks@cover@faculty@
\thesis@titlePage@Large\thesis@@{facultyName}\\%
\fi\ifthesis@blocks@cover@department@
\thesis@titlePage@large\thesis@department@name\\%
\ifthesis@blocks@cover@field@
{\thesis@titlePage@large\vskip 1em%
{\bf\thesis@@{fieldTitle}:} \thesis@field@name}%
\fi\vskip 2em}
\def\thesis@blocks@cover@content{%
{\thesis@titlePage@Huge\bf\thesis@TeXtitle\par\vfil}%
\vskip 0.8in%
{\thesis@titlePage@large\sc\thesis@@{typeName}}\\[0.3in]%
{\thesis@titlePage@Large\bf\thesis@author}}
\def\thesis@blocks@cover@footer{%
{\thesis@titlePage@large\thesis@place, \thesis@@{semester}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@blocks@advisorSignature}
% The |\thesis@blocks@advisorSignature| macro produces space for
% the thesis advisor's signature.
% \changes{v1.0.0}{2021/02/26}{^^A
% The \cs{thesis@blocks@advisorSignature} macro is now defined
% for styles of all faculties at the Masaryk University in Brno,
% not just for the Faculty of Informatics, and is automatically
% used in the \cs{thesis@blocks@titlePage} macro for rigorous
% theses and PhD thesis proposals. [VN]}
% \begin{macrocode}
\def\thesis@blocks@advisorSignature{%
\let\@A\relax\newlength{\@A}
\settowidth{\@A}{\thesis@@{advisorSignature}}
\setlength{\@A}{\@A+1cm}
\hfill\raisebox{-0.5em}{\parbox{\@A}{
\centering
\rule{\@A}{1pt}\\
\thesis@@{advisorSignature}
}}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@blocks@titlePage}
% The |\thesis@blocks@titlePage| macro typesets the thesis
% title page.
% The \cs{bfseries} command switches to the sans serif typeface
% and to the secondary color in the style files of the Masaryk
% University in Brno, Czech Republic. [VN]}
% \changes{v1.0.0}{2021/02/26}{^^A
% The \cs{thesis@blocks@titlePage} command no longer consists
% of the \cs{thesis@blocks@titlePage@header},
% \cs{thesis@blocks@titlePage@content}, and
% \cs{thesis@blocks@titlePage@footer} macros, which are no
% longer defined. [VN]}
% The output of the |\thesis@blocks@titlePage| macro is
% controlled by the following conditionals:
% \begin{enumerate}
% \item|\ifthesis@blocks@titlePage@department@| -- This
% conditional expression determines, whether the department
% name is going to be included in the title page. The
% default value of this conditional is \texttt{true}.
% \changes{v1.0.0}{2021/02/26}{^^A
% The \cs{ifthesis@blocks@titlePage@department@} conditional
% now defaults to \texttt{true}. [VN]}
% \item|\ifthesis@blocks@titlePage@field@| -- This
% conditional expression determines, whether the field of
% study is going to be included in the title page. The
% default value of this conditional is \texttt{true}.
% \changes{v1.0.0}{2021/02/26}{^^A
% The \cs{ifthesis@blocks@titlePage@field@} conditional
% now defaults to \texttt{true}. [VN]}
% \changes{v1.0.0}{2021/02/26}{^^A
% The \cs{ifthesis@blocks@titlePage@university@} and
% \cs{ifthesis@blocks@titlePage@faculty@} conditionals
% are no longer defined. [VN]}
% \item|\ifthesis@blocks@titlePage@programme@| -- This
% conditional expression determines, whether the study
% programme is going to be included in the title page. The
% default value of this conditional is \texttt{false}.
% \changes{v1.0.0}{2021/02/26}{^^A
% The \cs{ifthesis@blocks@titlePage@programme@} conditional
% is now defined and defaults to \texttt{false}. [VN]}
% \end{enumerate}
% The sebsequently loaded style files can modify the value of these
% conditionals to alter the output of the
% |\thesis@blocks@titlePage| macro without altering its definition.
% \begin{macrocode}
\newif\ifthesis@blocks@titlePage@department@
\thesis@blocks@titlePage@department@true
\newif\ifthesis@blocks@titlePage@field@
\thesis@blocks@titlePage@field@true
\newif\ifthesis@blocks@titlePage@programme@
\thesis@blocks@titlePage@programme@true
\def\thesis@blocks@titlePage{%
\thesis@blocks@clear
\begin{alwayssingle}%
\thispagestyle{empty}%
\begin{center}%
\thesis@blocks@universityLogo@color[width=6.3cm]%
\par\vspace{0.75cm}%
{\sf\thesis@titlePage@large\thesis@@upper{facultyName}}%
\par\vspace{1.75cm}%
{\bf\thesis@titlePage@Huge\thesis@TeXtitle}%
\par\vspace{1.75cm}%
{\sf\thesis@titlePage@Large\thesis@@{typeName}}
\par\vfill
{\sf\thesis@titlePage@LARGE\thesis@upper{author}}%
\par\vfill\vfill
{\sf\thesis@titlePage@large\thesis@@{advisorTitle}: \thesis@advisor}%
\par\vspace{0.75cm}%
\ifthesis@blocks@titlePage@department@
{\sf\thesis@titlePage@large\thesis@department@name}
\fi
\ifthesis@blocks@titlePage@programme@
\par\vspace{0.25cm}%
{\sf\thesis@titlePage@large\thesis@@{bib@programme}: \thesis@programme}\par
\fi
\ifthesis@blocks@titlePage@field@
\par\vspace{0.25cm}%
{\sf\thesis@titlePage@large\thesis@@{fieldTitle}: \thesis@field@name}%
\fi
\par\vfill
{\sf\thesis@titlePage@large\thesis@place, \thesis@@{semester}%
% \end{macrocode}
% If this is a rigorous thesis or a PhD thesis proposal, create
% space for the advisor's signature.
% \changes{v1.0.0}{2021/02/26}{^^A
% The \cs{thesis@blocks@advisorSignature} macro is now defined
% for styles of all faculties at the Masaryk University in Brno,
% not just for the Faculty of Informatics, and is automatically
% used in the \cs{thesis@blocks@titlePage} macro for rigorous
% theses and PhD thesis proposals. [VN]}
% \begin{macrocode}
\ifx\thesis@type\thesis@rigorous
\thesis@blocks@advisorSignature
\else\ifx\thesis@type\thesis@proposal
\thesis@blocks@advisorSignature
\fi\fi}%
\end{center}%
\end{alwayssingle}}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@seal}
% \changes{v1.0.0}{2021/03/22}{Added macro for the seal of faculty.
% [TV]}
% The |\thesis@blocks@seal| macro typesets the seal of the faculty.
% \begin{macrocode}
\def\thesis@blocks@seal{%
\thesis@blocks@clear
\begin{alwayssingle}%
\thispagestyle{empty}%
\begin{center}%
\leavevmode
\par\vfill
\thesis@blocks@facultyLogo@color[width=6.3cm]%
\par\vfill\vfill\vfill\vfill
\end{center}%
\end{alwayssingle}}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@toc}
% The |\thesis@blocks@toc| macro typesets the table of contents.
% \begin{macrocode}
\def\thesis@blocks@toc{%
\thesis@blocks@clear
\tableofcontents}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@tables}
% The |\thesis@blocks@tables| macro typesets the table of
% contents and optionally the list of tables and the
% list of figures.
\def\thesis@blocks@tables{%
\thesis@blocks@lot
\thesis@blocks@lof}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@declaration}
% The |\thesis@blocks@declaration| macro typesets the
% declaration text.
\def\thesis@blocks@declaration{%
\thesis@blocks@clear
\chapter*{\thesis@@{declarationTitle}}%
\thesis@declaration
\hfill\thesis@author
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@thanks}
% The |\thesis@blocks@thanks| macro typesets the
% acknowledgements, if the |\thesis@thanks| macro is
% defined. Otherwise, the macro produces no output.
\def\thesis@blocks@thanks{%
\ifx\thesis@thanks\undefined\else
\thesis@blocks@clear
\chapter*{\vspace*{\fill}\thesis@@{thanksTitle}}%
Vít Starý Novotný
committed
\leavevmode\thesis@thanks
\end{alwayssingle}%
\fi}
% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@abstract}
% The |\thesis@blocks@abstract| macro typesets the