-
Notifications
You must be signed in to change notification settings - Fork 1
/
report.sv.tex
222 lines (186 loc) · 6.41 KB
/
report.sv.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
212
213
214
215
216
217
218
219
220
221
222
% -------------------------------
% Latex report template.
% -------------------------------
\documentclass[10pt, titlepage, oneside, a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[swedish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{courier}
\usepackage{csquotes}
\usepackage{pgffor}
\usepackage{etoolbox}
\usepackage{biblatex}
\usepackage{hyperref} % import hyperref last
% -------------------------------
% Editable settings section.
% Example values follow the fields. Remove define to remove field in doc.
\def\school{SCHOOL} % "UMEÅ UNIVERSITY
\def\inst{INSTITUTION} % "Department of Computing Science"
\def\typeofdoc{TYPE} % "Report"
% \def\bibs{refs.bib} % Comma seperated list of biblatex resources.
\def\course{COURSENAME} % "Operating Systems"
\def\courselen{LENGTH} % "7.5 HP"
\def\courseid{COURSEID} % "5DV176"
\def\pretitle{PRETITLE} % "Assignment 1"
\def\doctitle{TITLE} % Syscall
\def\reportdate{\today} % "March 25, 2021"
% \def\version{VERSION} % "1.0"
\def\names{NAME1,NAME2} % Comma separated list of students
\def\emails{EMAIL1@DOMAIN.COM,EMAIL2@DOMAIN.COM} % Student emails, same order as names.
% \def\footernames{FNAME1, FNAME2} % Used in footer if defined, defaults to \names if not def.
\def\teacher{TEACHER NAME} % Course responsible
\def\assistants{TA1,TA2} % Comma separated list of TAs.
% \def\abst{ABSTRACT} % Entire abstract if needed.
% End editable settings section.
% -------------------------------
% Make all links black.
\hypersetup{colorlinks=true,allcolors=black}
% Set up lstlisting styles.
\lstset{basicstyle=\footnotesize\ttfamily,breaklines=true,frame=single}
% Count names and TAs.
\ifdefined\names
\newcounter{names}
\foreach \name in \names {\stepcounter{names}}
\fi
\ifdefined\assistants
\newcounter{tas}
\foreach \ta in \assistants {\stepcounter{tas}}
\fi
% Define footernames if not defined.
\ifx\footernames\undefined
\def\footernames{\names}
\fi
% Add bib resources.
\ifdefined\bibs
\foreach \bib in \bibs {\addbibresource{\bib}}
\fi
\begin{document}
\begin{titlepage}
\thispagestyle{empty}
\begin{center}
\begin{large}
\begin{tabular}{@{}p{\textwidth}@{}}
\textbf{\ifdefined\school \school\fi \hfill \ifdefined\reportdate \reportdate\fi} \\
\textbf{\ifdefined\inst \inst\fi \hfill \ifdefined\version \version\fi} \\
\ifdefined\typeofdoc \textbf{\typeofdoc} \\\fi
\end{tabular}
\end{large}
\end{center}
\vspace{2em}
\begin{center}
\ifdefined\courseid
\ifdefined\pretitle
\LARGE{\courseid \ - \pretitle} \\
\else
\LARGE{\courseid} \\
\fi
\else
\ifdefined\pretitle
\LARGE{\pretitle} \\
\fi
\fi
\ifdefined\course
\huge{\textbf{\course \ifdefined\courselen , \courselen \fi}} \\
\fi
\ifdefined\doctitle
\vspace{2em}
\LARGE{\doctitle} \\
\fi
\vspace{3em}
\begin{large}
\ifdefined\names
\ifnum\value{names}=1%
\begin{tabular}{ll}
\textbf{Namn} & \names \\
\\
\ifdefined\emails
\textbf{Epost} & \texttt{\emails} \\
\\
\fi
\end{tabular}
\else % More than one student.
\def\nametbl{}
\foreach \name [count=\nameidx] in \names {
\xappto\nametbl{& \name & }
\ifdefined\emails
\foreach \email [count=\emailidx] in \emails {
\ifnum\nameidx=\emailidx{}%
\xappto\nametbl{\email}
\fi
}
\fi
\xappto\nametbl{ \\ \\}
}
\begin{tabular}{lll}
\textbf{Namn} \nametbl
\end{tabular}
\fi
\fi
\end{large}
\ifdefined\abst
\vfill
\noindent\rule{\textwidth}{0.2pt}
\end{center}
\begin{large}
\textbf{Sammanfattning} \textit{\abst}
\end{large}
\begin{center}
\noindent\rule{\textwidth}{0.2pt}
\fi
\vfill
\ifdefined\teacher
\large{\textbf{Kursansvarig}} \\
\mbox{\large{\teacher}} \\
\fi
\ifdefined\assistants
\vspace{2em}
\large{\textbf{Handledare}} \\
\foreach \grader in \assistants
{
\mbox{\large{\grader}} \\
}
\fi
\end{center}
\end{titlepage}
\ifdefined\footernames \lfoot{\footnotesize{\footernames}}\fi
\ifdefined\reportdate \rfoot{\footnotesize{\reportdate}}\fi
\ifdefined\doctitle \lhead{\sc\footnotesize\doctitle}\fi
\rhead{\nouppercase{\sc\footnotesize\leftmark}}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.2pt}
\renewcommand{\footrulewidth}{0.2pt}
% Cover sheet
% Abstract
% Content
% Problem Specification
% Usage and user's guide
% Algorithm Description
% Systems Description
% Limitations on the Solution
% Problems and Reflections
% Test runs
% References
% Source Code
% Attachments
% \begin{figure}[H] %usepackage{float}
% \centering
% \fboxsep=0mm %padding thickness
% \fboxrule=2pt %border thickness
% \includegraphics[width=0.8\textwidth]{fig.png}
% \caption{Figure caption.}
% \label{fig:}
% \end{figure}
% \begin{lstlisting}[language=C]
% \end{lstlisting}
\pagenumbering{roman}
\tableofcontents
\setlength{\parindent}{0pt}
\setlength{\parskip}{10pt}
\newpage
\pagenumbering{arabic}
\normalsize
\section{Introduktion}
\end{document}