-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdikuReport.sty
executable file
·186 lines (156 loc) · 5.23 KB
/
dikuReport.sty
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Created by Michael Kirkedal Thomsen, [email protected]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%!TEX root = main.tex
\RequirePackage{eso-pic,graphicx,ifthen,array,multirow,calc,listings}
% Supervisor
\newcommand\supervisor[1]{\renewcommand\@supervisor{#1}}
\newcommand\@supervisor{\@latex@error{No \noexpand\supervisor given}\@ehc}
% Optional subject
%\newcommand\subject[1]{\renewcommand\@subject{#1}}
%\newcommand\@subject{\@latex@error{No \noexpand\subject given}\@ehc}
\newcommand\subject[1]{
\ifx\@subject\undefined
\newcommand\@subject{#1}
\else
\renewcommand\@subject{#1}
\fi}
% Thesis type
\newcommand\thesistype[1]{\renewcommand\@thesistype{#1}}
\newcommand\@thesistype{\@latex@error{No \noexpand\thesistype given}\@ehc}
% Thesis comment
\newcommand\thesiscomment[1]{\renewcommand\@thesiscomment{#1}}
\newcommand\@thesiscomment{\@latex@error{No \noexpand\thesiscomment given}\@ehc}
% Optional subtitle
\newcommand\subtitle[1]{
\ifx\@subtitle\undefined
\newcommand\@subtitle{#1}
\else
\renewcommand\@subtitle{#1}
\fi}
% Optional keywords
\providecommand{\keywords}[1]{\par\addvspace\baselineskip
\noindent{\textbf{Keywords:}}\enspace\ignorespaces#1}%
% ACM CCS Optional keywords
\providecommand{\ACMclass}[1]{\par\addvspace\baselineskip
\noindent{\textbf{Categories and Subject Descriptors:}}\enspace\ignorespaces#1}%
% Optional Danish abstract
\renewcommand{\abstractname}{\larger Abstract}
\newenvironment{resume}{\renewcommand{\abstractname}{\larger Dansk Resum\'e}\begin{abstract}}{\end{abstract}}
% MAKE TITLE PAGE
\renewcommand{\maketitle}{
\thispagestyle{empty}%
%
% INSERT BACKGROUND
%\AddToShipoutPicture*{\put(0,0){\includegraphics*[width=\paperwidth]{background}}}%
\AddToShipoutPicture*{\put(0,0){\includegraphics*[viewport=0 0 700 600]{inc/natbio-farve}}}
\AddToShipoutPicture*{\put(0,602){\includegraphics*[viewport=0 600 700 1600]{inc/natbio-farve}}}
\AddToShipoutPicture*{\put(0,0){\includegraphics*{inc/nat-en}}}
%
% INSERT TITLE
\ifx\@subtitle\undefined%
\AddToShipoutPicture*{\put(50,600){%
\begin{minipage}[t]{.83\paperwidth}%
{\textbf\LARGE PhD thesis}\vspace{12px}
{\Large\@author}\vspace{36px}
{\Huge\@title}\vspace{8px}
\end{minipage}%
}}%
\else%
\AddToShipoutPicture*{\put(50,600){%
\begin{minipage}[t]{.83\paperwidth}%
{\textbf{\LARGE \@thesistype}}\vspace{12px}
{\LARGE\@author}\vspace{36px}
{\Huge\@title}\vspace{8px}
{\LARGE\@subtitle}\vspace{8px}
\end{minipage}%
}}%
\fi%
%
% INSERT REPORT NUMBER AND IS NUMBER
\AddToShipoutPicture*{\put(50,100){\parbox{.83\paperwidth}{\large Academic advisor: \begin{tabular}[x]{@{}l@{}}\@supervisor\end{tabular}}}}%
\AddToShipoutPicture*{\put(50,80){\parbox{.83\paperwidth}{\large Submitted: \@date}}}%
%
% END PAGE
~
\pagestyle{empty}%
\cleardoublepage
\begin{titlingpage}
\begin{center}
~\\
\vspace{2cm}
\Huge\textbf\@title \\
\large~\\
\huge\@subtitle \\%
\vspace{2cm}
\LARGE\textbf\@author \\%
\Large DIKU, Department of Computer Science, \\
\Large University of Copenhagen, Denmark \\%
\vspace{1cm}
\@date \\
\vspace{6cm}
\textbf{\@thesistype}\\%
~\\
\emph{\@thesiscomment}%
\end{center}
\clearpage
\normalsize
%\pagestyle{plain}%
%\thispagestyle{plain}%
\noindent\begin{tabular}{p{.26\textwidth}p{.68\textwidth}}%
%Affiliation & The PhD School of Science, Faculty of Science, University of Copenhagen, Denmark \\%
%& \\%
Author: \vfill& \begin{tabular}[x]{@{}l@{}}\@author\end{tabular} \\%
& \\%
Affiliation: & DIKU, Department of Computer Science, \\&University of Copenhagen, Denmark \\%
& \\%
Title: & \@title~/~\@subtitle \\%
& \\%
Academic advisor: & \begin{tabular}[x]{@{}l@{}}\@supervisor\end{tabular} \\%
& \\%
Submitted: & \@date \\%
\end{tabular}%
~\\
~\\
~\\
~\\
\ifx\@subject\undefined
~
\else
\begin{center}\textbf{Short abstract}\end{center} %
\centering\parbox{.83\textwidth}{\@subject}
\fi
\end{titlingpage}
}
% NO RESETTING OF FOOTNOTES AT CHAPER CHANGE
\makeatletter\@removefromreset{footnote}{chapter}\makeatother
% Set the style of chapter heads
%\definecolor{TemplateColor}{rgb}{.75,.116,.60} % KU Red
\definecolor{TemplateColor}{rgb}{.2941,.4549,.2359} % KU green
\newcommand{\pnumb}[1]{
\begin{tikzpicture}
\draw[fill,color=gray] (0,0) rectangle (5mm,5mm);
\draw[color=white] (2.5mm,2.5mm) node { #1};
\end{tikzpicture}
}
\newcommand{\printchapternumm}{}
\makechapterstyle{combined}{
\setlength{\midchapskip}{-60pt}
\setlength{\afterchapskip}{2.5cm}
\renewcommand*{\printchaptername}{}
\renewcommand*{\chapnumfont}{\normalfont\bfseries\fontsize{45}{0}\selectfont}
\renewcommand*{\printchapternum}{\flushright\chapnumfont\textcolor{TemplateColor}{\thechapter}}
\renewcommand*{\chaptitlefont}{\normalfont\Huge\bfseries}
\renewcommand*{\printchaptertitle}[1]{%
\raggedright\chaptitlefont\parbox[t]{\textwidth-2cm}{\raggedright##1}}
}
% Only clearpage (not cleardoublepage) at new chapter.
\renewcommand{\clearforchapter}{\clearpage}
% Show subsections numbering and table of content
\setcounter{tocdepth}{2}
% Show subsubsections numbering, but table of content
\setcounter{secnumdepth}{3}
% Computer for Listings
\renewcommand\thelstnumber{\thesection.\arabic{lstlisting}}