forked from software-engineering-amsterdam/latex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuvamscse.cls
146 lines (131 loc) · 4.79 KB
/
uvamscse.cls
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
% Made by Dr. Vadim Zaytsev aka @grammarware
\NeedsTeXFormat{LaTeX2e}
% 2014/03/25 UvA MSc SE document class v1.0
% 2014/04/09 UvA MSc SE document class v1.01 - bugfix
\ProvidesClass{uvamscse}[2014/04/09 UvA MSc SE document class v1.01]
\LoadClass[a4paper,10pt,oneside]{report}
\setlength{\textwidth}{440pt}
\setlength{\textheight}{660pt}
\setlength{\oddsidemargin}{10pt}
\setlength{\topmargin}{-10pt}
\setlength{\parindent}{1em}
\setlength{\parskip}{0pt}
\addtolength{\fboxsep}{1pt}
% \renewcommand{\chapter}[1]{\newpage{\large\bfseries \thechapter. #1}}
\newcommand{\chapterautorefname}{\S}
\newcommand{\sectionautorefname}{\S}
\newcommand{\subsectionautorefname}{\S}
\newcommand{\subsubsectionautorefname}{\S}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{titlesec}
\usepackage{wrapfig}
\usepackage{array}
\usepackage{multirow}
\graphicspath{ {figures/} }
\usepackage{tocloft}
\usepackage{boxedminipage}
\usepackage{float}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amscd}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage{multirow}
\usepackage[unicode,bookmarks=false,pdfstartview={FitW},colorlinks,linkcolor=blue,urlcolor=blue,citecolor=blue]{hyperref}
\newcommand{\email}[1]{\href{mailto:#1}{#1}}
\newcommand{\doi}[1]{\texttt{\href{http://dx.doi.org/#1}{doi:#1}}}
\newcommand{\uvahost}{University of Amsterdam}
\newcommand{\host}[1]{\renewcommand{\uvahost}{#1}}
\newcommand{\uvatitle}{Cool Story Bro. Name It with \texttt{$\backslash$title} and \texttt{$\backslash$subtitle}}
\renewcommand{\title}[1]{\renewcommand{\uvatitle}{#1}\hypersetup{pdftitle={#1}}}
\newcommand{\uvasubtitle}{}
\newcommand{\subtitle}[1]{\renewcommand{\uvasubtitle}{{\LARGE\bfseries #1\par}}}
\newcommand{\uvaauthor}{Y U NO USE \texttt{$\backslash$author}?}
\renewcommand{\author}[1]{\renewcommand{\uvaauthor}{#1}\setcounter{page}{0}\hypersetup{pdfauthor={#1}}}
% \newcommand{\autref}[1]{\if\thepage0\else\hyperlink{aut#1}{$^#1$}\fi}
% \newcommand{\sponsor}[1]{\if\thepage0\else\footnote{#1}\fi}
\newcommand{\uvadate}{\today}
\renewcommand{\date}[1]{\renewcommand{\uvadate}{#1}}
\newcommand{\uvaemail}{}
\newcommand{\authemail}[1]{\renewcommand{\uvaemail}{{\ttfamily\email{#1}}\par}}
\newcommand{\uvasuper}{Vadim Zaytsev}
\newcommand{\supervisor}[1]{\renewcommand{\uvasuper}{#1}}
\newcommand{\uvapic}{}
\newcommand{\coverpic}[2][.9\textwidth]{\renewcommand{\uvapic}{\centerline{\includegraphics[width=#1]{#2}}}}
\newcommand{\uvaabstract}{}
\renewcommand{\abstract}[2][Abstract]{\renewcommand{\uvaabstract}{\chapter*{#1}\addcontentsline{toc}{chapter}{#1}%
\par#2\newpage}}
%% Listing environment
\newcommand{\listofsourcecodename}{List of Listings}
\newlistof{sourcecode}{lol}{\listofsourcecodename}
\floatstyle{boxed}
\newfloat{sourcecode}{thp}{lol}[chapter]
\restylefloat*{sourcecode}
\floatname{sourcecode}{Listing}
\renewcommand{\theHsourcecode}{src:\arabic{sourcecode}}
\newcommand{\sourcecodeautorefname}{Listing}
\renewcommand{\thesourcecode}{\thechapter.\arabic{sourcecode}}
%% end of Listing environment
%% Listing environment
\newenvironment{snippet}{\vspace{2pt}\noindent\begin{boxedminipage}{\textwidth}\footnotesize\ttfamily}{\end{boxedminipage}\vspace{2pt}}
\newenvironment{graybox}{%
\begin{lrbox}{\@tempboxa}\begin{minipage}{0.92\columnwidth}\footnotesize}{\end{minipage}\end{lrbox}%
\colorbox[gray]{0.92}{\usebox{\@tempboxa}}
}
%% end of Listing environment
\newcommand{\uvacoverfoot}{%
\vfill
\begin{center}
\begin{tabular}{r|l}
\multirow{3}{*}{\includegraphics[height=48pt]{uva.pdf}}
&\textsc{\Large Universiteit van Amsterdam}\\
&\textsc{Faculteit der Natuurwetenschappen, Wiskunde en Informatica}\\
&\textsc{Master Software Engineering}\\
&\url{http://www.software-engineering-amsterdam.nl}
% Supervisor: Prof Dr P. Klint
\end{tabular}
\end{center}
}
\renewcommand{\maketitle}{%
% The cover page
% --------------
\thispagestyle{empty}
\enlargethispage{30pt}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
% Will be page 0, s.t. contents start on page 1
\setcounter{page}{0}
% \eccoverhead
% Volume and article title, author(s)
\vspace{60pt}
\begin{center}
{\Huge\bfseries\uvatitle\par}
\uvasubtitle
\vspace{22pt}
\uvapic
\vspace{22pt}
{\Large\bfseries\uvaauthor\par}
\uvaemail
\vspace{11pt}
\uvadate, \pageref*{lastpage} pages
\end{center}
\vfill
\begin{tabular}{ll}
\textbf{Supervisor:} & \uvasuper\\
\textbf{Host organisation:} & \uvahost
\end{tabular}
\uvacoverfoot
\newpage
\tableofcontents
\newpage
\uvaabstract
\global\@topnum\z@ % To prevent floats above the title
\setcounter{footnote}{0}
\renewcommand{\thefootnote}{\arabic{footnote}}
\setlength{\parskip}{0pt}
}
\AtEndDocument{%
\clearpage%
\addtocounter{page}{-1}%
\immediate\write\@auxout{\string
\newlabel{lastpage}{{}{\thepage}{}{}}}%
\addtocounter{page}{1}}