This repository has been archived by the owner on Jun 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththesis.latex
198 lines (160 loc) · 4.93 KB
/
thesis.latex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
% A thesis template based on
% https://github.com/jgm/pandoc/blob/101aece6cc03eb8dc434f2ff23bd4d66198fb592/data/templates/default.latex
%
% Written by Sebastian Höffner <[email protected]>
%
\documentclass[a4paper,twoside,openright]{report}%{scrreprt}
\usepackage{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections,calc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{xintexpr}
\usepackage{dblfnote}
\newcommand{\widefn}{\begingroup\setlength{\DFNcolumnwidth}{\textwidth}\DFNinhibitcbreak}
\newcommand{\stopwidefn}{\DFNallowcbreak\endgroup}
$if(geometry)$
\PassOptionsToPackage{$for(geometry)$$geometry$$sep$,$endfor$}{geometry}
$endif$
\usepackage{thesistitlepage}
\usepackage{amssymb,amsmath}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{nowidow}
\usepackage{xcolor}
\usepackage{pgfplots}
$if(graphics)$
\usepackage[$if(draft)$draft$endif$]{graphicx}
\usepackage{grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
$endif$
$if(appendix)$
\usepackage[toc,page]{appendix}
\newif\ifappendixused
\let\oldAppendix\appendix
\renewcommand{\appendix}{%
\oldAppendix
\appendixusedtrue\cleardoublepage\pagenumbering{Roman}\begin{appendices}\sloppy}
$endif$
\makeatletter
\def\fps@figure{htbp}
\makeatother
% tightlist and lengths taken from default.latex
\setlength{\parindent}{0pt}
\setlength{\parskip}{7pt}
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\PassOptionsToPackage{hyphens}{url}
\usepackage[unicode=true]{hyperref}
\hypersetup{
breaklinks=true,
$if(draft)$$else$pdfborder={0 0 0}$endif$}
\urlstyle{same} % don't use monospace font for urls
\usepackage{cleveref}
% Push links to footnotes, but keep links created in footnotes there (putting them between parentheses).
\newif\ifinfootnote
\let\oldFootnote\footnote
\renewcommand{\footnote}[1]{\oldFootnote{\infootnotetrue{}#1\infootnotefalse{}}}
\DeclareRobustCommand{\href}[2]{\ifinfootnote{}\raggedright\sloppy#2 (\url{#1})\fussy\else{}#2\footnote{\url{#1}}\fi}
% Allow for line breaks after an _ in \texttt.
\usepackage[htt]{hyphenat}
% Awesome! Redefining \BreakableUnderscore from
% http://ctan.math.illinois.edu/macros/latex/contrib/hyphenat/hyphenat.pdf
% allows to disable the hyphen after a line break following an underscore.
\makeatletter
\renewcommand{\BreakableUnderscore}{\leavevmode%
\prw@zbreak\textunderscore\discretionary{}{}{}\prw@zbreak}
\makeatother
$if(glossary)$
\usepackage[nonumberlist,acronyms,toc,nomain,nogroupskip]{glossaries}
%\setglossarystyle{index}
\setacronymstyle{long-short}
\input{$glossary$}
\makeglossaries
$endif$
$if(highlighting-macros)$
$highlighting-macros$
$endif$
$for(header-includes)$
$header-includes$
$endfor$
\author{$author$}
\title{$title$}
\institute{$institute$}
\workgroup{$workgroup$}
\city{$city$}
\date{$date$}
\firstSupervisor{$firstSupervisor$}
\secondSupervisor{$secondSupervisor$}
% Copy abstract for acknowledgements
\let\acknowledgements\abstract
\let\endacknowledgements\endabstract
\let\oldAck\acknowledgements
\renewcommand{\acknowledgements}{%
{\renewcommand{\abstractname}{Acknowledgements}\oldAck{}}}
$for(header-files)$
\input{$header-files$}
$endfor$
\begin{document}
\frenchspacing
$if(draft)$
$else$
\maketitle
$if(abstract)$
\begin{abstract}
\input{$abstract$}
\end{abstract}
$endif$
$if(acknowledgements)$
\begin{acknowledgements}
\input{$acknowledgements$}
\vspace*{1cm}\raggedleft\makeatletter\@author\makeatother
\end{acknowledgements}
$endif$
$if(toc)$
\tableofcontents
$endif$
$if(lot)$
\listoftables
\addcontentsline{toc}{chapter}{\listtablename}
$endif$
$if(lof)$
\listoffigures
\addcontentsline{toc}{chapter}{\listfigurename}
$endif$
$if(loc)$
\ifdefined\listofcodelistings
\listofcodelistings
\addcontentsline{toc}{chapter}{\listcodelistingname}
\fi
$endif$
$if(glossary)$
$if(loa)$
\begingroup \setlength{\baselineskip}{0.2cm}
\printglossary[type=\acronymtype,title={List of Abbreviations and Acronyms}]
\endgroup
$endif$
$endif$
$endif$
$body$
$if(draft)$
$else$
\declarationofauthorship
$if(appendix)$
\ifappendixused
\fussy
\end{appendices}
\fi
$endif$
$endif$
\end{document}