This repository was archived by the owner on Apr 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings_utv2024_template.tex
211 lines (185 loc) · 6.38 KB
/
settings_utv2024_template.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Thesis Settings
%
% UTV Template
% 2024
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[left=1.5cm,right=1.5cm,top=1.5cm,bottom=2cm]{geometry}
\usepackage{fourier} % Utopia font-typesetting including mathematical formula compatible with newer TeX-Distributions (>2010)
% \usepackage{utopia} % On older systems -> use this package instead of fourier in combination with mathdesign for better looking results
% \usepackage[adobe-utopia]{mathdesign}
\usepackage{setspace}
\makeatletter
\setlength{\@fptop}{0pt} % For aligning all floating figures/tables etc. to the top margin
\makeatother
\usepackage{graphicx,xcolor}
\graphicspath{{images/}}
\usepackage{subfig}
\usepackage{booktabs}
\usepackage{lipsum}
\usepackage{microtype}
\usepackage{url}
\usepackage[final]{pdfpages}
\usepackage[shortlabels]{enumitem}
\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}
\usetikzlibrary{arrows.meta}
%%%%% PAGE HEADER %%%%
\usepackage{fancyhdr}
% 1) Define how LaTeX stores chapter and section info in the marks:
\renewcommand{\chaptermark}[1]{%
\markboth{\chaptername\ \thechapter\quad #1}{}%
}
\renewcommand{\sectionmark}[1]{%
\markright{\thesection\quad #1}%
}
% 2) Activate fancyhdr:
\pagestyle{fancy}
\fancyhf{} % clear all headers and footers
% 3) Rule widths:
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}
% 4) Define headers:
% EVEN (LEFT) PAGES
% Header: Chapter info on the left, nothing on the right
\fancyhead[LE]{\bfseries \nouppercase{\leftmark}}
\fancyhead[RE]{}
% Footer: Page number on the left, nothing on the right
\fancyfoot[LE]{\thepage}
\fancyfoot[RE]{}
% ODD (RIGHT) PAGES
% Header: Nothing on the left, section info on the right
\fancyhead[LO]{}
\fancyhead[RO]{\bfseries \nouppercase{\rightmark}}
% Footer: Nothing on the left, page number on the right
\fancyfoot[LO]{}
\fancyfoot[RO]{\thepage}
% 5) Redefine plain style for chapter start pages:
\fancypagestyle{plain}{%
\fancyhf{}%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
% Place page number at outer foot (left for even pages, right for odd pages)
\fancyfoot[LE,RO]{\thepage}%
}
\usepackage{listings}
% \lstset{language=[LaTeX]Tex,tabsize=4, basicstyle=\scriptsize\ttfamily, showstringspaces=false, numbers=left, numberstyle=\tiny, numbersep=10pt, breaklines=true, breakautoindent=true, breakindent=10pt}
\lstdefinestyle{oneside}{
basicstyle=\ttfamily\scriptsize,
breakatwhitespace=false,
tabsize=2,
showtabs=false,
showstringspaces=false,
showspaces=false,
numbers=left,
numberstyle=\tiny,
numbersep=5pt,
keepspaces=true,
captionpos=b,
frame=lines
}
\lstset{style=oneside}
\usepackage{hyperref}
\hypersetup{pdfborder={0 0 0},
colorlinks=true,
linkcolor=black,
citecolor=black,
urlcolor=black}
\urlstyle{same}
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother \clearpage{\pagestyle{plain}\cleardoublepage}
%%%%% CHAPTER HEADER %%%%
\usepackage[explicit]{titlesec}
\newcommand*\chapterlabel{}
%\renewcommand{\thechapter}{\Roman{chapter}}
\titleformat{\chapter}[display] % Type (section,chapter,etc...) to vary, shape (e.g. display-type)
{\normalfont\bfseries\huge} % Format of the chapter
{\gdef\chapterlabel{\thechapter\ }} % The label
{0pt} % Separation between label and chapter-title
{%
\begingroup
\microtypesetup{expansion=false, protrusion=false}%
\hyphenpenalty=10000
\exhyphenpenalty=10000
{\parskip=0pt
\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-8cm] at (current page.north west)
{%
\begin{tikzpicture}[remember picture, overlay]
\draw[fill=black] (0,0) rectangle(25mm,10mm);
\node[anchor=north east,yshift=-7.23cm,xshift=24mm,minimum height=30mm,inner sep=0mm] at (current page.north west)
{\parbox[top][30mm][t]{15mm}{\raggedleft $\phantom{\textrm{l}}$\color{white}\chapterlabel}}; % The black l is just to get better base-line alignment
\node[anchor=north west,yshift=-7.23cm,xshift=27mm,text width=\textwidth,minimum height=30mm,inner sep=0mm] at (current page.north west)
{\parbox[top][30mm][t]{\textwidth}{\color{black}#1}};
\end{tikzpicture}
};
\end{tikzpicture}
}
\gdef\chapterlabel{}
\endgroup
} % Code before the title body
\titlespacing*{\chapter}{0pt}{110pt}{40pt}
\titlespacing*{\section}{0pt}{12pt}{6pt}
\titlespacing*{\subsection}{0pt}{12pt}{6pt}
\titlespacing*{\subsubsection}{0pt}{12pt}{6pt}
\usepackage{array}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{float}
\floatstyle{ruled}
\restylefloat{algorithm}
\algrenewcommand\algorithmicrequire{\textbf{Input:}}
\algrenewcommand\algorithmicensure{\textbf{Output:}}
% Fix the problem with delimiter size caused by fourier and amsmath packages.
\makeatletter
\def\resetMathstrut@{%
\setbox\z@\hbox{%
\mathchardef\@tempa\mathcode`\(\relax
\def\@tempb##1"##2##3{\the\textfont"##3\char"}%
\expandafter\@tempb\meaning\@tempa \relax
}%
\ht\Mathstrutbox@1.2\ht\z@ \dp\Mathstrutbox@1.2\dp\z@
}
\makeatother
\usepackage{subfiles} % Compile sub-main files
\usepackage[capitalise,sort]{cleveref}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{assumption}[theorem]{Assumption}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{example}[theorem]{Example}
\crefname{theorem}{Theorem}{Theorems}
\crefname{assumption}{Assumption}{Assumptions}
\crefname{definition}{Definition}{Definitions}
\crefname{problem}{Problem}{Problems}
\crefname{lemma}{Lemma}{Lemmas}
\crefname{claim}{Claim}{Claims}
\crefname{remark}{Remark}{Remarks}
\crefname{corollary}{Corollary}{Corollaries}
\crefname{proposition}{Proposition}{Propositions}
\crefname{example}{Example}{Examples}
\crefname{algorithm}{Algorithm}{Algorithms}
\usepackage[labelfont=bf]{caption}
\usepackage{svg}