-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathuiofysmaster.cls
180 lines (167 loc) · 4.98 KB
/
uiofysmaster.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
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% UiO Physics Master Thesis Template
%
% Created by Milad Hobbi Mobarhan, Sigve Bøe Skattum and Svenn-Arne Dragly
% Some parts are inspired by a template from www.latextemplates.com, originally created by
% Steve R. Gunn, modified by Sunil Patel: www.sunilpatel.co.uk
%
% Licensed as CC Attribution-SA (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesClass{uiofysmaster}
[2012/08/22 v1.0
LaTeX document class]
\def\baseclass{book}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
\def\@checkoptions#1#2{
\edef\@curroptions{\@ptionlist{\@currname.\@currext}}
\@tempswafalse
\@tfor\@this:=#2\do{
\@expandtwoargs\in@{,\@this,}{,\@curroptions,}
\ifin@ \@tempswatrue \@break@tfor \fi}
\let\@this\@empty
\if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
}
\@checkoptions{12pt}{{10pt}{11pt}{12pt}}
\PassOptionsToClass{a4paper}{\baseclass}
\ProcessOptions\relax
\LoadClass{\baseclass}
\input{packages.tex}
\def\degreename{Master of Science}
\newcommand*{\degree}[1]{\def\degreename{#1}}
\def\degreenameno{Master i Fysikk}
\newcommand*{\degreeno}[1]{\def\degreenameno{#1}}
\def\universityname{University of Oslo}
\newcommand*{\university}[1]{\def\universityname{#1}}
\def\universitynameno{Universitetet i Oslo}
\newcommand*{\universityno}[1]{\def\universitynameno{#1}}
\def\facultyname{Faculty of Mathematics and Natural Sciences}
\newcommand*{\faculty}[1]{\def\facultyname{#1}}
\def\facultynameno{Det matematisk- naturvitenskapelige fakultet}
\newcommand*{\facultyno}[1]{\def\facultynameno{#1}}
%---------------------------------------
% USEFUL COMMANDS
%---------------------------------------
\newtheoremstyle{uiotheoremstyle} % name
{\topsep} % Space above
{\topsep} % Space below
{\itshape} % Body font
{} % Indent amount
{\scshape} % Theorem head font
{.} % Punctuation after theorem head
{.5em} % Space after theorem head
{} % Theorem head spec (can be left empty, meaning ‘normal’)
\theoremstyle{uiotheoremstyle}
\newtheorem{theorem}{Theorem}
\renewenvironment{proof}{\noindent{\scshape Proof}.}{\qed}
\input{commands}
% Page style commands
\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{%
\clearpage
{\pagestyle{empty}\origdoublepage}%
}
%----------------------------------------------------------------------------------------
% ABSTRACT PAGE DESIGN
%----------------------------------------------------------------------------------------
\newenvironment{abstract}
{
\thispagestyle{empty}
\begin{center}
{\huge{\textbf{Abstract}} \par}
\end{center}
}
{
\vfil\vfil\vfil\null
\thispagestyle{empty}
\clearemptydoublepage
}
%----------------------------------------------------------------------------------------
% DEDICATION PAGE DESIGN
%----------------------------------------------------------------------------------------
\newenvironment{dedication}
{
\thispagestyle{empty}
\begin{center}
}
{
\end{center}
\vfil\vfil\vfil\null
\thispagestyle{empty}
\clearemptydoublepage
}
%----------------------------------------------------------------------------------------
% ACKNOWLEDGEMENTS PAGE DESIGN
%----------------------------------------------------------------------------------------
\newenvironment{acknowledgements}
{
\thispagestyle{empty}
\begin{center}
{\huge{\textbf{Acknowledgements}} \par}
\end{center}
}
{
\vfil\vfil\vfil\null
\thispagestyle{empty}
\clearemptydoublepage
}
%----------------------------------------------------------------------------------------
% FRONT PAGE DESIGN
%----------------------------------------------------------------------------------------
\RequirePackage{iftex}
\RequirePackage{graphicx}
\renewcommand{\maketitle}{
\newgeometry{margin=3cm}
\pagenumbering{roman}
\thispagestyle{empty}
\begin{center} % Sentrerer teksten
% Tittel
\ \\
\vspace{10mm}
\LARGE
\textsc{\@title} \\
\small
\vspace{10mm}
{by} \\
\vspace{5mm}
% Forfatter
\large
{\@author} \\
\vspace{25mm}
\Large
{\textsc{Thesis}} \\
{\small for the degree of} \\
\vspace{2mm}
{\textsc{\degreename}} \\
\vspace{15mm}
\centerline{\includegraphics[width=5cm,height=5cm]{figures/apollonseglet/Apollonseglet/UiO_Segl_cmyk.pdf}}
\vspace{15mm}
\large
\facultyname \\
\universityname \\
\vspace{5mm}
\normalsize
\@date \\
\vspace{4mm}
\normalsize
\end{center}
\clearemptydoublepage
\restoregeometry
}
\makeatletter
\def\pagenumberingnoreset#1{%
\gdef\thepage{\csname @#1\endcsname \c@page}}
\makeatother
\let\oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{
{
\pagenumberingnoreset{roman}
\pagestyle{tableofcontents}
\pagenumbering{gobble}
\oldtableofcontents
\cleardoublepage
}
\pagenumbering{arabic}
}