chore: add latest version

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2022-05-12 12:28:22 +02:00
parent 6487b63cde
commit 4617806caf
Signed by: mfocko
GPG key ID: 7C47D46246790496
29 changed files with 802 additions and 9788 deletions

6
Makefile Normal file
View file

@ -0,0 +1,6 @@
COUNT:=$(shell texcount fi-pdflatex.tex -char -inc | grep "Letters in text:" | tail -n1 | cut -f2- -d:)
count:
@echo Does not count spaces! The number is therefore lower than actual number of standard pages.
@echo Letters: $(COUNT)
@echo Pages: $(shell echo "scale=2; $(COUNT)/1800.0" | bc -l )/30

View file

@ -1,685 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% I, the copyright holder of this work, release this work into the
%% public domain. This applies worldwide. In some countries this may
%% not be legally possible; if so: I grant anyone the right to use
%% this work for any purpose, without any conditions, unless such
%% conditions are required by law.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[
digital, %% The `digital` option enables the default options for the
%% digital version of a document. Replace with `printed`
%% to enable the default options for the printed version
%% of a document.
%% color, %% Uncomment these lines (by removing the %% at the
%% %% beginning) to use color in the digital version of your
%% %% document
table, %% The `table` option causes the coloring of tables.
%% Replace with `notable` to restore plain LaTeX tables.
twoside, %% The `twoside` option enables double-sided typesetting.
%% Use at least 120 g/m² paper to prevent show-through.
%% Replace with `oneside` to use one-sided typesetting;
%% use only if you dont have access to a double-sided
%% printer, or if one-sided typesetting is a formal
%% requirement at your faculty.
lof, %% The `lof` option prints the List of Figures. Replace
%% with `nolof` to hide the List of Figures.
lot, %% The `lot` option prints the List of Tables. Replace
%% with `nolot` to hide the List of Tables.
%% More options are listed in the user guide at
%% <http://mirrors.ctan.org/macros/latex/contrib/fithesis/guide/mu/fi.pdf>.
]{fithesis3}
%% The following section sets up the locales used in the thesis.
\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding
\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts.
\usepackage[
main=english, %% By using `czech` or `slovak` as the main locale
%% instead of `english`, you can typeset the thesis
%% in either Czech or Slovak, respectively.
english, german, russian, czech, slovak %% The additional keys allow
]{babel} %% foreign texts to be typeset as follows:
%%
%% \begin{otherlanguage}{german} ... \end{otherlanguage}
%% \begin{otherlanguage}{russian} ... \end{otherlanguage}
%% \begin{otherlanguage}{czech} ... \end{otherlanguage}
%% \begin{otherlanguage}{slovak} ... \end{otherlanguage}
%%
%% For non-Latin scripts, it may be necessary to load additional
%% fonts:
\usepackage{paratype}
\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}}
%%
%% The following section sets up the metadata of the thesis.
\thesissetup{
date = \the\year/\the\month/\the\day,
university = mu,
faculty = fi,
type = bc,
author = Matej Focko,
gender = m,
advisor = {prof. RNDr. Ivana Černá, CSc.},
title = {Rank-Balanced Trees},
TeXtitle = {Rank-Balanced Trees},
keywords = {algorithms, trees, rank, balanced trees, ...},
TeXkeywords = {algorithms, trees, rank, balanced trees, \ldots},
abstract = {%
This is the abstract of my thesis, which can
span multiple paragraphs.
},
thanks = {%
These are the acknowledgements for my thesis, which can
span multiple paragraphs.
},
bib = example.bib,
%% Uncomment the following line (by removing the %% at the
%% beginning) and replace `assignment.pdf` with the filename
%% of your scanned thesis assignment.
%% assignment = assignment.pdf,
}
\usepackage{makeidx} %% The `makeidx` package contains
\makeindex %% helper commands for index typesetting.
%% These additional packages are used within the document:
\usepackage{paralist} %% Compact list environments
\usepackage{amsmath} %% Mathematics
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{url} %% Hyperlinks
\usepackage{markdown} %% Lightweight markup
\usepackage{tabularx} %% Tables
\usepackage{tabu}
\usepackage{booktabs}
\usepackage{listings} %% Source code highlighting
\lstset{
basicstyle = \ttfamily,
identifierstyle = \color{black},
keywordstyle = \color{blue},
keywordstyle = {[2]\color{cyan}},
keywordstyle = {[3]\color{olive}},
stringstyle = \color{teal},
commentstyle = \itshape\color{magenta},
breaklines = true,
}
\usepackage{floatrow} %% Putting captions above tables
\floatsetup[table]{capposition=top}
\begin{document}
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
Theses are rumoured to be the capstones of education, so I decided
to write one of my own. If all goes well, I will soon have a
diploma under my belt. Wish me luck!
\begin{otherlanguage}{czech}
Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se
rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si
na konci semestru diplom. Držte mi palce!
\end{otherlanguage}
\begin{otherlanguage}{slovak}
Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa
rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem
si na konci semestra diplom. Držte mi palce!
\end{otherlanguage}
\begin{otherlanguage}{german}
Man munkelt, dass die Dissertation die Krönung der Ausbildung ist.
Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn
alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück!
\end{otherlanguage}
\begin{otherlanguage}{russian}\textrussian{%
Говорят, что тезис -- это кульминация обучения. Поэтому я и решил
написать собственный тезис. Если всё сработает по плану, я скоро
получу диплом. Желайте мне удачи!
}\end{otherlanguage}
\chapter{Using lightweight markup}
\shorthandoff{-}
\begin{markdown*}{%
hybrid,
definitionLists,
footnotes,
inlineFootnotes,
hashEnumerators,
fencedCode,
citations,
citationNbsps,
pipeTables,
tableCaptions,
}
If you decide that \LaTeX{} is too wordy for some parts of your
document, there are [packages](https://www.ctan.org/pkg/markdown
"Markdown") that allow you to use more lightweight markup next
to it.
![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the
Masaryk University")
| Right | Left | Default | Center |
|------:|:-----|---------|:------:|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
: This is a table with different types of alignment.
This is a bullet list. Unlike numbered lists, bulleted lists
contain an **unordered** set of bullet points. When a bullet point
contains multiple paragraphs, the list is typeset as follows:
* The first item of a bullet list
that spans several paragraphs,
* the second item of a bullet list,
* the third item of a bullet list.
When none of the bullet points contains multiple paragraphs, the
list has a more compact form:
* The first item of a bullet list,
* the second item of a bullet list,
* the third item of a bullet list.
Unlike a bulleted list, a numbered list implies chronology or
ordering of the bullet points. When a bullet point
contains multiple paragraphs, the list is typeset as follows:
1. The first item of an ordered list
that spans several paragraphs,
2. the second item of an ordered list,
3. the third item of an ordered list.
#. If you are feeling lazy,
#. you can use hash enumerators as well.
When none of the bullet points contains multiple paragraphs, the
list has a more compact form:
6. The first item of an ordered list,
7. the second item of an ordered list,
8. the third item of an ordered list.
Definition lists are used to provide definitions of terms. When
a definition contains multiple paragraphs, the list is typeset
as follows:
Term 1
: Definition 1
*Term 2*
: Definition 2
Some code, part of Definition 2
Third paragraph of Definition 2.
When none of the bullet points contains multiple paragraphs, the
list has a more compact form:
Term 1
: Definition 1
*Term 2*
: Definition 2
Block quotations are used to include an excerpt from an external
document in way that visually clearly separates the excerpt from
the rest of the work:
> This is the first level of quoting.
>
> > This is nested blockquote.
>
> Back to the first level.
Footnotes are used to include additional information to the
document that are not necessary for the understanding of the main
text. Here is a footnote reference^[Here is the footnote.] and
another.[^longnote]
[^longnote]: Here's one with multiple blocks.
Subsequent paragraphs are indented to show that they
belong to the previous footnote.
Some code
The whole paragraph can be indented, or just the first
line. In this way, multi-paragraph footnotes work like
multi-paragraph list items.
Citations are used to provide bibliographical references to other
documents. This is a regular citation~[@borgman03, p. 123]. This is
an in-text citation: @borgman03\. You can also cite several authors
at once using both regular~[see @borgman03, p. 123; @greenberg98,
sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123;
@greenberg98, sec. 3.2; @thanh01].
Code blocks are used to include source code listings into the
document:
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
// This is a comment
int main(int argc, char **argv)
{
while (--c > 1 && !fork());
sleep(c = atoi(v[c]));
printf("%d\n", c);
wait(0);
return 0;
}
There is an alternative syntax for code blocks that allows you to
specify additional information,
such as the language of the source
code. This information can be used for syntax highlighting:
``` sh
#!/bin/sh
fac() {
if [ "$1" -leq 1 ]; then
echo 1
else
echo $(("$1" * fac $(("$1" - 1))))
fi
}
```
~~~~~~ Ruby
# Here's a way to empty an array.
joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ]
print(joe.pop, " ") while joe.size > 0
print "\n"
~~~~~~
\end{markdown*}
\shorthandon{-}
\chapter{These are}
\section{the available}
\subsection{sectioning}
\subsubsection{commands.}
\paragraph{Paragraphs and}
\subparagraph{subparagraphs are available as well.}
Inside the text, you can also use unnumbered lists,
\begin{itemize}
\item such as
\item this one
\begin{itemize}
\item and they can be nested as well.
\item[>>] You can even turn the bullets into something fancier,
\item[\S] if you so desire.
\end{itemize}
\end{itemize}
Numbered lists are
\begin{enumerate}
\item very
\begin{enumerate}
\item similar
\end{enumerate}
\end{enumerate}
and so are description lists:
\begin{description}
\item[Description list]
A list of terms with a description of each term
\end{description}
The spacing of these lists is geared towards paragraphs of text.
For lists of words and phrases, the \textsf{paralist} package
offers commands
\begin{compactitem}
\item that
\begin{compactitem}
\item are
\begin{compactitem}
\item better
\begin{compactitem}
\item suited
\end{compactitem}
\end{compactitem}
\end{compactitem}
\end{compactitem}
\begin{compactenum}
\item to
\begin{compactenum}
\item this
\begin{compactenum}
\item kind of
\begin{compactenum}
\item content.
\end{compactenum}
\end{compactenum}
\end{compactenum}
\end{compactenum}
The \textsf{amsthm} package provides the commands necessary for the
typesetting of mathematical definitions, theorems, lemmas and
proofs.
%% We will define several mathematical sectioning commands.
\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems
%% will be reset after each section.
\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas
\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will
%% share the counter with theorems.
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\theoremstyle{remark}
\newtheorem*{remark}{Remark}
\begin{theorem}
This is a theorem that offers a profound insight into the
mathematical sectioning commands.
\end{theorem}
\begin{theorem}[Another theorem]
This is another theorem. Unlike the first one, this theorem has
been endowed with a name.
\end{theorem}
\begin{lemma}
Let us suppose that $x^2+y^2=z^2$. Then
\begin{equation}
\biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle
=F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr).
\end{equation}
\end{lemma}
\begin{proof}
$\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+
\frac{\partial^2f}{\partial y^2}$.
\end{proof}
\begin{corollary}
This is a corollary.
\end{corollary}
\begin{remark}
This is a remark.
\end{remark}
\chapter{Floats and references}
\begin{figure}
\begin{center}
%% PNG and JPG images can be inserted into the document as well,
%% but their resolution needs to be adequate. The minimum is
%% about 100 pixels per 1 centimeter or 300 pixels per 1 inch.
%% That means that a JPG or PNG image typeset at 4 × 4 cm should
%% be 400 × 400 px large at the bare minimum.
%%
%% The optimum is about 250 pixels per 1 centimeter or 600
%% pixels per 1 inch. That means that a JPG or PNG image typeset
%% at 4 × 4 cm should be 1000 × 1000 px large or larger.
\includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf}
\end{center}
\caption{The logo of the Masaryk University at 40\,mm}
\label{fig:mulogo1}
\end{figure}
\begin{figure}
\begin{center}
\begin{minipage}{.66\textwidth}
\includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf}
\end{minipage}
\begin{minipage}{.33\textwidth}
\includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\
\includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf}
\end{minipage}
\end{center}
\caption{The logo of the Masaryk University at $\frac23$ and
$\frac13$ of text width}
\label{fig:mulogo2}
\end{figure}
\begin{table}
\begin{tabularx}{\textwidth}{lllX}
\toprule
Day & Min Temp & Max Temp & Summary \\
\midrule
Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A
clear day with low wind and no adverse current advisories. \\
Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A
trough of low pressure will come from the northwest. \\
Wednesday & $10^{\circ}\mathrm{C}$ &
$21^\circ\mathrm{C}$ & Rain will spread to all parts during the
morning. \\
\bottomrule
\end{tabularx}
\caption{A weather forecast}
\label{tab:weather}
\end{table}
The logo of the Masaryk University is shown in Figure
\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages
\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather
forecast is shown in Table \ref{tab:weather} at page
\pageref{tab:weather}. The following chapter is Chapter
\ref{chap:matheq} and starts at page \pageref{chap:matheq}.
Items \ref{item:star1}, \ref{item:star2}, and
\ref{item:star3} are starred in the following list:
\begin{compactenum}
\item some text
\item some other text
\item $\star$ \label{item:star1}
\begin{compactenum}
\item some text
\item $\star$ \label{item:star2}
\item some other text
\begin{compactenum}
\item some text
\item some other text
\item yet another piece of text
\item $\star$ \label{item:star3}
\end{compactenum}
\item yet another piece of text
\end{compactenum}
\item yet another piece of text
\end{compactenum}
If your reference points to a place that has not yet been typeset,
the \verb"\ref" command will expand to \textbf{??} during the first
run of
\texttt{pdflatex \jobname.tex}
and a second run is going to be needed for the references to
resolve. With online services -- such as Overleaf -- this is
performed automatically.
\chapter{Mathematical equations}
\label{chap:matheq}
\TeX{} comes pre-packed with the ability to typeset inline
equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display
equations, such as \[
\mathbf{A}^{-1} = \begin{bmatrix}
a & b \\ c & d \\
\end{bmatrix}^{-1} =
\frac{1}{\det(\mathbf{A})} \begin{bmatrix}
\,\,\,d & \!\!-b \\ -c & \,a \\
\end{bmatrix} =
\frac{1}{ad - bc} \begin{bmatrix}
\,\,\,d & \!\!-b \\ -c & \,a \\
\end{bmatrix}.
\] \LaTeX{} defines the automatically numbered \texttt{equation}
environment:
\begin{equation}
\gamma Px = PAx = PAP^{-1}Px.
\end{equation}
The package \textsf{amsmath} provides several additional
environments that can be used to typeset complex equations:
\begin{enumerate}
\item An equation can be spread over multiple lines using the
\texttt{multline} environment:
\begin{multline}
a + b + c + d + e + f + b + c + d + e + f + b + c + d + e +
f \\
+ f + g + h + i + j + k + l + m + n + o + p + q
\end{multline}
\item Several aligned equations can be typeset using the
\texttt{align} environment:
\begin{align}
a + b &= c + d \\
u &= v + w + x \\[1ex]
i + j + k + l &= m
\end{align}
\item The \texttt{alignat} environment is similar to
\texttt{align}, but it doesn't insert horizontal spaces between
the individual columns:
\begin{alignat}{2}
a + b + c &+ d & &= 0 \\
e &+ f + g & &= 5
\end{alignat}
\item Much like chapter, sections, tables, figures, or list
items, equations -- such as \eqref{eq:first} and
\eqref{eq:mine} -- can also be labeled and referenced:
\begin{alignat}{4}
b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & &
&= y_1, \label{eq:first} \\
b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 &
&= y_2. \tag{My equation} \label{eq:mine}
\end{alignat}
\item The \texttt{gather} environment makes it possible to
typeset several equations without any alignment:
\begin{gather}
\psi = \psi\psi, \\
\eta = \eta\eta\eta\eta\eta\eta, \\
\theta = \theta.
\end{gather}
\item Several cases can be typeset using the \texttt{cases}
environment:
\begin{equation}
|y| = \begin{cases}
\phantom-y & \text{if }z\geq0, \\
-y & \text{otherwise}.
\end{cases}
\end{equation}
\end{enumerate}
For the complete list of environments and commands, consult the
\textsf{amsmath} package manual\footnote{
See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}.
The \texttt{\textbackslash url} command is provided by the
package \textsf{url}.
}.
\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts}
\textit{at} \textbf{disposal}}}
The serified roman font is used for the main body of the text.
\textit{Italics are typically used to denote emphasis or
quotations.} \texttt{The teletype font is typically used for source
code listings.} The \textbf{bold}, \textsc{small-caps} and
\textsf{sans-serif} variants of the base roman font can be used to
denote specific types of information.
\tiny We \scriptsize can \footnotesize also \small change \normalsize
the \large font \Large size, \LARGE although \huge it \Huge
is \huge usually \LARGE not \Large necessary.\normalsize
A wide variety of mathematical fonts is also available, such as: \[
\mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC},
\mathit{ABC}, \mathtt{ABC}
\] By loading the \textsf{amsfonts} packages, several additional
fonts will become available: \[
\mathfrak{ABC}, \mathbb{ABC}
\] Many other mathematical fonts are available\footnote{
See \url{http://tex.stackexchange.com/a/58124/70941}.
}.
\chapter{Inserting the bibliography}
After linking a bibliography data\-base files to the document using
the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}%
\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can
start citing the entries. This is just dummy text
\parencite{borgman03} lightly sprinkled with citations
\parencite[p.~123]{greenberg98}. Several sources can be cited at
once: \cite{borgman03,greenberg98,thanh01}.
\citetitle{greenberg98} was written by \citeauthor{greenberg98} in
\citeyear{greenberg98}. We can also produce \textcite{greenberg98}%
\ or %% Let us define a compound command:
\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})}%
\citeauthoryear{greenberg98}%
. The full bibliographic citation is:
\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic
citation into the footnote\footfullcite{greenberg98}.
The \verb"\nocite" command will not generate any
output\nocite{muni}, but it will insert its arguments into
the bibliography. The \verb"\nocite{*}" command will insert all the
records in the bibliography database file into the bibliography.
Try uncommenting the command
%% \nocite{*}
and watch the bibliography section come apart at the seams.
When typesetting the document for the first time, citing a
\texttt{work} will expand to [\textbf{work}] and the
\verb"\printbibliography" command will produce no output. It is now
necessary to generate the bibliography by running \texttt{biber
\jobname.bcf} from the command line and then by typesetting the
document again twice. During the first run, the bibliography
section and the citations will be typeset, and in the second run,
the bibliography section will appear in the table of contents.
The \texttt{biber} command needs to be executed from within the
directory, where the \LaTeX\ source file is located. In Windows,
the command line can be opened in a directory by holding down the
\textsf{Shift} key and by clicking the right mouse button while
hovering the cursor over a directory. Select the \textsf{Open
Command Window Here} option in the context menu that opens shortly
afterwards.
With online services -- such as Overleaf -- or when using an
automatic tool -- such as \LaTeX MK -- all commands are executed
automatically. When you omit the \verb"\printbibliography" command,
its location will be decided by the template.
\printbibliography[heading=bibintoc] %% Print the bibliography.
\chapter{Inserting the index}
After using the \verb"\makeindex" macro and loading the
\texttt{makeidx} package that provides additional indexing
commands, index entries can be created by issuing the \verb"\index"
command. \index{dummy text|(}It is possible to create ranged index
entries, which will encompass a span of text.\index{dummy text|)}
To insert complex typographic material -- such as $\alpha$
\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} --
into the index, you need to specify a text string, which will
determine how the entry will be sorted. It is also possible to
create hierarchal entries. \index{vehicles!trucks}
\index{vehicles!speed cars}
After typesetting the document, it is necessary to generate the
index by running
\begin{center}%
\texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}%
$\rangle$\texttt{ \jobname.idx}
\end{center}
from the command line, where $\langle$\textit{locale}$\rangle$
corresponds to the main locale of your thesis -- such as
\texttt{english}, and then typesetting the document again.
The \texttt{texindy} command needs to be executed from within the
directory, where the \LaTeX\ source file is located. In Windows,
the command line can be opened in a directory by holding down the
\textsf{Shift} key and by clicking the right mouse button while
hovering the cursor over a directory. Select the \textsf{Open Command
Window Here} option in the context menu that opens shortly
afterwards.
With online services -- such as Overleaf -- the commands are
executed automatically, although the locale may be erroneously
detected, or the \texttt{makeindex} tool (which is only able to
sort entries that contain digits and letters of the English
alphabet) may be used instead of \texttt{texindy}. In either case,
the index will be ill-sorted.
\makeatletter\thesis@blocks@clear\makeatother
\phantomsection %% Print the index and insert it into the
\addcontentsline{toc}{chapter}{\indexname} %% table of contents.
\printindex
\appendix %% Start the appendices.
\chapter{An appendix}
Here you can insert the appendices of your thesis.
\end{document}

245
bibliography.bib Normal file
View file

