v1
This commit is contained in:
commit
df1d19fc5f
25
.gitignore
vendored
Normal file
25
.gitignore
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
*.aux
|
||||||
|
*.bbl
|
||||||
|
*.bcf
|
||||||
|
*.blg
|
||||||
|
*.dvi
|
||||||
|
*.idx
|
||||||
|
*.ilg
|
||||||
|
*.ind
|
||||||
|
*.lof
|
||||||
|
*.log
|
||||||
|
*.lot
|
||||||
|
*.nav
|
||||||
|
*.nlo
|
||||||
|
*.nls
|
||||||
|
*.out
|
||||||
|
/*.pdf
|
||||||
|
pdfa.xmpi
|
||||||
|
*.snm
|
||||||
|
.*.swp
|
||||||
|
*.synctex.gz
|
||||||
|
thesis-blx.bib
|
||||||
|
thesis-run.xml
|
||||||
|
thesis.run.xml
|
||||||
|
*.toc
|
||||||
|
*.vrb
|
16
Makefile
Normal file
16
Makefile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
PDFS=thesis.pdf abstract-en.pdf abstract-cz.pdf
|
||||||
|
|
||||||
|
all: $(PDFS)
|
||||||
|
|
||||||
|
thesis.pdf: thesis.tex $(wildcard *.tex) refs.bib thesis.xmpdata
|
||||||
|
pdflatex $<
|
||||||
|
bibtex thesis
|
||||||
|
pdflatex $<
|
||||||
|
pdflatex $<
|
||||||
|
|
||||||
|
abstract-%.pdf: abstract-%.tex abstract-%.xmpdata metadata.tex
|
||||||
|
pdflatex $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.log *.dvi *.aux *.toc *.lof *.lot *.out *.bbl *.blg *.xmpi
|
||||||
|
rm -f $(PDFS)
|
31
README.md
Normal file
31
README.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
# A slightly improved bachelor thesis template
|
||||||
|
|
||||||
|
- modern packages
|
||||||
|
- modern fonts
|
||||||
|
- less confusing directory structure
|
||||||
|
- slightly more useful examples (figures, diagrams, tables, code listings)
|
||||||
|
- Czech version has correctly named references
|
||||||
|
- builds abstracts
|
||||||
|
|
||||||
|
See the [pre-built version](build/thesis.pdf) for details
|
||||||
|
|
||||||
|
## How-to
|
||||||
|
|
||||||
|
1. Type `make`, check that everything compiles. You should get a `thesis.pdf` that passes PDF-A validation. If not, complain.
|
||||||
|
2. Fill in `metadata.tex` and all `xmpdata` files.
|
||||||
|
3. Look at the example code (there are several hints), remember it, erase it.
|
||||||
|
4. Write the thesis.
|
||||||
|
5. Submit and defend the thesis.
|
||||||
|
|
||||||
|
PDF-A validation can be checked using the validator: https://github.com/mff-cuni-cz/cuni-thesis-validator
|
||||||
|
|
||||||
|
## Ideas/improvements/more examples?
|
||||||
|
|
||||||
|
Pull requests welcome.
|
||||||
|
|
||||||
|
## License?
|
||||||
|
|
||||||
|
Everything in this repository is released into the public domain, not encumbered by any kind of copyright at all.
|
||||||
|
|
||||||
|
Parts of the code (esp. the title page) are based on the original template (available from the faculty website) by Martin Mareš, Arnošt Komárek, and Michal Kulich. (Thanks!)
|
14
abstract-cz.tex
Normal file
14
abstract-cz.tex
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
\documentclass[12pt]{report}
|
||||||
|
|
||||||
|
\usepackage[a-2u]{pdfx}
|
||||||
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
|
||||||
|
\input{metadata}
|
||||||
|
\input{todos}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\ifEN
|
||||||
|
Czech abstract is not available
|
||||||
|
\else\Abstract\fi
|
||||||
|
\end{document}
|
5
abstract-cz.xmpdata
Normal file
5
abstract-cz.xmpdata
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
% Metadata k uložení do PDF, podrobnější popis viz dokumentace balíčku pdfx.
|
||||||
|
|
||||||
|
\Author{Jméno Příjmení}
|
||||||
|
\Title{Název práce}
|
||||||
|
\Publisher{Univerzita Karlova}
|
12
abstract-en.tex
Normal file
12
abstract-en.tex
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
\documentclass[12pt]{report}
|
||||||
|
|
||||||
|
\usepackage[a-2u]{pdfx}
|
||||||
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
|
||||||
|
\input{metadata}
|
||||||
|
\input{todos}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\ifEN\Abstract\else\AbstractEN\fi
|
||||||
|
\end{document}
|
5
abstract-en.xmpdata
Normal file
5
abstract-en.xmpdata
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
% Metadata to be stored in PDF, see documentation of the pdfx package for more details.
|
||||||
|
|
||||||
|
\Author{Name Surname}
|
||||||
|
\Title{Thesis title}
|
||||||
|
\Publisher{Charles University}
|
8
bibliography.tex
Normal file
8
bibliography.tex
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
\ifEN
|
||||||
|
\chapwithtoc{Bibliography}
|
||||||
|
\else
|
||||||
|
\chapwithtoc{Seznam použité literatury}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\printbibliography[heading=none]
|
BIN
build/thesis.pdf
Normal file
BIN
build/thesis.pdf
Normal file
Binary file not shown.
33
ch1.tex
Normal file
33
ch1.tex
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
\chapter{Important first chapter}
|
||||||
|
\label{chap:refs}
|
||||||
|
|
||||||
|
First chapter usually builds the theoretical background necessary for readers to understand the rest of the thesis. You should summarize and reference a lot of existing literature and research.
|
||||||
|
|
||||||
|
You should use the standard \emph{citations}\todo{Use \textbackslash{}emph command like this, to highlight the first occurrence of an important word or term. Reader will notice it, and hopefully remember the importance.}.
|
||||||
|
|
||||||
|
\begin{description}
|
||||||
|
\item[Obtaining bibTeX citation] Go to Google Scholar\footnote{\url{https://scholar.google.com}}\todo{This footnote is an acceptable way to `cite' a webpages or URLs. Document without proper titles, authors and publishers generally do not form citations. Consequently, avoid citations of wikipedia pages.}, find the relevant literature, click the tiny double-quote button below the link, and copy the bibTeX entry.
|
||||||
|
\item[Saving the citation] Insert the bibTeX entry to the file \texttt{refs.bib}. On the first line of the entry you should see the short reference name --- from Scholar, it usually looks like \texttt{author2015title} --- you will use that to refer to the citation.
|
||||||
|
\item[Using the citation] Use the \verb|\cite| command to typeset the citation number correctly in the text; a long citation description will be automaticaly added to the bibliography at the end of the thesis. Always use a non-breakable space before the citing parenthesis to avoid unacceptable line breaks:
|
||||||
|
\begin{Verbatim}
|
||||||
|
Trees utilize gravity to invade ye
|
||||||
|
noble sires~\cite{newton1666apple}.
|
||||||
|
\end{Verbatim}
|
||||||
|
\item[Why should I bother with citations at all?] For two main reasons:
|
||||||
|
\begin{itemize}
|
||||||
|
\item You do not have to explain everything in the thesis; instead you send the reader to refer to details in some other literature. Use citations to simplify the detailed explanations.
|
||||||
|
\item If you describe something that already exists without using a citation, the reviewer may think that you \emph{claim} to have invented it. Expectably, he will demand academic correctness, and, from your perspective, being accused of plagiarism is not a good starting point for a successful defense. Use citations to give the credit to people who invented what you build upon.
|
||||||
|
\end{itemize}
|
||||||
|
\item[How many citations should I use?]
|
||||||
|
Cite any non-trivial building block or assumption that you use, if it is published in the literature. You do not have to cite trivia, such as the basic definitions taught in the introductory courses.
|
||||||
|
|
||||||
|
The rule of thumb is that you should read, understand and briefly review at least around 4 scientific papers. A thesis that contains less than 3 sound citations will spark doubt in reviewers.
|
||||||
|
\end{description}
|
||||||
|
|
||||||
|
There are several main commands for inserting citations, used as follows:
|
||||||
|
\begin{itemize}
|
||||||
|
\item \citet{knuth1979tex} described a great system for typesetting theses.
|
||||||
|
\item We are typesetting this thesis with LaTeX, which is based on TeX and Metafont~\cite{knuth1979tex}.
|
||||||
|
\item The TeX was actually expanded to LaTeX by \citet{lamport1994latex}.
|
||||||
|
\item Revered are the authors of these systems!~\cite{knuth1979tex,lamport1994latex}
|
||||||
|
\end{itemize}
|
87
ch2.tex
Normal file
87
ch2.tex
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
\chapter{More complicated chapter}
|
||||||
|
\label{chap:math}
|
||||||
|
|
||||||
|
After the reader gained sufficient knowledge in \cref{chap:refs}, you can jump to your own material and conclusions.
|
||||||
|
|
||||||
|
You will need definitions (see \cref{defn:x} below in \cref{sec:demo}), theorems (\cref{thm:y}), general mathematics, algorithms (\cref{alg:w}), and tables (\cref{tab:z})\todo{See documentation of package \texttt{booktabs} for hints on typesetting tables. As a main rule, \emph{never} draw a vertical line.}. \Cref{fig:f,fig:g} show how to make a nice figure. See \cref{fig:schema} for an example of TikZ-based diagram.
|
||||||
|
|
||||||
|
\section{Some mathematics}
|
||||||
|
\label{sec:demo}
|
||||||
|
|
||||||
|
\begin{defn}[Triplet]\label{defn:x}
|
||||||
|
Given stuff $X$, $Y$ and $Z$, we will write a \emph{triplet} of the stuff as $(X,Y,Z)$.
|
||||||
|
\end{defn}
|
||||||
|
|
||||||
|
\newcommand{\Col}{\textsc{Colour}}
|
||||||
|
|
||||||
|
\begin{thm}[Car coloring]\label{thm:y}
|
||||||
|
All cars have the same color. More specifically, for any set of cars $C$, we have
|
||||||
|
$$(\forall c_1, c_2 \in C)\:\Col(c_1) = \Col(c_2).$$
|
||||||
|
\end{thm}
|
||||||
|
|
||||||
|
\begin{proof}
|
||||||
|
Use induction on sets of cars $C$. The statement holds trivially for $|C|\leq1$. For larger $C$, select 2 overlapping subsets of $C$ smaller than $|C|$ (thus same-colored). Overlapping cars need to have the same color as the cars outside the overlap, thus also the whole $C$ is same-colored.\todo{This is plain wrong though.}
|
||||||
|
\end{proof}
|
||||||
|
|
||||||
|
\begin{table}
|
||||||
|
\centering
|
||||||
|
{\footnotesize\sf
|
||||||
|
\begin{tabular}{llrl}
|
||||||
|
\toprule
|
||||||
|
Column A & Column 2 & Numbers & More \\
|
||||||
|
\midrule
|
||||||
|
Asd & QWERTY & 123123 & -- \\
|
||||||
|
Asd qsd 1sd & \textcolor{red}{BAD} & 234234234 & This line should be helpful. \\
|
||||||
|
Asd & \textcolor{blue}{INTERESTING} & 123123123 & -- \\
|
||||||
|
Asd qsd 1sd & \textcolor{violet!50}{PLAIN WEIRD} & 234234234 & -- \\
|
||||||
|
Asd & QWERTY & 123123 & -- \\
|
||||||
|
\addlinespace % a nice non-intrusive separator of data groups (or final table sums)
|
||||||
|
Asd qsd 1sd & \textcolor{green!80!black}{GOOD} & 234234299 & -- \\
|
||||||
|
Asd & NUMBER & \textbf{123123} & -- \\
|
||||||
|
Asd qsd 1sd & DIFFERENT & 234234234 & (no data) \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabular}}
|
||||||
|
\caption{An example table. Table caption should clearly explain how to interpret the data in the table. Use some visual guide, such as boldface or color coding, to highlight the most important results (e.g., comparison winners).}
|
||||||
|
\label{tab:z}
|
||||||
|
\end{table}
|
||||||
|
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=.6\linewidth]{img/ukazka-obr02.pdf}
|
||||||
|
\caption{A figure with a plot, not entirely related to anything. If you copy the figures from anywhere, always refer to the original author, ideally by citation (if possible). In particular, this picture --- and many others, also a lot of surrounding code --- was taken from the example bachelor thesis of MFF, originally created by Martin Mareš and others.}
|
||||||
|
\label{fig:g}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\tikzstyle{box}=[rectangle,draw,rounded corners=0.5ex,fill=green!10]
|
||||||
|
\begin{tikzpicture}[thick,font=\sf\scriptsize]
|
||||||
|
\node[box,rotate=45] (a) {A test.};
|
||||||
|
\node[] (b) at (4,0) {Node with no border!};
|
||||||
|
\node[circle,draw,dashed,fill=yellow!20, text width=6em, align=center] (c) at (0,4) {Ugly yellow node.\\Is this the Sun?};
|
||||||
|
\node[box, right=1cm of c] (d) {Math: $X=\sqrt{\frac{y}{z}}$};
|
||||||
|
\draw[->](a) to (b);
|
||||||
|
\draw[->](a) to[bend left=30] node[midway,sloped,anchor=north] {flow flows} (c);
|
||||||
|
\draw[->>>,dotted](b) to[bend right=30] (d);
|
||||||
|
\draw[ultra thick](c) to (d);
|
||||||
|
|
||||||
|
\end{tikzpicture}
|
||||||
|
\caption{An example diagram typeset with TikZ.}
|
||||||
|
\label{fig:schema}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{algorithm}
|
||||||
|
\begin{algorithmic}
|
||||||
|
\Function{ExecuteWithHighProbability}{$A$}
|
||||||
|
\State $r \gets$ a random number between $0$ and $1$
|
||||||
|
\State $\epsilon \gets 0.00000000001$
|
||||||
|
\If{$r\geq\epsilon$}
|
||||||
|
\State execute $A$ \Comment{We discard the return value}
|
||||||
|
\Else
|
||||||
|
\State print: \texttt{Not today, sorry.}
|
||||||
|
\EndIf
|
||||||
|
\EndFunction
|
||||||
|
\end{algorithmic}
|
||||||
|
\caption{Algorithm that executes an action with high probability.}
|
||||||
|
\label{alg:w}
|
||||||
|
\end{algorithm}
|
43
ch3.tex
Normal file
43
ch3.tex
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
\chapter{Results and discussion}
|
||||||
|
|
||||||
|
You should have a separate chapter for presenting your results (generated by the stuff described previously, in our case in \cref{chap:math}). Remember that your work needs to be validated rigorously, and no one will believe you if you just say that `it worked well for you'.
|
||||||
|
|
||||||
|
Instead, try some of the following:
|
||||||
|
\begin{itemize}
|
||||||
|
\item State a hypothesis and prove it statistically
|
||||||
|
\item Show plots with measurements that you did to prove your results (e.g. speedup). Use either \texttt{R} and \texttt{ggplot}, or Python with \texttt{matplotlib} to generate the plots.\footnote{Honestly, the plots from \texttt{ggplot} look \underline{much} better.} Save them as PDF to avoid printing pixels (as in \cref{fig:f}).
|
||||||
|
\item Compare with other similar software/theses/authors/results, if possible
|
||||||
|
\item Show example source code (e.g. for demonstrating how easily your results can be used)
|
||||||
|
\item Include a `toy problem' for demonstrating the basic functionality of your approach and detail all important properties and results on that.
|
||||||
|
\item Include clear pictures of `inputs' and `outputs' of all your algorithms, if applicable.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=.6\linewidth]{img/ukazka-obr01.pdf}
|
||||||
|
\caption{This caption is a friendly reminder to never insert figures ``in text,'' without a floating environment, unless explicitly needed for maintaining the text flow (e.g., the figure is small and developing with the text, like some of the centered equations, as in \cref{thm:y}). All figures \emph{must} be referenced by number from the text (so that the reader can find them when he reads the text) and properly captioned (so that the reader can interpret the figure even if he looks at it before reading the text --- reviewers love to do that).}
|
||||||
|
\label{fig:f}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
It is sometimes convenient (even recommended by some journals, including Cell) to name the results sub-sections so that they state what exactly has been achieved. Examples follow.
|
||||||
|
|
||||||
|
\section{SuperProgram is faster than naive OldAlgorithm}
|
||||||
|
\subsection{Scalability estimation}
|
||||||
|
\subsection{Precision of the results}
|
||||||
|
\section{Amount of code reduced by CodeRedTool}
|
||||||
|
\subsection{Example}
|
||||||
|
\subsection{Performance on real codebases}
|
||||||
|
|
||||||
|
\section{What is a discussion?}
|
||||||
|
After you present the results and showing that your contribution works, it is important to \emph{interpret} them, showing what they mean for the more general public. Separate discussion sections are common in life sciences where ambiguity is common and intuition is sometimes the only thing that the authors have; exact sciences and mathematicians do not use them as often.
|
||||||
|
|
||||||
|
Despite of that, it is nice to precisely set your output to the environment, answering:
|
||||||
|
\begin{itemize}
|
||||||
|
\item What is the potential application of the result?
|
||||||
|
\item Does the result solve a problem that other people encountered?
|
||||||
|
\item Did the results point to any new (surprising) facts?
|
||||||
|
\item Why is the result important for your future work (or work of anyone other)?
|
||||||
|
\item Can the results be used to replace (and improve) anything that is used currently?
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
If you do not know the answers, you may want to ask the supervisor. Also, do not worry if the discussion section is half-empty or completely pointless; you may remove it completely without much consequence. It is just a bachelor thesis, not a world-saving avenger thesis.
|
10
conclusion.tex
Normal file
10
conclusion.tex
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
\chapwithtoc{Conclusion}
|
||||||
|
|
||||||
|
You should summarize what was achieved by the thesis. In a few paragraphs, try to answer the following:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Was the problem stated in the introduction was solved? (Ideally include a list of successfully achieved goals.)
|
||||||
|
\item What is the quality of the result? Is the problem solved for good and the mankind does not need to ever think about that again, or just partially improved upon? (Is the incompleteness caused by overwhelming problem complexity that would be out of thesis scope\todo{That is quite common.}, or any theoretical reasons, such as computational hardness?)
|
||||||
|
\item Does the result have any practical applications that improve upon something realistic?
|
||||||
|
\item Is there any good future development or research direction that could further improve the results of this thesis? (This is often summarized in a separate section called `Future work'.)
|
||||||
|
\end{itemize}
|
45
howto.tex
Normal file
45
howto.tex
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
\chapter{Using CoolThesisSoftware}
|
||||||
|
|
||||||
|
Use this appendix to tell the readers (specifically the reviewer) how to use your software. A very reduced example follows; expand as necessary. Description of the program usage (e.g., how to process some example data) should be included as well.
|
||||||
|
|
||||||
|
To compile and run the software, you need dependencies XXX and YYY and a C compiler. On Debian-based Linux systems (such as Ubuntu), you may install these dependencies with APT:
|
||||||
|
\begin{Verbatim}
|
||||||
|
apt-get install \
|
||||||
|
libsuperdependency-dev \
|
||||||
|
libanotherdependency-dev \
|
||||||
|
build-essential
|
||||||
|
\end{Verbatim}
|
||||||
|
|
||||||
|
To unpack and compile the software, proceed as follows:
|
||||||
|
\begin{Verbatim}
|
||||||
|
unzip coolsoft.zip
|
||||||
|
cd coolsoft
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
\end{Verbatim}
|
||||||
|
|
||||||
|
The program can be used as a C++ library, the simplest use is demonstrated in \cref{lst:ex}. A demonstration program that processes demonstration data is available in directory \verb|demo/|, you can run the program on a demonstration dataset as follows:
|
||||||
|
\begin{Verbatim}
|
||||||
|
cd demo/
|
||||||
|
./bin/cool_process_data data/demo1
|
||||||
|
\end{Verbatim}
|
||||||
|
|
||||||
|
After the program starts, control the data avenger with standard \verb-WSAD- controls.
|
||||||
|
|
||||||
|
\begin{listing}
|
||||||
|
\begin{lstlisting}
|
||||||
|
#include <CoolSoft.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int i;
|
||||||
|
if(i = cool::ProcessAllData());
|
||||||
|
std::cout << i << std::endl;
|
||||||
|
else
|
||||||
|
std::cerr << "error!" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
\end{lstlisting}
|
||||||
|
\caption{Example program.}
|
||||||
|
\label{lst:ex}
|
||||||
|
\end{listing}
|
1416
img/logo-cs.pdf
Normal file
1416
img/logo-cs.pdf
Normal file
File diff suppressed because one or more lines are too long
1388
img/logo-en.pdf
Normal file
1388
img/logo-en.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
img/ukazka-obr01.pdf
Normal file
BIN
img/ukazka-obr01.pdf
Normal file
Binary file not shown.
BIN
img/ukazka-obr02.pdf
Normal file
BIN
img/ukazka-obr02.pdf
Normal file
Binary file not shown.
16
intro.tex
Normal file
16
intro.tex
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
\chapwithtoc{Introduction}
|
||||||
|
|
||||||
|
Introduction should answer the following questions, ideally in this order:
|
||||||
|
\begin{enumerate}
|
||||||
|
\item What is the nature of the problem the thesis is addressing?
|
||||||
|
\item What is the common approach for solving that problem now?
|
||||||
|
\item How this thesis approaches the problem?
|
||||||
|
\item What are the results? Did something improve?
|
||||||
|
\item What can the reader expect in the individual chapters of the thesis?
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
Expected length of the introduction is between 1--4 pages. Longer introductions may require sub-sectioning with appropriate headings --- use \texttt{\textbackslash{}section*} to avoid numbering (with section names like `Motivation' and `Related work'), but try to avoid lengthy discussion of anything specific. Any ``real science'' (definitions, theorems, methods, data) should go into other chapters.
|
||||||
|
\todo{You may notice that this paragraph briefly shows different ``types'' of `quotes' in TeX, and the usage difference between a hyphen (-), en-dash (--) and em-dash (---).}
|
||||||
|
|
||||||
|
It is very advisable to skim through a book about scientific English writing before starting the thesis. I can recommend `\citetitle{glasman2010science}' by \citet{glasman2010science}.
|
102
macros.tex
Normal file
102
macros.tex
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
|
||||||
|
% use this for typesetting a chapter without a number, e.g. intro and outro
|
||||||
|
\def\chapwithtoc#1{
|
||||||
|
\chapter*{#1}
|
||||||
|
\addcontentsline{toc}{chapter}{#1}
|
||||||
|
}
|
||||||
|
|
||||||
|
% If there is a line/figure overflowing into page margin, this will make the
|
||||||
|
% problem evident by drawing a thick black line at the overflowing spot. You
|
||||||
|
% should not disable this.
|
||||||
|
\overfullrule=3mm
|
||||||
|
|
||||||
|
% The maximum stretching of a space. Increasing this makes the text a bit more
|
||||||
|
% sloppy, but may prevent the overflows by moving words to next line.
|
||||||
|
\emergencystretch=1em
|
||||||
|
|
||||||
|
\ifEN
|
||||||
|
\theoremstyle{plain}
|
||||||
|
\newtheorem{thm}{Theorem}
|
||||||
|
\newtheorem{lemma}[thm]{Lemma}
|
||||||
|
\newtheorem{claim}[thm]{Claim}
|
||||||
|
\newtheorem{defn}{Definition}
|
||||||
|
\theoremstyle{remark}
|
||||||
|
\newtheorem*{cor}{Corollary}
|
||||||
|
\else
|
||||||
|
\theoremstyle{plain}
|
||||||
|
\newtheorem{thm}{Věta}
|
||||||
|
\newtheorem{lemma}{Lemma}
|
||||||
|
\newtheorem{claim}{Tvrzení}
|
||||||
|
\newtheorem{defn}{Definice}
|
||||||
|
\theoremstyle{remark}
|
||||||
|
\newtheorem*{cor}{Důsledek}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\newenvironment{myproof}{
|
||||||
|
\par\medskip\noindent
|
||||||
|
\textit{\ifEN Proof \else Důkaz \fi}.
|
||||||
|
}{
|
||||||
|
\newline
|
||||||
|
\rightline{$\qedsymbol$}
|
||||||
|
}
|
||||||
|
|
||||||
|
% real/natural numbers
|
||||||
|
\newcommand{\R}{\mathbb{R}}
|
||||||
|
\newcommand{\N}{\mathbb{N}}
|
||||||
|
|
||||||
|
% asymptotic complexity
|
||||||
|
\newcommand{\asy}[1]{\mathcal{O}(#1)}
|
||||||
|
|
||||||
|
% listings and default lstlisting config (remove if unused)
|
||||||
|
\floatstyle{ruled}
|
||||||
|
\newfloat{listing}{tbp}{lst}
|
||||||
|
\ifEN\floatname{listing}{Listing}
|
||||||
|
\else\floatname{listing}{Výpis kódu}\fi
|
||||||
|
\lstset{%
|
||||||
|
language=C++,
|
||||||
|
tabsize=2,
|
||||||
|
showstringspaces=false,
|
||||||
|
basicstyle=\footnotesize\tt\color{black!75},
|
||||||
|
identifierstyle=\color{black},
|
||||||
|
commentstyle=\color{green!50!black},
|
||||||
|
stringstyle=\color{red!50!black},
|
||||||
|
keywordstyle=\color{blue!75!black}}
|
||||||
|
|
||||||
|
% re-styling of the captions with the float package
|
||||||
|
\makeatletter
|
||||||
|
\newcommand\floatc@plainb[2]{\setbox\@tempboxa\hbox{{\@fs@cfont #1} #2}%
|
||||||
|
\ifdim\wd\@tempboxa>\hsize {\@fs@cfont #1} #2\par
|
||||||
|
\else\hbox to\hsize{\hfil\box\@tempboxa\hfil}\fi}
|
||||||
|
\newcommand\fs@plainb{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@plainb%
|
||||||
|
\def\@fs@pre{}\def\@fs@post{}%
|
||||||
|
\def\@fs@mid{\vspace\abovecaptionskip\relax}%
|
||||||
|
\let\@fs@iftopcapt\iffalse}
|
||||||
|
\makeatother
|
||||||
|
\floatstyle{plainb}
|
||||||
|
\restylefloat{table}
|
||||||
|
\restylefloat{figure}
|
||||||
|
|
||||||
|
% Czech versions of the used cleveref references (It's not as convenient as in
|
||||||
|
% English because of declension, cleveref is limited to sg/pl nominative. Use
|
||||||
|
% plain \ref to dodge that.)
|
||||||
|
\ifEN\relax\else
|
||||||
|
\crefname{chapter}{kapitola}{kapitoly}
|
||||||
|
\Crefname{chapter}{Kapitola}{Kapitoly}
|
||||||
|
\crefname{section}{sekce}{sekce}
|
||||||
|
\Crefname{section}{Sekce}{Sekce}
|
||||||
|
\crefname{subsection}{sekce}{sekce}
|
||||||
|
\Crefname{subsection}{Sekce}{Sekce}
|
||||||
|
\crefname{subsubsection}{sekce}{sekce}
|
||||||
|
\Crefname{subsubsection}{Sekce}{Sekce}
|
||||||
|
\crefname{figure}{obrázek}{obrázky}
|
||||||
|
\Crefname{figure}{Obrázek}{Obrázky}
|
||||||
|
\crefname{table}{tabulka}{tabulky}
|
||||||
|
\Crefname{table}{Tabulka}{Tabulky}
|
||||||
|
\crefname{listing}{výpis}{výpisy}
|
||||||
|
\Crefname{listing}{Výpis}{Výpisy}
|
||||||
|
\floatname{algorithm}{Algoritmus}
|
||||||
|
\crefname{algorithm}{algoritmus}{algoritmy}
|
||||||
|
\Crefname{algorithm}{Algoritmus}{Algoritmy}
|
||||||
|
\newcommand{\crefpairconjunction}{ a~}
|
||||||
|
\newcommand{\crefrangeconjunction}{ a~}
|
||||||
|
\fi
|
55
metadata.tex
Normal file
55
metadata.tex
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
% choose a language
|
||||||
|
\def\ifEN#1\else#2\fi{#1} % uncomment this for english
|
||||||
|
%\def\ifEN#1\else#2\fi{#2} % uncomment this for czech
|
||||||
|
|
||||||
|
% Fill in the rest of the file.
|
||||||
|
% (Note: \xxx is a "ToDo label" which makes the unfilled visible. Remove it.)
|
||||||
|
\def\ThesisTitle{\xxx{Thesis title}}
|
||||||
|
\def\ThesisAuthor{\xxx{Name Surname}}
|
||||||
|
\def\YearSubmitted{\xxx{YEAR}}
|
||||||
|
|
||||||
|
\def\Department{\xxx{Name of the department}} % department assigned to the thesis
|
||||||
|
\def\DeptType{\xxx{Department}} % Is it a department (katedra), or an institute (ústav)?
|
||||||
|
|
||||||
|
\def\Supervisor{\xxx{Supername Supersurname}}
|
||||||
|
\def\SupervisorsDepartment{\xxx{department}}
|
||||||
|
|
||||||
|
% Study programme and specialization
|
||||||
|
\def\StudyProgramme{\xxx{study programme}}
|
||||||
|
\def\StudyBranch{\xxx{study branch}}
|
||||||
|
|
||||||
|
\def\Dedication{%
|
||||||
|
Dedication. \xxx{It is nice to say thanks to supervisors, friends, family, book authors and food providers.}
|
||||||
|
}
|
||||||
|
|
||||||
|
\def\Abstract{%
|
||||||
|
\xxx{Abstract.}
|
||||||
|
% recommended length around 120 words.
|
||||||
|
% THIS IS NOT A COPY OF YOUR THESIS ASSIGNMENT!
|
||||||
|
}
|
||||||
|
|
||||||
|
% 3 to 5 keywords (recommended), each enclosed in curly braces
|
||||||
|
\def\Keywords{%
|
||||||
|
\xxx{{key} {words}}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
\ifEN\iffalse\else\iftrue\fi %this line is an ugly hack
|
||||||
|
|
||||||
|
% If you are writing a czech thesis, you additionally need to fill in the
|
||||||
|
% english version of metadata here!
|
||||||
|
\def\ThesisTitleEN{\xxx{Thesis title in English}}
|
||||||
|
\def\DepartmentEN{\xxx{Name of the department in English}}
|
||||||
|
\def\DeptTypeEN{\xxx{Department}}
|
||||||
|
\def\SupervisorsDepartmentEN{\xxx{Superdepartment}}
|
||||||
|
\def\StudyProgrammeEN{\xxx{study programme}}
|
||||||
|
\def\StudyBranchEN{\xxx{study branch}}
|
||||||
|
\def\AbstractEN{%
|
||||||
|
\xxx{Abstract.}
|
||||||
|
}
|
||||||
|
\def\KeywordsEN{%
|
||||||
|
\xxx{{key} {words}}
|
||||||
|
}
|
||||||
|
|
||||||
|
\fi %hack ends here
|
20
refs.bib
Normal file
20
refs.bib
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
@book{knuth1979tex,
|
||||||
|
title={TEX and METAFONT: New directions in typesetting},
|
||||||
|
author={Knuth, Donald Ervin},
|
||||||
|
year={1979},
|
||||||
|
publisher={American Mathematical Society}
|
||||||
|
}
|
||||||
|
|
||||||
|
@book{lamport1994latex,
|
||||||
|
title={LATEX: a document preparation system: user's guide and reference manual},
|
||||||
|
author={Lamport, Leslie},
|
||||||
|
year={1994},
|
||||||
|
publisher={Addison-wesley}
|
||||||
|
}
|
||||||
|
|
||||||
|
@book{glasman2010science,
|
||||||
|
title={Science research writing for non-native speakers of English},
|
||||||
|
author={Glasman-Deal, Hilary},
|
||||||
|
year={2010},
|
||||||
|
publisher={World Scientific}
|
||||||
|
}
|
75
thesis.tex
Normal file
75
thesis.tex
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
\documentclass[12pt,a4paper,twoside,openright]{report}
|
||||||
|
\let\openright=\cleardoublepage
|
||||||
|
|
||||||
|
\input{metadata}
|
||||||
|
|
||||||
|
\usepackage[a-2u]{pdfx}
|
||||||
|
|
||||||
|
\ifEN\else\usepackage[czech,shorthands=off]{babel}\fi
|
||||||
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
|
||||||
|
% The geometry modification is recommended by the official template, but
|
||||||
|
% clashes heavily with the existing page design guidelines. Decide for yourself.
|
||||||
|
% (also see https://en.wikipedia.org/wiki/Canons_of_page_construction )
|
||||||
|
%
|
||||||
|
%\usepackage[textwidth=145mm,textheight=247mm]{geometry}
|
||||||
|
|
||||||
|
% font for typesetting (choose one)
|
||||||
|
%\usepackage{lmodern} % TeX "original" (popular in math)
|
||||||
|
\usepackage[mono=false]{libertine} % popular for comp-sci (ACM uses this)
|
||||||
|
%\usepackage{tgpagella} % Palladio-like (popular in formal logic)
|
||||||
|
%\usepackage{tgschola} % Schoolbook-like (gives a bit of historic feel)
|
||||||
|
|
||||||
|
% some extra packages
|
||||||
|
\usepackage{amsmath,amsfonts,amsthm,bm}
|
||||||
|
\usepackage{graphicx}
|
||||||
|
\usepackage{xcolor}
|
||||||
|
\usepackage{booktabs}
|
||||||
|
\usepackage{float}
|
||||||
|
|
||||||
|
% load bibliography tools
|
||||||
|
\usepackage[backend=bibtex,natbib]{biblatex}
|
||||||
|
\addbibresource{refs}
|
||||||
|
|
||||||
|
% remove this if you won't use fancy verbatim environments
|
||||||
|
\usepackage{fancyvrb}
|
||||||
|
|
||||||
|
% remove this if you won't typeset TikZ graphics
|
||||||
|
\usepackage{tikz}
|
||||||
|
\usetikzlibrary{positioning} %possibly add more libraries, e.g. fit, decorations, ...
|
||||||
|
|
||||||
|
% remove this if you won't typeset any pseudocode
|
||||||
|
\usepackage{algpseudocode}
|
||||||
|
\usepackage{algorithm}
|
||||||
|
|
||||||
|
% remove this if you are not listing code
|
||||||
|
\usepackage{listings}
|
||||||
|
|
||||||
|
\hypersetup{unicode}
|
||||||
|
\hypersetup{breaklinks=true}
|
||||||
|
|
||||||
|
\usepackage[noabbrev]{cleveref}
|
||||||
|
|
||||||
|
\input{todos} % remove this before the final version
|
||||||
|
\input{macros}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\include{title}
|
||||||
|
|
||||||
|
\tableofcontents
|
||||||
|
|
||||||
|
\include{intro}
|
||||||
|
\include{ch1}
|
||||||
|
\include{ch2}
|
||||||
|
\include{ch3}
|
||||||
|
\include{conclusion}
|
||||||
|
\include{bibliography}
|
||||||
|
|
||||||
|
\appendix
|
||||||
|
\include{howto}
|
||||||
|
%\include{attachments} % include if your attachments are somehow complicated
|
||||||
|
|
||||||
|
\openright
|
||||||
|
\end{document}
|
7
thesis.xmpdata
Normal file
7
thesis.xmpdata
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
% Metadata to be stored in PDF, see documentation of the pdfx package for more details.
|
||||||
|
|
||||||
|
\Author{Name Surname}
|
||||||
|
\Title{Thesis title}
|
||||||
|
\Keywords{keywords\sep more such\sep yet another}
|
||||||
|
\Subject{Abstract of thesis}
|
||||||
|
\Publisher{Charles University}
|
179
title.tex
Normal file
179
title.tex
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
% the layout is mandatory, edit only in dire circumstances
|
||||||
|
|
||||||
|
\pagestyle{empty}
|
||||||
|
\hypersetup{pageanchor=false}
|
||||||
|
\begin{center}
|
||||||
|
|
||||||
|
\ifEN
|
||||||
|
\centerline{\mbox{\includegraphics[width=166mm]{img/logo-en.pdf}}}
|
||||||
|
\else
|
||||||
|
\centerline{\mbox{\includegraphics[width=166mm]{img/logo-cs.pdf}}}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\vspace{-8mm}
|
||||||
|
\vfill
|
||||||
|
|
||||||
|
|
||||||
|
\ifEN
|
||||||
|
{\bf\Large BACHELOR THESIS}
|
||||||
|
\else
|
||||||
|
{\bf\Large BAKALÁŘSKÁ PRÁCE}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\vfill
|
||||||
|
|
||||||
|
{\LARGE\ThesisAuthor}
|
||||||
|
|
||||||
|
\vspace{15mm}
|
||||||
|
|
||||||
|
{\LARGE\bfseries\ThesisTitle}
|
||||||
|
|
||||||
|
\vfill
|
||||||
|
|
||||||
|
\Department
|
||||||
|
|
||||||
|
\vfill
|
||||||
|
|
||||||
|
{
|
||||||
|
\centerline{\vbox{\halign{\hbox to 0.45\hsize{\hfil #}&\hskip 0.5em\parbox[t]{0.45\hsize}{\raggedright #}\cr
|
||||||
|
\ifEN Supervisor of the bachelor thesis: \else Vedoucí bakalářské práce: \fi
|
||||||
|
& \Supervisor \cr
|
||||||
|
\noalign{\vspace{2mm}}
|
||||||
|
\ifEN Study programme: \else Studijní program: \fi
|
||||||
|
& \StudyProgramme \cr
|
||||||
|
\noalign{\vspace{2mm}}
|
||||||
|
\ifEN Study branch: \else Studijní obor: \fi
|
||||||
|
& \StudyBranch \cr
|
||||||
|
}}}}
|
||||||
|
|
||||||
|
\vfill
|
||||||
|
|
||||||
|
\ifEN Prague \else Praha \fi
|
||||||
|
\YearSubmitted
|
||||||
|
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
|
||||||
|
% remember to sign this!
|
||||||
|
|
||||||
|
\openright
|
||||||
|
\hypersetup{pageanchor=true}
|
||||||
|
\pagestyle{plain}
|
||||||
|
\pagenumbering{roman}
|
||||||
|
\vglue 0pt plus 1fill
|
||||||
|
|
||||||
|
\ifEN
|
||||||
|
\noindent
|
||||||
|
I declare that I carried out this bachelor thesis independently, and only with the cited
|
||||||
|
sources, literature and other professional sources. It has not been used to obtain another
|
||||||
|
or the same degree.
|
||||||
|
\else
|
||||||
|
\noindent
|
||||||
|
Prohlašuji, že jsem tuto bakalářskou práci vypracoval(a) samostatně a výhradně
|
||||||
|
s~použitím citovaných pramenů, literatury a dalších odborných zdrojů.
|
||||||
|
Tato práce nebyla využita k získání jiného nebo stejného titulu.
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\ifEN
|
||||||
|
\medskip\noindent
|
||||||
|
I understand that my work relates to the rights and obligations under the Act No.~121/2000 Sb.,
|
||||||
|
the Copyright Act, as amended, in particular the fact that the Charles
|
||||||
|
University has the right to conclude a license agreement on the use of this
|
||||||
|
work as a school work pursuant to Section 60 subsection 1 of the Copyright~Act.
|
||||||
|
\else
|
||||||
|
\medskip\noindent
|
||||||
|
Beru na~vědomí, že se na moji práci vztahují práva a povinnosti vyplývající
|
||||||
|
ze zákona č. 121/2000 Sb., autorského zákona v~platném znění, zejména skutečnost,
|
||||||
|
že Univerzita Karlova má právo na~uzavření licenční smlouvy o~užití této
|
||||||
|
práce jako školního díla podle §60 odst. 1 autorského zákona.
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\vspace{10mm}
|
||||||
|
|
||||||
|
|
||||||
|
\ifEN
|
||||||
|
\hbox{\hbox to 0.5\hsize{%
|
||||||
|
In \hbox to 6em{\dotfill} date \hbox to 6em{\dotfill}
|
||||||
|
\hss}\hbox to 0.5\hsize{\dotfill\quad}}
|
||||||
|
\smallskip
|
||||||
|
\hbox{\hbox to 0.5\hsize{}\hbox to 0.5\hsize{\hfil Author's signature\hfil}}
|
||||||
|
\else
|
||||||
|
\hbox{\hbox to 0.5\hsize{%
|
||||||
|
V \hbox to 6em{\dotfill} dne \hbox to 6em{\dotfill}
|
||||||
|
\hss}\hbox to 0.5\hsize{\dotfill\quad}}
|
||||||
|
\smallskip
|
||||||
|
\hbox{\hbox to 0.5\hsize{}\hbox to 0.5\hsize{\hfil Podpis autora\hfil}}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\vspace{20mm}
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
% dedication
|
||||||
|
|
||||||
|
\openright
|
||||||
|
|
||||||
|
\noindent
|
||||||
|
\Dedication
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
% mandatory information page
|
||||||
|
|
||||||
|
\openright
|
||||||
|
|
||||||
|
\vbox to 0.49\vsize{
|
||||||
|
\setlength\parindent{0mm}
|
||||||
|
\setlength\parskip{5mm}
|
||||||
|
|
||||||
|
\ifEN Title: \else Název práce: \fi
|
||||||
|
\ThesisTitle
|
||||||
|
|
||||||
|
\ifEN Author: \else Autor: \fi
|
||||||
|
\ThesisAuthor
|
||||||
|
|
||||||
|
\DeptType:
|
||||||
|
\Department
|
||||||
|
|
||||||
|
\ifEN Supervisor: \else Vedoucí bakalářské práce: \fi
|
||||||
|
\Supervisor, \SupervisorsDepartment
|
||||||
|
|
||||||
|
\ifEN Abstract: \else Abstrakt: \fi
|
||||||
|
\Abstract
|
||||||
|
|
||||||
|
\ifEN Keywords: \else Klíčová slova: \fi
|
||||||
|
\Keywords
|
||||||
|
|
||||||
|
% hack follows (no idea why \long doesn't work for \ifEN)
|
||||||
|
\vss}\ifEN\iffalse\else\iftrue\fi\nobreak\vbox to 0.49\vsize{
|
||||||
|
\setlength\parindent{0mm}
|
||||||
|
\setlength\parskip{5mm}
|
||||||
|
|
||||||
|
Title:
|
||||||
|
\ThesisTitleEN
|
||||||
|
|
||||||
|
Author:
|
||||||
|
\ThesisAuthor
|
||||||
|
|
||||||
|
\DeptTypeEN:
|
||||||
|
\DepartmentEN
|
||||||
|
|
||||||
|
Supervisor:
|
||||||
|
\Supervisor, \SupervisorsDepartmentEN
|
||||||
|
|
||||||
|
Abstract:
|
||||||
|
\AbstractEN
|
||||||
|
|
||||||
|
Keywords:
|
||||||
|
\KeywordsEN
|
||||||
|
|
||||||
|
\vss}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
\openright
|
||||||
|
\pagestyle{plain}
|
||||||
|
\pagenumbering{arabic}
|
||||||
|
\setcounter{page}{1}
|
Loading…
Reference in New Issue
Block a user