-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathUSN-BSc.cls
158 lines (138 loc) · 3.93 KB
/
USN-BSc.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% USN-BSc.cls %%
%% LaTeX-class for writing theses %%
%% %%
%% (c) Dietmar Winkler (me.dwe.no) %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ---Identification----
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{USN-BSc}[2019/12/09 Template class for BSc reports and theses]
% --- definitions of options ---
% All other options are passed on to the book class
\DeclareOption*{%
\typeout{Option \CurrentOption\space is passed to package USN-base!}
\PassOptionsToClass{\CurrentOption}{USN-base}
}%
% --- execution of options ---
\ProcessOptions* %% process the options in calling order
% --- load other classes
\LoadClass{USN-base} %% we reuse the USN-base class
% --- useful commands
\newcommand*{\USNpreface}{\if@norsk Forord\else Preface\fi}
\newcommand{\mysubject}[1]{%
\if@norsk%
{Rapport fra #1\@. semesters prosjekt \the\year}
\else%
{Report from \nth{#1} semester project \the\year}
\fi%
}
\newcommand{\USNtitlepage}[8]{%
% #1 subject
% #2 optional figure
% #3 date
% #4 authors
% #5 Project partner
% #6 Norwegian Summary
% #7 English Summary
\subject{\mysubtitle}
\title{\mytitle}
\subtitle{#2}
\author{\myauthor}
\date{#3}
% --- pdf document settings ---
\hypersetup{%
pdftitle = {\mytitle},%
pdfsubject = {\mysubject{#1}},%
pdfauthor = {#4}
}%
\pdfbookmark[0]{\@title}{title} %% set the correct PDF bookmark
\maketitle%
%
\cleardoubleemptypage %% fillpage without page number
%
%% --- summary page ---
\if@summary%
{
% --- norwegian summary page ---
\thispagestyle{sammendrag}
\setlength{\footheight}{52pt}
\label{Sammendrag}\pdfbookmark[1]{Sammendrag}{Sammendrag}
\USNtitlehead%
\par\bigskip
%{\large \textbf{\mysubject{#1}}}
\begin{tabbing}
\textbf{Emne:~} \= \textit{\mysubtitle} \\
\textbf{Tittel:~} \> \begin{minipage}[t]{0.8\textwidth}
\textit{\mytitle}\end{minipage}
\end{tabbing}
%
Denne rapporten utgjør en del av vurderingsgrunnlaget i emnet.
\textbf{Prosjektgruppe:~} \textit{\myauthor}
\begin{tabbing}
\textbf{Gruppedeltakere:~} \=
\begin{minipage}[t]{0.5\textwidth}
\textit{#4}
\end{minipage}\\
~\\
\textbf{Veileder:~} \> \textit{\supervisor} \\
% \textbf{Sensor:~} \> \textit{\examiner}\\
\textbf{Prosjektpartner:~} \>\begin{minipage}[t]{0.7\textwidth}
\textit{#5}\end{minipage}
\end{tabbing}
% \begin{tabular}{lp{20em}}
% \textbf{Godkjent for arkivering: } & \hrulefill\\
% & (\supervisor)
% \end{tabular}
\begin{framed}
\textbf{Sammendrag:}\\
{\small #6}
\end{framed}
%
\cleardoubleemptypage %% fillpage without page number
% --- english abstract page ---
\thispagestyle{summary}
\setlength{\footheight}{52pt}
\label{Summary}\pdfbookmark[1]{Summary}{Summary}
\if@norsk{%
\@norskfalse % make sure to use the english versions
\USNtitlehead%
\par\bigskip
% {\large \textbf{\mysubject{#1}}}
\@norsktrue % back to norsk
}
\else%
\USNtitlehead%
\par\bigskip
%{\large \textbf{\mysubject{#1}}}
\fi%
\begin{tabbing}
\textbf{Course:~} \= \textit{\mysubtitle} \\
\textbf{Title:~} \> \begin{minipage}[t]{0.8\textwidth}
\textit{\mytitle}\end{minipage}
\end{tabbing}
This report forms part of the basis for assessing the student's performance on the course.
\textbf{Project group:} \textit{\myauthor}
\begin{tabbing}
\textbf{Group participants:~} \=
\begin{minipage}[t]{0.5\textwidth}
\textit{#4}
\end{minipage}\\
~\\
\textbf{Supervisor:~} \> \textit{\supervisor} \\
\textbf{Project partner:~} \> \textit{#5}
\end{tabbing}
% \begin{tabular}{lp{20em}}
% \textbf{Approved for archiving: } & \hrulefill\\
% & (\supervisor)
% \end{tabular}
\begin{framed}
\textbf{Summary:}\\
{\small #7}
\end{framed}
%
\cleardoubleemptypage %% fillpage without page number
}
\else
{}
\fi % end if@summary
}