@ -0,0 +1,245 @@
% The example bibliographical entries below were borrowed from the
% <https://www.ctan.org/pkg/biblatex-iso690> package documentation.
@article{wavl,
author = {Haeupler, Bernhard and Sen, Siddhartha and Tarjan, Robert E.},
title = {Rank-Balanced Trees},
year = {2015},
issue_date = {June 2015},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {11},
number = {4},
issn = {1549-6325},
url = {https://doi.org/10.1145/2689412},
doi = {10.1145/2689412},
abstract = {Since the invention of AVL trees in 1962, many kinds of binary search trees have been proposed. Notable are red-black trees, in which bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and O(1) rotations worst-case. But the design space of balanced trees has not been fully explored. We continue the exploration. Our contributions are three: We systematically study the use of ranks and rank differences to define height-based balance in binary trees. Different invariants on rank differences yield AVL trees, red-black trees, and other kinds of balanced trees. By relaxing AVL trees, we obtain a new kind of balanced binary tree, the weak AVL tree (wavl tree), whose properties we develop. Bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and at most two rotations, improving the three or more rotations per deletion needed in all other kinds of balanced trees of which we are aware. The height bound of a wavl tree degrades gracefully from that of an AVL tree as the number of deletions increases and is never worse than that of a red-black tree. Wavl trees also support top-down, fixed look-ahead rebalancing in O(1) amortized time. Finally, we use exponential potential functions to prove that in wavl trees rebalancing steps occur exponentially infrequently in rank. Thus, most of the rebalancing is at the bottom of the tree, which is crucial in concurrent applications and in those in which rotations take time that depends on the subtree size.},
journal = {ACM Trans. Algorithms},
month = {6},
articleno = {30},
numpages = {26},
keywords = {data structures, exponential potential function, red-black trees, AVL trees, search trees, Balanced binary trees, amortized complexity}
}
@article{ravl,
author = {Sen, Siddhartha and Tarjan, Robert E. and Kim, David Hong Kyun},
title = {Deletion Without Rebalancing in Binary Search Trees},
year = {2016},
issue_date = {September 2016},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {12},
number = {4},
issn = {1549-6325},
url = {https://doi.org/10.1145/2903142},
doi = {10.1145/2903142},
abstract = {We address the vexing issue of deletions in balanced trees. Rebalancing after a deletion is generally more complicated than rebalancing after an insertion. Textbooks neglect deletion rebalancing, and many B-tree--based database systems do not do it. We describe a relaxation of AVL trees in which rebalancing is done after insertions but not after deletions, yet worst-case access time remains logarithmic in the number of insertions. For any application of balanced trees in which the number of updates is polynomial in the tree size, our structure offers performance competitive with that of classical balanced trees. With the addition of periodic rebuilding, the performance of our structure is theoretically superior to that of many, if not all, classic balanced tree structures. Our structure needs lg lg m+ 1 bits of balance information per node, where m is the number of insertions and lg is the base-two logarithm, or lg lg n+ O(1) with periodic rebuilding, where n is the number of nodes. An insertion takes up to two rotations and O(1) amortized time, not counting the time to find the insertion position. This is the same as in standard AVL trees. Using an analysis that relies on an exponential potential function, we show that rebalancing steps occur with a frequency that is exponentially small in the height of the affected node. Our techniques apply to other types of balanced trees, notably B-trees, as we show in a companion article, and particularly red-black trees, which can be viewed as a special case of B-trees.},
journal = {ACM Trans. Algorithms},
month = {sep},
articleno = {57},
numpages = {31},
keywords = {Balanced trees, exponential potential function, amortized complexity, algorithm, data structure, database access methods}
}
@INPROCEEDINGS{rbtree,
author={Guibas, Leo J. and Sedgewick, Robert},
booktitle={19th Annual Symposium on Foundations of Computer Science (sfcs 1978)},
title={A dichromatic framework for balanced trees},
year={1978},
volume={},
number={},
pages={8-21},
doi={10.1109/SFCS.1978.3}
}
@inproceedings{btree,
author = {Bayer, R. and McCreight, E.},
title = {Organization and Maintenance of Large Ordered Indices},
year = {1970},
isbn = {9781450379410},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/1734663.1734671},
doi = {10.1145/1734663.1734671},
abstract = {Organization and maintenance of an index for a dynamic random access file is considered. It is assumed that the index must be kept on some pseudo random access backup store like a disc or a drum. The index organization described allows retrieval, insertion, and deletion of keys in time proportional to logk I where I is the size of the index and k is a device dependent natural number such that the performance of the scheme becomes near optimal. Storage utilization is at least 50\% but generally much higher. The pages of the index are organized in a special data-structure, so-called B-trees. The scheme is analyzed, performance bounds are obtained, and a near optimal k is computed. Experiments have been performed with indices up to 100,000 keys. An index of size 15,000 (100,000) can be maintained with an average of 9 (at least 4) transactions per second on an IBM 360/44 with a 2311 disc.},
booktitle = {Proceedings of the 1970 ACM SIGFIDET (Now SIGMOD) Workshop on Data Description, Access and Control},
pages = {107141},
numpages = {35},
keywords = {key deletion, paging, information retrieval, data structures, key insertion, random access files, dynamic index maintenance, key retrieval},
location = {Houston, Texas},
series = {SIGFIDET '70}
}
@book{knuth1998art,
title={The Art of Computer Programming: Volume 3: Sorting and Searching},
author={Knuth, D.E.},
isbn={9780321635785},
url={https://books.google.cz/books?id=cYULBAAAQBAJ},
year={1998},
publisher={Pearson Education}
}
@Book{cormen2009introduction,
author = {Cormen, Thomas},
title = {Introduction to algorithms},
publisher = {MIT Press},
year = {2009},
address = {Cambridge, Mass},
isbn = {9780262033848}
}
@Book{labyrint,
author = {Mareš, Martin and Valla, Tomáš},
title = {Průvodce labyrintem algoritmů},
publisher = {CZ.NIC, z.s.p.o.},
year = {2017},
isbn = {9788088168225},
url = {http://pruvodce.ucw.cz}
}
@article{hypothesis,
author = {MacIver, David R. and Hatfield-Dodds, Zac and {many other contributors}},
doi = {10.21105/joss.01891},
month = {11},
title = {{Hypothesis: A new approach to property-based testing}},
year = {2019}
}
@ONLINE{ib002,
title = {Algoritmy a datové struktury I},
url = {https://is.muni.cz/predmet/fi/jaro2022/IB002},
urldate = {2022-05-01},
location = {Brno},
langid = {czech}
}
@ONLINE{ib111,
title = {Základy programování},
url = {https://is.muni.cz/predmet/fi/podzim2021/IB111},
urldate = {2022-05-01},
location = {Brno},
langid = {czech}
}
%% EXAMPLES FOLLOW %%
% BORGMAN, Christine L., 2003. From Gutenberg to the global information
% infrastructure: access to information in the networked world. First. Cambridge
% (Mass): The MIT Press. ISBN 0-262-52345-0 [xviii, 324]
@BOOK{borgman03,
author = {Borgman, Christine L.},
date = {2003},
title = {From Gutenberg to the global information infrastructure},
subtitle = {access to information in the networked world},
edition = {1}, % should not be stated
location = {Cambridge (Mass)},
publisher = {The MIT Press},
pagetotal = {xviii, 324},
isbn = {0-262-52345-0},
langid = {english}
}
% GREENBERG, David, 1998. Camel drivers and gatecrashers: quality control in
% the digital research library. In: HAWKINS, B.L et al. (eds.). The mirage of
% continuity: reconfiguring academic information resources for the 21st
% century. Washington (D.C.): Council on Library and Information Resources;
% Association of American Universities, pp. 105116
@INCOLLECTION{greenberg98,
crossref = {mirage98},
author = {Greenberg, David},
title = {Camel drivers and gatecrashers},
subtitle = {quality control in the digital research library},
pages = {105-116},
}
@COLLECTION{mirage98,
title = {The mirage of continuity},
subtitle = {reconfiguring academic information
resources for the 21st century},
editor = {Hawkins, B.L and Battin, P},
date = {1998},
location = {Washington (D.C.)},
publisher = {Council on Library and Information Resources;
Association of American Universities},
langid = {english}
}
% LYNCH, C., 2005. Where do we go from here?: the next decade for digital
% libraries. DLib Magazine [online]. Vol. 11, no. 7/8 [visited on 2005-08-15].
% ISSN 1082-9873. Available from:
% http://www.dlib.org/dlib/july05/lynch/07lynch.html
@ARTICLE{lynch05,
crossref = {dlib},
author = {Lynch, C.},
title = {Where do we go from here?},
subtitle = {the next decade for digital libraries},
url = {http://www.dlib.org/dlib/july05/lynch/07lynch.html},
urldate = {2005-08-15}
}
@PERIODICAL{dlib,
journaltitle = {DLib Magazine},
date = {2005},
volume = {11},
number = {7/8},
issn = {1082-9873},
langid = {english},
}
% HÀN, Thé Thành, 2001. Micro-typographic extensions to the TEX type- setting
% system [online]. Brno [visited on 2016-12-09]. Available from:
% http://www.pragma-ade.nl/pdftex/thesis.pdf. PhD thesis. The Faculty of
% Informatics, Masaryk University.
@PHDTHESIS{thanh01,
author = {Hàn Thé, Thành},
title = {Micro-typographic extensions to the \TeX{} typesetting system},
date = {2001},
institution = {The Faculty of Informatics, Masaryk University},
location = {Brno},
url = {http://www.pragma-ade.nl/pdftex/thesis.pdf},
urldate = {2016-12-09},
langid = {english}
}
% SHANNON, Claude Elwood, 1940. A symbolic analysis of relay and switching
% circuits. Available from DOI: 1721.1/11173. Masters thesis. Massachusetts
% Institute of Technology.
@MASTERSTHESIS{shannon40,
author = {Shannon, Claude Elwood},
title = {A symbolic analysis of relay and switching circuits},
date = {1940},
institution = {Massachusetts Institute of Technology},
langid = {english},
doi = {1721.1/11173},
}
% EHLINGER JR., Philip Charles. Device for the treatment of hiccups. US.
% US Patent, 7062320.
@PATENT{ehlinger06,
author = {Ehlinger Jr., Philip Charles},
title = {Device for the treatment of hiccups},
type = {US Patent},
location = {US},
date = {2006},
number = {7062320},
langid = {english}
}
% Masaryk University, 19962009 [online]. Brno: Masaryk University
% [visited on 2016-12-09]. Available from: https://www.muni.cz/en.
@ONLINE{muni,
publisher = {Masaryk University},
title = {Masaryk University},
date = {1996/2009},
url = {https://www.muni.cz/en},
urldate = {2016-12-09},
location = {Brno},
langid = {english}
}

View file

@ -1,123 +0,0 @@
% The example bibliographical entries below were borrowed from the
% <https://www.ctan.org/pkg/biblatex-iso690> package documentation.
% BORGMAN, Christine L., 2003. From Gutenberg to the global information
% infrastructure: access to information in the networked world. First. Cambridge
% (Mass): The MIT Press. ISBN 0-262-52345-0 [xviii, 324]
@BOOK{borgman03,
author = {Borgman, Christine L.},
date = {2003},
title = {From Gutenberg to the global information infrastructure},
subtitle = {access to information in the networked world},
edition = {1}, % should not be stated
location = {Cambridge (Mass)},
publisher = {The MIT Press},
pagetotal = {xviii, 324},
isbn = {0-262-52345-0},
langid = {english}
}
% GREENBERG, David, 1998. Camel drivers and gatecrashers: quality control in
% the digital research library. In: HAWKINS, B.L et al. (eds.). The mirage of
% continuity: reconfiguring academic information resources for the 21st
% century. Washington (D.C.): Council on Library and Information Resources;
% Association of American Universities, pp. 105116
@INCOLLECTION{greenberg98,
crossref = {mirage98},
author = {Greenberg, David},
title = {Camel drivers and gatecrashers},
subtitle = {quality control in the digital research library},
pages = {105-116},
}
@COLLECTION{mirage98,
title = {The mirage of continuity},
subtitle = {reconfiguring academic information
resources for the 21st century},
editor = {Hawkins, B.L and Battin, P},
date = {1998},
location = {Washington (D.C.)},
publisher = {Council on Library and Information Resources;
Association of American Universities},
langid = {english}
}
% LYNCH, C., 2005. Where do we go from here?: the next decade for digital
% libraries. DLib Magazine [online]. Vol. 11, no. 7/8 [visited on 2005-08-15].
% ISSN 1082-9873. Available from:
% http://www.dlib.org/dlib/july05/lynch/07lynch.html
@ARTICLE{lynch05,
crossref = {dlib},
author = {Lynch, C.},
title = {Where do we go from here?},
subtitle = {the next decade for digital libraries},
url = {http://www.dlib.org/dlib/july05/lynch/07lynch.html},
urldate = {2005-08-15}
}
@PERIODICAL{dlib,
journaltitle = {DLib Magazine},
date = {2005},
volume = {11},
number = {7/8},
issn = {1082-9873},
langid = {english},
}
% HÀN, Thé Thành, 2001. Micro-typographic extensions to the TEX type- setting
% system [online]. Brno [visited on 2016-12-09]. Available from:
% http://www.pragma-ade.nl/pdftex/thesis.pdf. PhD thesis. The Faculty of
% Informatics, Masaryk University.
@PHDTHESIS{thanh01,
author = {Hàn Thé, Thành},
title = {Micro-typographic extensions to the \TeX{} typesetting system},
date = {2001},
institution = {The Faculty of Informatics, Masaryk University},
location = {Brno},
url = {http://www.pragma-ade.nl/pdftex/thesis.pdf},
urldate = {2016-12-09},
langid = {english}
}
% SHANNON, Claude Elwood, 1940. A symbolic analysis of relay and switching
% circuits. Available from DOI: 1721.1/11173. Masters thesis. Massachusetts
% Institute of Technology.
@MASTERSTHESIS{shannon40,
author = {Shannon, Claude Elwood},
title = {A symbolic analysis of relay and switching circuits},
date = {1940},
institution = {Massachusetts Institute of Technology},
langid = {english},
doi = {1721.1/11173},
}
% EHLINGER JR., Philip Charles. Device for the treatment of hiccups. US.
% US Patent, 7062320.
@PATENT{ehlinger06,
author = {Ehlinger Jr., Philip Charles},
title = {Device for the treatment of hiccups},
type = {US Patent},
location = {US},
date = {2006},
number = {7062320},
langid = {english}
}
% Masaryk University, 19962009 [online]. Brno: Masaryk University
% [visited on 2016-12-09]. Available from: https://www.muni.cz/en.
@ONLINE{muni,
publisher = {Masaryk University},
title = {Masaryk University},
date = {1996/2009},
url = {https://www.muni.cz/en},
urldate = {2016-12-09},
location = {Brno},
langid = {english}
}

View file

@ -36,7 +36,7 @@
main=english, %% By using `czech` or `slovak` as the main locale
%% instead of `english`, you can typeset the thesis
%% in either Czech or Slovak, respectively.
english, german, russian, czech, slovak %% The additional keys allow
english, czech, slovak %% The additional keys allow
]{babel} %% foreign texts to be typeset as follows:
%%
%% \begin{otherlanguage}{german} ... \end{otherlanguage}
@ -63,18 +63,18 @@
keywords = {algorithms, data structures, rank, trees, balanced trees, study material, visualization, ...},
TeXkeywords = {algorithms, data structures, rank, trees, balanced trees, study material, visualization, \ldots},
abstract = {%
In the thesis I demonstrate usage of rank for implementing balanced binary-search trees
In the thesis we demonstrate usage of a rank for implementing balanced binary-search trees
and algorithms related to a specific rank-balanced tree, the weak AVL tree. First part
of the thesis consists of description of the rank-balanced tree followed by comparison
of the thesis consists of description of the rank-balanced tree followed by a comparison
to other balanced trees that can be implemented using rank, diagrams and pseudo-codes related
to weak AVL tree. I also present an implementation of weak AVL tree in Python, tested with
property-based testing. The final part of the thesis is web-page that allows performing operations
on the weak AVL tree with animations and step-by-step walk-through of pseudo-code.
to the weak AVL tree. We also present an implementation of the weak AVL tree in Python, tested with a
property-based testing. The final part of the thesis is a web-page that allows performing operations
on the weak AVL tree with animations and step-by-step walk-through of a pseudo-code.
},
thanks = {%
\textit{TBD}
},
bib = example.bib,
bib = bibliography.bib,
%% Uncomment the following line (by removing the %% at the
%% beginning) and replace `assignment.pdf` with the filename
%% of your scanned thesis assignment.
@ -88,7 +88,6 @@
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{url} %% Hyperlinks
\usepackage{markdown} %% Lightweight markup
\usepackage{tabularx} %% Tables
\usepackage{tabu}
\usepackage{booktabs}
@ -106,57 +105,395 @@
}
\usepackage{floatrow} %% Putting captions above tables
\floatsetup[table]{capposition=top}
\usepackage{hyperref}
\usepackage[x11names, svgnames, rgb]{xcolor}
\usepackage{tikz}
\usetikzlibrary{decorations,arrows,shapes}
\SetKwProg{Fn}{function}{ is}{end}
\SetKwProg{Proc}{procedure}{ is}{end}
\begin{document}
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
\textit{TBD}
Data structures have become a regular part of the essential toolbox for problem-solving. In many cases, they also help to improve the existing algorithm's performance, e.g. using a priority queue in Dijkstra's algorithm for the shortest path. This thesis will mainly discuss the implementation of a set (which can also be adjusted to represent a dictionary or map, if you wish).
Currently, the most commonly used implementations of sets use hash tables, but we will talk about another common alternative, implementation via self-balancing search trees. Compared to a hash table, they provide us with \textbf{consistent} time complexity, but at the cost of a requirement for ordering on the elements. The most implemented self-balancing binary tree is a \textit{red-black tree}, as described by Guibas and Sedgewick~\cite{rbtree}. Among other alternatives, we can find (non-binary) \textit{B-tree}~\cite{btree} and \textit{AVL tree}~\cite{knuth1998art}.
This thesis analyses and visualizes the \textit{Weak AVL (WAVL)}\cite{wavl} tree that has more relaxed conditions than the AVL tree but still provides better balancing than a red-black tree.
We start by reiterating through commonly used search trees, explaining basic ideas behind their self-balancing and bounding the height in the worst-case scenario. Then we state used terminology and explain the rank-balanced tree. Given a rank-balanced tree, we can delve into the details behind the representation of previously shown self-balancing binary search trees using rank and the WAVL rule gives us a new self-balancing binary search tree. For the WAVL, we provide pseudocode and explain operations used for rebalancing, including diagrams. Later on, we will discuss different heuristics that can be used for rebalancing and implementing the visualization of the operations on the WAVL tree.
\chapter{Self-balancing search trees}\label{chap:sb-bst}
This chapter will briefly discuss the properties and fundamental ideas behind the most used self-balancing search trees in standard libraries to give an idea about current options and how WAVL fits among them.
\section{Red-black trees}
As mentioned previously, red-black trees are among the most popular implementations in standard libraries. As always, we have a binary search tree, and then each node is given \textit{red} or \textit{black} colour. A red-black tree is kept balanced by enforcing the following set of rules:
\begin{enumerate}
\item External nodes are black; internal nodes may be red or black
\item For each internal node, all paths from it to external nodes contain the same number of black nodes
\item No path from an internal node to an external node contains two red nodes in a row
\end{enumerate}~\cite{rbtree}
Given this knowledge, we can safely deduce the following relation between the height of the red-black tree and nodes stored in it:
\[
\log_2{(n + 1)} \leq h \leq 2 \cdot \log_2{(n + 2)} - 2
\]\label{rb-height}~\cite{cormen2009introduction}
where the lower bound is given by a perfect binary tree and upper bound by the minimal red-black tree.
There are also other variants of the red-black tree that are considered to be simpler for implementation, e.g. left-leaning red-black tree, as described by Sedgewick.
Red-black trees are used to implement sets in C++, Java and C\#.
\section{AVL tree}
AVL tree is considered to be the eldest self-balancing binary search tree. For clarity, we define the following function:
\[
BalanceFactor(n) := height(right(n)) - height(left(n))
\]
Then we have an AVL tree, if for every node $n$ in the tree the following holds:
\[
BalanceFactor(n) \in \{ -1, 0, 1 \}
\]
In other words, the heights of left and right subtrees of each node differ at most in 1.
Similarly, we will deduce the height of the AVL tree from original paper, by Adelson-Velsky and Landis, we get:
\[
\left( \log_2{(n + 1)} \leq \right) h < \log_{\varphi}{(n + 1)} < \frac{3}{2} \cdot \log_2{(n + 1)}
\]\label{avl-height}
If we compare the upper bounds for the height of the red-black trees and AVL trees, we can see that AVL rules are more strict than red-black rules, but at the cost of rebalancing. However, in both cases, the rebalancing still takes $\log_2{n}$.
Regarding the implementation of AVL trees, we can see them implemented in the standard library of Agda or Coq.
\section {B-tree}
\textit{To keep or not to keep…}
Used in Rust.
\chapter{Rank-balanced trees}
In comparison to nodes in binary search trees, nodes in rank-balanced trees contain one more information and that is \textit{rank}. Each type of tree that can be implemented using this representation, e.g. red-black, 2-3-4, AVL or WAVL, has specific set of rules that ensure the resulting tree is balanced.
In comparison to nodes in binary search trees, nodes in rank-balanced trees contain one more piece of information, and that is \textit{rank}. Each type of tree that can be implemented using this representation, e.g. red-black, 2-3-4, AVL or WAVL, has a specific set of rules that ensure the resulting tree is balanced.
\section{Terminology related to rank-balanced trees}
In the text and pseudo-codes I adopt these functions or properties:
In the text and pseudocode we adopt these functions or properties:
\begin{itemize}
\item $r(x)$ or $x.rank$ returns rank of a node; in case of $r(x)$ there is a special case: $r(nil) = -1$
\item $parent(x)$ or $x.parent$ returns parent of a node; analogically for left and right children of a node
\item \textit{rank-difference} of \textit{x} is $r(parent(x)) - r(x)$
\item function $r(x)$ or property $x.rank$ that returns rank of a node; in case of $r(x)$ there is a special case: $r(nil) = -1$
\item function $parent(x)$ or property $x.parent$ returns parent of a node; analogically for the left and right children of a node
\item \textit{rank-difference} of \textit{x} is defined as $r(parent(x)) - r(x)$
\item $x$ is an \textit{i-child} if its rank-difference is $i$
\item $x$ is an $(i, j)$ node if its left and right children have $i$ and $j$ rank-differences respectively
\item $x$ is an $(i, j)$ node if its left and right children have $i$ and $j$ rank-differences respectively;
ordering of the children does not matter
\end{itemize}~\cite{wavl}
\section{Rules for the other trees}
As we have mentioned above, it is possible to implement different kinds of self-balancing binary search trees via different rules for ranks.
\subsection{AVL tree}\label{chap:avl-rule}
\textbf{AVL Rule}: Every node is (1, 1) or (1, 2).
In case of the AVL trees rank represents height. Here we can notice a very smart way of using the \textit{(i, j) node} definition. If we go back to the definition and want to be explicit about the nodes that are allowed with the \textit{AVL Rule}, then we get (1, 1), (1, 2) \textbf{or} (2, 1) nodes. However it is possible to find implementations of the AVL tree that allow leaning \textbf{to only one side} as opposed to the original requirements given by Adelson-Velsky and Landis. Forbidding interchangeability of (i, j) with (j, i) nodes would still yield AVL trees that lean to one side.
Meaning of the \textit{AVL Rule} is quite simple, since rank represents height in that case. We can draw analogies using the notation used for the AVL trees, where we mark nodes with a trit (or a sign) or use a balance-factor. We have two cases to discuss:
\begin{itemize}
\item \textbf{(1, 1) node} represents a tree where both of its subtrees have the same height. In this case we are talking about the nodes with balance-factor $0$ (respectively being signed with a $0$).
\item \textbf{(1, 2) node} represents a tree where one of its subtrees has a bigger height. In this case we are talking about the nodes with balance-factor $-1$ or $1$ (respectively being signed with a $-$ or a $+$).
\end{itemize}
\section{Weak AVL trees}
Example of the AVL tree that uses ranks instead of signs or balance-factors can be seen in \autoref{fig:ranked:avl}.
Based on rank rules for implementing red-black tree and AVL tree, \textit{Haeupler et al.} present new rank rule: \\ \textbf{Weak AVL Rule}: All rank differences are 1 or 2, and every leaf has rank 0.
\begin{figure}
\centering
\begin{tikzpicture}[>=latex',line join=bevel,scale=0.75,]
%%
\node (Node{value=3+ rank=3}) at (140.6bp,279.0bp) [draw,ellipse] {3, 3};
\node (Node{value=1+ rank=1}) at (103.6bp,192.0bp) [draw,ellipse] {1, 1};
\node (Node{value=7+ rank=2}) at (178.6bp,192.0bp) [draw,ellipse] {7, 2};
\node (Node{value=0+ rank=0}) at (28.597bp,105.0bp) [draw,ellipse] {0, 0};
\node (Node{value=2+ rank=0}) at (103.6bp,105.0bp) [draw,ellipse] {2, 0};
\node (Node{value=5+ rank=1}) at (178.6bp,105.0bp) [draw,ellipse] {5, 1};
\node (Node{value=8+ rank=1}) at (253.6bp,105.0bp) [draw,ellipse] {8, 1};
\node (Node{value=4+ rank=0}) at (103.6bp,18.0bp) [draw,ellipse] {4, 0};
\node (Node{value=6+ rank=0}) at (178.6bp,18.0bp) [draw,ellipse] {6, 0};
\node (Node{value=9+ rank=0}) at (253.6bp,18.0bp) [draw,ellipse] {9, 0};
\draw [->] (Node{value=3+ rank=3}) ..controls (128.03bp,249.14bp) and (120.85bp,232.64bp) .. (Node{value=1+ rank=1});
\definecolor{strokecol}{rgb}{0.0,0.0,0.0};
\pgfsetstrokecolor{strokecol}
\draw (128.6bp,235.5bp) node {2};
\draw [->] (Node{value=3+ rank=3}) ..controls (153.5bp,249.14bp) and (160.88bp,232.64bp) .. (Node{value=7+ rank=2});
\draw (166.6bp,235.5bp) node {1};
\draw [->] (Node{value=1+ rank=1}) ..controls (78.671bp,162.75bp) and (61.893bp,143.74bp) .. (Node{value=0+ rank=0});
\draw (75.597bp,148.5bp) node {1};
\draw [->] (Node{value=1+ rank=1}) ..controls (103.6bp,162.16bp) and (103.6bp,146.55bp) .. (Node{value=2+ rank=0});
\draw (108.6bp,148.5bp) node {1};
\draw [->] (Node{value=7+ rank=2}) ..controls (178.6bp,162.16bp) and (178.6bp,146.55bp) .. (Node{value=5+ rank=1});
\draw (183.6bp,148.5bp) node {1};
\draw [->] (Node{value=7+ rank=2}) ..controls (203.52bp,162.75bp) and (220.3bp,143.74bp) .. (Node{value=8+ rank=1});
\draw (224.6bp,148.5bp) node {1};
\draw [->] (Node{value=5+ rank=1}) ..controls (153.67bp,75.75bp) and (136.89bp,56.735bp) .. (Node{value=4+ rank=0});
\draw (149.6bp,61.5bp) node {1};
\draw [->] (Node{value=5+ rank=1}) ..controls (178.6bp,75.163bp) and (178.6bp,59.548bp) .. (Node{value=6+ rank=0});
\draw (183.6bp,61.5bp) node {1};
\draw [->] (Node{value=8+ rank=1}) ..controls (253.6bp,75.163bp) and (253.6bp,59.548bp) .. (Node{value=9+ rank=0});
\draw (258.6bp,61.5bp) node {1};
%
\end{tikzpicture}
\caption{Example of the AVL tree using ranks}
\label{fig:ranked:avl}
\end{figure}
\chapter{Operations on weak AVL trees}
\subsection{Red-black tree}\label{chap:rb-rule}
\section{Using bottom-up rebalancing}
\textbf{Red-Black Rule}: All rank differences are 0 or 1, and no parent of a 0-child is a 0-child. \\
In case of red-black trees, rank represents number of black nodes on a path from the node to a leaf (excluding the node itself). Based on that we can discuss the \textit{Red-Black Rule} in detail:
\begin{enumerate}
\item \textit{All rank differences are 0 or 1} inductively enforces monotonically increasing (at most by 1) count of black nodes from the leaves. \\
In detail:
\begin{enumerate}
\item In case the \textbf{current node is black}, the rank difference must be 1, since we have one more black node on the path from the parent to the leaves than from the current node.
\item In case the \textbf{current node is red}, the rank difference must be 0, since from the parent the count of black nodes on the path to leaves has not changed.
\item And finally all other differences are invalid, since by adding a node to the beginning of a path to the leaf we can either add red node (0-child) or black node (1-child), i.e. there is one more black node on the path or not which implies the change can be only 0 or 1.
\end{enumerate}
\item \textit{No parent of a 0-child is a 0-child} ensures that there are no two consecutive red nodes, since 0-child node is equivalent to the red node.
\end{enumerate}
\subsection{\texttt{insert}}
Inserting values into WAVL tree is equivalent to inserting values into regular binary-search tree, which is followed up by rebalancing that ensures rank rules hold.
Example of the red-black tree that uses ranks instead of colors can be seen in \autoref{fig:ranked:rbt}, red nodes are also colored for convenience.
Rebalancing of the tree is equivalent to rebalancing of AVL tree and is executed in a following way:
Majority of the red-black tree implementations color nodes of the tree, following that notation and \textbf{precise} definition of the red-black tree it is quite common to ask the following questions:
As a first step it is checked whether parent of a current (inserted) node is (0, 1) or (1, 0)-node, i.e. parent node was leaf node before. In that case parent node's rank is promoted and the process continues by parent node becoming the current node. (After the initial check we can encounter such nodes as a result of promoting the parent.)
\begin{enumerate}
\item \textit{Do we count the node itself if it is black?} \\
If we do not count nodes themselves, we decrease the count of black nodes on every path to the external nodes by $1$.
\item \textit{Do we count the external nodes (leaves that do not hold any value)?} \\
If we do not count external nodes themselves, we decrease the count of black nodes on every path to the external nodes by $1$.
\end{enumerate}
Once the node does not have a parent (is root node) or is not (0, 1) or (1, 0) node, we might end up in a situation where the rank rule does not hold \textbf{and} we cannot fix it with promotion.
Overall they do not really matter as long as they are used consistently, since they affect the counts globally.
However it is also possible to color edges instead of the nodes as is presented in \textit{Průvodce labyrintem algoritmů} by \textit{Mareš and Valla}.~\cite{labyrint} In this representation color of the edge represents color of the child node. This representation is much more „natural“ for the representation using rank as it can be seen in \autoref{fig:ranked:rbt}, where edges connecting nodes with rank-difference $1$ represent \textit{black edges} and edges connecting nodes with rank-difference $0$ represent \textit{red edges}. It is also apparent that using this representation root of the tree does not hold any color anymore.
\begin{figure}
\centering
\begin{tikzpicture}[>=latex',line join=bevel,scale=0.75,]
%%
\node (Node{value=3+ rank=2}) at (140.6bp,366.0bp) [draw,ellipse] {3, 2};
%%
\node (Node{value=3+ rank=2}) at (140.6bp,366.0bp) [draw,ellipse] {3, 2};
\node (Node{value=1+ rank=1}) at (103.6bp,279.0bp) [draw,ellipse] {1, 1};
\node (Node{value=5+ rank=1}) at (178.6bp,279.0bp) [draw,ellipse] {5, 1};
\node (Node{value=0+ rank=0}) at (28.597bp,192.0bp) [draw,ellipse] {0, 0};
\node (Node{value=2+ rank=0}) at (103.6bp,192.0bp) [draw,ellipse] {2, 0};
\node (Node{value=4+ rank=0}) at (178.6bp,192.0bp) [draw,ellipse] {4, 0};
\node (Node{value=7+ rank=1}) at (253.6bp,192.0bp) [draw=red,ellipse] {7, 1};
\node (Node{value=6+ rank=0}) at (226.6bp,105.0bp) [draw,ellipse] {6, 0};
\node (Node{value=8+ rank=0}) at (301.6bp,105.0bp) [draw,ellipse] {8, 0};
\node (Node{value=9+ rank=0}) at (301.6bp,18.0bp) [draw=red,ellipse] {9, 0};
\draw [->] (Node{value=3+ rank=2}) ..controls (128.03bp,336.14bp) and (120.85bp,319.64bp) .. (Node{value=1+ rank=1});
\definecolor{strokecol}{rgb}{0.0,0.0,0.0};
\pgfsetstrokecolor{strokecol}
\draw (129.6bp,322.5bp) node {1};
\draw [->] (Node{value=3+ rank=2}) ..controls (153.5bp,336.14bp) and (160.88bp,319.64bp) .. (Node{value=5+ rank=1});
\draw (167.6bp,322.5bp) node {1};
\draw [->] (Node{value=1+ rank=1}) ..controls (78.671bp,249.75bp) and (61.893bp,230.74bp) .. (Node{value=0+ rank=0});
\draw (75.597bp,235.5bp) node {1};
\draw [->] (Node{value=1+ rank=1}) ..controls (103.6bp,249.16bp) and (103.6bp,233.55bp) .. (Node{value=2+ rank=0});
\draw (108.6bp,235.5bp) node {1};
\draw [->] (Node{value=7+ rank=1}) ..controls (244.49bp,162.33bp) and (239.36bp,146.17bp) .. (Node{value=6+ rank=0});
\draw (246.6bp,148.5bp) node {1};
\draw [->] (Node{value=7+ rank=1}) ..controls (269.82bp,162.26bp) and (279.51bp,145.12bp) .. (Node{value=8+ rank=0});
\draw (284.6bp,148.5bp) node {1};
\draw [->] (Node{value=5+ rank=1}) ..controls (178.6bp,249.16bp) and (178.6bp,233.55bp) .. (Node{value=4+ rank=0});
\draw (183.6bp,235.5bp) node {1};
\draw [red,->] (Node{value=5+ rank=1}) ..controls (203.52bp,249.75bp) and (220.3bp,230.74bp) .. (Node{value=7+ rank=1});
\draw (225.6bp,235.5bp) node {0};
\draw [red,->] (Node{value=8+ rank=0}) ..controls (301.6bp,75.163bp) and (301.6bp,59.548bp) .. (Node{value=9+ rank=0});
\draw (306.6bp,61.5bp) node {0};
%
\end{tikzpicture}
\caption{Example of the red-black tree using ranks}
\label{fig:ranked:rbt}
\end{figure}
\section{Implementation of other balanced trees using rank}
To show that using rank is mostly an implementation detail, we will describe an implementation of the AVL tree using rank.
Implementation of the insertion is trivial, since it is described by \textit{Haeupler et al.} and is used in the WAVL tree. All we need to implement is the deletion from the AVL tree. We will start by short description of the deletion rebalance as given by \textit{Mareš and Valla} in \textit{Průvodce labyrintem algoritmů}.
When propagating the error, we can encounter 3 cases (we explain them with respect to propagating deletion from the left subtree, propagation from right is mirrored and role of trits $+$ and $-$ swaps):
\begin{enumerate}
\item \textit{Node was marked with $-$.} In this case, heights of left and right subtrees are equal now and node is marked with $0$, but propagation must be continued, since the height of the whole subtree has changed.
\item \textit{Node was marked with $0$.} In this case, node is marked with $+$ and the height of the subrtree has not changed, therefore we can stop the propagation.
\item \textit{Node was marked with $+$.} In this case, node would acquire balance-factor of $+2$, which is not allowed. In this situation we decide based on the mark of the node from which we are propagating the insertion in the following way (let $x$ the current node marked with $+$ and $y$ be the right child of $x$):
\begin{enumerate}
\item $y$ is marked with $+$, then we rotate by $x$ to the left. After that both $x$ and $y$ can be marked with $0$. Height from the point of the parent has changed, so we continue the propagation.
\item $y$ is marked with $0$, then we rotate by $x$ to the left. After the rotation, $x$ can be marked with $+$ and $y$ with $-$. Height of the subtree has not changed, so propagation can be stopped.
\item $y$ is marked with $-$. Let $z$ be the left son of $y$. We double rotate: first by $z$ to the right and then by $x$ to the left. After the double-rotation $x$ can be marked by either $0$ or $-$, $y$ by $0$ or $+$ and $z$ gets $0$. Height of the subtree has changed, therefore we must propagate further.
\end{enumerate}
\end{enumerate}\label{avl:rules:delete}~\cite{labyrint}
We have implemented the deletion rebalance by implementing following functions:
\begin{enumerate}
\item \texttt{deleteRebalance} that handles updating the current node and its parent and iteratively calls subroutine handling previously described \textit{one step of a rebalancing}
\item \texttt{deleteFixNode} that handles one adjustment of rebalancing as described above
\item \texttt{deleteRotate} that handles rotation and updating of ranks, if necessary
\end{enumerate}
\begin{algorithm}
\Proc{$\texttt{insert}(tree, key)$}{
\Proc{$\texttt{deleteRebalance}(T, y, parent)$}{
\If{$y = nil \land parent = nil$}{
\Return;
}
\BlankLine
\If{$y = nil$}{
$(y, parent) \gets (parent, parent.parent)$\;
}
\BlankLine
\While{$y \neq nil \land \texttt{deleteFixNode}(T, y, parent)$}{
$y \gets parent$\;
\eIf{$parent \neq nil$}{
$parent \gets parent.parent$\;
}{
$parent \gets nil$\;
}
}
}
\caption{\texttt{deleteRebalance} algorithm for the AVL tree}\label{algorithm:avl:deleteRebalance}
\end{algorithm}
\texttt{deleteRebalance}, as can be seen in \autoref{algorithm:avl:deleteRebalance}, is quite straightforward. At the beginning we early return in case there is nothing to be rebalanced, which happens when deleting the last node from the tree. Then we handle case when we are given only parent by correctly setting $y$ and $parent$. Following up on that, as long as we have a node to be checked, we call \autoref{algorithm:avl:deleteFixNode} to fix balancing of the current node. Algorithm for fixing node returns $true$ or $false$ depending on the need to propagate the height change further, which is utilized in the condition of the \texttt{while} loop.
\begin{algorithm}
\Proc{$\texttt{deleteFixNode}(T, x, parent)$}{
\uIf(\tcp*[h]{Handles rule 1}){balance-factor of $x$ is $0$}{
update rank of $x$\;
\Return{$true$}\;
}
\ElseIf(\tcp*[h]{Handles rule 2}){balance-factor of $x$ is $-1$ or $1$}{
\Return{$false$}\;
}
\BlankLine
$(l, r) \gets (x.left, x.right)$\;
$(rotateL, rotateR) \gets (\texttt{rotateLeft}, \texttt{rotateRight})$\;
\BlankLine
\tcp{Handles rule 3}
\eIf{balance-factor of $x$ is $2$}{
\Return{$\texttt{deleteRotate}(T, x, r, 1, rotateL, rotateR)$}\;
}{
\Return{$\texttt{deleteRotate}(T, x, l, -1, rotateR, rotateL)$}\;
}
}
\caption{\texttt{deleteFixNode} algorithm for the AVL tree}\label{algorithm:avl:deleteFixNode}
\end{algorithm}
\texttt{deleteFixNode} implements the algorithm as described in \hyperref[avl:rules:delete]{the list} with all possible cases above. We start by checking the balance-factor of the given node, in case there is no need to rotate, the rank gets updated if necessary and then we return the information whether there is a need to propagate further or not. In case the node has acquired balance-factor of $2$ we call \autoref{algorithm:avl:deleteRotate} to fix the balancing locally.
There are two operations that are not described using helper functions and they are done in a following way:
\begin{itemize}
\item Balance-factor of a node $x$ is calculated as \[ rank(x.right) - rank(x.left) \]
\item Updating rank of a node $x$ is done by setting node's rank to \[ 1 + \max \{ rank(x.left), rank(x.right) \} \]
\end{itemize}
\begin{algorithm}
\Proc{$\texttt{deleteRotate}(T, x, y, leaning, rotateL, rotateR)$}{
$factor \gets $ balance-factor of $y$\;
\BlankLine
\uIf(\tcp*[h]{Handles rule 3ab}){$factor = 0 \lor factor = leaning$}{
$rotateL(T, x)$\;
}
\Else(\tcp*[h]{Handles rule 3c}){
$rotateR(T, y)$\;
$rotateL(T, x)$\;
}
\BlankLine
update ranks of $x$, $y$ and new root of the subtree\;
\BlankLine
\Return{$factor \neq 0$}\;
}
\caption{\texttt{deleteRotate} algorithm for the AVL tree}\label{algorithm:avl:deleteRotate}
\end{algorithm}
\newpage
\texttt{deleteRotate} is handling only fixes where the rotations are required. Both \autoref{algorithm:avl:deleteFixNode} and \autoref{algorithm:avl:deleteRotate} include comments to highlight which rules are handled. This function is also done generically regardless of the subtree from which the height change is being propagated. This is done passing in functions used for rotations (since it is mirrored) and also by passing in the balance-factor required for just one rotation.
In both \autoref{algorithm:avl:deleteFixNode} and \autoref{algorithm:avl:deleteRotate} there is a key difference compared to the AVL tree implementations without ranks. Comparing the \hyperref[avl:rules:delete]{rules for deletion} with algorithms for rank-balanced implementation, it is apparent that during propagation of height change, the balance-factors of immediate nodes are already adjusted, since the information comes from either of its subtrees and it is calculated using ranks of its children that are already adjusted. This fact needs to be reflected in the implementation accordingly, since it shifts the meaning of rules as they are described above and written for the implementations that store the trit in the nodes directly, which is updated manually during rebalancing.
\chapter{Weak AVL trees}
\section{Rank rule}
Based on the rank rules for implementing red-black tree (as described in \ref{chap:rb-rule}) and AVL tree (as described in \ref{chap:avl-rule}), \textit{Haeupler et al.} present a new rank rule:
\textbf{Weak AVL Rule}: All rank differences are 1 or 2, and every leaf has rank 0.~\cite{wavl}
Comparing the \textit{Weak AVL Rule} to the \textit{AVL Rule}, we can come to these conclusions:
\begin{itemize}
\item \textit{Every leaf has rank 0} holds with the AVL Rule, since every node is (1, 1) or (1, 2) and rank of a node represents height of its tree. Rank of \textit{nil} is defined as $-1$ and height of tree rooted at leaf is $0$, therefore leaves are (1, 1)-nodes
\item \textit{All rank differences are 1 or 2} does not hold in one specific case, and that is (2, 2)-node, which is allowed in the WAVL tree, but not in the AVL tree. This difference will be explained more thoroughly later on.
\end{itemize}
\section{Height boundaries}
We have described in \autoref{chap:sb-bst} other common self-balanced binary search trees to be able to draw analogies and explain differences between them. Given the boundaries of height for red-black and AVL tree, we can safely assume that the AVL is more strict with regards to the self-balancing than the red-black tree. Let us show how does WAVL fit among them. \textit{Haeupler et al.} present following bounds:
\[ h \leq k \leq 2h \text{ and } k \leq 2 \log_2{n} \]~\cite{wavl}
In those equations we can see $h$ and $n$ in the same context as we used it to lay boundaries for the AVL and red-black trees, but we can also see new variable $k$, which represents the rank of the tree.
One of the core differences between AVL and WAVL lies in the rebalancing after deletion. Insertion into the WAVL tree is realized in the same way as it would in the AVL tree and the benefit of (2, 2)-node is used during deletion rebalancing.
From the previous 2 statements we can come to 2 conclusions and those are:
\begin{itemize}
\item If we commit only insertions to the WAVL tree, it will always yield a valid AVL tree. In that case it means that the height boundaries are same as of the AVL tree (described in \autoref{avl-height}).
\item If we commit deletions too, we can assume the worst-case scenario where \[ h < 2 \log_2{n} \] which also holds for the red-black trees.
\end{itemize}
From the two conclusions we can safely deduce that the WAVL tree is in the worst-case scenario as efficient as the red-black tree and in the best-case scenario as efficient as the AVL tree.
\newpage
\section{Operations on weak AVL trees}
\subsection{\texttt{insert}}
Inserting values into WAVL tree is equivalent to inserting values into regular binary-search tree followed up by rebalancing that ensures rank rules hold. This part can be clearly seen in \autoref{algorithm:wavl:insert}. We can also see there two early returns, one of them happens during insertion into the empty tree and other during insertion of duplicate key, which we do not allow.
\begin{algorithm}
\Proc{$\texttt{insert}(T, key)$}{
$insertedNode \gets Node(key)$\;
\If{$tree.root = nil$}{
$tree.root \gets insertedNode$\;
\If{$T.root = nil$}{
$T.root \gets insertedNode$\;
\Return\;
}
\BlankLine
$parent \gets \texttt{findParentNode}(key, tree.root)$\;
$parent \gets \texttt{findParentNode}(key, T.root)$\;
\If{$parent = nil$}{
\Return\;
}
$insertedNode.parent \gets parent$\;
\BlankLine
\eIf{$key < parent.key$}{
@ -165,115 +502,253 @@ Once the node does not have a parent (is root node) or is not (0, 1) or (1, 0) n
$parent.right \gets insertedNode$\;
}
\BlankLine
$\texttt{bottomUpInsertRebalance}(tree, insertedNode)$\;
$\texttt{bottomUpInsertRebalance}(T, insertedNode)$\;
}
\caption{Insert operation on binary search tree}
\caption{Insert operation on binary search tree}\label{algorithm:wavl:insert}
\end{algorithm}
In the \autoref{algorithm:wavl:insert} we have also utilized a helper function that is used to find parent of the newly inserted node and also prevents insertion of duplicate keys within the tree. Pseudocode of that function can be seen in \autoref{algorithm:findParentNode}.
\begin{algorithm}
\Fn{$\texttt{findParentNode}(key, node)$}{
$childNode \gets node$\;
\BlankLine
\While{$childNode \neq nil$}{
$node \gets childNode$\;
\eIf{$key < node.key$}{
\uIf{$key < node.key$}{
$childNode \gets node.left$\;
}{
}
\ElseIf{$node.key < key$}{
$childNode \gets node.right$\;
}
\Else{
\Return{nil}\;
}
}
\BlankLine
\Return{node}\;
}
\caption{Helper function that returns parent for newly inserted node}
\caption{Helper function that returns parent for newly inserted node}\label{algorithm:findParentNode}
\end{algorithm}
Rebalancing after insertion in the WAVL tree is equivalent to rebalancing after insertion in the AVL tree. We will start with a short description of the rebalancing within AVL to lay a foundation for analogies and differences compared to the implementation using ranks.
When propagating the error, we can encounter 3 cases (we explain them with respect to propagating insertion from the left subtree, propagation from right is mirrored and role of trits $+$ and $-$ swaps):
\begin{enumerate}
\item \textit{Node was marked with $+$.} In this case, heights of left and right subtrees are equal now and node is marked with $0$ and propagation can be stopped.
\item \textit{Node was marked with $0$.} In this case, node is marked with $-$, but the height of the tree rooted at the node has changes, which means that we need to propagate the changes further.
\item \textit{Node was marked with $-$.} In this case, node would acquire balance-factor of $-2$, which is not allowed. In this situation we decide based on the mark of the node from which we are propagating the insertion in the following way (let $y$ be the node from which the information is being propagated and $x$ the current node marked with $-$):
\begin{enumerate}
\item $y$ is marked with $-$, then we rotate by $x$ to the right. After that both $x$ and $y$ can be marked with $0$. Height from the point of the parent has not changed, so we can stop the propagation.
\item $y$ is marked with $+$, then we double rotate: first by $y$ to the left and then by $x$ to the right. Here we need to recalculate the balance-factors for $x$ and $y$, where $x$ gets $-$ or $0$ and $y$ gets $0$ or $+$. Node that was a right child to the $y$ before the double-rotation is now marked with $0$ and propagation can be stopped.
\item $y$ is marked with $0$. This case is trivial, since it cannot happen, because we never propagate the height change from a node that acquired sign $0$.
\end{enumerate}
\end{enumerate}~\cite{labyrint}
Rebalancing of the tree is equivalent to rebalancing of AVL tree and is executed in a following way:
As a first step, it is checked whether parent of a current (inserted) node is (0, 1) or (1, 0)-node, i.e. parent node was leaf node before. In that case parent node's rank is promoted and the process continues by parent node becoming the current node. (After the initial check we can encounter such nodes as a result of promoting the parent.)
Once the node does not have a parent (is root node) or is not (0, 1) or (1, 0) node, we might end up in a situation where the rank rule does not hold \textbf{and} we cannot fix it with promotion.
Bottom-up rebalancing after the insertion into WAVL tree is identical to AVL tree insertion:
\begin{algorithm}
\Proc{$\texttt{bottomUpInsertRebalance}(tree, node)$}{
\Proc{$\texttt{bottomUpInsertRebalance}(T, node)$}{
\While{$node.parent \neq nil \land (node.parent\, is\, (0, 1)\, or\, (1, 0))$}{
$\texttt{promote}(node.parent)$\;
$node \gets node.parent$\;
}
\BlankLine
\lIf{$node.parent = nil$}{\Return}
\BlankLine
$rotatingAroundRoot \gets node.parent.parent = nil$\;
$newRoot \gets node.parent$\;
\BlankLine
\lIf{$node\, is\, not\, \text{0-child}$}{\Return}
\lIf{$node.parent = nil \lor node\, is\, not\, \text{0-child}$}{\Return}
\BlankLine
\eIf{$node = node.parent.left$}{
$newRoot \gets \texttt{fix0Child}(node, node.right, \texttt{rotateLeft}, \texttt{rotateRight})$\;
$\texttt{fix0Child}(T, node, node.right, \texttt{rotateLeft}, \texttt{rotateRight})$\;
}{
$newRoot \gets \texttt{fix0Child}(node, node.left, \texttt{rotateRight}, \texttt{rotateLeft})$\;
$\texttt{fix0Child}(T, node, node.left, \texttt{rotateRight}, \texttt{rotateLeft})$\;
}
\BlankLine
\lIf{$rotatingAroundRoot$}{$tree.root \gets newRoot$}
}
\caption{Algorithm containing bottom-up rebalancing after insertion}
\caption{Algorithm containing bottom-up rebalancing after insertion}\label{algorithm:wavl:bottomUpInsertRebalance}
\end{algorithm}
\begin{algorithm}
\Proc{$\texttt{fix0Child}(x, y, rotateToLeft, rotateToRight)$}{
\Proc{$\texttt{fix0Child}(T, x, y, rotateToLeft, rotateToRight)$}{
$z \gets x.parent$\;
$newRoot \gets x.parent$\;
\BlankLine
\uIf{$y = nil \lor y\, is\, \text{2-child}$}{
$newRoot \gets rotateToRight(z)$\;
$newRoot \gets rotateToRight(T, z)$\;
\BlankLine
$\texttt{demote}(z)$\;
}
\ElseIf{$y\, is\, \text{1-child}$}{
$rotateToLeft(x)$\;
$newRoot \gets rotateToRight(z)$\;
$rotateToLeft(T, x)$\;
$rotateToRight(T, z)$\;
\BlankLine
$\texttt{promote}(y)$\;
$\texttt{demote}(x)$\;
$\texttt{demote}(z)$\;
}
\BlankLine
\Return{$newRoot$}\;
}
\caption{Generic algorithm for fixing 0-child after insertion}
\caption{Generic algorithm for fixing 0-child after insertion}\label{algorithm:wavl:fix0Child}
\end{algorithm}
\section{\texttt{delete}}
\subsection{\texttt{delete}}
\begin{algorithm}
\Proc{$\texttt{bottomUpDeleteRebalance}(T, y, parent)$}{
\uIf{$y \text{ is (2, 2)}$}{
$\texttt{demote}(y)$\;
$parent \gets y.parent$\;
}
\ElseIf{$parent \text{ is (2, 2)}$}{
$\texttt{demote}(parent)$\;
$parent \gets parent.parent$\;
}
\BlankLine
\If{$parent = nil$}{
\Return\;
}
$z \gets \text{3-child of } parent$\;
\If{$z \neq nil$}{
$\texttt{bottomUpDelete}(T, z, parent)$\;
}
}
\caption{Initial phase of algorithm for the rebalance after deletion from the WAVL tree}\label{algorithm:wavl:bottomUpDeleteRebalance}
\end{algorithm}
\section{Using top-down rebalancing}
\subsection{\texttt{insert}}
\subsection{\texttt{delete}}
\begin{algorithm}
\Proc{$\texttt{bottomUpDelete}(T, x, parent)$}{
\If{$x \text{ is not 3-child} \lor parent = nil$}{
\Return\;
}
\BlankLine
$y \gets nil$\;
\eIf{$parent.left = x$}{
$y \gets parent.right$\;
}{
$y \gets parent.left$\;
}
\BlankLine
\While{$parent \neq nil \land x \text{ is 3-child} \land (y \text{ is 2-child or (2, 2)})$}{
\If{$y \text{ is not 2-child}$}{
$\texttt{demote}(y)$\;
}
$\texttt{demote}(parent)$\;
\BlankLine
$x \gets parent$\;
$parent \gets x.parent$\;
\If{$parent = nil$}{
\Return;
}
\BlankLine
\eIf{$parent.left = x$}{
$y \gets parent.right$\;
}{
$y \gets parent.left$\;
}
}
\BlankLine
\If{$parent \text{ is not (1, 3)}$}{
\Return\;
}
$p \gets parent$\;
\eIf{$parent.left = x$}{
$\texttt{fixDelete}(T, x, p.right, p, false, \texttt{rotateLeft}, \texttt{rotateRight})$\;
}{
$\texttt{fixDelete}(T, x, p.left, p, true, \texttt{rotateRight}, \texttt{rotateLeft})$\;
}
}
\caption{Propagation of the broken rank rule after deletion from the WAVL tree}\label{algorithm:wavl:bottomUpDelete}
\end{algorithm}
\section{Using rebalancing with promotion}
\subsection{\texttt{insert}}
\subsection{\texttt{delete}}
\begin{algorithm}
\Proc{$\texttt{fixDelete}(T, x, y, z, reversed, rotateLeft, rotateRight)$}{
$v \gets y.left$\;
$w \gets y.right$\;
\If{$reversed$}{
$(v, w) \gets (w, v)$\;
}
\BlankLine
\uIf{$w \text{ is 1-child} \land y.parent \neq nil$}{
$rotateLeft(T, y.parent)$\;
\BlankLine
$\texttt{promote}(y)$\;
$\texttt{demote}(z)$\;
\BlankLine
\If{$z$ is a leaf}{
$\texttt{demote}(z)$\;
}
}
\ElseIf{$w \text{ is 2-child} \land v.parent \neq nil$}{
$rotateRight(T, v.parent)$\;
$rotateLeft(T, v.parent)$\;
\BlankLine
$\texttt{promote}(v)$\;
$\texttt{promote}(v)$\;
$\texttt{demote}(y)$\;
$\texttt{demote}(z)$\;
$\texttt{demote}(z)$\;
}
}
\caption{Final phase of the deletion rebalance after deletion from the WAVL tree}\label{algorithm:wavl:fixDelete}
\end{algorithm}
\section{Implementation of other balanced trees using rank}
\chapter{Implementation}
To show that using rank is mostly an implementation detail, I will describe AVL and red-black tree implementation using rank.
For the implementation of rank-balanced trees we have used two programming languages: C\# and Python. C\# implementation has not been finished and therefore is not part of the submitted attachments. However it has given a valuable insight into the role of preconditions and invariants in algorithms while \texttt{null}-checking is enforced, since, for example, static type control cannot be aware of a node \textbf{not} being a \texttt{null} after checking specific set of conditions that forbid such scenario.
\subsection{AVL tree}
Python has been chosen as the \textit{go-to} language, since it is used for teaching foundations of programming~\cite{ib111} and also introductory course of algorithms and data structures~\cite{ib002} at our faculty.
\textbf{AVL Rule}: Every node is (1, 1) or (1, 2). \\
In case of AVL trees rank represents height.
We have started by implementing a general idea of a rank-balanced tree. Rank-balanced tree is an abstract class that \textbf{does not} implement methods specific to different kinds of trees such as
\textit{TBD}
\subsection{Red-black tree}
\textbf{Red-Black Rule}: All rank differences are 0 or 1, and no parent of a 0-child is a 0-child. \\
In case of red-black trees rank represents number of black nodes on a path from the node to a leaf (excluding the node itself). Based on that we can discuss the \textit{Red-Black Rule} in detail:
\begin{enumerate}
\item \textit{All rank differences are 0 or 1} \\
in case the current node is black the rank difference must be 1, since we have one more black node on the path from the parent to the leaves than from the current node \\
in case the current node is red the rank difference must be 0, since from parent the count of black nodes on the path to leaves has not changed \\
and finally all other differences are invalid, since by adding a node to the beginning of a path to the leaf we can either add red node (0-child) or black node (1-child), i.e. there is one more black node on the path or not which implies the change can be only 0 or 1
\item \textit{no parent of a 0-child is a 0-child} \\
this part of the rule ensures there are no two consecutive red nodes (0-child node is equivalent to red node)
\item \texttt{is\_correct\_node} is used to check whether node and its subtrees satisfy rank rules
\item \texttt{\_insert\_rebalance} rebalances the tree from the given node after insertion
\item \texttt{\_delete\_rebalance} rebalances the tree from the given nodes (deleted node and parent) after deletion
\end{enumerate}
Apart from the abstract methods there is provided following interface that is either shared by the specific trees or used by them:
\begin{enumerate}
\item \texttt{\_get\_unwrapped\_graph} that is used to generate DOT format of the tree for purpose of either debugging or sharing
\item \texttt{rank} returns rank of the root of the tree
\item \texttt{is\_correct} calls \texttt{is\_correct\_node} on the root of the tree
\item \texttt{search} is used to look up keys in the tree
\item \texttt{insert} implements generic insertion into the tree followed by a call to tree-specific rebalance function
\item \texttt{delete} is identical to \texttt{insert}, but for the deletion from the tree
\end{enumerate}
Apart from that we have also implemented class for representation of nodes that provides quite rich interface that is utilized during rebalancing and also in generic methods on generic tree.
\section{Testing and validation}
From the beginning we have employed the techniques of property-based testing (done manually during C\# implementation and uses Hypothesis~\cite{hypothesis} for Python implementation). The elementary requirement for testing and validation of implemented algorithms was a \textbf{correct} \texttt{is\_correct\_node} method that validates properties of a specific rank-balanced tree and a good set of invariants. List of set invariants follows:
\begin{enumerate}
\item for insertion we have set following invariants
\begin{itemize}
\item Rank rules have not been broken after the insertion.
\item Inserted value can be found in the tree after the insertion.
\item All previously inserted values can still be found in the tree.
\end{itemize}
\item for deletion we have set following invariants
\begin{itemize}
\item Rank rules have not been broken after the deletion.
\item Deleted node can no longer be found in the tree after the deletion.
\item All other values can still be found in the tree.
\end{itemize}
\end{enumerate}
We also admit abuse of property-based testing to find a \textit{minimal} sequence of operations when WAVL tree relaxation manifests. For that purpose we have implemented a \textit{comparator} class that takes two different instances of rank-balanced trees and provides rudimentary \texttt{insert} and \texttt{delete} interface enriched with \texttt{are\_same} (evaluates isomorphism and ranks) and \texttt{are\_similar} (evaluates just isomorphism) methods. While trying to find minimal counter-example, we have also discovered a bug in rebalance after deletion of WAVL tree that caused enforcement of the AVL rank rules.
\chapter{Visualization}
\chapter*{Summary}
\addcontentsline{toc}{chapter}{Summary}
\appendix %% Start the appendices.
\chapter{An appendix}
Here you can insert the appendices of your thesis.

View file

@ -1,159 +0,0 @@
%%
%% This is file `fithesis-czech.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% czech.dtx (with options: `base')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/locale/fithesis-czech.def}[2017/07/09]
\gdef\thesis@czech@gender@koncovka{%
\ifthesis@woman a\fi}
\gdef\thesis@czech@csquotesStyle{german}
\gdef\thesis@czech@universityName{Název univerzity}
\gdef\thesis@czech@facultyName{Název fakulty}
\gdef\thesis@czech@assignment{%
Na tomto místě se v~tištěné práci nachází oficiální podepsané
zadání práce.}
\gdef\thesis@czech@declaration{Text prohlášení ...}
\gdef\thesis@czech@spring{jaro}
\gdef\thesis@czech@fall{podzim}
\gdef\thesis@czech@semester{%
\thesis@{czech@\thesis@season} \thesis@seasonYear}
\gdef\thesis@czech@formattedDate{{%
\thesis@day.
\newcount\@month\expandafter\@month\thesis@month\relax
\ifnum\@month=1%
ledna
\else\ifnum\@month=2%
února
\else\ifnum\@month=3%
března
\else\ifnum\@month=4%
dubna
\else\ifnum\@month=5%
května
\else\ifnum\@month=6%
června
\else\ifnum\@month=7%
července
\else\ifnum\@month=8%
srpna
\else\ifnum\@month=9%
září
\else\ifnum\@month=10%
října
\else\ifnum\@month=11%
listopadu
\else\ifnum\@month=12%
prosince
\else
<<neznámý měsíc (\the\@month)>>
\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi
\thesis@year}}
\gdef\thesis@czech@authorSignature{%
Podpis autor\ifthesis@woman ky\else a\fi}
\gdef\thesis@czech@fieldTitle{Obor}
\gdef\thesis@czech@advisorTitle{Vedoucí práce}
\gdef\thesis@czech@authorTitle{Autor}
\gdef\thesis@czech@abstractTitle{Shrnutí}
\gdef\thesis@czech@keywordsTitle{Klíčová slova}
\gdef\thesis@czech@thanksTitle{Poděkování}
\gdef\thesis@czech@declarationTitle{Prohlášení}
\gdef\thesis@czech@idTitle{ID}
\gdef\thesis@czech@typeName@sempaper{Seminární práce}
\gdef\thesis@czech@typeName@bachelors{Bakalářská práce}
\gdef\thesis@czech@typeName@masters{Diplomová práce}
\gdef\thesis@czech@typeName@proposal{Teze závěrečné práce}
\gdef\thesis@czech@typeName@doctoral{Disertační práce}
\gdef\thesis@czech@typeName@rigorous{Rigorózní práce}
\gdef\thesis@czech@typeName{%
\ifx\thesis@type\thesis@sempaper
\thesis@czech@typeName@sempaper
\else\ifx\thesis@type\thesis@bachelors
\thesis@czech@typeName@bachelors
\else\ifx\thesis@type\thesis@masters
\thesis@czech@typeName@masters
\else\ifx\thesis@type\thesis@proposal
\thesis@czech@typeName@proposal
\else\ifx\thesis@type\thesis@doctoral
\thesis@czech@typeName@doctoral
\else\ifx\thesis@type\thesis@rigorous
\thesis@czech@typeName@rigorous
\else
<<Neznámý typ práce (\thesis@type)>>%
\fi\fi\fi\fi\fi\fi}
\gdef\thesis@czech@typeName@akuzativ@sempaper{Seminární práci}
\gdef\thesis@czech@typeName@akuzativ@bachelors{Bakalářskou práci}
\gdef\thesis@czech@typeName@akuzativ@masters{Diplomovou práci}
\gdef\thesis@czech@typeName@akuzativ@proposal{Tezi závěrečné práce}
\gdef\thesis@czech@typeName@akuzativ@doctoral{Disertační práci}
\gdef\thesis@czech@typeName@akuzativ@rigorous{Rigorózní práci}
\gdef\thesis@czech@typeName@akuzativ{%
\ifx\thesis@type\thesis@sempaper
\thesis@czech@typeName@akuzativ@sempaper
\else\ifx\thesis@type\thesis@bachelors
\thesis@czech@typeName@akuzativ@bachelors
\else\ifx\thesis@type\thesis@masters
\thesis@czech@typeName@akuzativ@masters
\else\ifx\thesis@type\thesis@proposal
\thesis@czech@typeName@akuzativ@proposal
\else\ifx\thesis@type\thesis@doctoral
\thesis@czech@typeName@akuzativ@doctoral
\else\ifx\thesis@type\thesis@rigorous
\thesis@czech@typeName@akuzativ@rigorous
\else
<<Neznámý typ práce (\thesis@type)>>%
\fi\fi\fi\fi\fi\fi}
\endinput
%%
%% End of file `fithesis-czech.def'.

View file

@ -1,133 +0,0 @@
%%
%% This is file `fithesis-english.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% english.dtx (with options: `base')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/locale/fithesis-english.def}[2017/09/08]
\gdef\thesis@english@universityName{University name}
\gdef\thesis@english@facultyName{Faculty name}
\gdef\thesis@english@assignment{%
This is where a copy of the official signed thesis assignment
is located in the printed version of the document.}
\gdef\thesis@english@declaration{Declaration text ...}
\gdef\thesis@english@csquotesStyle{english}
\gdef\thesis@english@spring{Spring}
\gdef\thesis@english@fall{Fall}
\gdef\thesis@english@semester{%
\thesis@{english@\thesis@season} \thesis@seasonYear}
\gdef\thesis@english@formattedDate{{%
\thesis@day.
\newcount\@month\expandafter\@month\thesis@month\relax
\ifnum\@month=1%
January
\else\ifnum\@month=2%
February
\else\ifnum\@month=3%
March
\else\ifnum\@month=4%
April
\else\ifnum\@month=5%
May
\else\ifnum\@month=6%
June
\else\ifnum\@month=7%
July
\else\ifnum\@month=8%
August
\else\ifnum\@month=9%
September
\else\ifnum\@month=10%
October
\else\ifnum\@month=11%
November
\else\ifnum\@month=12%
December
\else
<<unknown month (\the\@month)>>
\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi
\thesis@year}}
\gdef\thesis@english@authorSignature{Author's signature}
\gdef\thesis@english@fieldTitle{Field of study}
\gdef\thesis@english@advisorTitle{Advisor}
\gdef\thesis@english@authorTitle{Author}
\gdef\thesis@english@abstractTitle{Abstract}
\gdef\thesis@english@keywordsTitle{Keywords}
\gdef\thesis@english@thanksTitle{Acknowledgements}
\gdef\thesis@english@declarationTitle{Declaration}
\gdef\thesis@english@idTitle{ID}
\gdef\thesis@english@typeName@sempaper{Seminar Paper}
\gdef\thesis@english@typeName@bachelors{Bachelor's Thesis}
\gdef\thesis@english@typeName@masters{Master's Thesis}
\gdef\thesis@english@typeName@proposal{Thesis Proposal}
\gdef\thesis@english@typeName@doctoral{Doctoral Thesis}
\gdef\thesis@english@typeName@rigorous{Rigorous Thesis}
\gdef\thesis@english@typeName{%
\ifx\thesis@type\thesis@sempaper
\thesis@english@typeName@sempaper
\else\ifx\thesis@type\thesis@bachelors
\thesis@english@typeName@bachelors
\else\ifx\thesis@type\thesis@masters
\thesis@english@typeName@masters
\else\ifx\thesis@type\thesis@proposal
\thesis@english@typeName@proposal
\else\ifx\thesis@type\thesis@doctoral
\thesis@english@typeName@doctoral
\else\ifx\thesis@type\thesis@rigorous
\thesis@english@typeName@rigorous
\else
<<Unknown thesis type (\thesis@type)>>%
\fi\fi\fi\fi\fi\fi}
\endinput
%%
%% End of file `fithesis-english.def'.

View file

@ -1,160 +0,0 @@
%%
%% This is file `fithesis-slovak.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% slovak.dtx (with options: `base')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/locale/fithesis-slovak.def}[2017/07/09]
\gdef\thesis@slovak@gender@koncovka{%
\ifthesis@woman a\fi}
\gdef\thesis@slovak@csquotesStyle{german}
\gdef\thesis@slovak@universityName{Názov univerzity}
\gdef\thesis@slovak@facultyName{Názov fakulty}
\gdef\thesis@slovak@assignment{%
Na tomto mieste sa v~tlačenej práci nachádza oficiálne
podpísané zadanie práce.}
\gdef\thesis@slovak@declaration{Text vyhlásenie ...}
\gdef\thesis@slovak@spring{jar}
\gdef\thesis@slovak@fall{jeseň}
\gdef\thesis@slovak@semester{%
\thesis@{slovak@\thesis@season} \thesis@seasonYear}
\gdef\thesis@slovak@formattedDate{{%
\thesis@day.
\newcount\@month\expandafter\@month\thesis@month\relax
\ifnum\@month=1%
januára
\else\ifnum\@month=2%
februára
\else\ifnum\@month=3%
marca
\else\ifnum\@month=4%
apríla
\else\ifnum\@month=5%
mája
\else\ifnum\@month=6%
júna
\else\ifnum\@month=7%
júla
\else\ifnum\@month=8%
augusta
\else\ifnum\@month=9%
septembra
\else\ifnum\@month=10%
októbra
\else\ifnum\@month=11%
novembra
\else\ifnum\@month=12%
decembra
\else
<<neznámy mesiac (\the\@month)>>
\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi
\thesis@year}}
\gdef\thesis@slovak@authorSignature{%
Podpis autor\ifthesis@woman ky\else a\fi}
\gdef\thesis@slovak@fieldTitle{Odbor}
\gdef\thesis@slovak@advisorTitle{Vedúci práce}
\gdef\thesis@slovak@authorTitle{Autor}
\gdef\thesis@slovak@abstractTitle{Zhrnutie}
\gdef\thesis@slovak@keywordsTitle{Kľúčové slová}
\gdef\thesis@slovak@thanksTitle{Poďakovanie}
\gdef\thesis@slovak@declarationTitle{Vyhlásenie}
\gdef\thesis@slovak@idTitle{ID}
\gdef\thesis@slovak@typeName@sempaper{Seminárna práca}
\gdef\thesis@slovak@typeName@bachelors{Bakalárska práca}
\gdef\thesis@slovak@typeName@masters{Diplomová práca}
\gdef\thesis@slovak@typeName@proposal{Tézy záverečnej práce}
\gdef\thesis@slovak@typeName@doctoral{Dizertačná práca}
\gdef\thesis@slovak@typeName@rigorous{Rigorózna práca}
\gdef\thesis@slovak@typeName{%
\ifx\thesis@type\thesis@sempaper
\thesis@slovak@typeName@sempaper
\else\ifx\thesis@type\thesis@bachelors
\thesis@slovak@typeName@bachelors
\else\ifx\thesis@type\thesis@masters
\thesis@slovak@typeName@masters
\else\ifx\thesis@type\thesis@proposal
\thesis@slovak@typeName@proposal
\else\ifx\thesis@type\thesis@doctoral
\thesis@slovak@typeName@doctoral
\else\ifx\thesis@type\thesis@rigorous
\thesis@slovak@typeName@rigorous
\else
<<Neznámy typ práce (\thesis@type)>>%
\fi\fi\fi\fi\fi\fi}
\gdef\thesis@slovak@typeName@akuzativ@sempaper{Seminárnu prácu}
\gdef\thesis@slovak@typeName@akuzativ@bachelors{Bakalársku prácu}
\gdef\thesis@slovak@typeName@akuzativ@masters{Diplomovú prácu}
\gdef\thesis@slovak@typeName@akuzativ@proposal{Tézy záverečnej práce}
\gdef\thesis@slovak@typeName@akuzativ@doctoral{Dizertačnú prácu}
\gdef\thesis@slovak@typeName@akuzativ@rigorous{Rigoróznu prácu}
\gdef\thesis@slovak@typeName@akuzativ{%
\ifx\thesis@type\thesis@sempaper
\thesis@slovak@typeName@akuzativ@sempaper
\else\ifx\thesis@type\thesis@bachelors
\thesis@slovak@typeName@akuzativ@bachelors
\else\ifx\thesis@type\thesis@masters
\thesis@slovak@typeName@akuzativ@masters
\else\ifx\thesis@type\thesis@proposal
\thesis@slovak@typeName@akuzativ@proposal
\else\ifx\thesis@type\thesis@doctoral
\thesis@slovak@typeName@akuzativ@doctoral
\else\ifx\thesis@type\thesis@rigorous
\thesis@slovak@typeName@akuzativ@rigorous
\else
<<Neznámy typ práce (\thesis@type)>>%
\fi\fi\fi\fi\fi\fi}
\endinput
%%
%% End of file `fithesis-slovak.def'.

View file

@ -1,77 +0,0 @@
%%
%% This is file `mu/fi/fithesis-czech.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% czech.dtx (with options: `mu/fi')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/locale/mu/fi/fithesis-czech.def}[2016/05/25]
\gdef\thesis@czech@facultyName{Fakulta informatiky}
\gdef\thesis@czech@assignment{%
\ifthesis@digital@
Na tomto místě se v~tištěné práci nachází oficiální podepsané
zadání práce a~prohlášení autora školního díla.
\else
Místo tohoto listu vložte kopie oficiálního podepsaného zadání
práce a~prohlášení autora školního díla.
\fi}
\gdef\thesis@czech@declaration{%
Prohlašuji, že tato \thesis@lower{czech@typeName} je mým
původním autorským dílem, které jsem vypracoval%
\thesis@czech@gender@koncovka\ samostatně. Všechny zdroje,
prameny a~literaturu, které jsem při vypracování
používal\thesis@czech@gender@koncovka\ nebo z~nich
čerpal\thesis@czech@gender@koncovka, v~práci řádně cituji
s~uvedením úplného odkazu na příslušný zdroj.}
\gdef\thesis@czech@advisorSignature{Podpis vedoucího}
\gdef\thesis@czech@typeName@proposal{Teze disertační práce}
\gdef\thesis@czech@typeName@akuzativ@proposal{Tezi disertační práce}
\endinput
%%
%% End of file `mu/fi/fithesis-czech.def'.

View file

@ -1,73 +0,0 @@
%%
%% This is file `mu/fi/fithesis-english.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% english.dtx (with options: `mu/fi')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/locale/mu/fi/fithesis-english.def}[2016/05/25]
\gdef\thesis@english@facultyName{Faculty of Informatics}
\gdef\thesis@english@assignment{Replace this page with a copy
of the official signed thesis assignment and a copy of the
Statement of an Author.}
\gdef\thesis@english@assignment{%
\ifthesis@digital@
This is where a copy of the official signed thesis assignment
and a copy of the Statement of an Author is located in the
printed version of the document.
\else
Replace this page with a copy of the official signed thesis
assignment and a copy of the Statement of an Author.
\fi}
\gdef\thesis@english@advisorSignature{Signature of Thesis
\thesis@english@advisorTitle}
\gdef\thesis@english@typeName@proposal{Ph.D. Thesis Proposal}
\endinput
%%
%% End of file `mu/fi/fithesis-english.def'.

View file

@ -1,78 +0,0 @@
%%
%% This is file `mu/fi/fithesis-slovak.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% slovak.dtx (with options: `mu/fi')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/locale/mu/fi/fithesis-slovak.def}[2016/05/25]
\gdef\thesis@slovak@facultyName{Fakulta informatiky}
\gdef\thesis@slovak@assignment{%
\ifthesis@digital@
Na tomto mieste sa v~tlačenej práci nachádza oficiálne
podpísané zadanie práce a vyhlásenie autora školského diela.
\else
Namiesto tejto stránky vložte kópiu oficiálneho podpísaného
zadania práce a vyhlásenie autora školského diela.
\fi}
\gdef\thesis@slovak@declaration{%
Vyhlasujem, že táto \thesis@lower{slovak@typeName} je mojím
pôvodným autorským dielom, ktoré som vypracoval%
\thesis@slovak@gender@koncovka\ samostatne. Všetky zdroje,
pramene a literatúru, ktoré som pri vypracovaní
používal\thesis@slovak@gender@koncovka\ alebo z~nich
čerpal\thesis@slovak@gender@koncovka, v~práci riadne citujem
s~uvedením úplného odkazu na príslušný zdroj.}
\gdef\thesis@slovak@advisorSignature{Podpis vedúceho}
\gdef\thesis@slovak@typeName@proposal{Tézy dizertačnej práce}
\gdef\thesis@slovak@typeName@akuzativ@proposal{Tézy dizertačnej práce}
\endinput
%%
%% End of file `mu/fi/fithesis-slovak.def'.

View file

@ -1,83 +0,0 @@
%%
%% This is file `mu/fithesis-czech.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% czech.dtx (with options: `mu')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/locale/mu/fithesis-czech.def}[2017/07/09]
\gdef\thesis@czech@universityName{Masarykova univerzita}
\gdef\thesis@czech@declaration{Prohlašuji, že jsem
\thesis@lower{czech@typeName@akuzativ} zpracoval%
\thesis@czech@gender@koncovka\ samostatně a~%
použil\thesis@czech@gender@koncovka\ jen prameny
uvedené v~seznamu literatury.}
\gdef\thesis@czech@assignment{%
\ifthesis@blocks@assignment@hideIfDigital@
\ifthesis@digital@
Na tomto místě se v~tištěné práci nachází oficiální podepsané
zadání práce.
\else
Místo tohoto listu vložte kopii oficiálního podepsaného zadání
práce.
\fi
\else
Nastavte pomocí klíče <<assignment>> název PDF souboru
s~oficiálním podepsaným zadáním práce.
\fi}
\gdef\thesis@czech@bib@title{Bibliografický záznam}
\gdef\thesis@czech@bib@pages{str}
\global\let\thesis@czech@bib@author\thesis@czech@authorTitle
\gdef\thesis@czech@bib@thesisTitle{Název práce}
\global\let\thesis@czech@bib@advisor\thesis@czech@advisorTitle
\gdef\thesis@czech@idTitle{UČO}
\endinput
%%
%% End of file `mu/fithesis-czech.def'.

View file

@ -1,87 +0,0 @@
%%
%% This is file `mu/fithesis-english.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% english.dtx (with options: `mu')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/locale/mu/fithesis-english.def}[2017/07/09]
\gdef\thesis@english@universityName{Masaryk University}
\gdef\thesis@english@declaration{%
Hereby I declare that this paper is my original authorial work,
which I have worked out on my own. All sources, references, and
literature used or excerpted during elaboration of this work are
properly cited and listed in complete reference to the due source.}
\gdef\thesis@english@assignment{%
\ifthesis@digital@
\else
\fi}
\gdef\thesis@english@assignment{%
\ifthesis@blocks@assignment@hideIfDigital@
\ifthesis@digital@
This is where a copy of the official signed thesis assignment
is located in the printed version of the document.
\else
Replace this page with a copy of the official signed thesis
assignment.
\fi
\else
Set the PDF document containing the official signed thesis
assignment using the <<assignment>> key.
\fi}
\gdef\thesis@english@bib@title{Bibliographic record}
\gdef\thesis@english@bib@pages{p}
\global\let\thesis@english@bib@author\thesis@english@authorTitle
\gdef\thesis@english@bib@thesisTitle{Title of Thesis}
\gdef\thesis@english@bib@advisor{Supervisor}
\gdef\thesis@english@idTitle{UČO}
\endinput
%%
%% End of file `mu/fithesis-english.def'.

View file

@ -1,84 +0,0 @@
%%
%% This is file `mu/fithesis-slovak.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% slovak.dtx (with options: `mu')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/locale/mu/fithesis-slovak.def}[2018/02/11]
\gdef\thesis@slovak@universityName{Masarykova univerzita}
\gdef\thesis@slovak@declaration{%
Vyhlasujem, že som predloženú \thesis@lower{%
slovak@typeName@akuzativ} vypracoval%
\thesis@slovak@gender@koncovka\ samostatne len s~použitím
uvedenej literatúry a prameňov.}
\gdef\thesis@slovak@assignment{%
\ifthesis@blocks@assignment@hideIfDigital@
\ifthesis@digital@
Na tomto mieste sa v~tlačenej práci nachádza oficiálne
podpísané zadanie práce.
\else
Namiesto tejto stránky vložte kópiu oficiálneho podpísaného
zadania práce.
\fi
\else
Nastavte pomocou kľúča <<assignment>> názov súboru PDF
s~oficiálnym podpísaným zadaním práce.
\fi}
\gdef\thesis@slovak@bib@title{Bibliografický záznam}
\gdef\thesis@slovak@bib@pages{str}
\global\let\thesis@slovak@bib@author\thesis@slovak@authorTitle
\gdef\thesis@slovak@bib@thesisTitle{Názov práce}
\global\let\thesis@slovak@bib@advisor\thesis@slovak@advisorTitle
\gdef\thesis@slovak@idTitle{UČO}
\endinput
%%
%% End of file `mu/fithesis-slovak.def'.

Binary file not shown.

Binary file not shown.

View file

@ -1,59 +0,0 @@
%%
%% This is file `fithesis-base.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% base.dtx
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fithesis/style/fithesis-base}[2018/02/11]
\DeclareRobustCommand\em
{\@nomath\em \ifdim \fontdimen\@ne\font >\z@
\eminnershape \else \itshape \fi}%
\endinput
%%
%% End of file `fithesis-base.sty'.

View file

@ -1,281 +0,0 @@
%%
%% This is file `fithesis-10.clo',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% base.dtx (with options: `opt,10pt')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/style/mu/fithesis-10.clo}[2016/05/15]
\renewcommand{\normalsize}{\fontsize\@xpt{12}\selectfont
\abovedisplayskip 10\p@ plus2\p@ minus5\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@
\let\@listi\@listI}
\renewcommand{\small}{\fontsize\@ixpt{11}\selectfont
\abovedisplayskip 8.5\p@ plus3\p@ minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2\p@
\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
\def\@listi{\leftmargin\leftmargini
\topsep 4\p@ plus2\p@ minus2\p@\parsep 2\p@ plus\p@ minus\p@
\itemsep \parsep}}
\renewcommand{\footnotesize}{\fontsize\@viiipt{9.5}\selectfont
\abovedisplayskip 6\p@ plus2\p@ minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus\p@
\belowdisplayshortskip 3\p@ plus\p@ minus2\p@
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\topsep 3\p@ plus\p@ minus\p@\parsep 2\p@ plus\p@ minus\p@
\itemsep \parsep}}
\renewcommand{\scriptsize}{\fontsize\@viipt{8pt}\selectfont}
\renewcommand{\tiny}{\fontsize\@vpt{6pt}\selectfont}
\renewcommand{\large}{\fontsize\@xiipt{14pt}\selectfont}
\renewcommand{\Large}{\fontsize\@xivpt{18pt}\selectfont}
\renewcommand{\LARGE}{\fontsize\@xviipt{22pt}\selectfont}
\renewcommand{\huge}{\fontsize\@xxpt{25pt}\selectfont}
\renewcommand{\Huge}{\fontsize\@xxvpt{30pt}\selectfont}
\def\thesis@titlePage@normalsize{\fontsize\@xiipt{14.5}%
\selectfont\abovedisplayskip 12\p@ plus3\p@ minus7\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@
\let\@listi\@listI}
\def\thesis@titlePage@small{\fontsize\@xipt{13.6}\selectfont
\abovedisplayskip 11\p@ plus3\p@ minus6\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\parsep 4.5\p@ plus2\p@ minus\p@
\itemsep \parsep
\topsep 9\p@ plus3\p@ minus5\p@}}
\def\thesis@titlePage@footnotesize{\fontsize\@xpt{12}\selectfont
\abovedisplayskip 10\p@ plus2\p@ minus5\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@
\itemsep \parsep}}
\def\thesis@titlePage@scriptsize{\fontsize\@viiipt{9.5pt}\selectfont}
\def\thesis@titlePage@tiny{\fontsize\@vipt{7pt}\selectfont}
\def\thesis@titlePage@large{\fontsize\@xivpt{18pt}\selectfont}
\def\thesis@titlePage@Large{\fontsize\@xviipt{22pt}\selectfont}
\def\thesis@titlePage@LARGE{\fontsize\@xxpt{25pt}\selectfont}
\def\thesis@titlePage@huge{\fontsize\@xxvpt{30pt}\selectfont}
\def\thesis@titlePage@Huge{\fontsize\@xxvpt{30pt}\selectfont}
\let\@normalsize\normalsize
\normalsize
\if@twoside
\oddsidemargin 0.75in
\evensidemargin 0.4in
\marginparwidth 0pt
\else
\oddsidemargin 0.75in
\evensidemargin 0.75in
\marginparwidth 0pt
\fi
\marginparsep 10pt
\topmargin 0.4in
\headheight 20pt
\headsep 10pt
\topskip 10pt
\footskip 30pt
\textheight = 43\baselineskip
\advance\textheight by \topskip
\textwidth 5.0truein
\columnsep 10pt
\columnseprule 0pt
\footnotesep 6.65pt
\skip\footins 9pt plus 4pt minus 2pt
\floatsep 12pt plus 2pt minus 2pt
\textfloatsep 20pt plus 2pt minus 4pt
\intextsep 12pt plus 2pt minus 2pt
\dblfloatsep 12pt plus 2pt minus 2pt
\dbltextfloatsep 20pt plus 2pt minus 4pt
\@fptop 0pt plus 1fil
\@fpsep 8pt plus 2fil
\@fpbot 0pt plus 1fil
\@dblfptop 0pt plus 1fil
\@dblfpsep 8pt plus 2fil
\@dblfpbot 0pt plus 1fil
\marginparpush 5pt
\parskip 0pt plus 1pt
\partopsep 2pt plus 1pt minus 1pt
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
\@beginparpenalty -\@lowpenalty
\@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty
\def\@makechapterhead#1{{%
\setlength\parindent{\z@}%
\setlength\parskip {\z@}%
\Large \ChapFont
\ifnum
\c@secnumdepth >\m@ne
\par\nobreak
\vskip 10\p@
\thechapter{} \space
\fi #1\par
\nobreak
\vskip 20\p@}}
\def\@makeschapterhead#1{{%
\setlength\parindent{\z@}%
\setlength\parskip {\z@}%
\Large \ChapFont #1\par
\nobreak
\vskip 20\p@}}
\def\chapter{%
\clearpage
\thispagestyle{plain}
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth
>\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}{\protect
\numberline{\thechapter}\bfseries #1}
\else
\addcontentsline{toc}{chapter}{\bfseries #1}
\fi
\chaptermark{#1}%
\addtocontents{lof}%
{\protect\addvspace{4\p@}}
\addtocontents{lot}%
{\protect\addvspace{4\p@}}
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi
}
\def\section{\@startsection{section}{1}{\z@}{%
-3.5ex plus-1ex minus-.2ex}{2.3ex plus.2ex}{%
\reset@font\large\bfseries}}
\def\subsection{\@startsection{subsection}{2}{\z@}{%
-3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{%
\reset@font\normalsize\bfseries}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{%
-3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{%
\reset@font\normalsize}}
\def\paragraph{\@startsection{paragraph}{4}{\z@}{%
3.25ex plus1ex minus.2ex}{-1em}{%
\reset@font\normalsize\bfseries}}
\def\subparagraph{\@startsection{subparagraph}{4}{\parindent}{%
3.25ex plus1ex minus.2ex}{-1em}{%
\reset@font\normalsize\bfseries}}
\leftmargini 2.5em
\leftmarginii 2.2em % > \labelsep + width of '(m)'
\leftmarginiii 1.87em % > \labelsep + width of 'vii.'
\leftmarginiv 1.7em % > \labelsep + width of 'M.'
\leftmarginv 1em
\leftmarginvi 1em
\leftmargin\leftmargini
\labelsep .5em
\labelwidth\leftmargini\advance\labelwidth-\labelsep
\def\@listI{\leftmargin\leftmargini \parsep 4\p@ plus2\p@ minus\p@
\topsep 8\p@ plus2\p@ minus4\p@
\itemsep 4\p@ plus2\p@ minus\p@}
\let\@listi\@listI
\@listi
\def\@listii{\leftmargin\leftmarginii
\labelwidth\leftmarginii\advance\labelwidth-\labelsep
\topsep 4\p@ plus2\p@ minus\p@
\parsep 2\p@ plus\p@ minus\p@
\itemsep \parsep}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii\advance\labelwidth-\labelsep
\topsep 2\p@ plus\p@ minus\p@
\parsep \z@ \partopsep\p@ plus\z@ minus\p@
\itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv
\labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
\labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
\labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
\endinput
%%
%% End of file `fithesis-10.clo'.

View file

@ -1,280 +0,0 @@
%%
%% This is file `fithesis-11.clo',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% base.dtx (with options: `opt,11pt')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/style/mu/fithesis-11.clo}[2016/05/15]
\renewcommand{\normalsize}{\fontsize\@xipt{14}\selectfont
\abovedisplayskip 11\p@ plus3\p@ minus6\p@
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@
\let\@listi\@listI}
\renewcommand{\small}{\fontsize\@xpt{12}\selectfont
\abovedisplayskip 10\p@ plus2\p@ minus5\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@
\def\@listi{\leftmargin\leftmargini
\topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@
\itemsep \parsep}}
\renewcommand{\footnotesize}{\fontsize\@ixpt{11}\selectfont
\abovedisplayskip 8\p@ plus2\p@ minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus\p@
\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
\def\@listi{\leftmargin\leftmargini
\topsep 4\p@ plus2\p@ minus2\p@\parsep 2\p@ plus\p@ minus\p@
\itemsep \parsep}}
\renewcommand{\scriptsize}{\fontsize\@viiipt{9.5pt}\selectfont}
\renewcommand{\tiny}{\fontsize\@vipt{7pt}\selectfont}
\renewcommand{\large}{\fontsize\@xiipt{14pt}\selectfont}
\renewcommand{\Large}{\fontsize\@xivpt{18pt}\selectfont}
\renewcommand{\LARGE}{\fontsize\@xviipt{22pt}\selectfont}
\renewcommand{\huge}{\fontsize\@xxpt{25pt}\selectfont}
\renewcommand{\Huge}{\fontsize\@xxvpt{30pt}\selectfont}
\def\thesis@titlePage@normalsize{\fontsize\@xiipt{14.5}%
\selectfont\abovedisplayskip 12\p@ plus3\p@ minus7\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@
\let\@listi\@listI}
\def\thesis@titlePage@small{\fontsize\@xipt{13.6}\selectfont
\abovedisplayskip 11\p@ plus3\p@ minus6\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\parsep 4.5\p@ plus2\p@ minus\p@
\itemsep \parsep
\topsep 9\p@ plus3\p@ minus5\p@}}
\def\thesis@titlePage@footnotesize{\fontsize\@xpt{12}\selectfont
\abovedisplayskip 10\p@ plus2\p@ minus5\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@
\itemsep \parsep}}
\def\thesis@titlePage@scriptsize{\fontsize\@viiipt{9.5pt}\selectfont}
\def\thesis@titlePage@tiny{\fontsize\@vipt{7pt}\selectfont}
\def\thesis@titlePage@large{\fontsize\@xivpt{18pt}\selectfont}
\def\thesis@titlePage@Large{\fontsize\@xviipt{22pt}\selectfont}
\def\thesis@titlePage@LARGE{\fontsize\@xxpt{25pt}\selectfont}
\def\thesis@titlePage@huge{\fontsize\@xxvpt{30pt}\selectfont}
\def\thesis@titlePage@Huge{\fontsize\@xxvpt{30pt}\selectfont}
\let\@normalsize\normalsize
\normalsize
\if@twoside
\oddsidemargin 0.75in
\evensidemargin 0.4in
\marginparwidth 0pt
\else
\oddsidemargin 0.75in
\evensidemargin 0.75in
\marginparwidth 0pt
\fi
\marginparsep 10pt
\topmargin 0.4in
\headheight 20pt
\headsep 10pt
\topskip 10pt
\footskip 30pt
\textheight = 39\baselineskip
\advance\textheight by \topskip
\textwidth 5.0truein
\columnsep 10pt
\columnseprule 0pt
\footnotesep 7.7pt
\skip\footins 10pt plus 4pt minus 2pt
\floatsep 12pt plus 2pt minus 2pt
\textfloatsep 20pt plus 2pt minus 4pt
\intextsep 12pt plus 2pt minus 2pt
\dblfloatsep 12pt plus 2pt minus 2pt
\dbltextfloatsep 20pt plus 2pt minus 4pt
\@fptop 0pt plus 1fil
\@fpsep 8pt plus 2fil
\@fpbot 0pt plus 1fil
\@dblfptop 0pt plus 1fil
\@dblfpsep 8pt plus 2fil
\@dblfpbot 0pt plus 1fil
\marginparpush 5pt
\parskip 0pt plus 0pt
\partopsep 3pt plus 1pt minus 2pt
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
\@beginparpenalty -\@lowpenalty
\@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty
\def\@makechapterhead#1{{%
\setlength\parindent{\z@}%
\setlength\parskip {\z@}%
\Large \ChapFont
\ifnum
\c@secnumdepth >\m@ne
\par\nobreak
\vskip 10\p@
\thechapter{} \space
\fi #1\par
\nobreak
\vskip 20\p@}}
\def\@makeschapterhead#1{{%
\setlength\parindent{\z@}%
\setlength\parskip {\z@}%
\Large \ChapFont #1\par
\nobreak
\vskip 20\p@}}
\def\chapter{%
\clearpage
\thispagestyle{plain}
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth
>\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}{\protect
\numberline{\thechapter}\bfseries #1}
\else
\addcontentsline{toc}{chapter}{\bfseries #1}
\fi
\chaptermark{#1}%
\addtocontents{lof}%
{\protect\addvspace{4\p@}}
\addtocontents{lot}%
{\protect\addvspace{4\p@}}
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi
}
\def\section{\@startsection{section}{1}{\z@}{%
-3.5ex plus-1ex minus-.2ex}{2.3ex plus.2ex}{%
\reset@font\large\bfseries}}
\def\subsection{\@startsection{subsection}{2}{\z@}{%
-3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{%
\reset@font\normalsize\bfseries}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{%
-3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{%
\reset@font\normalsize}}
\def\paragraph{\@startsection{paragraph}{4}{\z@}{%
3.25ex plus1ex minus.2ex}{-1em}{%
\reset@font\normalsize\bfseries}}
\def\subparagraph{\@startsection{subparagraph}{4}{\parindent}{%
3.25ex plus1ex minus.2ex}{-1em}{%
\reset@font\normalsize\bfseries}}
\leftmargini 2.5em
\leftmarginii 2.2em % > \labelsep + width of '(m)'
\leftmarginiii 1.87em % > \labelsep + width of 'vii.'
\leftmarginiv 1.7em % > \labelsep + width of 'M.'
\leftmarginv 1em
\leftmarginvi 1em
\leftmargin\leftmargini
\labelsep .5em
\labelwidth\leftmargini\advance\labelwidth-\labelsep
\def\@listI{\leftmargin\leftmargini \parsep 4.5\p@ plus2\p@ minus\p@
\topsep 9\p@ plus3\p@ minus5\p@
\itemsep 4.5\p@ plus2\p@ minus\p@}
\let\@listi\@listI
\@listi
\def\@listii{\leftmargin\leftmarginii
\labelwidth\leftmarginii\advance\labelwidth-\labelsep
\topsep 4.5\p@ plus2\p@ minus\p@
\parsep 2\p@ plus\p@ minus\p@
\itemsep \parsep}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii\advance\labelwidth-\labelsep
\topsep 2\p@ plus\p@ minus\p@
\parsep \z@ \partopsep \p@ plus\z@ minus\p@
\itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv
\labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
\labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
\labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
\endinput
%%
%% End of file `fithesis-11.clo'.

View file

@ -1,257 +0,0 @@
%%
%% This is file `fithesis-12.clo',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% base.dtx (with options: `opt,12pt')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesFile{fithesis/style/mu/fithesis-12.clo}[2016/05/15]
\def\thesis@titlePage@normalsize{\fontsize\@xiipt{14.5}%
\selectfont\abovedisplayskip 12\p@ plus3\p@ minus7\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@
\let\@listi\@listI}
\def\thesis@titlePage@small{\fontsize\@xipt{13.6}\selectfont
\abovedisplayskip 11\p@ plus3\p@ minus6\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\parsep 4.5\p@ plus2\p@ minus\p@
\itemsep \parsep
\topsep 9\p@ plus3\p@ minus5\p@}}
\def\thesis@titlePage@footnotesize{\fontsize\@xpt{12}\selectfont
\abovedisplayskip 10\p@ plus2\p@ minus5\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3\p@
\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@
\itemsep \parsep}}
\def\thesis@titlePage@scriptsize{\fontsize\@viiipt{9.5pt}\selectfont}
\def\thesis@titlePage@tiny{\fontsize\@vipt{7pt}\selectfont}
\def\thesis@titlePage@large{\fontsize\@xivpt{18pt}\selectfont}
\def\thesis@titlePage@Large{\fontsize\@xviipt{22pt}\selectfont}
\def\thesis@titlePage@LARGE{\fontsize\@xxpt{25pt}\selectfont}
\def\thesis@titlePage@huge{\fontsize\@xxvpt{30pt}\selectfont}
\def\thesis@titlePage@Huge{\fontsize\@xxvpt{30pt}\selectfont}
\renewcommand{\normalsize}{\thesis@titlePage@normalsize}
\renewcommand{\small}{\thesis@titlePage@small}
\renewcommand{\footnotesize}{\thesis@titlePage@footnotesize}
\renewcommand{\scriptsize}{\thesis@titlePage@scriptsize}
\renewcommand{\tiny}{\thesis@titlePage@tiny}
\renewcommand{\large}{\thesis@titlePage@large}
\renewcommand{\Large}{\thesis@titlePage@Large}
\renewcommand{\LARGE}{\thesis@titlePage@LARGE}
\renewcommand{\huge}{\thesis@titlePage@huge}
\renewcommand{\Huge}{\thesis@titlePage@Huge}
\let\@normalsize\normalsize
\normalsize
\if@twoside
\oddsidemargin 0.75in
\evensidemargin 0.4in
\marginparwidth 0pt
\else
\oddsidemargin 0.75in
\evensidemargin 0.75in
\marginparwidth 0pt
\fi
\marginparsep 10pt
\topmargin 0.4in
\headheight 20pt
\headsep 10pt
\topskip 10pt
\footskip 30pt
\textheight = 37\baselineskip
\advance\textheight by \topskip
\textwidth 5.0truein
\columnsep 10pt
\columnseprule 0pt
\footnotesep 8.4pt
\skip\footins 10.8pt plus 4pt minus 2pt
\floatsep 14pt plus 2pt minus 4pt
\textfloatsep 20pt plus 2pt minus 4pt
\intextsep 14pt plus 4pt minus 4pt
\dblfloatsep 14pt plus 2pt minus 4pt
\dbltextfloatsep 20pt plus 2pt minus 4pt
\@fptop 0pt plus 1fil
\@fpsep 10pt plus 2fil
\@fpbot 0pt plus 1fil
\@dblfptop 0pt plus 1fil
\@dblfpsep 10pt plus 2fil
\@dblfpbot 0pt plus 1fil
\marginparpush 7pt
\parskip 0pt plus 0pt
\partopsep 3pt plus 2pt minus 2pt
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
\@beginparpenalty -\@lowpenalty
\@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty
\def\@makechapterhead#1{{%
\setlength\parindent{\z@}%
\setlength\parskip {\z@}%
\Large \ChapFont
\ifnum
\c@secnumdepth >\m@ne
\par\nobreak
\vskip 10\p@
\thechapter{} \space
\fi #1\par
\nobreak
\vskip 20\p@}}
\def\@makeschapterhead#1{{%
\setlength\parindent{\z@}%
\setlength\parskip {\z@}%
\Large \ChapFont #1\par
\nobreak
\vskip 20\p@}}
\def\chapter{%
\clearpage
\thispagestyle{plain}
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth
>\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}{\protect
\numberline{\thechapter}\bfseries #1}
\else
\addcontentsline{toc}{chapter}{\bfseries #1}
\fi
\chaptermark{#1}%
\addtocontents{lof}%
{\protect\addvspace{4\p@}}
\addtocontents{lot}%
{\protect\addvspace{4\p@}}
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi
}
\def\section{\@startsection{section}{1}{\z@}{%
-3.5ex plus-1ex minus-.2ex}{2.3ex plus.2ex}{%
\reset@font\large\bfseries}}
\def\subsection{\@startsection{subsection}{2}{\z@}{%
-3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{%
\reset@font\normalsize\bfseries}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{%
-3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{%
\reset@font\normalsize}}
\def\paragraph{\@startsection{paragraph}{4}{\z@}{%
3.25ex plus1ex minus.2ex}{-1em}{%
\reset@font\normalsize\bfseries}}
\def\subparagraph{\@startsection{subparagraph}{4}{\parindent}{%
3.25ex plus1ex minus.2ex}{-1em}{%
\reset@font\normalsize\bfseries}}
\leftmargini 2.5em
\leftmarginii 2.2em % > \labelsep + width of '(m)'
\leftmarginiii 1.87em % > \labelsep + width of 'vii.'
\leftmarginiv 1.7em % > \labelsep + width of 'M.'
\leftmarginv 1em
\leftmarginvi 1em
\leftmargin\leftmargini
\labelsep .5em
\labelwidth\leftmargini\advance\labelwidth-\labelsep
\def\@listI{\leftmargin\leftmargini \parsep 5\p@ plus2.5\p@ minus\p@
\topsep 10\p@ plus4\p@ minus6\p@
\itemsep 5\p@ plus2.5\p@ minus\p@}
\let\@listi\@listI
\@listi
\def\@listii{\leftmargin\leftmarginii
\labelwidth\leftmarginii\advance\labelwidth-\labelsep
\topsep 5\p@ plus2.5\p@ minus\p@
\parsep 2.5\p@ plus\p@ minus\p@
\itemsep \parsep}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii\advance\labelwidth-\labelsep
\topsep 2.5\p@ plus\p@ minus\p@
\parsep \z@ \partopsep \p@ plus\z@ minus\p@
\itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv
\labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
\labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
\labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
\endinput
%%
%% End of file `fithesis-12.clo'.

View file

@ -1,624 +0,0 @@
%%
%% This is file `fithesis-base.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% base.dtx (with options: `base')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\ProvidesPackage{fithesis/style/mu/fithesis-base}[2018/12/25]
\NeedsTeXFormat{LaTeX2e}
\DeclareOption{10pt}{\def\thesis@ptsize{0}}
\DeclareOption{11pt}{\def\thesis@ptsize{1}}
\DeclareOption{12pt}{\def\thesis@ptsize{2}}
\newif\ifthesis@twoside@
\DeclareOption{oneside}{%
\thesis@twoside@false\@twosidefalse\@mparswitchfalse}
\DeclareOption{twoside}{%
\thesis@twoside@true \@twosidetrue \@mparswitchtrue}
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\newif\ifthesis@palatino@
\DeclareOption{palatino}{\thesis@palatino@true}
\DeclareOption{nopalatino}{\thesis@palatino@false}
\newif\ifthesis@color@
\DeclareOption{monochrome}{\thesis@color@false}
\DeclareOption{color}{\thesis@color@true}
\newif\ifthesis@microtype@
\DeclareOption{microtype}{\thesis@microtype@true}
\DeclareOption{nomicrotype}{\thesis@microtype@false}
\newif\ifthesis@newtable@
\DeclareOption{table}{\thesis@newtable@true}
\DeclareOption{oldtable}{\thesis@newtable@false}
\DeclareOption{nolot}{\let\thesis@blocks@lot\relax}
\DeclareOption{lot}{\let\thesis@blocks@lot\listoftables}
\DeclareOption{nolof}{\let\thesis@blocks@lof\relax}
\DeclareOption{lof}{\let\thesis@blocks@lof\listoffigures}
\newif\ifthesis@cover@
\DeclareOption{nocover}{\thesis@cover@false}
\DeclareOption{cover}{\thesis@cover@true}
\newif\ifthesis@digital@
\DeclareOption{digital}{%
\ExecuteOptions{color,cover}%
\thesis@digital@true}
\DeclareOption{printed}{%
\ExecuteOptions{monochrome,nocover}%
\thesis@digital@false}
\ExecuteOptions{%
printed,12pt,twoside,final,microtype,palatino,oldtable,lot,lof}
\ProcessOptions*
\thesis@requireLocale{english}
\thesis@require{xcolor}
\thesis@require{graphicx}
\thesis@require{pdfpages}
\thesis@require{keyval}
\thesis@require{ifxetex}
\thesis@require{ifluatex}
\ifthesis@microtype@
\thesis@require[final,babel]{microtype}
\fi
{\let\x\expandafter
\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%
\fi
\fi\endcsname}
\ifthesis@xeluatex
\ifthesis@palatino@
\thesis@require{fontspec}
\thesis@require{unicode-math}
\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
\setmathfont[math-style=ISO,bold-style=ISO]{texgyrepagella-math.otf}
\fi
\else
\ifthesis@palatino@
\RequirePackage[resetfonts]{cmap}
\thesis@require{lmodern}
\thesis@require{mathpazo}
\thesis@require{tgpagella}
\RequirePackage[T1]{fontenc}
\fi
\fi
\let\thesis@newtable@old\tabular
\let\endthesis@newtable@old\endtabular
\ifthesis@newtable@
% Load the packages.
\thesis@require{tabularx}
\thesis@require{tabu}
\thesis@require{booktabs}
% Adjust the measurements.
\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\setlength{\extrarowheight}{.75ex}
\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
\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
\def\thesis@bibliography@setup#1{%
\setkeys{thesis@bibliography}{#1}}
\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}
\thesis@def@extra[]{bibliography}
\ifx\thesis@extra@bibliography
\thesis@placeholder@extra@bibliography\else
\expandafter\thesis@bibliography@setup\expandafter{%
\thesis@extra@bibliography}%
\fi
\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}
\thesis@bibliography@setup{
style = iso-numeric,
sorting = none}
\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,}%
\let\thesis@printbibliography@old\printbibliography
\def\printbibliography{%
\global\thesis@bibliography@included@true
\thesis@printbibliography@old}
\fi
\fi}
\thesis@require{hyperref}
\ifthesis@digital@
\hypersetup{pdfborderstyle={/S/U/W 1}}
\else
\hypersetup{hidelinks}
\fi
\widowpenalty 10000
\clubpenalty 10000
\def\thesis@color@setup#1{%
\setkeys{thesis@color}{#1}}
\define@key{thesis@color}{links}{%
\definecolor{thesis@color@links}#1
\hypersetup{linkbordercolor=thesis@color@links}}
\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}
\def\thesis@blocks@coverMatter{%
\pagenumbering{gobble}}
\def\thesis@blocks@frontMatter{%
\thesis@blocks@clear
\pagestyle{plain}
\parindent 1.5em
\setcounter{page}{1}
\pagenumbering{roman}}
\def\thesis@blocks@clear{%
\ifthesis@twoside@
\clearpage
\ifodd\value{page}\else%
\thispagestyle{empty}%
\hbox{}%
\newpage
\fi
\else
\newpage
\fi}
\def\thesis@blocks@clearRight{%
\ifthesis@twoside@
\clearpage
\ifodd\value{page}%
\thispagestyle{empty}%
\hbox{}%
\newpage
\fi
\else
\newpage
\fi}
\newcommand{\thesis@blocks@facultyLogo@monochrome}[1]%
[width=40mm]{{%
\edef\@path{\thesis@logopath\thesis@facultyLogo}%
\includegraphics[#1]{\@path}}}
\newcommand{\thesis@blocks@facultyLogo@color}[1]%
[width=40mm]{{%
\edef\@path{\thesis@logopath\thesis@facultyLogo
\ifthesis@color@-color\fi}%
\includegraphics[#1]{\@path}}}
\newcommand{\thesis@blocks@universityLogo@monochrome}[1]%
[width=40mm]{{%
\edef\@path{\thesis@logopath\thesis@universityLogo}%
\includegraphics[#1]{\@path}}}
\newcommand{\thesis@blocks@universityLogo@color}[1]%
[width=40mm]{{%
\edef\@path{\thesis@logopath\thesis@universityLogo
\ifthesis@color@-color\fi}%
\includegraphics[#1]{\@path}}}
\let\thesis@department@name\thesis@department
\let\thesis@departmentEn@name\thesis@departmentEn
\let\thesis@field@name\thesis@field
\let\thesis@fieldEn@name\thesis@fieldEn
\def\thesis@blocks@cover{%
\ifthesis@cover@
\thesis@blocks@clear
\begin{alwayssingle}%
\thispagestyle{empty}%
\begin{center}%
\thesis@blocks@cover@header
\thesis@blocks@facultyLogo@monochrome\\[0.4in]%
\let\footnotesize\small
\let\footnoterule\relax{}%
\thesis@blocks@cover@content
\par\vfill
\thesis@blocks@cover@footer
\end{center}%
\end{alwayssingle}%
\fi}
\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
\def\thesis@blocks@cover@header{%
{\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\\%
\fi}
\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}}}
\def\thesis@blocks@titlePage{%
\thesis@blocks@clear
\begin{alwayssingle}%
\thispagestyle{empty}%
\begin{center}%
\thesis@blocks@titlePage@header
\thesis@blocks@facultyLogo@color\\[0.4in]%
\let\footnotesize\small
\let\footnoterule\relax{}%
\thesis@blocks@titlePage@content
\par\vfill
\thesis@blocks@titlePage@footer
\end{center}%
\end{alwayssingle}}
\newif\ifthesis@blocks@titlePage@university@
\thesis@blocks@titlePage@university@true
\newif\ifthesis@blocks@titlePage@faculty@
\thesis@blocks@titlePage@faculty@true
\newif\ifthesis@blocks@titlePage@department@
\thesis@blocks@titlePage@department@false
\newif\ifthesis@blocks@titlePage@field@
\thesis@blocks@titlePage@field@false
\def\thesis@blocks@titlePage@header{%
{\sc\ifthesis@blocks@titlePage@university@
\thesis@titlePage@LARGE\thesis@@{universityName}\\%
\fi\ifthesis@blocks@titlePage@faculty@
\thesis@titlePage@Large\thesis@@{facultyName}\\%
\fi\ifthesis@blocks@titlePage@department@
\thesis@titlePage@large\thesis@department@name\\%
\fi}
\ifthesis@blocks@titlePage@field@
{\thesis@titlePage@large\vskip 1em%
{\bf\thesis@@{fieldTitle}:} \thesis@field@name}%
\fi\vskip 2em}
\let\thesis@blocks@titlePage@content=\thesis@blocks@cover@content
\let\thesis@blocks@titlePage@footer=\thesis@blocks@cover@footer
\def\thesis@blocks@toc{%
\thesis@blocks@clear
\tableofcontents}
\def\thesis@blocks@tables{%
\thesis@blocks@toc
\thesis@blocks@lot
\thesis@blocks@lof}
\def\thesis@blocks@declaration{%
\thesis@blocks@clear
\begin{alwayssingle}%
\chapter*{\thesis@@{declarationTitle}}%
\thesis@declaration
\vskip 2cm%
\hfill\thesis@author
\end{alwayssingle}}
\def\thesis@blocks@thanks{%
\ifx\thesis@thanks\undefined\else
\thesis@blocks@clear
\begin{alwayssingle}%
\chapter*{\vspace*{\fill}\thesis@@{thanksTitle}}%
\leavevmode\thesis@thanks
\end{alwayssingle}%
\fi}
\def\thesis@blocks@abstract{%
\begin{alwayssingle}%
% Start the new chapter without clearing the left page.
\clearpage
{\let\thesis@blocks@clear\relax
\chapter*{\thesis@@{abstractTitle}}}%
\noindent\thesis@abstract
\par\vfil\null
\end{alwayssingle}}
\def\thesis@blocks@abstractEn{%
\ifthesis@english\else
{\thesis@selectLocale{english}%
\begin{alwayssingle}%
% Start the new chapter without clearing the left page.
\clearpage
{\let\thesis@blocks@clear\relax
\chapter*{\thesis@english@abstractTitle}}%
\noindent\thesis@abstractEn
\par\vfil\null
\end{alwayssingle}}%
\fi}
\def\thesis@blocks@keywords{%
\begin{alwayssingle}%
% Start the new chapter without clearing the left page.
\clearpage
{\let\thesis@blocks@clear\relax
\chapter*{\thesis@@{keywordsTitle}}%
\noindent\thesis@TeXkeywords}%
\par\vfil\null
\end{alwayssingle}}
\def\thesis@blocks@keywordsEn{%
\ifthesis@english\else
{\thesis@selectLocale{english}%
\begin{alwayssingle}%
% Start the new chapter without clearing the left page.
\clearpage
{\let\thesis@blocks@clear\relax%
\chapter*{\thesis@english@keywordsTitle}}%
\noindent\thesis@TeXkeywordsEn
\par\vfil\null
\end{alwayssingle}}%
\fi}
\def\thesis@rewind{%
\addtocounter{page}{-\ifthesis@twoside@2\else1\fi}}
\newif\ifthesis@blocks@assignment@
\thesis@blocks@assignment@true
\newif\ifthesis@blocks@assignment@hideIfDigital@
\thesis@blocks@assignment@hideIfDigital@true
\def\thesis@blocks@assignment{%
\ifthesis@blocks@assignment@
\ifx\thesis@assignmentFiles\undefined
% Rewind the pages and typeset a placeholder page.
\thesis@blocks@clear
\begin{alwayssingle}%
\thispagestyle{empty}\thesis@rewind
\noindent\textit{\thesis@@{assignment}}%
\end{alwayssingle}%
\else
{\edef\@pdfList{\thesis@assignmentFiles}%
\let\ea\expandafter
% Injects the specified PDF documents.
\def\@inject##1,{\thesis@blocks@clear
\def\@args{##1}\def\@relax{\relax}%
\ifx\@args\@relax\else
% Trim leading spaces.
\edef\@trimmed{\romannumeral-`\.##1}%
% Rewind the pages and include the PDF.
\thesis@rewind\includepdf[pages=-]\@trimmed
\ea\@inject\fi}%
\ifx\@pdfList\empty\else
\ifthesis@digital@
\ifthesis@blocks@assignment@hideIfDigital@
\thesis@blocks@clear
\begin{alwayssingle}%
\thispagestyle{empty}\thesis@rewind
\noindent\textit{\thesis@@{assignment}}%
\end{alwayssingle}%
\else
\ea\@inject\@pdfList,\relax,%
\fi
\else
\ea\@inject\@pdfList,\relax,%
\fi
\fi}%
\fi
\fi}
\def\thesis@blocks@mainMatter{%
\thesis@blocks@clear
\setcounter{page}{1}
\pagenumbering{arabic}
\pagestyle{thesisheadings}
\parindent 1.5em\relax}
\def\thesis@blocks@bibEntry{%
\chapter*{\thesis@@{bib@title}}
\noindent\thesis@upper{author@tail}, \thesis@author@head.
\emph{\thesis@title}. \thesis@place: \thesis@@{universityName},
\thesis@@{facultyName}, \thesis@department@name, \thesis@year.
\thesis@pages\ \thesis@@{bib@pages}.
\thesis@@{advisorTitle}: \thesis@advisor
\thesis@blocks@clearRight}
\def\thesis@blocks@bibliography{%
\ifthesis@bibliography@loaded@
\ifthesis@bibliography@included@\else
\thesis@blocks@clear
{\emergencystretch=3em%
\printbibliography[heading=bibintoc]}%
\fi
\fi}
\setcounter{tocdepth}{2}
\setcounter{secnumdepth}{2}
\input\thesis@stylepath mu/fithesis-1\thesis@ptsize.clo\relax
\def\ps@thesisheadings{%
\def\chaptermark##1{%
\markright{%
\ifnum\c@secnumdepth >\m@ne
\thechapter.\ %
\fi ##1}}
\let\@oddfoot\@empty
\let\@oddhead\@empty
\def\@oddhead{%
\vbox{%
\hbox to \textwidth{%
\hfil{\sc\rightmark}}%
\vskip 4pt\hrule}}
\if@twoside
\def\@evenhead{%
\vbox{%
\hbox to \textwidth{%
{\sc\rightmark}%
\hfil}
\vskip 4pt\hrule}}
\else
\let\@evenhead\@oddhead
\fi
\def\@oddfoot{\hfil\PageFont\thepage}
\if@twoside
\def\@evenfoot{\PageFont\thepage\hfil}%
\else
\let\@evenfoot\@oddfoot
\fi
\let\@mkboth\markboth}
\renewcommand*\chapter{%
\thesis@blocks@clear
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\renewcommand*\part{%
\thesis@blocks@clear
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\hbox{}\vfil
\secdef\@part\@spart}
\newif\if@restonecol
\def\alwayssingle{%
\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi}
\def\endalwayssingle{\if@restonecol\twocolumn\fi}
\pdfstringdefDisableCommands{%
\let\MakeUppercase\relax}
\renewcommand*\toc@font[1]{%
\ifcase #1\relax
\bfseries % \chapter (0)
\or
\slshape % \section (1)
\else
\rmfamily % \subsection (2), \subsubsection (3)
% \paragraph, \subparagraph (4)
\fi}
\renewcommand*\l@part[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty{-\@highpenalty}%
\ifnum \c@tocdepth >0\relax
\addvspace{2.25em \@plus\p@}%
\else
\addvspace{1.0em \@plus\p@}%
\fi
\begingroup
\setlength\@tempdima{3em}%
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
{\leavevmode
\normalfont \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
\nobreak
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}%
\endgroup
\fi}
\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >0\relax
\addpenalty{-\@highpenalty}%
\addvspace{1.0em \@plus\p@}%
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\else
\@dottedtocline{0}{0em}{1.5em}{#1}{#2}
\fi}
\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
\renewcommand*\l@paragraph{\@dottedtocline{4}{10.0em}{5.0em}}
\renewcommand*\l@subparagraph{\@dottedtocline{4}{12.0em}{6.0em}}
\endinput
%%
%% End of file `fithesis-base.sty'.

View file

@ -1,131 +0,0 @@
%%
%% This is file `fithesis-fi.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fi.dtx
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fithesis/style/mu/fithesis-fi}[2016/04/18]
\thesis@color@setup{
links={HTML}{FFD451},
tableEmph={HTML}{FFD451},
tableOdd={HTML}{FFF9E5},
tableEven={HTML}{FFECB3}}
\thesis@bibliography@setup{
style=iso-numeric,
sorting=none}
\thesis@bibliography@load
\ifx\thesis@type\thesis@rigorous
\thesis@blocks@assignment@false
\else\ifx\thesis@type\thesis@doctoral
\thesis@blocks@assignment@false
\fi\fi
\def\thesis@blocks@advisor{%
{\thesis@titlePage@large\\[0.3in]
{\bf\thesis@@{advisorTitle}:} \thesis@advisor}}
\def\thesis@blocks@titlePage@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}
% If this is a rigorous thesis or a PhD thesis proposal,
% typeset the name of the thesis advisor.
\ifx\thesis@type\thesis@rigorous
\thesis@blocks@advisor
\else\ifx\thesis@type\thesis@proposal
\thesis@blocks@advisor
\fi\fi}%
\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}
}}}%
\def\thesis@blocks@titlePage@footer{%
{\thesis@titlePage@large\thesis@place, \thesis@@{semester}
% If this is a rigorous thesis or a PhD thesis proposal,
% create space for the advisor's signature.
\ifx\thesis@type\thesis@rigorous
\thesis@blocks@advisorSignature
\else\ifx\thesis@type\thesis@proposal
\thesis@blocks@advisorSignature
\fi\fi}}
\def\thesis@blocks@declaration{%
\thesis@blocks@clear
\begin{alwayssingle}%
\chapter*{\thesis@@{declarationTitle}}%
\thesis@declaration
\vskip 2cm%
\hfill\thesis@author
\par\vfill\noindent
\textbf{\thesis@@{advisorTitle}:} \thesis@advisor
\par\vfil
\end{alwayssingle}}
\def\thesis@blocks@preamble{%
\thesis@blocks@coverMatter
\thesis@blocks@cover
\thesis@blocks@titlePage
\thesis@blocks@frontMatter
\ifx\thesis@type\thesis@proposal
\thesis@blocks@toc
\else
\thesis@blocks@assignment
\thesis@blocks@declaration
\thesis@blocks@thanks
\thesis@blocks@clearRight
\thesis@blocks@abstract
\thesis@blocks@keywords
\thesis@blocks@tables
\fi}
\def\thesis@blocks@postamble{%
\thesis@blocks@bibliography}
\endinput
%%
%% End of file `fithesis-fi.sty'.

View file

@ -1,588 +0,0 @@
%%
%% This is file `fithesis3.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fithesis.dtx (with options: `class')
%%
%% Copyright 1998--2020 Daniel Marek (DM), Jan Pavlovič (JP),
%% Vít Novotný (VN), Petr Sojka (PS)
%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%%
%% http://is.muni.cz/auth/df/fithesis-sazba/
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\NeedsTeXFormat{LaTeX2e}
{\def\thesis@versiondef#1#2{
\gdef\thesis@version@number{#1}
\gdef\thesis@version@date{#2}
\gdef\thesis@version{#2 #1 fithesis3 MU thesis class}}
\thesis@versiondef{v0.3.51}{2020/03/09}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesClass{fithesis3}[\thesis@version]
\ifx\thesis@backend\undefined
\def\thesis@backend{[a4paper]{rapport3}}
\fi\expandafter\LoadClass\thesis@backend
\RequirePackage{keyval}
\RequirePackage{etoolbox}
\RequirePackage{ltxcmds}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
\ifxetex\else\ifluatex\else
\RequirePackage[utf8]{inputenc}
\fi\fi
\long\def\thesissetup#1{%
\setkeys{thesis}{#1}}
\def\thesis@basepath{fithesis/}
\define@key{thesis}{basePath}{%
\ifx\thesis@empty#1\thesis@empty
\def\thesis@basepath{}%
\else
\def\thesis@basepath{#1/}%
\fi}
\def\thesis@logopath{\thesis@basepath logo/\thesis@university/}
\define@key{thesis}{logoPath}{%
\def\thesis@logopath{\thesis@subdir#1%
\empty\empty\empty\empty}}
\def\thesis@stylepath{\thesis@basepath style/}
\define@key{thesis}{stylePath}{%
\def\thesis@stylepath{\thesis@subdir#1%
\empty\empty\empty\empty}}
\def\thesis@localepath{\thesis@basepath locale/}
\define@key{thesis}{localePath}{%
\def\thesis@localepath{\thesis@subdir#1%
\empty\empty\empty\empty}}
\def\thesis@subdir#1#2#3#4\empty{%
\ifx#1\empty% <empty> -> <basepath>
\thesis@basepath
\else
\if#1/%
\ifx#2\empty% / -> /
/%
\else% /<path> -> /<path>/
#1#2#3#4/%
\fi
\else
\if#1.%
\ifx#2\empty% . -> ./
./%
\else
\if#2.%
\ifx#3\empty% .. -> ../
../%
\else
\if#3/% ../<path> -> ../<path>/
../#4/%
\else
\thesis@basepath#1#2#3#4/%
\fi
\fi
\else
\if#2/% ./<path> -> ./<path>/
./#3#4/%
\else
\thesis@basepath#1#2#3#4/%
\fi
\fi
\fi
\else
\thesis@basepath#1#2#3#4/%
\fi
\fi
\fi}
\newcommand{\thesis@def}[2][]{%
\expandafter\def\csname thesis@#2\endcsname{%
<<\ifx\thesis@empty#1\thesis@empty#2\else#1\fi>>}}
\def\thesis@declaration{\thesis@@{declaration}}
\long\def\KV@thesis@declaration#1{%
\long\def\thesis@declaration{#1}}
\newif\ifthesis@woman\thesis@womanfalse
\define@key{thesis}{gender}{%
\def\thesis@male{m}%
\def\thesis@arg{#1}%
\ifx\thesis@male\thesis@arg
\thesis@womanfalse
\else
\thesis@womantrue
\fi}
\def\thesis@parseAuthor#1{%
\def\thesis@author{#1}%
\def\thesis@author@head{\expandafter\expandafter\expandafter
\@gobble\thesis@head#1 \relax}%
\def\thesis@author@tail{\thesis@tail#1 \relax}}
\thesis@def{author}%
\thesis@def[author]{author@head}%
\thesis@def[author]{author@tail}%
\define@key{thesis}{author}{%
\thesis@parseAuthor{#1}}
\let\author\thesis@parseAuthor
\thesis@def{id}
\define@key{thesis}{id}{%
\def\thesis@id{#1}}
\def\thesis@sempaper{sem}
\def\thesis@bachelors{bc}
\def\thesis@masters{mgr}
\def\thesis@proposal{prop}
\def\thesis@doctoral{d}
\def\thesis@rigorous{r}
\let\thesis@type\thesis@bachelors
\define@key{thesis}{type}{%
\def\thesis@type{#1}}
\def\thesis@university{mu}
\define@key{thesis}{university}{%
\def\thesis@university{#1}}
\def\thesis@faculty{fi}
\define@key{thesis}{faculty}{%
\def\thesis@faculty{#1}}
\thesis@def{department}
\define@key{thesis}{department}{%
\def\thesis@department{#1}}
\thesis@def{departmentEn}
\define@key{thesis}{departmentEn}{%
\def\thesis@departmentEn{#1}}
\thesis@def{programme}
\define@key{thesis}{programme}{%
\def\thesis@programme{#1}}
\thesis@def{programmeEn}
\define@key{thesis}{programmeEn}{%
\def\thesis@programmeEn{#1}}
\thesis@def{field}
\define@key{thesis}{field}{%
\def\thesis@field{#1}}
\thesis@def{fieldEn}
\define@key{thesis}{fieldEn}{%
\def\thesis@fieldEn{#1}}
\def\thesis@universityLogo{fithesis-base}
\define@key{thesis}{universityLogo}{%
\def\thesis@universityLogo{#1}}
\def\thesis@facultyLogo{fithesis-\thesis@faculty}
\define@key{thesis}{facultyLogo}{%
\def\thesis@facultyLogo{#1}}
\def\thesis@style{\thesis@university/fithesis-\thesis@faculty}
\define@key{thesis}{style}{%
\def\thesis@style{#1}}
\newif\ifthesis@style@inheritance\thesis@style@inheritancetrue
\define@key{thesis}{styleInheritance}[true]{%
\begingroup
\def\@true{true}%
\def\@arg{#1}%
\ifx\@true\@arg
\endgroup\thesis@style@inheritancetrue
\else
\endgroup\thesis@style@inheritancefalse
\fi}
\def\thesis@locale{%
% Babel / polyglossia detection
\ifx\languagename\undefined
english\else\languagename\fi}
\define@key{thesis}{locale}{%
\def\thesis@locale{#1}}
\def\ifthesis@english{
\expandafter\def\expandafter\@english\expandafter{\string
\english}%
\expandafter\expandafter\expandafter\def\expandafter
\expandafter\expandafter\@locale\expandafter\expandafter
\expandafter{\expandafter\string\csname\thesis@locale\endcsname}%
\expandafter\csname\expandafter i\expandafter f\ifx\@locale
\@english
true%
\else
false%
\fi\endcsname}
\newif\ifthesis@locale@inheritance\thesis@locale@inheritancetrue
\define@key{thesis}{localeInheritance}[true]{%
\begingroup
\def\@true{true}%
\def\@arg{#1}%
\ifx\@true\@arg
\endgroup\thesis@locale@inheritancetrue
\else
\endgroup\thesis@locale@inheritancefalse
\fi}
\def\thesis@parseDate#1/#2/#3|{{
% Set the basic macros
\gdef\thesis@date{#1/#2/#3}%
\gdef\thesis@year{#1}%
\gdef\thesis@month{#2}%
\gdef\thesis@day{#3}%
% Set the season
\newcount\@month\expandafter\@month\thesis@month\relax
\ifnum\@month>8\gdef\thesis@season{fall}
\else\ifnum\@month<3\gdef\thesis@season{fall}
\else \gdef\thesis@season{spring}
\fi\fi
% Set the academic year
\newcount\@year\expandafter\@year\thesis@year\relax
\ifnum\@month>8%
\edef\@yearA{\the\@year}%
\advance\@year 1\edef\@yearB{\the\@year}%
\advance\@year-1
\else
\advance\@year-1\edef\@yearA{\the\@year}%
\advance\@year 1\edef\@yearB{\the\@year}%
\fi
\global\edef\thesis@academicYear{\@yearA/\@yearB}
% Set the season year
\ifnum\@month>2\else
\advance\@year-1
\fi
\global\edef\thesis@seasonYear{\the\@year}}}
\edef\thesis@date{\the\year/\the\month/\the\day}%
\expandafter\thesis@parseDate\thesis@date|%
\define@key{thesis}{date}{{%
\edef\@date{#1}%
\expandafter\thesis@parseDate\@date|}}
\def\thesis@place{Brno}
\define@key{thesis}{place}{%
\def\thesis@place{#1}}
\thesis@def{title}
\define@key{thesis}{title}{%
\def\thesis@title{#1}}
\def\title#1{\def\thesis@title{#1}}
\let\maketitle\relax
\def\thesis@TeXtitle{\thesis@title}
\define@key{thesis}{TeXtitle}{%
\def\thesis@TeXtitle{#1}}
\thesis@def{titleEn}
\define@key{thesis}{titleEn}{%
\def\thesis@titleEn{#1}}
\def\thesis@TeXtitleEn{\thesis@titleEn}
\define@key{thesis}{TeXtitleEn}{%
\def\thesis@TeXtitleEn{#1}}
\thesis@def{keywords}
\define@key{thesis}{keywords}{%
\def\thesis@keywords{#1}}
\def\thesis@TeXkeywords{\thesis@keywords}
\define@key{thesis}{TeXkeywords}{%
\def\thesis@TeXkeywords{#1}}
\thesis@def{keywordsEn}
\define@key{thesis}{keywordsEn}{%
\def\thesis@keywordsEn{#1}}
\def\thesis@TeXkeywordsEn{\thesis@keywordsEn}
\define@key{thesis}{TeXkeywordsEn}{%
\def\thesis@TeXkeywordsEn{#1}}
\thesis@def{abstract}
\long\def\KV@thesis@abstract#1{%
\long\def\thesis@abstract{#1}}
\thesis@def{abstractEn}
\long\def\KV@thesis@abstractEn#1{%
\long\def\thesis@abstractEn{#1}}
\thesis@def{advisor}
\define@key{thesis}{advisor}{\def\thesis@advisor{#1}}
\long\def\KV@thesis@thanks#1{%
\long\def\thesis@thanks{#1}}
\define@key{thesis}{assignment}{%
\def\thesis@assignmentFiles{#1}}
\define@key{thesis}{bib}{%
\def\thesis@bibFiles{#1}}
\newif\ifthesis@auto\thesis@autotrue
\define@key{thesis}{autoLayout}[true]{%
\def\@true{true}%
\def\@arg{#1}%
\ifx\@true\@arg
\thesis@autotrue
\else
\thesis@autofalse
\fi}
\ifx\thesis@pages@preamble\undefined
\def\thesis@pages@preamble{??}\fi
\ifx\thesis@pages@postamble\undefined
\def\thesis@pages@postamble{??}\fi
\def\thesis@preamble{%
{\thesis@selectLocale{\thesis@locale}%
\thesis@blocks@preamble
\gdef\thesis@pages@preamble{\thepage}
\write\@auxout{\noexpand\gdef\noexpand
\thesis@pages@preamble{\thepage}}
\clearpage}
\thesis@blocks@mainMatter}
\let\thesis@blocks@preamble\relax
\let\thesis@blocks@mainMatter\relax
\def\thesis@postamble{%
\gdef\thesis@pages@postamble{\thepage}
\immediate\write\@auxout{\noexpand\gdef\noexpand
\thesis@pages@postamble{\thepage}}
{\thesis@selectLocale{\thesis@locale}%
\thesis@blocks@postamble}}
\let\thesis@blocks@postamble\relax
\def\thesis@extra@KV@prefix{KV@thesis@extra@}
\def\thesis@extra@XKV@fams{thesis@extra}
\long\def\KV@thesis@extra#1{%
\long\def\XKV@s@tk@ys##1=##2=##3\@nil{%
\XKV@g@tkeyname##1=\@nil\XKV@tkey
\expandafter\KV@@sp@def\expandafter\XKV@tkey\expandafter{\XKV@tkey}%
\ifx\XKV@tkey\@empty
\XKV@toks{##2}%
\ifcat$\the\XKV@toks$\else
\XKV@err{no key specified for value `\the\XKV@toks'}%
\fi
\else
\@expandtwoargs\in@{,\XKV@tkey,}{,\XKV@na,}%
\ifin@\else
\XKV@knftrue
\KV@@sp@def\XKV@tempa{##2}%
\ifXKV@preset\XKV@s@tk@ys@{##3}\else
\ifXKV@pl
\XKV@for@eo\XKV@fams\XKV@tfam{%
\XKV@makehd\XKV@tfam
\XKV@s@tk@ys@{##3}%
}%
\else
\XKV@whilist\XKV@fams\XKV@tfam\ifXKV@knf\fi{%
\XKV@makehd\XKV@tfam
\XKV@s@tk@ys@{##3}%
}%
\fi
\fi
\ifXKV@knf
\ifXKV@inpox
\ifx\XKV@doxs\relax
\ifx\@currext\@clsextension\else
\let\CurrentOption\XKV@tkey\@unknownoptionerror
\fi
\else\XKV@doxs\fi
\else
\ifXKV@st
\XKV@addtolist@o\XKV@rm\CurrentOption
\else
\ifx\XKV@fams\thesis@extra@XKV@fams
\expandafter\long\expandafter\def\csname%
thesis@extra@\XKV@tkey\endcsname{##2}%
\else
\XKV@err{`\XKV@tkey' undefined in families
`\XKV@fams'}%
\fi
\fi
\fi
\else
\ifXKV@inpox\ifx\XKV@testclass\XKV@documentclass
\expandafter\XKV@useoption\expandafter{\CurrentOption}%
\fi\fi
\fi
\fi
\fi
}%
\setkeys{thesis@extra}{#1}%
\def\KV@prefix{KV@thesis@}}
\long\def\KV@split#1=#2=#3\relax{%
\KV@@sp@def\@tempa{#1}%
\ifx\@tempa\@empty\else
\expandafter\let\expandafter\@tempc
\csname\KV@prefix\@tempa\endcsname
\ifx\@tempc\relax
\ifx\KV@prefix\thesis@extra@KV@prefix
\KV@@sp@def\@tempb{#2}%
\expandafter\let\csname thesis@extra@\@tempa\endcsname
\@tempb%
\else
\KV@errx
{\@tempa\space undefined}%
\fi
\else
\ifx\@empty#3\@empty
\KV@default
\else
\KV@@sp@def\@tempb{#2}%
\expandafter\@tempc\expandafter{\@tempb}\relax
\fi
\fi
\fi}
\newcommand{\thesis@def@extra}[2][]{%
\expandafter\ifx\csname thesis@extra@#2\endcsname\relax
\def\thesis@placeholder@extra{<<extra@#2>>}%
\expandafter\let\csname thesis@placeholder@extra@#2\endcsname
\thesis@placeholder@extra
\def\thesis@arg{#1}%
\ifx\empty\thesis@arg
\expandafter\let\csname thesis@extra@#2\endcsname
\thesis@placeholder@extra
\else
\expandafter\def\csname thesis@extra@#2\endcsname{#1}%
\fi
\fi}
\long\def\thesislong#1#2{%
\csname KV@thesis@#1\endcsname{#2}}
\newif\ifthesis@loaded\thesis@loadedfalse
\BeforeBeginEnvironment{document}{\thesisload}
\def\thesis@load{\thesisload}
\def\thesisload{%
\ifthesis@loaded\else
\thesis@loadedtrue
\makeatletter
\ifx\thesis@locale\empty\else
\edef\thesis@locale{\thesis@locale}
\thesis@requireLocale{\thesis@locale}
\fi
\ifluatex
\ltx@ifpackageloaded{babel}{}{
% See <article.gmane.org/gmane.comp.tex.luatex.user/5680>
\RequirePackage[base]{babel}}
\fi
\ifthesis@english
\expandafter\expandafter\expandafter\let\expandafter\expandafter
\csname ifthesis@english\endcsname\csname iftrue\endcsname
\else
\expandafter\expandafter\expandafter\let\expandafter\expandafter
\csname ifthesis@english\endcsname\csname iffalse\endcsname
\fi
\ifx\thesis@style\empty\else
\thesis@requireStyle{\thesis@style}
\fi
\ifx\languagename\empty\else
\begingroup
\edef\@doclocale{\languagename}%
\ifx\@doclocale\thesis@locale
\endgroup
\AtBeginDocument{%
\thesis@selectLocale{\thesis@locale}}%
\else
\endgroup
\fi
\fi
\thesis@require{hyperref}
\hypersetup{
unicode=true,
pdfencoding=auto,
pdftitle=\thesis@title,
pdfauthor=\thesis@author,
pdfkeywords=\thesis@keywords,
pdfcreator=\thesis@version}
\ifthesis@auto
\AtBeginDocument{\thesis@preamble}
\AtEndDocument{%
\thesis@postamble
\immediate\write\@auxout{%
\noexpand\gdef\noexpand\thesis@pages{\thepage}}}
\else
\AtEndDocument{%
\immediate\write\@auxout{%
\noexpand\gdef\noexpand\thesis@pages{\thepage}}}
\fi
\makeatother
\fi}
\def\thesis@exists#1#2{%
\IfFileExists{#1}{#2}{%
\ClassWarning{fithesis3}{File #1 doesn't exist}}}
\def\thesis@input#1{%
\thesis@exists{#1}{\input{#1}}}
\newcommand\thesis@require[2][]{%
\@ifpackageloaded{#2}{}{\RequirePackage[#1]{#2}}}
\newcommand\thesis@requireIfExists[2][]{%
\thesis@exists{#2.sty}{\thesis@require[#1]{#2}}}
\def\thesis@requireStyle#1{%
\ifthesis@style@inheritance
\thesis@requireIfExists{\thesis@stylepath fithesis-base}%
\thesis@requireIfExists{\thesis@stylepath\thesis@university
/fithesis-base}
\fi
\thesis@requireIfExists{\thesis@stylepath#1}}
\def\thesis@requireLocale#1{%
% Ignore redundant requests
\expandafter\ifx\csname thesis@#1@required\endcsname\relax
\expandafter\def\csname thesis@#1@required\endcsname{}%
\@ifpackageloaded{polyglossia}{\setotherlanguage{#1}}{}
\thesis@input{\thesis@localepath fithesis-#1.def}%
\ifthesis@locale@inheritance
\thesis@input{\thesis@localepath\thesis@university/%
fithesis-#1.def}%
\thesis@input{\thesis@localepath\thesis@university/%
\thesis@faculty/fithesis-#1.def}%
\fi
\fi}
\def\thesis@#1{\csname thesis@#1\endcsname}
\def\thesis@@#1{\thesis@{\thesis@locale @#1}}
\def\thesis@lower#1{{%
\let\ea\expandafter
\ea\MakeLowercase\ea{\csname thesis@#1\endcsname}}}
\def\thesis@upper#1{{%
\let\ea\expandafter
\ea\MakeUppercase\ea{\csname thesis@#1\endcsname}}}
\def\thesis@@lower#1{\thesis@lower{\thesis@locale @#1}}
\def\thesis@@upper#1{\thesis@upper{\thesis@locale @#1}}
\def\thesis@head#1 #2{%
\ifx\relax#2%
\expandafter\@gobbletwo
\else
\ #1%
\fi
\thesis@head#2}%
\def\thesis@tail#1 #2{%
\ifx\relax#2%
#1%
\expandafter\@gobbletwo
\fi
\thesis@tail#2}%
\ifx\thesis@pages\undefined\def\thesis@pages{??}\fi
\def\thesis@selectLocale#1{%
\edef\thesis@locale{#1}%
\ltx@ifpackageloaded{csquotes}{%
\csq@setstyle{\thesis@@{csquotesStyle}}%
}{}%
\ltx@ifpackageloaded{polyglossia}{%
\selectlanguage{\thesis@locale}
}{%
\language\csname l@\thesis@locale\endcsname
}}
\def\thesis@patch#1#2{%
\def\thesis@patch@versions{#1}%
\def\thesis@patch@action{#2}%
\def\thesis@patch@next##1,{%
\def\thesis@patch@arg{##1}%
\def\thesis@patch@relax{\relax}%
\ifx\thesis@patch@arg\thesis@version@number
\def\thesis@patch@next####1\relax,{}%
\expandafter\thesis@patch@action
\expandafter\thesis@patch@next
\else\ifx\thesis@patch@arg\thesis@patch@relax\else
\expandafter\expandafter\expandafter\thesis@patch@next
\fi\fi}%
\expandafter\expandafter\expandafter\thesis@patch@next
\expandafter\thesis@patch@versions\expandafter,\relax,}
\endinput
%%
%% End of file `fithesis3.cls'.

File diff suppressed because it is too large Load diff

View file

@ -1,829 +0,0 @@
%%
%% This is file `markdown.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% markdown.dtx (with options: `latex')
%%
%% Copyright (C) 2016-2020 Vít Novotný
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%% The Current Maintainer of this work is Vít Novotný.
%%
%% Send bug reports, requests for additions and questions
%% either to the GitHub issue tracker at
%%
%% https://github.com/Witiko/markdown/issues
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\NeedsTeXFormat{LaTeX2e}%
\RequirePackage{keyval}
\RequirePackage{url}
\RequirePackage{graphicx}
\RequirePackage{ifthen}
\RequirePackage{fancyvrb}
\RequirePackage{csvsimple}
\RequirePackage{gobble}
\newenvironment{markdown}\relax\relax
\newenvironment{markdown*}[1]\relax\relax
\newcommand\markdownSetup[1]{%
\setkeys{markdownOptions}{#1}}%
\define@key{markdownOptions}{helperScriptFileName}{%
\def\markdownOptionHelperScriptFileName{#1}}%
\define@key{markdownOptions}{inputTempFileName}{%
\def\markdownOptionInputTempFileName{#1}}%
\define@key{markdownOptions}{outputTempFileName}{%
\def\markdownOptionOutputTempFileName{#1}}%
\define@key{markdownOptions}{errorTempFileName}{%
\def\markdownOptionErrorTempFileName{#1}}%
\define@key{markdownOptions}{cacheDir}{%
\def\markdownOptionCacheDir{#1}}%
\define@key{markdownOptions}{outputDir}{%
\def\markdownOptionOutputDir{#1}}%
\define@key{markdownOptions}{blankBeforeBlockquote}[true]{%
\def\markdownOptionBlankBeforeBlockquote{#1}}%
\define@key{markdownOptions}{blankBeforeCodeFence}[true]{%
\def\markdownOptionBlankBeforeCodeFence{#1}}%
\define@key{markdownOptions}{blankBeforeHeading}[true]{%
\def\markdownOptionBlankBeforeHeading{#1}}%
\define@key{markdownOptions}{breakableBlockquotes}[true]{%
\def\markdownOptionBreakableBlockquotes{#1}}%
\define@key{markdownOptions}{citations}[true]{%
\def\markdownOptionCitations{#1}}%
\define@key{markdownOptions}{citationNbsps}[true]{%
\def\markdownOptionCitationNbsps{#1}}%
\define@key{markdownOptions}{contentBlocks}[true]{%
\def\markdownOptionContentBlocks{#1}}%
\define@key{markdownOptions}{codeSpans}[true]{%
\def\markdownOptionCodeSpans{#1}}%
\define@key{markdownOptions}{contentBlocksLanguageMap}{%
\def\markdownOptionContentBlocksLanguageMap{#1}}%
\define@key{markdownOptions}{definitionLists}[true]{%
\def\markdownOptionDefinitionLists{#1}}%
\define@key{markdownOptions}{footnotes}[true]{%
\def\markdownOptionFootnotes{#1}}%
\define@key{markdownOptions}{fencedCode}[true]{%
\def\markdownOptionFencedCode{#1}}%
\define@key{markdownOptions}{hashEnumerators}[true]{%
\def\markdownOptionHashEnumerators{#1}}%
\define@key{markdownOptions}{headerAttributes}[true]{%
\def\markdownOptionHeaderAttributes{#1}}%
\define@key{markdownOptions}{html}[true]{%
\def\markdownOptionHtml{#1}}%
\define@key{markdownOptions}{hybrid}[true]{%
\def\markdownOptionHybrid{#1}}%
\define@key{markdownOptions}{inlineFootnotes}[true]{%
\def\markdownOptionInlineFootnotes{#1}}%
\define@key{markdownOptions}{pipeTables}[true]{%
\def\markdownOptionPipeTables{#1}}%
\define@key{markdownOptions}{preserveTabs}[true]{%
\def\markdownOptionPreserveTabs{#1}}%
\define@key{markdownOptions}{smartEllipses}[true]{%
\def\markdownOptionSmartEllipses{#1}}%
\define@key{markdownOptions}{shiftHeadings}{%
\def\markdownOptionShiftHeadings{#1}}%
\define@key{markdownOptions}{slice}{%
\def\markdownOptionSlice{#1}}%
\define@key{markdownOptions}{startNumber}[true]{%
\def\markdownOptionStartNumber{#1}}%
\define@key{markdownOptions}{tableCaptions}[true]{%
\def\markdownOptionTableCaptions{#1}}%
\define@key{markdownOptions}{tightLists}[true]{%
\def\markdownOptionTightLists{#1}}%
\define@key{markdownOptions}{underscores}[true]{%
\def\markdownOptionUnderscores{#1}}%
\define@key{markdownOptions}{stripPercentSigns}[true]{%
\def\markdownOptionStripPercentSigns{#1}}%
\define@key{markdownOptions}{finalizeCache}[true]{%
\def\markdownOptionFinalizeCache{#1}}%
\DeclareOption{finalizecache}{\markdownSetup{finalizeCache}}
\define@key{markdownOptions}{frozenCache}[true]{%
\def\markdownOptionFrozenCache{#1}}%
\DeclareOption{frozencache}{\markdownSetup{frozenCache}}
\define@key{markdownOptions}{frozenCacheFileName}{%
\def\markdownOptionFrozenCacheFileName{#1}}%
\define@key{markdownRenderers}{interblockSeparator}{%
\renewcommand\markdownRendererInterblockSeparator{#1}}%
\define@key{markdownRenderers}{lineBreak}{%
\renewcommand\markdownRendererLineBreak{#1}}%
\define@key{markdownRenderers}{ellipsis}{%
\renewcommand\markdownRendererEllipsis{#1}}%
\define@key{markdownRenderers}{nbsp}{%
\renewcommand\markdownRendererNbsp{#1}}%
\define@key{markdownRenderers}{leftBrace}{%
\renewcommand\markdownRendererLeftBrace{#1}}%
\define@key{markdownRenderers}{rightBrace}{%
\renewcommand\markdownRendererRightBrace{#1}}%
\define@key{markdownRenderers}{dollarSign}{%
\renewcommand\markdownRendererDollarSign{#1}}%
\define@key{markdownRenderers}{percentSign}{%
\renewcommand\markdownRendererPercentSign{#1}}%
\define@key{markdownRenderers}{ampersand}{%
\renewcommand\markdownRendererAmpersand{#1}}%
\define@key{markdownRenderers}{underscore}{%
\renewcommand\markdownRendererUnderscore{#1}}%
\define@key{markdownRenderers}{hash}{%
\renewcommand\markdownRendererHash{#1}}%
\define@key{markdownRenderers}{circumflex}{%
\renewcommand\markdownRendererCircumflex{#1}}%
\define@key{markdownRenderers}{backslash}{%
\renewcommand\markdownRendererBackslash{#1}}%
\define@key{markdownRenderers}{tilde}{%
\renewcommand\markdownRendererTilde{#1}}%
\define@key{markdownRenderers}{pipe}{%
\renewcommand\markdownRendererPipe{#1}}%
\define@key{markdownRenderers}{codeSpan}{%
\renewcommand\markdownRendererCodeSpan[1]{#1}}%
\define@key{markdownRenderers}{link}{%
\renewcommand\markdownRendererLink[4]{#1}}%
\define@key{markdownRenderers}{contentBlock}{%
\renewcommand\markdownRendererContentBlock[4]{#1}}%
\define@key{markdownRenderers}{contentBlockOnlineImage}{%
\renewcommand\markdownRendererContentBlockOnlineImage[4]{#1}}%
\define@key{markdownRenderers}{contentBlockCode}{%
\renewcommand\markdownRendererContentBlockCode[5]{#1}}%
\define@key{markdownRenderers}{image}{%
\renewcommand\markdownRendererImage[4]{#1}}%
\define@key{markdownRenderers}{ulBegin}{%
\renewcommand\markdownRendererUlBegin{#1}}%
\define@key{markdownRenderers}{ulBeginTight}{%
\renewcommand\markdownRendererUlBeginTight{#1}}%
\define@key{markdownRenderers}{ulItem}{%
\renewcommand\markdownRendererUlItem{#1}}%
\define@key{markdownRenderers}{ulItemEnd}{%
\renewcommand\markdownRendererUlItemEnd{#1}}%
\define@key{markdownRenderers}{ulEnd}{%
\renewcommand\markdownRendererUlEnd{#1}}%
\define@key{markdownRenderers}{ulEndTight}{%
\renewcommand\markdownRendererUlEndTight{#1}}%
\define@key{markdownRenderers}{olBegin}{%
\renewcommand\markdownRendererOlBegin{#1}}%
\define@key{markdownRenderers}{olBeginTight}{%
\renewcommand\markdownRendererOlBeginTight{#1}}%
\define@key{markdownRenderers}{olItem}{%
\renewcommand\markdownRendererOlItem{#1}}%
\define@key{markdownRenderers}{olItemWithNumber}{%
\renewcommand\markdownRendererOlItemWithNumber[1]{#1}}%
\define@key{markdownRenderers}{olItemEnd}{%
\renewcommand\markdownRendererOlItemEnd{#1}}%
\define@key{markdownRenderers}{olEnd}{%
\renewcommand\markdownRendererOlEnd{#1}}%
\define@key{markdownRenderers}{olEndTight}{%
\renewcommand\markdownRendererOlEndTight{#1}}%
\define@key{markdownRenderers}{dlBegin}{%
\renewcommand\markdownRendererDlBegin{#1}}%
\define@key{markdownRenderers}{dlBeginTight}{%
\renewcommand\markdownRendererDlBeginTight{#1}}%
\define@key{markdownRenderers}{dlItem}{%
\renewcommand\markdownRendererDlItem[1]{#1}}%
\define@key{markdownRenderers}{dlItemEnd}{%
\renewcommand\markdownRendererDlItemEnd{#1}}%
\define@key{markdownRenderers}{dlDefinitionBegin}{%
\renewcommand\markdownRendererDlDefinitionBegin{#1}}%
\define@key{markdownRenderers}{dlDefinitionEnd}{%
\renewcommand\markdownRendererDlDefinitionEnd{#1}}%
\define@key{markdownRenderers}{dlEnd}{%
\renewcommand\markdownRendererDlEnd{#1}}%
\define@key{markdownRenderers}{dlEndTight}{%
\renewcommand\markdownRendererDlEndTight{#1}}%
\define@key{markdownRenderers}{emphasis}{%
\renewcommand\markdownRendererEmphasis[1]{#1}}%
\define@key{markdownRenderers}{strongEmphasis}{%
\renewcommand\markdownRendererStrongEmphasis[1]{#1}}%
\define@key{markdownRenderers}{blockQuoteBegin}{%
\renewcommand\markdownRendererBlockQuoteBegin{#1}}%
\define@key{markdownRenderers}{blockQuoteEnd}{%
\renewcommand\markdownRendererBlockQuoteEnd{#1}}%
\define@key{markdownRenderers}{inputVerbatim}{%
\renewcommand\markdownRendererInputVerbatim[1]{#1}}%
\define@key{markdownRenderers}{inputFencedCode}{%
\renewcommand\markdownRendererInputFencedCode[2]{#1}}%
\define@key{markdownRenderers}{headingOne}{%
\renewcommand\markdownRendererHeadingOne[1]{#1}}%
\define@key{markdownRenderers}{headingTwo}{%
\renewcommand\markdownRendererHeadingTwo[1]{#1}}%
\define@key{markdownRenderers}{headingThree}{%
\renewcommand\markdownRendererHeadingThree[1]{#1}}%
\define@key{markdownRenderers}{headingFour}{%
\renewcommand\markdownRendererHeadingFour[1]{#1}}%
\define@key{markdownRenderers}{headingFive}{%
\renewcommand\markdownRendererHeadingFive[1]{#1}}%
\define@key{markdownRenderers}{headingSix}{%
\renewcommand\markdownRendererHeadingSix[1]{#1}}%
\define@key{markdownRenderers}{horizontalRule}{%
\renewcommand\markdownRendererHorizontalRule{#1}}%
\define@key{markdownRenderers}{footnote}{%
\renewcommand\markdownRendererFootnote[1]{#1}}%
\define@key{markdownRenderers}{cite}{%
\renewcommand\markdownRendererCite[1]{#1}}%
\define@key{markdownRenderers}{textCite}{%
\renewcommand\markdownRendererTextCite[1]{#1}}%
\define@key{markdownRenderers}{table}{%
\renewcommand\markdownRendererTable[3]{#1}}%
\define@key{markdownRendererPrototypes}{interblockSeparator}{%
\renewcommand\markdownRendererInterblockSeparatorPrototype{#1}}%
\define@key{markdownRendererPrototypes}{lineBreak}{%
\renewcommand\markdownRendererLineBreakPrototype{#1}}%
\define@key{markdownRendererPrototypes}{ellipsis}{%
\renewcommand\markdownRendererEllipsisPrototype{#1}}%
\define@key{markdownRendererPrototypes}{nbsp}{%
\renewcommand\markdownRendererNbspPrototype{#1}}%
\define@key{markdownRendererPrototypes}{leftBrace}{%
\renewcommand\markdownRendererLeftBracePrototype{#1}}%
\define@key{markdownRendererPrototypes}{rightBrace}{%
\renewcommand\markdownRendererRightBracePrototype{#1}}%
\define@key{markdownRendererPrototypes}{dollarSign}{%
\renewcommand\markdownRendererDollarSignPrototype{#1}}%
\define@key{markdownRendererPrototypes}{percentSign}{%
\renewcommand\markdownRendererPercentSignPrototype{#1}}%
\define@key{markdownRendererPrototypes}{ampersand}{%
\renewcommand\markdownRendererAmpersandPrototype{#1}}%
\define@key{markdownRendererPrototypes}{underscore}{%
\renewcommand\markdownRendererUnderscorePrototype{#1}}%
\define@key{markdownRendererPrototypes}{hash}{%
\renewcommand\markdownRendererHashPrototype{#1}}%
\define@key{markdownRendererPrototypes}{circumflex}{%
\renewcommand\markdownRendererCircumflexPrototype{#1}}%
\define@key{markdownRendererPrototypes}{backslash}{%
\renewcommand\markdownRendererBackslashPrototype{#1}}%
\define@key{markdownRendererPrototypes}{tilde}{%
\renewcommand\markdownRendererTildePrototype{#1}}%
\define@key{markdownRendererPrototypes}{pipe}{%
\renewcommand\markdownRendererPipePrototype{#1}}%
\define@key{markdownRendererPrototypes}{codeSpan}{%
\renewcommand\markdownRendererCodeSpanPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{link}{%
\renewcommand\markdownRendererLinkPrototype[4]{#1}}%
\define@key{markdownRendererPrototypes}{contentBlock}{%
\renewcommand\markdownRendererContentBlockPrototype[4]{#1}}%
\define@key{markdownRendererPrototypes}{contentBlockOnlineImage}{%
\renewcommand\markdownRendererContentBlockOnlineImagePrototype[4]{#1}}%
\define@key{markdownRendererPrototypes}{contentBlockCode}{%
\renewcommand\markdownRendererContentBlockCodePrototype[5]{#1}}%
\define@key{markdownRendererPrototypes}{image}{%
\renewcommand\markdownRendererImagePrototype[4]{#1}}%
\define@key{markdownRendererPrototypes}{ulBegin}{%
\renewcommand\markdownRendererUlBeginPrototype{#1}}%
\define@key{markdownRendererPrototypes}{ulBeginTight}{%
\renewcommand\markdownRendererUlBeginTightPrototype{#1}}%
\define@key{markdownRendererPrototypes}{ulItem}{%
\renewcommand\markdownRendererUlItemPrototype{#1}}%
\define@key{markdownRendererPrototypes}{ulItemEnd}{%
\renewcommand\markdownRendererUlItemEndPrototype{#1}}%
\define@key{markdownRendererPrototypes}{ulEnd}{%
\renewcommand\markdownRendererUlEndPrototype{#1}}%
\define@key{markdownRendererPrototypes}{ulEndTight}{%
\renewcommand\markdownRendererUlEndTightPrototype{#1}}%
\define@key{markdownRendererPrototypes}{olBegin}{%
\renewcommand\markdownRendererOlBeginPrototype{#1}}%
\define@key{markdownRendererPrototypes}{olBeginTight}{%
\renewcommand\markdownRendererOlBeginTightPrototype{#1}}%
\define@key{markdownRendererPrototypes}{olItem}{%
\renewcommand\markdownRendererOlItemPrototype{#1}}%
\define@key{markdownRendererPrototypes}{olItemWithNumber}{%
\renewcommand\markdownRendererOlItemWithNumberPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{olItemEnd}{%
\renewcommand\markdownRendererOlItemEndPrototype{#1}}%
\define@key{markdownRendererPrototypes}{olEnd}{%
\renewcommand\markdownRendererOlEndPrototype{#1}}%
\define@key{markdownRendererPrototypes}{olEndTight}{%
\renewcommand\markdownRendererOlEndTightPrototype{#1}}%
\define@key{markdownRendererPrototypes}{dlBegin}{%
\renewcommand\markdownRendererDlBeginPrototype{#1}}%
\define@key{markdownRendererPrototypes}{dlBeginTight}{%
\renewcommand\markdownRendererDlBeginTightPrototype{#1}}%
\define@key{markdownRendererPrototypes}{dlItem}{%
\renewcommand\markdownRendererDlItemPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{dlItemEnd}{%
\renewcommand\markdownRendererDlItemEndPrototype{#1}}%
\define@key{markdownRendererPrototypes}{dlDefinitionBegin}{%
\renewcommand\markdownRendererDlDefinitionBeginPrototype{#1}}%
\define@key{markdownRendererPrototypes}{dlDefinitionEnd}{%
\renewcommand\markdownRendererDlDefinitionEndPrototype{#1}}%
\define@key{markdownRendererPrototypes}{dlEnd}{%
\renewcommand\markdownRendererDlEndPrototype{#1}}%
\define@key{markdownRendererPrototypes}{dlEndTight}{%
\renewcommand\markdownRendererDlEndTightPrototype{#1}}%
\define@key{markdownRendererPrototypes}{emphasis}{%
\renewcommand\markdownRendererEmphasisPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{strongEmphasis}{%
\renewcommand\markdownRendererStrongEmphasisPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{blockQuoteBegin}{%
\renewcommand\markdownRendererBlockQuoteBeginPrototype{#1}}%
\define@key{markdownRendererPrototypes}{blockQuoteEnd}{%
\renewcommand\markdownRendererBlockQuoteEndPrototype{#1}}%
\define@key{markdownRendererPrototypes}{inputVerbatim}{%
\renewcommand\markdownRendererInputVerbatimPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{inputFencedCode}{%
\renewcommand\markdownRendererInputFencedCodePrototype[2]{#1}}%
\define@key{markdownRendererPrototypes}{headingOne}{%
\renewcommand\markdownRendererHeadingOnePrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{headingTwo}{%
\renewcommand\markdownRendererHeadingTwoPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{headingThree}{%
\renewcommand\markdownRendererHeadingThreePrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{headingFour}{%
\renewcommand\markdownRendererHeadingFourPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{headingFive}{%
\renewcommand\markdownRendererHeadingFivePrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{headingSix}{%
\renewcommand\markdownRendererHeadingSixPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{horizontalRule}{%
\renewcommand\markdownRendererHorizontalRulePrototype{#1}}%
\define@key{markdownRendererPrototypes}{footnote}{%
\renewcommand\markdownRendererFootnotePrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{cite}{%
\renewcommand\markdownRendererCitePrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{textCite}{%
\renewcommand\markdownRendererTextCitePrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{table}{%
\renewcommand\markdownRendererTablePrototype[3]{#1}}%
\input markdown
\def\markdownVersionSpace{ }%
\ProvidesPackage{markdown}[\markdownLastModified\markdownVersionSpace v%
\markdownVersion\markdownVersionSpace markdown renderer]%
\renewcommand\markdownInfo[1]{\PackageInfo{markdown}{#1}}%
\renewcommand\markdownWarning[1]{\PackageWarning{markdown}{#1}}%
\renewcommand\markdownError[2]{\PackageError{markdown}{#1}{#2.}}%
\let\markdownInputPlainTeX\markdownInput
\renewcommand\markdownInput[2][]{%
\begingroup
\markdownSetup{#1}%
\markdownInputPlainTeX{#2}%
\endgroup}%
\renewenvironment{markdown}{%
\markdownReadAndConvert@markdown{}}{%
\markdownEnd}%
\renewenvironment{markdown*}[1]{%
\markdownSetup{#1}%
\markdownReadAndConvert@markdown*}{%
\markdownEnd}%
\begingroup
\catcode`\|=0\catcode`\<=1\catcode`\>=2%
\catcode`\\=12|catcode`|{=12|catcode`|}=12%
|gdef|markdownReadAndConvert@markdown#1<%
|markdownReadAndConvert<\end{markdown#1}>%
<|end<markdown#1>>>%
|endgroup
\DeclareOption*{%
\expandafter\markdownSetup\expandafter{\CurrentOption}}%
\ProcessOptions\relax
\define@key{markdownOptions}{renderers}{%
\setkeys{markdownRenderers}{#1}%
\def\KV@prefix{KV@markdownOptions@}}%
\define@key{markdownOptions}{rendererPrototypes}{%
\setkeys{markdownRendererPrototypes}{#1}%
\def\KV@prefix{KV@markdownOptions@}}%
\ifx\markdownOptionTightLists\undefined
\@ifclassloaded{beamer}{}{
\RequirePackage{paralist}}
\else
\ifthenelse{\equal{\markdownOptionTightLists}{false}}{}{
\RequirePackage{paralist}}
\fi
\@ifpackageloaded{paralist}{
\markdownSetup{rendererPrototypes={
ulBeginTight = {\begin{compactitem}},
ulEndTight = {\end{compactitem}},
olBeginTight = {\begin{compactenum}},
olEndTight = {\end{compactenum}},
dlBeginTight = {\begin{compactdesc}},
dlEndTight = {\end{compactdesc}}}}
}{
\markdownSetup{rendererPrototypes={
ulBeginTight = {\markdownRendererUlBegin},
ulEndTight = {\markdownRendererUlEnd},
olBeginTight = {\markdownRendererOlBegin},
olEndTight = {\markdownRendererOlEnd},
dlBeginTight = {\markdownRendererDlBegin},
dlEndTight = {\markdownRendererDlEnd}}}}
\markdownSetup{rendererPrototypes={
lineBreak = {\\},
leftBrace = {\textbraceleft},
rightBrace = {\textbraceright},
dollarSign = {\textdollar},
underscore = {\textunderscore},
circumflex = {\textasciicircum},
backslash = {\textbackslash},
tilde = {\textasciitilde},
pipe = {\textbar},
codeSpan = {\texttt{#1}},
contentBlock = {%
\ifthenelse{\equal{#1}{csv}}{%
\begin{table}%
\begin{center}%
\csvautotabular{#3}%
\end{center}
\ifx\empty#4\empty\else
\caption{#4}%
\fi
\end{table}}{%
\markdownInput{#3}}},
image = {%
\begin{figure}%
\begin{center}%
\includegraphics{#3}%
\end{center}%
\ifx\empty#4\empty\else
\caption{#4}%
\fi
\label{fig:#1}%
\end{figure}},
ulBegin = {\begin{itemize}},
ulItem = {\item},
ulEnd = {\end{itemize}},
olBegin = {\begin{enumerate}},
olItem = {\item},
olItemWithNumber = {\item[#1.]},
olEnd = {\end{enumerate}},
dlBegin = {\begin{description}},
dlItem = {\item[#1]},
dlEnd = {\end{description}},
emphasis = {\emph{#1}},
blockQuoteBegin = {\begin{quotation}},
blockQuoteEnd = {\end{quotation}},
inputVerbatim = {\VerbatimInput{#1}},
inputFencedCode = {%
\ifx\relax#2\relax
\VerbatimInput{#1}%
\else
\ifx\minted@code\undefined
\ifx\lst@version\undefined
\markdownRendererInputFencedCode{#1}{}%
\else
\lstinputlisting[language=#2]{#1}%
\fi
\else
\inputminted{#2}{#1}%
\fi
\fi},
horizontalRule = {\noindent\rule[0.5ex]{\linewidth}{1pt}},
footnote = {\footnote{#1}}}}
\newif\ifmarkdownLATEXStrongEmphasisNested
\markdownLATEXStrongEmphasisNestedfalse
\markdownSetup{rendererPrototypes={
strongEmphasis = {%
\ifmarkdownLATEXStrongEmphasisNested
\markdownLATEXStrongEmphasisNestedfalse
\textmd{#1}%
\markdownLATEXStrongEmphasisNestedtrue
\else
\markdownLATEXStrongEmphasisNestedtrue
\textbf{#1}%
\markdownLATEXStrongEmphasisNestedfalse
\fi}}}
\ifx\chapter\undefined
\markdownSetup{rendererPrototypes = {
headingOne = {\section{#1}},
headingTwo = {\subsection{#1}},
headingThree = {\subsubsection{#1}},
headingFour = {\paragraph{#1}\leavevmode},
headingFive = {\subparagraph{#1}\leavevmode}}}
\else
\markdownSetup{rendererPrototypes = {
headingOne = {\chapter{#1}},
headingTwo = {\section{#1}},
headingThree = {\subsection{#1}},
headingFour = {\subsubsection{#1}},
headingFive = {\paragraph{#1}\leavevmode},
headingSix = {\subparagraph{#1}\leavevmode}}}
\fi
\newcount\markdownLaTeXCitationsCounter
\def\markdownLaTeXBasicCitations#1#2#3#4#5#6{%
\advance\markdownLaTeXCitationsCounter by 1\relax
\ifx\relax#4\relax
\ifx\relax#5\relax
\ifnum\markdownLaTeXCitationsCounter>\markdownLaTeXCitationsTotal\relax
\cite{#1#2#6}% Without prenotes and postnotes, just accumulate cites
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\@gobblethree
\fi
\else% Before a postnote (#5), dump the accumulator
\ifx\relax#1\relax\else
\cite{#1}%
\fi
\cite[#5]{#6}%
\ifnum\markdownLaTeXCitationsCounter>\markdownLaTeXCitationsTotal\relax
\else
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\markdownLaTeXBasicCitations
\fi
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter}%
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter}%
\expandafter\expandafter\expandafter
\@gobblethree
\fi
\else% Before a prenote (#4), dump the accumulator
\ifx\relax#1\relax\else
\cite{#1}%
\fi
\ifnum\markdownLaTeXCitationsCounter>1\relax
\space % Insert a space before the prenote in later citations
\fi
#4~\expandafter\cite\ifx\relax#5\relax{#6}\else[#5]{#6}\fi
\ifnum\markdownLaTeXCitationsCounter>\markdownLaTeXCitationsTotal\relax
\else
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\markdownLaTeXBasicCitations
\fi
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\expandafter
\@gobblethree
\fi\markdownLaTeXBasicCitations{#1#2#6},}
\let\markdownLaTeXBasicTextCitations\markdownLaTeXBasicCitations
\def\markdownLaTeXNatbibCitations#1#2#3#4#5{%
\advance\markdownLaTeXCitationsCounter by 1\relax
\ifx\relax#3\relax
\ifx\relax#4\relax
\ifnum\markdownLaTeXCitationsCounter>\markdownLaTeXCitationsTotal\relax
\citep{#1,#5}% Without prenotes and postnotes, just accumulate cites
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\@gobbletwo
\fi
\else% Before a postnote (#4), dump the accumulator
\ifx\relax#1\relax\else
\citep{#1}%
\fi
\citep[][#4]{#5}%
\ifnum\markdownLaTeXCitationsCounter>\markdownLaTeXCitationsTotal\relax
\else
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\markdownLaTeXNatbibCitations
\fi
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter}%
\expandafter\expandafter\expandafter
\@gobbletwo
\fi
\else% Before a prenote (#3), dump the accumulator
\ifx\relax#1\relax\relax\else
\citep{#1}%
\fi
\citep[#3][#4]{#5}%
\ifnum\markdownLaTeXCitationsCounter>\markdownLaTeXCitationsTotal\relax
\else
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\markdownLaTeXNatbibCitations
\fi
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\expandafter
\@gobbletwo
\fi\markdownLaTeXNatbibCitations{#1,#5}}
\def\markdownLaTeXNatbibTextCitations#1#2#3#4#5{%
\advance\markdownLaTeXCitationsCounter by 1\relax
\ifx\relax#3\relax
\ifx\relax#4\relax
\ifnum\markdownLaTeXCitationsCounter>\markdownLaTeXCitationsTotal\relax
\citet{#1,#5}% Without prenotes and postnotes, just accumulate cites
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\@gobbletwo
\fi
\else% After a prenote or a postnote, dump the accumulator
\ifx\relax#1\relax\else
\citet{#1}%
\fi
, \citet[#3][#4]{#5}%
\ifnum\markdownLaTeXCitationsCounter<\markdownLaTeXCitationsTotal\relax
,
\else
\ifnum\markdownLaTeXCitationsCounter=\markdownLaTeXCitationsTotal\relax
,
\fi
\fi
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter
\markdownLaTeXNatbibTextCitations
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\expandafter}%
\expandafter\expandafter\expandafter
\@gobbletwo
\fi
\else% After a prenote or a postnote, dump the accumulator
\ifx\relax#1\relax\relax\else
\citet{#1}%
\fi
, \citet[#3][#4]{#5}%
\ifnum\markdownLaTeXCitationsCounter<\markdownLaTeXCitationsTotal\relax
,
\else
\ifnum\markdownLaTeXCitationsCounter=\markdownLaTeXCitationsTotal\relax
,
\fi
\fi
\expandafter\expandafter\expandafter
\markdownLaTeXNatbibTextCitations
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\expandafter
\@gobbletwo
\fi\markdownLaTeXNatbibTextCitations{#1,#5}}
\def\markdownLaTeXBibLaTeXCitations#1#2#3#4#5{%
\advance\markdownLaTeXCitationsCounter by 1\relax
\ifnum\markdownLaTeXCitationsCounter>\markdownLaTeXCitationsTotal\relax
\autocites#1[#3][#4]{#5}%
\expandafter\@gobbletwo
\fi\markdownLaTeXBibLaTeXCitations{#1[#3][#4]{#5}}}
\def\markdownLaTeXBibLaTeXTextCitations#1#2#3#4#5{%
\advance\markdownLaTeXCitationsCounter by 1\relax
\ifnum\markdownLaTeXCitationsCounter>\markdownLaTeXCitationsTotal\relax
\textcites#1[#3][#4]{#5}%
\expandafter\@gobbletwo
\fi\markdownLaTeXBibLaTeXTextCitations{#1[#3][#4]{#5}}}
\markdownSetup{rendererPrototypes = {
cite = {%
\markdownLaTeXCitationsCounter=1%
\def\markdownLaTeXCitationsTotal{#1}%
\ifx\autocites\undefined
\ifx\citep\undefined
\expandafter\expandafter\expandafter
\markdownLaTeXBasicCitations
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\else
\expandafter\expandafter\expandafter
\markdownLaTeXNatbibCitations
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\fi
\else
\expandafter\expandafter\expandafter
\markdownLaTeXBibLaTeXCitations
\expandafter{\expandafter}%
\fi},
textCite = {%
\markdownLaTeXCitationsCounter=1%
\def\markdownLaTeXCitationsTotal{#1}%
\ifx\autocites\undefined
\ifx\citep\undefined
\expandafter\expandafter\expandafter
\markdownLaTeXBasicTextCitations
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\else
\expandafter\expandafter\expandafter
\markdownLaTeXNatbibTextCitations
\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter}%
\fi
\else
\expandafter\expandafter\expandafter
\markdownLaTeXBibLaTeXTextCitations
\expandafter{\expandafter}%
\fi}}}
\def\markdownRendererLinkPrototype{%
\begingroup
\catcode`\#=12
\def\next##1##2##3##4{%
##1\footnote{%
\ifx\empty##4\empty\else##4: \fi\texttt<\url{##3}\texttt>}%
\endgroup}%
\next}
\newcount\markdownLaTeXRowCounter
\newcount\markdownLaTeXRowTotal
\newcount\markdownLaTeXColumnCounter
\newcount\markdownLaTeXColumnTotal
\newtoks\markdownLaTeXTable
\newtoks\markdownLaTeXTableAlignment
\newtoks\markdownLaTeXTableEnd
\@ifpackageloaded{booktabs}{
\let\markdownLaTeXTopRule\toprule
\let\markdownLaTeXMidRule\midrule
\let\markdownLaTeXBottomRule\bottomrule
}{
\let\markdownLaTeXTopRule\hline
\let\markdownLaTeXMidRule\hline
\let\markdownLaTeXBottomRule\hline
}
\markdownSetup{rendererPrototypes={
table = {%
\markdownLaTeXTable={}%
\markdownLaTeXTableAlignment={}%
\markdownLaTeXTableEnd={%
\markdownLaTeXBottomRule
\end{tabular}}%
\ifx\empty#1\empty\else
\addto@hook\markdownLaTeXTable{%
\begin{table}
\centering}%
\addto@hook\markdownLaTeXTableEnd{%
\caption{#1}
\end{table}}%
\fi
\addto@hook\markdownLaTeXTable{\begin{tabular}}%
\markdownLaTeXRowCounter=0%
\markdownLaTeXRowTotal=#2%
\markdownLaTeXColumnTotal=#3%
\markdownLaTeXRenderTableRow
}
}}
\def\markdownLaTeXRenderTableRow#1{%
\markdownLaTeXColumnCounter=0%
\ifnum\markdownLaTeXRowCounter=0\relax
\markdownLaTeXReadAlignments#1%
\markdownLaTeXTable=\expandafter\expandafter\expandafter{%
\expandafter\the\expandafter\markdownLaTeXTable\expandafter{%
\the\markdownLaTeXTableAlignment}}%
\addto@hook\markdownLaTeXTable{\markdownLaTeXTopRule}%
\else
\markdownLaTeXRenderTableCell#1%
\fi
\ifnum\markdownLaTeXRowCounter=1\relax
\addto@hook\markdownLaTeXTable\markdownLaTeXMidRule
\fi
\advance\markdownLaTeXRowCounter by 1\relax
\ifnum\markdownLaTeXRowCounter>\markdownLaTeXRowTotal\relax
\markdownInfo{\the\markdownLaTeXTable}
\markdownInfo{\the\markdownLaTeXTableEnd}
\the\markdownLaTeXTable
\the\markdownLaTeXTableEnd
\expandafter\@gobble
\fi\markdownLaTeXRenderTableRow}
\def\markdownLaTeXReadAlignments#1{%
\advance\markdownLaTeXColumnCounter by 1\relax
\if#1d%
\addto@hook\markdownLaTeXTableAlignment{l}%
\else
\addto@hook\markdownLaTeXTableAlignment{#1}%
\fi
\ifnum\markdownLaTeXColumnCounter<\markdownLaTeXColumnTotal\relax\else
\expandafter\@gobble
\fi\markdownLaTeXReadAlignments}
\def\markdownLaTeXRenderTableCell#1{%
\advance\markdownLaTeXColumnCounter by 1\relax
\ifnum\markdownLaTeXColumnCounter<\markdownLaTeXColumnTotal\relax
\addto@hook\markdownLaTeXTable{#1&}%
\else
\addto@hook\markdownLaTeXTable{#1\\}%
\expandafter\@gobble
\fi\markdownLaTeXRenderTableCell}
\newcommand\markdownMakeOther{%
\count0=128\relax
\loop
\catcode\count0=11\relax
\advance\count0 by 1\relax
\ifnum\count0<256\repeat}%
\endinput
%%
%% End of file `markdown.sty'.

View file

@ -1,631 +0,0 @@
%%
%% This is file `markdown.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% markdown.dtx (with options: `tex')
%%
%% Copyright (C) 2016-2020 Vít Novotný
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%% The Current Maintainer of this work is Vít Novotný.
%%
%% Send bug reports, requests for additions and questions
%% either to the GitHub issue tracker at
%%
%% https://github.com/Witiko/markdown/issues
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\def\markdownLastModified{2020/09/14}%
\def\markdownVersion{2.9.0}%
\let\markdownBegin\relax
\let\markdownEnd\relax
\let\markdownInput\relax
\let\markdownOptionFinalizeCache\undefined
\def\markdownOptionHelperScriptFileName{\jobname.markdown.lua}%
\def\markdownOptionInputTempFileName{\jobname.markdown.in}%
\def\markdownOptionOutputTempFileName{\jobname.markdown.out}%
\def\markdownOptionErrorTempFileName{\jobname.markdown.err}%
\def\markdownOptionOutputDir{.}%
\def\markdownOptionCacheDir{\markdownOptionOutputDir/_markdown_\jobname}%
\def\markdownOptionFrozenCacheFileName{\markdownOptionCacheDir/frozenCache.tex}
\let\markdownOptionBlankBeforeBlockquote\undefined
\let\markdownOptionBlankBeforeCodeFence\undefined
\let\markdownOptionBlankBeforeHeading\undefined
\let\markdownOptionBreakableBlockquotes\undefined
\let\markdownOptionCitations\undefined
\let\markdownOptionCitationNbsps\undefined
\let\markdownOptionContentBlocks\undefined
\let\markdownOptionContentBlocksLanguageMap\undefined
\let\markdownOptionDefinitionLists\undefined
\let\markdownOptionFootnotes\undefined
\let\markdownOptionFencedCode\undefined
\let\markdownOptionHashEnumerators\undefined
\let\markdownOptionHeaderAttributes\undefined
\let\markdownOptionHtml\undefined
\let\markdownOptionHybrid\undefined
\let\markdownOptionInlineFootnotes\undefined
\let\markdownOptionPipeTables\undefined
\let\markdownOptionPreserveTabs\undefined
\let\markdownOptionShiftHeadings\undefined
\let\markdownOptionSlice\undefined
\let\markdownOptionSmartEllipses\undefined
\let\markdownOptionStartNumber\undefined
\let\markdownOptionTableCaptions\undefined
\let\markdownOptionTightLists\undefined
\def\markdownOptionStripPercentSigns{false}%
\def\markdownRendererInterblockSeparator{%
\markdownRendererInterblockSeparatorPrototype}%
\def\markdownRendererLineBreak{%
\markdownRendererLineBreakPrototype}%
\def\markdownRendererEllipsis{%
\markdownRendererEllipsisPrototype}%
\def\markdownRendererNbsp{%
\markdownRendererNbspPrototype}%
\def\markdownRendererLeftBrace{%
\markdownRendererLeftBracePrototype}%
\def\markdownRendererRightBrace{%
\markdownRendererRightBracePrototype}%
\def\markdownRendererDollarSign{%
\markdownRendererDollarSignPrototype}%
\def\markdownRendererPercentSign{%
\markdownRendererPercentSignPrototype}%
\def\markdownRendererAmpersand{%
\markdownRendererAmpersandPrototype}%
\def\markdownRendererUnderscore{%
\markdownRendererUnderscorePrototype}%
\def\markdownRendererHash{%
\markdownRendererHashPrototype}%
\def\markdownRendererCircumflex{%
\markdownRendererCircumflexPrototype}%
\def\markdownRendererBackslash{%
\markdownRendererBackslashPrototype}%
\def\markdownRendererTilde{%
\markdownRendererTildePrototype}%
\def\markdownRendererPipe{%
\markdownRendererPipePrototype}%
\def\markdownRendererCodeSpan{%
\markdownRendererCodeSpanPrototype}%
\def\markdownRendererLink{%
\markdownRendererLinkPrototype}%
\def\markdownRendererImage{%
\markdownRendererImagePrototype}%
\def\markdownRendererContentBlock{%
\markdownRendererContentBlockPrototype}%
\def\markdownRendererContentBlockOnlineImage{%
\markdownRendererContentBlockOnlineImagePrototype}%
\def\markdownRendererContentBlockCode{%
\markdownRendererContentBlockCodePrototype}%
\def\markdownRendererUlBegin{%
\markdownRendererUlBeginPrototype}%
\def\markdownRendererUlBeginTight{%
\markdownRendererUlBeginTightPrototype}%
\def\markdownRendererUlItem{%
\markdownRendererUlItemPrototype}%
\def\markdownRendererUlItemEnd{%
\markdownRendererUlItemEndPrototype}%
\def\markdownRendererUlEnd{%
\markdownRendererUlEndPrototype}%
\def\markdownRendererUlEndTight{%
\markdownRendererUlEndTightPrototype}%
\def\markdownRendererOlBegin{%
\markdownRendererOlBeginPrototype}%
\def\markdownRendererOlBeginTight{%
\markdownRendererOlBeginTightPrototype}%
\def\markdownRendererOlItem{%
\markdownRendererOlItemPrototype}%
\def\markdownRendererOlItemEnd{%
\markdownRendererOlItemEndPrototype}%
\def\markdownRendererOlItemWithNumber{%
\markdownRendererOlItemWithNumberPrototype}%
\def\markdownRendererOlEnd{%
\markdownRendererOlEndPrototype}%
\def\markdownRendererOlEndTight{%
\markdownRendererOlEndTightPrototype}%
\def\markdownRendererDlBegin{%
\markdownRendererDlBeginPrototype}%
\def\markdownRendererDlBeginTight{%
\markdownRendererDlBeginTightPrototype}%
\def\markdownRendererDlItem{%
\markdownRendererDlItemPrototype}%
\def\markdownRendererDlItemEnd{%
\markdownRendererDlItemEndPrototype}%
\def\markdownRendererDlDefinitionBegin{%
\markdownRendererDlDefinitionBeginPrototype}%
\def\markdownRendererDlDefinitionEnd{%
\markdownRendererDlDefinitionEndPrototype}%
\def\markdownRendererDlEnd{%
\markdownRendererDlEndPrototype}%
\def\markdownRendererDlEndTight{%
\markdownRendererDlEndTightPrototype}%
\def\markdownRendererEmphasis{%
\markdownRendererEmphasisPrototype}%
\def\markdownRendererStrongEmphasis{%
\markdownRendererStrongEmphasisPrototype}%
\def\markdownRendererBlockQuoteBegin{%
\markdownRendererBlockQuoteBeginPrototype}%
\def\markdownRendererBlockQuoteEnd{%
\markdownRendererBlockQuoteEndPrototype}%
\def\markdownRendererInputVerbatim{%
\markdownRendererInputVerbatimPrototype}%
\def\markdownRendererInputFencedCode{%
\markdownRendererInputFencedCodePrototype}%
\def\markdownRendererHeadingOne{%
\markdownRendererHeadingOnePrototype}%
\def\markdownRendererHeadingTwo{%
\markdownRendererHeadingTwoPrototype}%
\def\markdownRendererHeadingThree{%
\markdownRendererHeadingThreePrototype}%
\def\markdownRendererHeadingFour{%
\markdownRendererHeadingFourPrototype}%
\def\markdownRendererHeadingFive{%
\markdownRendererHeadingFivePrototype}%
\def\markdownRendererHeadingSix{%
\markdownRendererHeadingSixPrototype}%
\def\markdownRendererHorizontalRule{%
\markdownRendererHorizontalRulePrototype}%
\def\markdownRendererFootnote{%
\markdownRendererFootnotePrototype}%
\def\markdownRendererCite{%
\markdownRendererCitePrototype}%
\def\markdownRendererTextCite{%
\markdownRendererTextCitePrototype}%
\def\markdownRendererTable{%
\markdownRendererTablePrototype}%
\def\markdownRendererInterblockSeparatorPrototype{}%
\def\markdownRendererLineBreakPrototype{}%
\def\markdownRendererEllipsisPrototype{}%
\def\markdownRendererNbspPrototype{}%
\def\markdownRendererLeftBracePrototype{}%
\def\markdownRendererRightBracePrototype{}%
\def\markdownRendererDollarSignPrototype{}%
\def\markdownRendererPercentSignPrototype{}%
\def\markdownRendererAmpersandPrototype{}%
\def\markdownRendererUnderscorePrototype{}%
\def\markdownRendererHashPrototype{}%
\def\markdownRendererCircumflexPrototype{}%
\def\markdownRendererBackslashPrototype{}%
\def\markdownRendererTildePrototype{}%
\def\markdownRendererPipePrototype{}%
\def\markdownRendererCodeSpanPrototype#1{}%
\def\markdownRendererLinkPrototype#1#2#3#4{}%
\def\markdownRendererImagePrototype#1#2#3#4{}%
\def\markdownRendererContentBlockPrototype#1#2#3#4{}%
\def\markdownRendererContentBlockOnlineImagePrototype#1#2#3#4{}%
\def\markdownRendererContentBlockCodePrototype#1#2#3#4#5{}%
\def\markdownRendererUlBeginPrototype{}%
\def\markdownRendererUlBeginTightPrototype{}%
\def\markdownRendererUlItemPrototype{}%
\def\markdownRendererUlItemEndPrototype{}%
\def\markdownRendererUlEndPrototype{}%
\def\markdownRendererUlEndTightPrototype{}%
\def\markdownRendererOlBeginPrototype{}%
\def\markdownRendererOlBeginTightPrototype{}%
\def\markdownRendererOlItemPrototype{}%
\def\markdownRendererOlItemWithNumberPrototype#1{}%
\def\markdownRendererOlItemEndPrototype{}%
\def\markdownRendererOlEndPrototype{}%
\def\markdownRendererOlEndTightPrototype{}%
\def\markdownRendererDlBeginPrototype{}%
\def\markdownRendererDlBeginTightPrototype{}%
\def\markdownRendererDlItemPrototype#1{}%
\def\markdownRendererDlItemEndPrototype{}%
\def\markdownRendererDlDefinitionBeginPrototype{}%
\def\markdownRendererDlDefinitionEndPrototype{}%
\def\markdownRendererDlEndPrototype{}%
\def\markdownRendererDlEndTightPrototype{}%
\def\markdownRendererEmphasisPrototype#1{}%
\def\markdownRendererStrongEmphasisPrototype#1{}%
\def\markdownRendererBlockQuoteBeginPrototype{}%
\def\markdownRendererBlockQuoteEndPrototype{}%
\def\markdownRendererInputVerbatimPrototype#1{}%
\def\markdownRendererInputFencedCodePrototype#1#2{}%
\def\markdownRendererHeadingOnePrototype#1{}%
\def\markdownRendererHeadingTwoPrototype#1{}%
\def\markdownRendererHeadingThreePrototype#1{}%
\def\markdownRendererHeadingFourPrototype#1{}%
\def\markdownRendererHeadingFivePrototype#1{}%
\def\markdownRendererHeadingSixPrototype#1{}%
\def\markdownRendererHorizontalRulePrototype{}%
\def\markdownRendererFootnotePrototype#1{}%
\def\markdownRendererCitePrototype#1{}%
\def\markdownRendererTextCitePrototype#1{}%
\def\markdownRendererTablePrototype#1#2#3{}%
\def\markdownInfo#1{}%
\def\markdownWarning#1{}%
\def\markdownError#1#2{}%
\let\markdownMakeOther\relax
\let\markdownReadAndConvert\relax
\begingroup
\catcode`\|=0\catcode`\\=12%
|gdef|markdownBegin{%
|markdownReadAndConvert{\markdownEnd}%
{|markdownEnd}}%
|endgroup
\ifx\markdownMode\undefined
\ifx\directlua\undefined
\def\markdownMode{0}%
\else
\def\markdownMode{2}%
\fi
\fi
\def\markdownLuaRegisterIBCallback#1{\relax}%
\def\markdownLuaUnregisterIBCallback#1{\relax}%
\def\markdownInfo#1{%
\immediate\write-1{(l.\the\inputlineno) markdown.tex info: #1.}}%
\def\markdownWarning#1{%
\immediate\write16{(l.\the\inputlineno) markdown.tex warning: #1}}%
\def\markdownError#1#2{%
\errhelp{#2.}%
\errmessage{(l.\the\inputlineno) markdown.tex error: #1}}%
\newcount\markdownFrozenCacheCounter
\def\markdownRendererInterblockSeparatorPrototype{\par}%
\def\markdownRendererLineBreakPrototype{\hfil\break}%
\let\markdownRendererEllipsisPrototype\dots
\def\markdownRendererNbspPrototype{~}%
\def\markdownRendererLeftBracePrototype{\char`\{}%
\def\markdownRendererRightBracePrototype{\char`\}}%
\def\markdownRendererDollarSignPrototype{\char`$}%
\def\markdownRendererPercentSignPrototype{\char`\%}%
\def\markdownRendererAmpersandPrototype{\&}%
\def\markdownRendererUnderscorePrototype{\char`_}%
\def\markdownRendererHashPrototype{\char`\#}%
\def\markdownRendererCircumflexPrototype{\char`^}%
\def\markdownRendererBackslashPrototype{\char`\\}%
\def\markdownRendererTildePrototype{\char`~}%
\def\markdownRendererPipePrototype{|}%
\def\markdownRendererCodeSpanPrototype#1{{\tt#1}}%
\def\markdownRendererLinkPrototype#1#2#3#4{#2}%
\def\markdownRendererContentBlockPrototype#1#2#3#4{%
\markdownInput{#3}}%
\def\markdownRendererContentBlockOnlineImagePrototype{%
\markdownRendererImage}%
\def\markdownRendererContentBlockCodePrototype#1#2#3#4#5{%
\markdownRendererInputFencedCode{#3}{#2}}%
\def\markdownRendererImagePrototype#1#2#3#4{#2}%
\def\markdownRendererUlBeginPrototype{}%
\def\markdownRendererUlBeginTightPrototype{}%
\def\markdownRendererUlItemPrototype{}%
\def\markdownRendererUlItemEndPrototype{}%
\def\markdownRendererUlEndPrototype{}%
\def\markdownRendererUlEndTightPrototype{}%
\def\markdownRendererOlBeginPrototype{}%
\def\markdownRendererOlBeginTightPrototype{}%
\def\markdownRendererOlItemPrototype{}%
\def\markdownRendererOlItemWithNumberPrototype#1{}%
\def\markdownRendererOlItemEndPrototype{}%
\def\markdownRendererOlEndPrototype{}%
\def\markdownRendererOlEndTightPrototype{}%
\def\markdownRendererDlBeginPrototype{}%
\def\markdownRendererDlBeginTightPrototype{}%
\def\markdownRendererDlItemPrototype#1{#1}%
\def\markdownRendererDlItemEndPrototype{}%
\def\markdownRendererDlDefinitionBeginPrototype{}%
\def\markdownRendererDlDefinitionEndPrototype{\par}%
\def\markdownRendererDlEndPrototype{}%
\def\markdownRendererDlEndTightPrototype{}%
\def\markdownRendererEmphasisPrototype#1{{\it#1}}%
\def\markdownRendererStrongEmphasisPrototype#1{{\bf#1}}%
\def\markdownRendererBlockQuoteBeginPrototype{\par\begingroup\it}%
\def\markdownRendererBlockQuoteEndPrototype{\endgroup\par}%
\def\markdownRendererInputVerbatimPrototype#1{%
\par{\tt\input#1\relax{}}\par}%
\def\markdownRendererInputFencedCodePrototype#1#2{%
\markdownRendererInputVerbatimPrototype{#1}}%
\def\markdownRendererHeadingOnePrototype#1{#1}%
\def\markdownRendererHeadingTwoPrototype#1{#1}%
\def\markdownRendererHeadingThreePrototype#1{#1}%
\def\markdownRendererHeadingFourPrototype#1{#1}%
\def\markdownRendererHeadingFivePrototype#1{#1}%
\def\markdownRendererHeadingSixPrototype#1{#1}%
\def\markdownRendererHorizontalRulePrototype{}%
\def\markdownRendererFootnotePrototype#1{#1}%
\def\markdownRendererCitePrototype#1{}%
\def\markdownRendererTextCitePrototype#1{}%
\def\markdownLuaOptions{{%
\ifx\markdownOptionBlankBeforeBlockquote\undefined\else
blankBeforeBlockquote = \markdownOptionBlankBeforeBlockquote,
\fi
\ifx\markdownOptionBlankBeforeCodeFence\undefined\else
blankBeforeCodeFence = \markdownOptionBlankBeforeCodeFence,
\fi
\ifx\markdownOptionBlankBeforeHeading\undefined\else
blankBeforeHeading = \markdownOptionBlankBeforeHeading,
\fi
\ifx\markdownOptionBreakableBlockquotes\undefined\else
breakableBlockquotes = \markdownOptionBreakableBlockquotes,
\fi
cacheDir = "\markdownOptionCacheDir",
\ifx\markdownOptionCitations\undefined\else
citations = \markdownOptionCitations,
\fi
\ifx\markdownOptionCitationNbsps\undefined\else
citationNbsps = \markdownOptionCitationNbsps,
\fi
\ifx\markdownOptionCodeSpans\undefined\else
codeSpans = \markdownOptionCodeSpans,
\fi
\ifx\markdownOptionContentBlocks\undefined\else
contentBlocks = \markdownOptionContentBlocks,
\fi
\ifx\markdownOptionContentBlocksLanguageMap\undefined\else
contentBlocksLanguageMap =
"\markdownOptionContentBlocksLanguageMap",
\fi
\ifx\markdownOptionDefinitionLists\undefined\else
definitionLists = \markdownOptionDefinitionLists,
\fi
\ifx\markdownOptionFinalizeCache\undefined\else
finalizeCache = \markdownOptionFinalizeCache,
\fi
frozenCacheFileName = "\markdownOptionFrozenCacheFileName",
frozenCacheCounter = \the\markdownFrozenCacheCounter,
\ifx\markdownOptionFootnotes\undefined\else
footnotes = \markdownOptionFootnotes,
\fi
\ifx\markdownOptionFencedCode\undefined\else
fencedCode = \markdownOptionFencedCode,
\fi
\ifx\markdownOptionHashEnumerators\undefined\else
hashEnumerators = \markdownOptionHashEnumerators,
\fi
\ifx\markdownOptionHeaderAttributes\undefined\else
headerAttributes = \markdownOptionHeaderAttributes,
\fi
\ifx\markdownOptionHtml\undefined\else
html = \markdownOptionHtml,
\fi
\ifx\markdownOptionHybrid\undefined\else
hybrid = \markdownOptionHybrid,
\fi
\ifx\markdownOptionInlineFootnotes\undefined\else
inlineFootnotes = \markdownOptionInlineFootnotes,
\fi
\ifx\markdownOptionPipeTables\undefined\else
pipeTables = \markdownOptionPipeTables,
\fi
\ifx\markdownOptionPreserveTabs\undefined\else
preserveTabs = \markdownOptionPreserveTabs,
\fi
\ifx\markdownOptionShiftHeadings\undefined\else
shiftHeadings = "\markdownOptionShiftHeadings",
\fi
\ifx\markdownOptionSlice\undefined\else
slice = "\markdownOptionSlice",
\fi
\ifx\markdownOptionSmartEllipses\undefined\else
smartEllipses = \markdownOptionSmartEllipses,
\fi
\ifx\markdownOptionStartNumber\undefined\else
startNumber = \markdownOptionStartNumber,
\fi
\ifx\markdownOptionTableCaptions\undefined\else
tableCaptions = \markdownOptionTableCaptions,
\fi
\ifx\markdownOptionTightLists\undefined\else
tightLists = \markdownOptionTightLists,
\fi
\ifx\markdownOptionUnderscores\undefined\else
underscores = \markdownOptionUnderscores,
\fi}
}%
\def\markdownPrepare{%
local lfs = require("lfs")
local cacheDir = "\markdownOptionCacheDir"
if not lfs.isdir(cacheDir) then
assert(lfs.mkdir(cacheDir))
end
local md = require("markdown")
local convert = md.new(\markdownLuaOptions)
}%
\def\markdownIfOption#1#2#3{%
\begingroup
\def\next{true}%
\expandafter\ifx\csname markdownOption#1\endcsname\next
\endgroup#2\else\endgroup#3\fi}%
\csname newread\endcsname\markdownInputFileStream
\csname newwrite\endcsname\markdownOutputFileStream
\begingroup
\catcode`\^^I=12%
\gdef\markdownReadAndConvertTab{^^I}%
\endgroup
\begingroup
\catcode`\^^M=13%
\catcode`\^^I=13%
\catcode`|=0%
\catcode`\\=12%
|catcode`@=14%
|catcode`|%=12@
|gdef|markdownReadAndConvert#1#2{@
|begingroup@
|markdownIfOption{FrozenCache}{}{@
|immediate|openout|markdownOutputFileStream@
|markdownOptionInputTempFileName|relax@
|markdownInfo{Buffering markdown input into the temporary @
input file "|markdownOptionInputTempFileName" and scanning @
for the closing token sequence "#1"}@
}@
|def|do##1{|catcode`##1=12}|dospecials@
|catcode`| =12@
|markdownMakeOther@
|def|markdownReadAndConvertStripPercentSign##1{@
|markdownIfOption{StripPercentSigns}{@
|if##1%@
|expandafter|expandafter|expandafter@
|markdownReadAndConvertProcessLine@
|else@
|expandafter|expandafter|expandafter@
|markdownReadAndConvertProcessLine@
|expandafter|expandafter|expandafter##1@
|fi@
}{@
|expandafter@
|markdownReadAndConvertProcessLine@
|expandafter##1@
}@
}@
|def|markdownReadAndConvertProcessLine##1#1##2#1##3|relax{@
|ifx|relax##3|relax@
|markdownIfOption{FrozenCache}{}{@
|immediate|write|markdownOutputFileStream{##1}@
}@
|else@
|def^^M{@
|markdownInfo{The ending token sequence was found}@
|markdownIfOption{FrozenCache}{}{@
|immediate|closeout|markdownOutputFileStream@
}@
|endgroup@
|markdownInput{@
|markdownOptionOutputDir@
/|markdownOptionInputTempFileName@
}@
#2}@
|fi@
^^M}@
|catcode`|^^I=13@
|def^^I{|markdownReadAndConvertTab}@
|catcode`|^^M=13@
|def^^M##1^^M{@
|def^^M####1^^M{@
|markdownReadAndConvertStripPercentSign####1#1#1|relax}@
^^M}@
^^M}@
|endgroup
\ifnum\markdownMode<2\relax
\ifnum\markdownMode=0\relax
\markdownInfo{Using mode 0: Shell escape via write18}%
\else
\markdownInfo{Using mode 1: Shell escape via os.execute}%
\fi
\ifx\pdfshellescape\undefined
\ifx\shellescape\undefined
\ifnum\markdownMode=0\relax
\def\markdownExecuteShellEscape{1}%
\else
\def\markdownExecuteShellEscape{%
\directlua{tex.sprint(status.shell_escape or "1")}}%
\fi
\else
\let\markdownExecuteShellEscape\shellescape
\fi
\else
\let\markdownExecuteShellEscape\pdfshellescape
\fi
\ifnum\markdownMode=0\relax
\def\markdownExecuteDirect#1{\immediate\write18{#1}}%
\else
\def\markdownExecuteDirect#1{%
\directlua{os.execute("\luaescapestring{#1}")}}%
\fi
\def\markdownExecute#1{%
\ifnum\markdownExecuteShellEscape=1\relax
\markdownExecuteDirect{#1}%
\else
\markdownError{I can not access the shell}{Either run the TeX
compiler with the --shell-escape or the --enable-write18 flag,
or set shell_escape=t in the texmf.cnf file}%
\fi}%
\begingroup
\catcode`|=0%
\catcode`\\=12%
|gdef|markdownLuaExecute#1{%
|immediate|openout|markdownOutputFileStream=%
|markdownOptionHelperScriptFileName
|markdownInfo{Writing a helper Lua script to the file
"|markdownOptionHelperScriptFileName"}%
|immediate|write|markdownOutputFileStream{%
local ran_ok, error = pcall(function()
local kpse = require("kpse")
kpse.set_program_name("luatex")
#1
end)
if not ran_ok then
local file = io.open("%
|markdownOptionOutputDir
/|markdownOptionErrorTempFileName", "w")
if file then
file:write(error .. "\n")
file:close()
end
print('\\markdownError{An error was encountered while executing
Lua code}{For further clues, examine the file
"|markdownOptionOutputDir
/|markdownOptionErrorTempFileName"}')
end}%
|immediate|closeout|markdownOutputFileStream
|markdownInfo{Executing a helper Lua script from the file
"|markdownOptionHelperScriptFileName" and storing the result in the
file "|markdownOptionOutputTempFileName"}%
|markdownExecute{texlua "|markdownOptionOutputDir
/|markdownOptionHelperScriptFileName" > %
"|markdownOptionOutputDir
/|markdownOptionOutputTempFileName"}%
|input|markdownOptionOutputTempFileName|relax}%
|endgroup
\else
\markdownInfo{Using mode 2: Direct Lua access}%
\def\markdownLuaExecute#1{\directlua{local print = tex.print #1}}%
\fi
\begingroup
\catcode`|=0%
\catcode`\\=12%
|gdef|markdownInput#1{%
|markdownIfOption{FrozenCache}{%
|ifnum|markdownFrozenCacheCounter=0|relax
|markdownInfo{Reading frozen cache from
"|markdownOptionFrozenCacheFileName"}%
|input|markdownOptionFrozenCacheFileName|relax
|fi
|markdownInfo{Including markdown document number
"|the|markdownFrozenCacheCounter" from frozen cache}%
|csname markdownFrozenCache|the|markdownFrozenCacheCounter|endcsname
|advance|markdownFrozenCacheCounter by 1|relax
}{%
|markdownInfo{Including markdown document "#1"}%
|openin|markdownInputFileStream#1
|closein|markdownInputFileStream
|markdownLuaExecute{%
|markdownPrepare
local file = assert(io.open("#1", "r"))
local input = assert(file:read("*a"))
assert(file:close())
print(convert(input:gsub("\r\n?", "\n") .. "\n"))}%
|markdownIfOption{FinalizeCache}{%
|advance|markdownFrozenCacheCounter by 1|relax
}%
}%
}%
|endgroup
\endinput
%%
%% End of file `markdown.tex'.

View file

@ -1,227 +0,0 @@
%%
%% This is file `t-markdown.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% markdown.dtx (with options: `context')
%%
%% Copyright (C) 2016-2020 Vít Novotný
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%% The Current Maintainer of this work is Vít Novotný.
%%
%% Send bug reports, requests for additions and questions
%% either to the GitHub issue tracker at
%%
%% https://github.com/Witiko/markdown/issues
%%
%% or to the e-mail address <witiko@mail.muni.cz>.
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
\writestatus{loading}{ConTeXt User Module / markdown}%
\unprotect
\let\startmarkdown\relax
\let\stopmarkdown\relax
\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
\do\#\do\^\do\_\do\%\do\~}%
\input markdown
\def\markdownMakeOther{%
\count0=128\relax
\loop
\catcode\count0=11\relax
\advance\count0 by 1\relax
\ifnum\count0<256\repeat
\catcode`|=12}%
\def\markdownInfo#1{\writestatus{markdown}{#1.}}%
\def\markdownWarning#1{\writestatus{markdown\space warn}{#1.}}%
\begingroup
\catcode`\|=0%
\catcode`\\=12%
|gdef|startmarkdown{%
|markdownReadAndConvert{\stopmarkdown}%
{|stopmarkdown}}%
|gdef|stopmarkdown{|markdownEnd}%
|endgroup
\def\markdownRendererLineBreakPrototype{\blank}%
\def\markdownRendererLeftBracePrototype{\textbraceleft}%
\def\markdownRendererRightBracePrototype{\textbraceright}%
\def\markdownRendererDollarSignPrototype{\textdollar}%
\def\markdownRendererPercentSignPrototype{\percent}%
\def\markdownRendererUnderscorePrototype{\textunderscore}%
\def\markdownRendererCircumflexPrototype{\textcircumflex}%
\def\markdownRendererBackslashPrototype{\textbackslash}%
\def\markdownRendererTildePrototype{\textasciitilde}%
\def\markdownRendererPipePrototype{\char`|}%
\def\markdownRendererLinkPrototype#1#2#3#4{%
\useURL[#1][#3][][#4]#1\footnote[#1]{\ifx\empty#4\empty\else#4:
\fi\tt<\hyphenatedurl{#3}>}}%
\usemodule[database]
\defineseparatedlist
[MarkdownConTeXtCSV]
[separator={,},
before=\bTABLE,after=\eTABLE,
first=\bTR,last=\eTR,
left=\bTD,right=\eTD]
\def\markdownConTeXtCSV{csv}
\def\markdownRendererContentBlockPrototype#1#2#3#4{%
\def\markdownConTeXtCSV@arg{#1}%
\ifx\markdownConTeXtCSV@arg\markdownConTeXtCSV
\placetable[][tab:#1]{#4}{%
\processseparatedfile[MarkdownConTeXtCSV][#3]}%
\else
\markdownInput{#3}%
\fi}%
\def\markdownRendererImagePrototype#1#2#3#4{%
\placefigure[][fig:#1]{#4}{\externalfigure[#3]}}%
\def\markdownRendererUlBeginPrototype{\startitemize}%
\def\markdownRendererUlBeginTightPrototype{\startitemize[packed]}%
\def\markdownRendererUlItemPrototype{\item}%
\def\markdownRendererUlEndPrototype{\stopitemize}%
\def\markdownRendererUlEndTightPrototype{\stopitemize}%
\def\markdownRendererOlBeginPrototype{\startitemize[n]}%
\def\markdownRendererOlBeginTightPrototype{\startitemize[packed,n]}%
\def\markdownRendererOlItemPrototype{\item}%
\def\markdownRendererOlItemWithNumberPrototype#1{\sym{#1.}}%
\def\markdownRendererOlEndPrototype{\stopitemize}%
\def\markdownRendererOlEndTightPrototype{\stopitemize}%
\definedescription
[MarkdownConTeXtDlItemPrototype]
[location=hanging,
margin=standard,
headstyle=bold]%
\definestartstop
[MarkdownConTeXtDlPrototype]
[before=\blank,
after=\blank]%
\definestartstop
[MarkdownConTeXtDlTightPrototype]
[before=\blank\startpacked,
after=\stoppacked\blank]%
\def\markdownRendererDlBeginPrototype{%
\startMarkdownConTeXtDlPrototype}%
\def\markdownRendererDlBeginTightPrototype{%
\startMarkdownConTeXtDlTightPrototype}%
\def\markdownRendererDlItemPrototype#1{%
\startMarkdownConTeXtDlItemPrototype{#1}}%
\def\markdownRendererDlItemEndPrototype{%
\stopMarkdownConTeXtDlItemPrototype}%
\def\markdownRendererDlEndPrototype{%
\stopMarkdownConTeXtDlPrototype}%
\def\markdownRendererDlEndTightPrototype{%
\stopMarkdownConTeXtDlTightPrototype}%
\def\markdownRendererEmphasisPrototype#1{{\em#1}}%
\def\markdownRendererStrongEmphasisPrototype#1{{\bf#1}}%
\def\markdownRendererBlockQuoteBeginPrototype{\startquotation}%
\def\markdownRendererBlockQuoteEndPrototype{\stopquotation}%
\def\markdownRendererInputVerbatimPrototype#1{\typefile{#1}}%
\def\markdownRendererInputFencedCodePrototype#1#2{%
\ifx\relax#2\relax
\typefile{#1}%
\else
\typefile[#2][]{#1}%
\fi}%
\def\markdownRendererHeadingOnePrototype#1{\chapter{#1}}%
\def\markdownRendererHeadingTwoPrototype#1{\section{#1}}%
\def\markdownRendererHeadingThreePrototype#1{\subsection{#1}}%
\def\markdownRendererHeadingFourPrototype#1{\subsubsection{#1}}%
\def\markdownRendererHeadingFivePrototype#1{\subsubsubsection{#1}}%
\def\markdownRendererHeadingSixPrototype#1{\subsubsubsubsection{#1}}%
\def\markdownRendererHorizontalRulePrototype{%
\blackrule[height=1pt, width=\hsize]}%
\def\markdownRendererFootnotePrototype#1{\footnote{#1}}%
\stopmodule\protect
\newcount\markdownConTeXtRowCounter
\newcount\markdownConTeXtRowTotal
\newcount\markdownConTeXtColumnCounter
\newcount\markdownConTeXtColumnTotal
\newtoks\markdownConTeXtTable
\newtoks\markdownConTeXtTableFloat
\def\markdownRendererTablePrototype#1#2#3{%
\markdownConTeXtTable={}%
\ifx\empty#1\empty
\markdownConTeXtTableFloat={%
\the\markdownConTeXtTable}%
\else
\markdownConTeXtTableFloat={%
\placetable{#1}{\the\markdownConTeXtTable}}%
\fi
\begingroup
\setupTABLE[r][each][topframe=off, bottomframe=off, leftframe=off, rightframe=off]
\setupTABLE[c][each][topframe=off, bottomframe=off, leftframe=off, rightframe=off]
\setupTABLE[r][1][topframe=on, bottomframe=on]
\setupTABLE[r][#1][bottomframe=on]
\markdownConTeXtRowCounter=0%
\markdownConTeXtRowTotal=#2%
\markdownConTeXtColumnTotal=#3%
\markdownConTeXtRenderTableRow}
\def\markdownConTeXtRenderTableRow#1{%
\markdownConTeXtColumnCounter=0%
\ifnum\markdownConTeXtRowCounter=0\relax
\markdownConTeXtReadAlignments#1%
\markdownConTeXtTable={\bTABLE}%
\else
\markdownConTeXtTable=\expandafter{%
\the\markdownConTeXtTable\bTR}%
\markdownConTeXtRenderTableCell#1%
\markdownConTeXtTable=\expandafter{%
\the\markdownConTeXtTable\eTR}%
\fi
\advance\markdownConTeXtRowCounter by 1\relax
\ifnum\markdownConTeXtRowCounter>\markdownConTeXtRowTotal\relax
\markdownConTeXtTable=\expandafter{%
\the\markdownConTeXtTable\eTABLE}%
\the\markdownConTeXtTableFloat
\endgroup
\expandafter\gobbleoneargument
\fi\markdownConTeXtRenderTableRow}
\def\markdownConTeXtReadAlignments#1{%
\advance\markdownConTeXtColumnCounter by 1\relax
\if#1d%
\setupTABLE[c][\the\markdownConTeXtColumnCounter][align=right]
\fi\if#1l%
\setupTABLE[c][\the\markdownConTeXtColumnCounter][align=right]
\fi\if#1c%
\setupTABLE[c][\the\markdownConTeXtColumnCounter][align=middle]
\fi\if#1r%
\setupTABLE[c][\the\markdownConTeXtColumnCounter][align=left]
\fi
\ifnum\markdownConTeXtColumnCounter<\markdownConTeXtColumnTotal\relax\else
\expandafter\gobbleoneargument
\fi\markdownConTeXtReadAlignments}
\def\markdownConTeXtRenderTableCell#1{%
\advance\markdownConTeXtColumnCounter by 1\relax
\markdownConTeXtTable=\expandafter{%
\the\markdownConTeXtTable\bTD#1\eTD}%
\ifnum\markdownConTeXtColumnCounter<\markdownConTeXtColumnTotal\relax\else
\expandafter\gobbleoneargument
\fi\markdownConTeXtRenderTableCell}
\endinput
%%
%% End of file `t-markdown.tex'.