-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththesisconfig.tex
246 lines (224 loc) · 8.23 KB
/
thesisconfig.tex
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
% This is the file where all your settings, packages, newcommands, ... should go
\PassOptionsToPackage{T1}{fontenc}
\usepackage{fontenc}
% Configure classicthesis for your needs here.
% (see ClassicThesis.pdf for more information)
\PassOptionsToPackage{
drafting=false, % print version information on the bottom of the pages
tocaligned=false, % the left column of the toc will be aligned (no indentation)
dottedtoc=true, % page numbers in ToC flushed right
eulerchapternumbers=true, % use AMS Euler for chapter font (otherwise Palatino)
linedheaders=false, % chaper headers will have line above and beneath
floatperchapter=true, % numbering per chapter for all floats (i.e., Figure 1.1)
eulermath=false, % use awesome Euler fonts for mathematical formulae (only with pdfLaTeX)
beramono=true, % toggle a nice monospaced font (w/ bold)
palatino=false, % deactivate standard font for loading another one, see the last section at the end of this file for suggestions
parts=false,
style=classicthesis
}{classicthesis}
\input{versionData}
% Load all the packages you want here
% Probably you will need the following
\PassOptionsToPackage{english}{babel}
\usepackage{fontsetup}
\usepackage{babel} % language support
\usepackage{enumitem} % for better itemize and enumerate
\usepackage{mathtools,amsthm,amssymb} % because math
\usepackage{mleftright}
\usepackage{etoolbox}
\usepackage{thmtools} % for correct autorefs
\usepackage[onehalfspacing]{setspace} % as required by SGS
\usepackage{graphicx} % to include graphics
\usepackage{xspace} % to get the spacing after macros right
\usepackage{calc} % to allow adding lengths
\usepackage{multicol}
\usepackage{ulem}
\usepackage{stmaryrd}
\usepackage{acronym}
\usepackage{newunicodechar}
\usepackage{ltablex}
\usepackage{ragged2e}
\usepackage{pdflscape}
\usepackage{caption}
\usepackage{subcaption}
% Footnote customization; it is now easier to distinguish superscripts from
% footnotes.
\renewcommand{\thefootnote}{\dag\arabic{footnote}}
\input{macros}
% Her Majesty herself
\usepackage{classicthesis}
\usepackage[langlinenos=true]{minted}
\usepackage[most, minted]{tcolorbox}
\setminted{breaklines=true,linenos=true}
\usepackage{xpatch}
\makeatletter
\ifminted@draft
\xpatchcmd\inputminted
{\VerbatimInput{#3}}
{\minted@langlinenoson
\VerbatimInput{#3}%
\minted@langlinenosoff}
{}{\PatchFailed}
\else
\xpatchcmd\inputminted
{\minted@pygmentize[#3]{#2}}
{\minted@langlinenoson
\minted@pygmentize[#3]{#2}%
\minted@langlinenosoff}
{}{\PatchFailed}
\fi
\makeatother
\newtcblisting{code}{%
listing engine=minted,
minted language=haskell,
listing only,
breakable,
enhanced,
minted options = {
breaklines=true,
breakbefore=.,
fontsize=\footnotesize,
numbersep=1mm,
linenos=true,
langlinenos=true,
firstnumber=last
},
overlay={%
\begin{tcbclipinterior}
\fill[gray!25] (frame.south west) rectangle ([xshift=5mm]frame.north west);
\end{tcbclipinterior}
}
}
\newtcblisting{mathematica}{%
listing engine=minted,
minted language=mathematica,
listing only,
breakable,
enhanced,
minted options = {
breaklines=true,
breakbefore=.,
fontsize=\footnotesize,
numbersep=1mm,
langlinenos=true,
firstnumber=last
},
overlay={%
\begin{tcbclipinterior}
\fill[gray!25] (frame.south west) rectangle ([xshift=5mm]frame.north west);
\end{tcbclipinterior}
}
}
\setminted[mathematica]{firstnumber=last}
\usemintedstyle[wolfram]{mathematica}
\newminted[spec]{haskell}{}
\newmintinline[hs]{haskell}{}
\newmintinline[mma]{mathematica}{}
% Disable fcolorbox.
\makeatletter
\AtBeginEnvironment{minted}{\dontdofcolorbox}
\def\dontdofcolorbox{\renewcommand\fcolorbox[4][]{##4}}
\xpatchcmd{\inputminted}{\minted@fvset}{\minted@fvset\dontdofcolorbox}{}{}
\makeatother
% Fine-tune hyperreferences (hyperref should be called last)
\iftoggle{paper}{%
\hypersetup{colorlinks=false, linktocpage=false, pdfborder={0 0 0}}
}{%
\hypersetup{colorlinks=true, linktocpage=true}
}
\hypersetup{%
%draft, % hyperref's draft mode, for printing see below
pdfstartpage=3, pdfstartview=FitV,%
%pdfstartpage=3, pdfstartview=FitV,
breaklinks=true, pageanchor=true,%
pdfpagemode=UseNone, %
% pdfpagemode=UseOutlines,%
plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,%
hypertexnames=true, pdfhighlight=/O,%nesting=true,%frenchlinks,%
urlcolor=CTurl, linkcolor=CTlink, citecolor=CTcitation, %pagecolor=RoyalBlue,%
%urlcolor=Black, linkcolor=Black, citecolor=Black, %pagecolor=Black,%
pdftitle={\myTitle},%
pdfauthor={\textcopyright\ \myName, \myDepartment, \myUni},%
pdfsubject={},%
pdfkeywords={},%
pdfcreator={pdfLaTeX},%
pdfproducer={LaTeX with hyperref and classicthesis}%
}
\usepackage[noabbrev]{cleveref}
% Setup autoreferences (hyperref and babel)
% In the document, don't use \ref{...}
% Instead, use \autoref{...}
% That changes the reference from "3.1" to "Definition 3.1"
\makeatletter
\@ifpackageloaded{babel}%
{%
\addto\extrasenglish{%
\renewcommand*{\figureautorefname}{Figure}%
\renewcommand*{\tableautorefname}{Table}%
\renewcommand*{\partautorefname}{Part}%
\renewcommand*{\chapterautorefname}{Chapter}%
\renewcommand*{\sectionautorefname}{Section}%
\renewcommand*{\subsectionautorefname}{Section}%
\renewcommand*{\subsubsectionautorefname}{Section}%
\renewcommand*{\theoremautorefname}{Theorem}%
\renewcommand*{\lemmaautorefname}{Lemma}%
\renewcommand*{\conjectureautorefname}{Conjecture}%
\renewcommand*{\corollaryautorefname}{Corollary}%
\renewcommand*{\definitionautorefname}{Definition}%
\renewcommand*{\methodautorefname}{Method}%
\renewcommand*{\factautorefname}{Fact}%
\renewcommand*{\problemautorefname}{Problem}%
\renewcommand*{\questionautorefname}{Question}%
\renewcommand*{\exampleautorefname}{Example}%
\renewcommand*{\remarkautorefname}{Remark}%
}%
}{\relax}
\makeatother
% This changes the regular classicthesis chapter header to one that is a bit larger and uses red as a colour
\makeatletter
\ifthenelse{\boolean{ct@linedheaders}}%
{% lines above and below, number right
\titleformat{\chapter}[display]%
{\relax}{\raggedleft{\color{CTsemi}\chapterNumber\thechapter} \\ }{0pt}%
{\titlerule\vspace*{.9\baselineskip}\raggedright\Large\color{CTtitle}\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
}{% something like Bringhurst
\titleformat{\chapter}[display]%
{\relax}{\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{CTsemi}\chapterNumber\thechapter}}{0pt}%
{\raggedright\huge\color{CTtitle}\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
}
\makeatother
% Load tikz-cd after chapter title redefinition.
\usepackage{tikz-cd}
\usepackage{csquotes}
% Add any other environments you might need here
% Note: You should also add any new environments to the autorefnames above
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{method}[theorem]{Method}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{question}[theorem]{Question}
\newtheorem{example}[theorem]{Example}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
% Better spacing than regular itemize
\newenvironment{itemize*}
{\begin{itemize}[topsep=-\parskip+\jot,itemsep=-\parskip-\jot]}
{\end{itemize}}
% Better spacing than regular enumerate, (a), (b), ...
\newenvironment{enumerate*}
{\begin{enumerate}[label=(\alph*),topsep=-\parskip+\jot,itemsep=-\parskip-\jot]}
{\end{enumerate}}
% Better spacing than regular enumerate, (i), (ii), ...
\newenvironment{enumerate**}
{\begin{enumerate}[label=(\roman*),topsep=-\parskip+\jot,itemsep=-\parskip-\jot]}
{\end{enumerate}}
% Better spacing than regular enumerate, (a'), (b'), ...
\newenvironment{enumerate***}
{\begin{enumerate}[label=(\alph*'),topsep=-\parskip+\jot,itemsep=-\parskip-\jot]}
{\end{enumerate}}