Commit df48ae5f authored by Michael Keller's avatar Michael Keller
Browse files

Added Initial Thesis

parent 9e66f46a
This diff is collapsed.
%% This file is `ETHlogo.sty'
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ETHlogo}[2000/11/06 0.1 ETH Logo command]
\RequirePackage{graphicx}
\newcommand{\ETHlogo}[1][\textwidth]{\resizebox{#1}{!}{\includegraphics{ETHlogo}}}
\endinput
%%
%% End of file `ETHlogo.sty'
# partly autogenerated, that's why it's so ugly!
# say 'make V=1' to see the full build output
ifndef V
Q = @
Q_LATEX = sh -c 'echo -e " " `echo $$(basename "$$0") | tr a-z A-Z`"\t$${!\#/..\/..\//}"; ! "$$0" "$$@" | grep -A5 -E "^[^ ]+:[0-9]+:"'
Q_OTHER = sh -c 'echo -e " " `echo $$(basename "$$0") | tr a-z A-Z`"\t$${!\#/..\/..\//}"; "$$0" "$$@" >/dev/null'
endif
LATEX = latex
PDFLATEX = pdflatex
BIBTEX = bibtex
DVIPS = dvips
DVIPDF = dvipdf
PDFTOEPS = pdftops -eps
PDFTOPS = pdf2ps
EPSTOPDF = epstopdf
FIGTODEV = fig2dev
MPOST = mpost
.PHONY: all clean archive
all: thesis
texfiles = $(wildcard *.tex)
.PHONY: thesis
thesis: thesis.pdf thesis.ps
thesis.pdf: $(texfiles) thesis.bbl
$(Q) rm -rf build/pdf/; mkdir -p build/pdf/
$(Q) cd build/pdf/ && TEXINPUTS="../../:$$TEXINPUTS" $(Q_LATEX) $(PDFLATEX) -interaction=nonstopmode -file-line-error ../../thesis.tex
$(Q) cd build/pdf/ && TEXINPUTS="../../:$$TEXINPUTS" $(Q_LATEX) $(PDFLATEX) -interaction=nonstopmode -file-line-error ../../thesis.tex
$(Q) ln -f build/pdf/thesis.pdf thesis.pdf
thesis.dvi: $(texfiles) thesis.bbl
$(Q) rm -rf build/dvi/; mkdir -p build/dvi/
$(Q) cd build/dvi/ && TEXINPUTS="../../:$$TEXINPUTS" $(Q_LATEX) $(LATEX) -interaction=nonstopmode -file-line-error ../../thesis.tex
$(Q) cd build/dvi/ && TEXINPUTS="../../:$$TEXINPUTS" $(Q_LATEX) $(LATEX) -interaction=nonstopmode -file-line-error ../../thesis.tex
$(Q) ln -f build/dvi/thesis.dvi thesis.dvi
thesis.ps: thesis.dvi
$(Q)$(Q_OTHER) $(DVIPS) -q thesis
thesis.aux: $(texfiles)
$(Q) $(Q_LATEX) $(LATEX) -interaction=nonstopmode -file-line-error thesis.tex
thesis.bbl: thesis.aux
$(Q)$(Q_OTHER) $(BIBTEX) thesis
clean:
rm -rf build/
rm -f *.aux
rm -f thesis.dvi thesis.idx thesis.ind thesis.ilg thesis.out thesis.toc thesis.pdf thesis.log
archive: thesis-template.zip
thesis-template.zip: *.tex Makefile ETHlogo.* refs.bib
mkdir -p thesis
cp `git ls-files "*.tex" Makefile "ETHlogo.*" refs.bib` thesis/
perl -i -pe 's/\$$VERSION\$$/'"$$(git describe)/" thesis/*.tex
rm -f thesis-template.zip
zip -r thesis-template.zip thesis/
\begin{abstract}
TODO
\end{abstract}
\chapter{Calculations Appendix}
You can defer lengthy calculations that would otherwise only interrupt
the flow of your thesis to an appendix.
\chapter{Conclusion}
\ No newline at end of file
%% See the TeXed file for more explanations
%% [OPT] Multi-rowed cells in tabulars
%\usepackage{multirow}
%% [REC] Intelligent cross reference package. This allows for nice
%% combined references that include the reference and a hint to where
%% to look for it.
\usepackage{varioref}
%% [OPT] Easily changeable quotes with \enquote{Text}
%\usepackage[german=swiss]{csquotes}
%% [REC] Format dates and time depending on locale
\usepackage{datetime}
%% [OPT] Provides a \cancel{} command to stroke through mathematics.
%\usepackage{cancel}
%% [NEED] This allows for additional typesetting tools in mathmode.
%% See its excellent documentation.
\usepackage{mathtools}
%% [ADV] Conditional commands
%\usepackage{ifthen}
%% [OPT] Manual large braces or other delimiters.
%\usepackage{bigdelim, bigstrut}
%% [REC] Alternate vector arrows. Use the command \vv{} to get scaled
%% vector arrows.
\usepackage[h]{esvect}
%% [NEED] Some extensions to tabulars and array environments.
\usepackage{array}
%% [OPT] Postscript support via pstricks graphics package. Very
%% diverse applications.
%\usepackage{pstricks,pst-all}
%% [?] This seems to allow us to define some additional counters.
%\usepackage{etex}
%% [ADV] XY-Pic to typeset some matrix-style graphics
%\usepackage[all]{xy}
%% [OPT] This is needed to generate an index at the end of the
%% document.
%\usepackage{makeidx}
%% [OPT] Fancy package for source code listings. The template text
%% needs it for some LaTeX snippets; remove/adapt the \lstset when you
%% remove the template content.
\usepackage{listings}
\lstset{language=TeX,basicstyle={\normalfont\ttfamily}}
%% [REC] Fancy character protrusion. Must be loaded after all fonts.
\usepackage{microtype}
%% [REC] Nicer tables. Read the excellent documentation.
\usepackage{booktabs}
\chapter{Introduction}
Writers block is a real thing...
\ No newline at end of file
%% Memoir layout setup
%% NOTE: You are strongly advised not to change any of them unless you
%% know what you are doing. These settings strongly interact in the
%% final look of the document.
% Dependencies
\usepackage{ETHlogo}
% Turn extra space before chapter headings off.
\setlength{\beforechapskip}{0pt}
\nonzeroparskip
\parindent=0pt
\defaultlists
% Chapter style redefinition
\makeatletter
\if@twoside
\pagestyle{Ruled}
\copypagestyle{chapter}{Ruled}
\else
\pagestyle{ruled}
\copypagestyle{chapter}{ruled}
\fi
\makeoddhead{chapter}{}{}{}
\makeevenhead{chapter}{}{}{}
\makeheadrule{chapter}{\textwidth}{0pt}
\copypagestyle{abstract}{empty}
\makechapterstyle{bianchimod}{%
\chapterstyle{default}
\renewcommand*{\chapnamefont}{\normalfont\Large\sffamily}
\renewcommand*{\chapnumfont}{\normalfont\Large\sffamily}
\renewcommand*{\printchaptername}{%
\chapnamefont\centering\@chapapp}
\renewcommand*{\printchapternum}{\chapnumfont {\thechapter}}
\renewcommand*{\chaptitlefont}{\normalfont\huge\sffamily}
\renewcommand*{\printchaptertitle}[1]{%
\hrule\vskip\onelineskip \centering \chaptitlefont\textbf{\vphantom{gyM}##1}\par}
\renewcommand*{\afterchaptertitle}{\vskip\onelineskip \hrule\vskip
\afterchapskip}
\renewcommand*{\printchapternonum}{%
\vphantom{\chapnumfont {9}}\afterchapternum}}
% Use the newly defined style
\chapterstyle{bianchimod}
\setsecheadstyle{\Large\bfseries\sffamily}
\setsubsecheadstyle{\large\bfseries\sffamily}
\setsubsubsecheadstyle{\bfseries\sffamily}
\setparaheadstyle{\normalsize\bfseries\sffamily}
\setsubparaheadstyle{\normalsize\itshape\sffamily}
\setsubparaindent{0pt}
% Set captions to a more separated style for clearness
\captionnamefont{\sffamily\bfseries\footnotesize}
\captiontitlefont{\sffamily\footnotesize}
\setlength{\intextsep}{16pt}
\setlength{\belowcaptionskip}{1pt}
% Set section and TOC numbering depth to subsection
\setsecnumdepth{subsection}
\settocdepth{subsection}
%% Titlepage adjustments
\pretitle{\vspace{0pt plus 0.7fill}\begin{center}\HUGE\sffamily\bfseries}
\posttitle{\end{center}\par}
\preauthor{\par\begin{center}\let\and\\\Large\sffamily}
\postauthor{\end{center}}
\predate{\par\begin{center}\Large\sffamily}
\postdate{\end{center}}
\def\@advisors{}
\newcommand{\advisors}[1]{\def\@advisors{#1}}
\def\@department{}
\newcommand{\department}[1]{\def\@department{#1}}
\def\@thesistype{}
\newcommand{\thesistype}[1]{\def\@thesistype{#1}}
\renewcommand{\maketitlehooka}{\noindent\ETHlogo[2in]}
\renewcommand{\maketitlehookb}{\vspace{1in}%
\par\begin{center}\Large\sffamily\@thesistype\end{center}}
\renewcommand{\maketitlehookd}{%
\vfill\par
\begin{flushright}
\sffamily
\@advisors\par
\@department, ETH Z\"urich
\end{flushright}
}
\checkandfixthelayout
\setlength{\droptitle}{-48pt}
\makeatother
% This defines how theorems should look. Best leave as is.
\theoremstyle{plain}
\setlength\theorempostskipamount{0pt}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "thesis"
%%% End:
%% Custom commands
%% ===============
%% Special characters for number sets, e.g. real or complex numbers.
\newcommand{\C}{\mathbb{C}}
\newcommand{\Cps}{\mathcal{C}}
\newcommand{\K}{\mathbb{K}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\X}{\mathbb{X}}
%% Fixed/scaling delimiter examples (see mathtools documentation)
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
%% Use the alternative epsilon per default and define the old one as \oldepsilon
\let\oldepsilon\epsilon
\renewcommand{\epsilon}{\ensuremath\varepsilon}
%% Also set the alternate phi as default.
\let\oldphi\phi
\renewcommand{\phi}{\ensuremath{\varphi}}
% Some commands used in this file
\newcommand{\package}{\emph}
\chapter{Introduction}
This is version \verb-v1.4- of the template.
We assume that you found this template on our institute's website, so
we do not repeat everything stated there. Consult the website again
for pointers to further reading about \LaTeX{}. This chapter only
gives a brief overview of the files you are looking at.
\section{Features}
\label{sec:features}
The rest of this document shows off a few features of the template
files. Look at the source code to see which macros we used!
The template is divided into \TeX{} files as follows:
\begin{enumerate}
\item \texttt{thesis.tex} is the main file.
\item \texttt{extrapackages.tex} holds extra package includes.
\item \texttt{layoutsetup.tex} defines the style used in this document.
\item \texttt{theoremsetup.tex} declares the theorem-like environments.
\item \texttt{macrosetup.tex} defines extra macros that you may find
useful.
\item \texttt{introduction.tex} contains this text.
\item \texttt{sections.tex} is a quick demo of each sectioning level
available.
\item \texttt{refs.bib} is an example bibliography file. You can use
Bib\TeX{} to quote references. For example, read
\cite{bringhurst1996ets} if you can get a hold of it.
\end{enumerate}
\subsection{Extra package includes}
The file \texttt{extrapackages.tex} lists some packages that usually
come in handy. Simply have a look at the source code. We have
added the following comments based on our experiences:
\begin{description}
\item[REC] This package is recommended.
\item[OPT] This package is optional. It usually solves a specific
problem in a clever way.
\item[ADV] This package is for the advanced user, but solves a problem
frequent enough that we mention it. Consult the package's
documentation.
\end{description}
As a small example, here is a reference to the Section \emph{Features}
typeset with the recommended \package{varioref} package:
\begin{quote}
See Section~\vref{sec:features}.
\end{quote}
\subsection{Layout setup}
This defines the overall look of the document -- for example, it
changes the chapter and section heading appearance. We consider this
a `do not touch' area. Take a look at the excellent \emph{Memoir}
documentation before changing it.
In fact, take a look at the excellent \emph{Memoir} documentation,
full stop.
\subsection{Theorem setup}
This file defines a bunch of theorem-like environments.
\begin{theorem}
An example theorem.
\end{theorem}
\begin{proof}
Proof text goes here.
\end{proof}
Note that the q.e.d.\ symbol moves to the correct place automatically
if you end the proof with an \texttt{enumerate} or
\texttt{displaymath}. You do not need to use \verb-\qedhere- as with
\package{amsthm}.
\begin{theorem}[Some Famous Guy]
Another example theorem.
\end{theorem}
\begin{proof}
This proof
\begin{enumerate}
\item ends in an enumerate.
\end{enumerate}
\end{proof}
\begin{proposition}
Note that all theorem-like environments are by default numbered on
the same counter.
\end{proposition}
\begin{proof}
This proof ends in a display like so:
\begin{displaymath}
f(x) = x^2.
\end{displaymath}
\end{proof}
\subsection{Macro setup}
For now the macro setup only shows how to define some basic macros,
and how to use a neat feature of the \package{mathtools} package:
\begin{displaymath}
\abs{a}, \quad \abs*{\frac{a}{b}}, \quad \abs[\big]{\frac{a}{b}}.
\end{displaymath}
\chapter{Problem Statement}
We assume that we are given four inputs:
\begin{enumerate}
\item The field dimensions, denoted as $X$ for the number of pixels
on the x-axis and $Y$ correspondingly. Both $X, Y \in \N$.
\item The types of crop we would like to plant. We let
$C\in \N$ denote the number of different crop types we would
like to plant and $\Cps := \{c_1, \cdots, c_{C}\}$
as the set of all crops.
\item A function $R: \Cps^2 \to [-1, 1]$ that measures the
synergy between two crops. The higher the value of
$R(c_a, c_b)$, the more crop $c_a$ likes $c_b$.
\item A probability distribution $D$ over our crops $\Cps$
that tells us how many pixels of the field should
contain a certain crop.
\end{enumerate}
and we are looking for a matrix $F \in \Cps^{X \times Y}$
that maximizes the following score function:
@book{bringhurst1996ets,
title={{The Elements of Typographic Style}},
author={Bringhurst, Robert},
year={1996},
publisher={Hartley \& Marks}
}
\chapter{Related Work}
Here Dr. Arnolds Stuff comes in
\ No newline at end of file
\chapter{Writing scientific texts in English}
This chapter was originally a separate document written by Reto
Spöhel. It is reprinted here so that the template can serve as a
quick guide to thesis writing, and to provide some more example
material to give you a feeling for good typesetting.
% We're going to need an extra theorem-like environment for this
% chapter
\theoremstyle{plain}
\theoremsymbol{}
\newtheorem{Rule}[theorem]{Rule}
\section{Basic writing rules}
The following rules need little further explanation; they are best
understood by looking at the example in the booklet by Knuth et al.,
§2--§3.
\begin{Rule}
Write texts, not chains of formulas.
\end{Rule}
More specifically, write full sentences that are logically
interconnected by phrases like `Therefore', `However', `On the other
hand', etc.\ where appropriate.
\begin{Rule}
Displayed formulas should be embedded in your text and punctuated
with it.
\end{Rule}
In other words, your writing should not be divided into `text parts'
and `formula parts'; instead the formulas should be tied together by
your prose such that there is a natural flow to your writing.
\section{Being nice to the reader}
Try to write your text in such a way that a reader enjoys reading
it. That's of course a lofty goal, but nevertheless one you should
aspire to!
\begin{Rule}
Be nice to the reader.
\end{Rule}
Give some intuition or easy example for definitions and theorems which
might be hard to digest. Remind the reader of notations you introduced
many pages ago -- chances are he has forgotten them. Illustrate your
writing with diagrams and pictures where this helps the reader. Etc.
\begin{Rule}
Organize your writing.
\end{Rule}
Think carefully about how you subdivide your thesis into chapters,
sections, and possibly subsections. Give overviews at the beginning
of your thesis and of each chapter, so the reader knows what to
expect. In proofs, outline the main ideas before going into technical
details. Give the reader the opportunity to `catch up with you' by
summing up your findings periodically.
\emph{Useful phrases:} `So far we have shown that \ldots', `It remains
to show that \ldots', `Recall that we want to prove inequality (7), as
this will allow us to deduce that \ldots', `Thus we can conclude that
\ldots. Next, we would like to find out whether \ldots', etc.
\begin{Rule}
Don't say the same thing twice without telling the reader that you
are saying it twice.
\end{Rule}
Repetition of key ideas is important and helpful. However, if you
present the same idea, definition or observation twice (in the same or
different words) without telling the reader, he will be looking for
something new where there is nothing new.
\emph{Useful phrases:} `Recall that [we have seen in Chapter 5 that]
\ldots', `As argued before / in the proof of Lemma 3, \ldots', `As
mentioned in the introduction, \ldots', `In other words, \ldots', etc.
\begin{Rule}
Don't make statements that you will justify later without telling
the reader that you will justify them later.
\end{Rule}
This rule also applies when the justification is coming right in the
next sentence! The reasoning should be clear: if you violate it, the
reader will lose valuable time trying to figure out on his own what
you were going to explain to him anyway.
\emph{Useful phrases:} `Next we argue that \ldots', `As we shall see,
\ldots', `We will see in the next section that \ldots, etc.
\section{A few important grammar rules}
\begin{Rule}
\label{rule:no-comma-before-that}
There is (almost) \emph{never} a comma before `that'.
\end{Rule}
It's really that simple. Examples:
\begin{quote}
We assume that \ldots\\
\emph{Wir nehmen an, dass \ldots}
It follows that \ldots\\
\emph{Daraus folgt, dass \ldots}
`thrice' is a word that is seldom used.\\
\emph{`thrice' ist ein Wort, das selten verwendet wird.}
\end{quote}
Exceptions to this rule are rare and usually pretty obvious. For
example, you may end up with a comma before `that' because `i.e.' is
spelled out as `that is':
\begin{quote}
For \(p(n)=\log n/n\) we have \ldots{} However, if we choose \(p\) a
little bit higher, that is \(p(n)=(1+\varepsilon)\log n/n\) for some
\(\varepsilon>0\), we obtain that\ldots
\end{quote}
Or you may get a comma before `that' because there is some additional
information inserted in the middle of your sentence:
\begin{quote}
Thus we found a number, namely \(n_0\), that satisfies equation (13).
\end{quote}
If the additional information is left out, the sentence has no comma:
\begin{quote}
Thus we found a number that satisfies equation (13).
\end{quote}
(For `that' as a relative pronoun, see also
Rules~\ref{rule:non-defining-has-comma}
and~\ref{rule:defining-without-comma} below.)
\begin{Rule}
There is usually no comma before `if'.
\end{Rule}
Example:
\begin{quote}
A graph is not \(3\)-colorable if it contains a \(4\)-clique.\\
\emph{Ein Graph ist nicht \(3\)-färbbar, wenn er eine \(4\)-Clique
enthält.}
\end{quote}
However, if the `if' clause comes first, it is usually separated from
the main clause by a comma:
\begin{quote}
If a graph contains a \(4\)-clique, it is not \(3\)-colorable .\\
\emph{Wenn ein Graph eine \(4\)-Clique enthält, ist er nicht
\(3\)-färbbar.}
\end{quote}
There are more exceptions to these rules than to
Rule~\ref{rule:no-comma-before-that}, which is why we are not
discussing them here. Just keep in mind: don't put a comma before `if'
without good reason.
\begin{Rule}
\label{rule:non-defining-has-comma}
Non-defining relative clauses have commas.
\end{Rule}
\begin{Rule}
\label{rule:defining-without-comma}
Defining relative clauses have no commas.
\end{Rule}
In English, it is very important to distinguish between two types of
relative clauses: defining and non-defining ones. This is a
distinction you absolutely need to understand to write scientific
texts, because mistakes in this area actually distort the meaning of
your text!
It's probably easier to explain first what a \emph{non-defining}
relative clause is. A non-defining relative clauses simply gives
additional information \emph{that could also be left out} (or given in
a separate sentence). For example, the sentence
\begin{quote}
The \textsc{WeirdSort} algorithm, which was found by the famous
mathematician John Doe, is theoretically best possible but difficult
to implement in practice.
\end{quote}
would be fully understandable if the relative clause were left out
completely. It could also be rephrased as two separate sentences:
\begin{quote}
The \textsc{WeirdSort} algorithm is theoretically best possible but
difficult to implement in practice. [By the way,] \textsc{WeirdSort}
was found by the famous mathematician John Doe.
\end{quote}
This is what a non-defining relative clause is. \emph{Non-defining
relative clauses are always written with commas.} As a corollary we