-
Notifications
You must be signed in to change notification settings - Fork 9
/
MasterThesis.tex
247 lines (213 loc) · 9.21 KB
/
MasterThesis.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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
% USE PDFLATEX WITH THIS DOCUMENT. If you wish to use ordinary latex (why?) then convert the figures in figures/ to eps.
% If you are using Chalmers linux system, you might need to change to a newer tex dist.
% Do so with: vcs-what latex
% look up the newest version and select it, a.t.m that would be: vcs-select -p texlive-20080816
% I recommend using kile in linux. Make it available by adding the unsup software
% echo unsup ~/.vcs4/pathsetup
\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[swedish]{babel}
%\usepackage[latin1]{inputenc} % Use the same as the encoding of the textfile
\usepackage[utf8]{inputenc} % But this is probably the best choice. This doument is currently in utf8 (so is all other files)
\usepackage{amsmath,amsfonts,amsthm,mathtools} % Math. Look up the amsmath manual (google) for many great examples.
\usepackage{graphicx,placeins,float} % Figures and placements, float must be loaded before hypperref
\usepackage[colorlinks,citecolor=blue]{hyperref} % Warning this package conflicts with the package algorithm
\usepackage{fancyhdr,url,tikz} % Other usefull stuff. tikz is good for making drawings (but difficult)
\usepackage{listings} % Source code
% \usepackage{a4wide} % Gives a wider page
\usepackage{mycommands} % Here you can define your personal favourites. See mycommands.cls
\usepackage{pgfplots} % Anoth nice library for plots
\usepackage{natbib} % ger Harvard-referenser
%mina andringar för att få riktiga paragrafer vid radbrytning
\setlength{\parskip}{12pt}
\setlength{\parindent}{0pt}
% mysubtitle, cover* and divisionnameB may be uncommented if nonexistant.
\newcommand{\mytitle}{Haskell in Javascript}
%\newcommand{\mysubtitle}{Some subtitle}
\newcommand{\writtenmonth}{May}
\newcommand{\writtenyear}{2010}
\newcommand{\authors}{Adam Bengtsson\\Mikael Bung\\Johan Gustavsson\\Mattis Jeppsson}
\newcommand{\authorsc}{Adam Bengtsson, Mikael Bung, Johan Gustavsson, Mattis Jeppsson} % again with comma
\newcommand{\YYYYNN}{2010:05}
%\newcommand{\ISSN}{1652-8557}
%\newcommand{\covercaption}{Haskell 98 implementerat i Javascript för att köras i en webbläsare}
% \newcommand{\coverfigure}{figures/COVER_93_iso.png}
\newcommand{\departmentname}{Computer Science and Engineering}
\newcommand{\divisionnameA}{Computer Engineering}
%\newcommand{\divisionnameB}{Fluid Mechanics}
% \newcommand{\nameofprinters}{Chalmers Reproservice}
\newcommand{\nameofprogramme}{Computer Science and Engineering Programme}
\newcommand{\keywords}{Javascript, Haskell, Parser, Interpreter, Type Checker}
% This is just to keep the swedish letters at one place in case there are problems with encoding
\newcommand{\city}{Göteborg}
\newcommand{\country}{Sweden}
\newcommand{\university}{Chalmers University of Technology}
\newcommand{\thesis}{Bachelor's thesis}
\newcommand{\telephone}{+ 46 (0)31-772 1000}
\newcommand{\postcode}{SE-412 96}
% End of input.
% Use section number first in numbering
\numberwithin{equation}{section}
\numberwithin{figure}{section}
\numberwithin{table}{section}
% Setting up the marginals a bit larger
%\textheight=730pt % default 609pt, ~710 if you dont use a4wide
%\headsep=0pt % default 25pt, since we have no headers in this document
%\headheight=0pt% 12 pt
%\voffset=-0.4in % default 0
% Set up headers to match styleguide
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhead{}
\fancyfoot{}
\fancyfoot[C]{\footnotesize \includegraphics[height=2.5mm]{figures/Logo.pdf}, \textit{\departmentname}, \thesis\ \YYYYNN}
\fancyfoot[RO,LE]{\thepage}
% To use code use \lstinputlisting[langauge=matlab,style=mystyle]{somematlabfile.m}
% Here is a suitable style for code.
%\lstset{language=Haskell}
%\lstset{keywordstyle=\color{blue}\textbf}
%\lstset{stringstyle=\color{red}}
\lstdefinestyle{mystyle}{showstringspaces=false, basicstyle=\scriptsize\ttfamily,
frame=shadowbox, breaklines=true, numbers=left, commentstyle=\color{gray},
keywordstyle=\color{blue}\textbf, stringstyle=\color{red}}
% Metadata ion the PDF file (makes it searchable)
\hypersetup{pdfauthor={\authorsc},pdftitle={\mytitle},pdfsubject={\thesis},pdfkeywords={\keywords}}
% The following part is automatically generated, go to document start
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-6.4cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
% First draw the grid and then the Logo and avancez logo.
\draw[clip] (0cm,6.4cm)--(\paperwidth,6.4cm)--(\paperwidth,0cm)--(0.725\paperwidth,0cm)
.. controls (0.703\paperwidth,0) and (0.703\paperwidth,0.8cm)..
(0.68\paperwidth,0.8cm)--(0cm,0.8cm)--cycle;
\draw[step=5mm,black] (0,0) grid (\paperwidth,6.4cm);
\node[anchor=west,xshift=2.05cm,yshift=3.27cm,rectangle]{\includegraphics[width=13.2cm]{figures/Logo.pdf}};
\node[anchor=west,xshift=15.65cm,yshift=3.3cm,rectangle]{\includegraphics[width=3.6cm]{figures/Avancez.pdf}};
\end{tikzpicture}};
\end{tikzpicture}
\ \vfill
\makeatletter\@ifundefined{coverfigure}{}{
\begin{center}
\includegraphics[width=\textwidth,height=0.4\paperheight,keepaspectratio]{\coverfigure}
\end{center}
}\makeatother
{\huge\noindent \mytitle\par} % title, 21
{\large\noindent \ \par} % subtitle, 16
%{\normalsize\noindent\textit{Master of Science Thesis}\par};
{\normalsize\noindent\textit{\thesis\ in \nameofprogramme}\par} % 14
\vskip 5mm
{\Large\noindent \uppercase\expandafter{\authors}\par}% 18
\vskip 6mm
{\small\noindent
Department of \departmentname\\
\textit{Division of \divisionnameA}
\makeatletter\@ifundefined{divisionnameB}{}{\textit{and Division of \divisionnameB}}\makeatother\\
\uppercase\expandafter{\university}\\
\city, \country\ \writtenyear\\
\thesis\ \YYYYNN\par}
\newpage
\thispagestyle{empty}
\mbox{}
\newpage
\thispagestyle{empty}
\begin{center}
{\uppercase\expandafter{\thesis}\ \YYYYNN\par}
\vskip 40mm
{\Large \mytitle\par}
\vskip 5mm
\makeatletter\@ifundefined{mysubtitle}{}{{\mysubtitle\par}}\makeatother
\vskip 5mm
{\thesis\ in \nameofprogramme\par} % (if applicable) (if applicable)
{\uppercase\expandafter{\authors}\par}
\vfill
{Department of Computer Science\par}
{\textit{Division of \divisionnameA}
\makeatletter\@ifundefined{divisionnameB}{}{\textit{and Division of \divisionnameB}}\makeatother
\par}
{\uppercase\expandafter{\university}\par}
\vskip 2mm
{\city, \country\ \writtenyear\par}
\end{center}
\newpage
{\noindent \mytitle\\
\makeatletter\@ifundefined{mysubtitle}{}{\mysubtitle\\}\makeatother
{\uppercase\expandafter{\authors}}\par}
\vskip 10mm
{\noindent \copyright {\uppercase\expandafter{\authorsc}}, \writtenyear\par}
\vskip 20mm
{\noindent \thesis\ \YYYYNN\\
Department of \departmentname\\
\makeatletter\@ifundefined{divisionnameB}{}{ and Division of \divisionnameB}\makeatother
\\
\university\\
\postcode\ \city\\
\country\\
Telephone: \telephone\par}
\vfill
\makeatletter\@ifundefined{covercaption}{}{{\noindent Cover:\\\covercaption\par}\vskip 5mm}\makeatother
{\noindent \nameofprinters
%/ Department of \departmentname
\\\city, \country\ \writtenyear\par}
\thispagestyle{empty}
\newpage
%\thispagestyle{justpage}
\setcounter{page}{1}
\pagenumbering{Roman}
%{\noindent \mytitle\\
%\makeatletter\@ifundefined{mysubtitle}{}{\mysubtitle\\}\makeatother
%\thesis\ in \nameofprogramme\\ % (if applicable)
%{\uppercase\expandafter{\authors}}\\
%Department of \departmentname\\
%Division of \divisionnameA
%\makeatletter\@ifundefined{divisionnameB}{}{ and Division of \divisionnameB}\makeatother\\
%\university\par}
\hyphenpenalty=10000
\tolerance=5000
%\hyphenation{dereference,heapptr,expression} %, typcheckaren, miss-lyckande, ghci, haskelltolk, haskell, typinformation, javascript, interpreter, programmering, interpretatorn, functions, haskell-kompilator, lambda, modul, exempelvis, grammatik, interpreteringen, pekar, av-sockrar, upp-byggnad, funktions-defenitioner, returnera, av-sockrade, skickas }
\phantomsection\addcontentsline{toc}{section}{Abstract}\input{kapitel/abstract}
%\noindent Keywords: \keywords
% Either a swedish translation, or an emtpy page.
\newpage
\phantomsection\addcontentsline{toc}{section}{Sammanfattning}\input{kapitel/sammanfattning}
\newpage
\mbox{}
%\newpage
\phantomsection\addcontentsline{toc}{section}{Innehåll}
\tableofcontents
% Here you can add preface and notations
%\cleardoublepage
%\phantomsection\addcontentsline{toc}{section}{Preface}\input{Preface}
%\vskip 1cm
%\noindent \city\ \writtenmonth\ \writtenyear\\
%\authorsc
%\newpage
%\phantomsection\addcontentsline{toc}{section}{Notations}\input{Notations}
\cleardoublepage
\setcounter{page}{1}
\pagenumbering{arabic}
% Real contents of report starts here
% Splitting it up to several files help when working together.
% Floatbarriers prevent figures from beeing placed into the next chapter.
\input{kapitel/inledning}\FloatBarrier
\newpage
%\input{kapitel/teori}\FloatBarrier
%\newpage
\input{kapitel/metod.tex}\FloatBarrier
\newpage
\input{kapitel/resultat.tex}\FloatBarrier
\newpage
\input{kapitel/diskussion.tex}\FloatBarrier
\newpage
\input{kapitel/slutsatser.tex}\FloatBarrier
\newpage
% \input{Method}\FloatBarrier
% \input{Results}\FloatBarrier
% \input{Conclusions}
% \input{Recommendations}
% And the bilbiography saved as mybib.bib
\bibliographystyle{plainnat}
\bibliography{kallor}
% Appendices
\end{document}