Skip to content
This repository
Newer
Older
100644 248 lines (214 sloc) 9.577 kb
e215d0fc » Adam Bengtsson
2010-05-18 justify fixat
1 % USE PDFLATEX WITH THIS DOCUMENT. If you wish to use ordinary latex (why?) then convert the figures in figures/ to eps.
2 % If you are using Chalmers linux system, you might need to change to a newer tex dist.
3 % Do so with: vcs-what latex
4 % look up the newest version and select it, a.t.m that would be: vcs-select -p texlive-20080816
5 % I recommend using kile in linux. Make it available by adding the unsup software
6 % echo unsup ~/.vcs4/pathsetup
7 \documentclass[a4paper,12pt]{article}
8
9 \usepackage[T1]{fontenc}
10 \usepackage[swedish]{babel}
11 %\usepackage[latin1]{inputenc} % Use the same as the encoding of the textfile
12 \usepackage[utf8]{inputenc} % But this is probably the best choice. This doument is currently in utf8 (so is all other files)
13 \usepackage{amsmath,amsfonts,amsthm,mathtools} % Math. Look up the amsmath manual (google) for many great examples.
14 \usepackage{graphicx,placeins,float} % Figures and placements, float must be loaded before hypperref
15 \usepackage[colorlinks,citecolor=blue]{hyperref} % Warning this package conflicts with the package algorithm
16 \usepackage{fancyhdr,url,tikz} % Other usefull stuff. tikz is good for making drawings (but difficult)
17 \usepackage{listings} % Source code
18 % \usepackage{a4wide} % Gives a wider page
19 \usepackage{mycommands} % Here you can define your personal favourites. See mycommands.cls
20 \usepackage{pgfplots} % Anoth nice library for plots
21
22 \usepackage{natbib} % ger Harvard-referenser
23
24
25 %mina andringar för att få riktiga paragrafer vid radbrytning
26 \setlength{\parskip}{12pt}
27 \setlength{\parindent}{0pt}
28
29
30
31 % mysubtitle, cover* and divisionnameB may be uncommented if nonexistant.
32 \newcommand{\mytitle}{Haskell in Javascript}
33 %\newcommand{\mysubtitle}{Some subtitle}
34 \newcommand{\writtenmonth}{May}
35 \newcommand{\writtenyear}{2010}
9e57339b » Adam Bengtsson
2010-05-18 massa endringar
36 \newcommand{\authors}{Adam Bengtsson\\Mikael Bung\\Johan Gustafsson\\Mattis Jeppsson}
37 \newcommand{\authorsc}{ Adam Bengtsson, Mikael Bung, Johan Gustafsson, \\Mattis Jeppsson} % again with comma
e215d0fc » Adam Bengtsson
2010-05-18 justify fixat
38 \newcommand{\YYYYNN}{2010:05}
39 %\newcommand{\ISSN}{1652-8557}
40 %\newcommand{\covercaption}{Haskell 98 implementerat i Javascript för att köras i en webbläsare}
41 % \newcommand{\coverfigure}{figures/COVER_93_iso.png}
42 \newcommand{\departmentname}{Computer Science and Engineering}
43 \newcommand{\divisionnameA}{Computer Engineering}
44 %\newcommand{\divisionnameB}{Fluid Mechanics}
45 % \newcommand{\nameofprinters}{Chalmers Reproservice}
46 \newcommand{\nameofprogramme}{Computer Science and Engineering Programme}
47 \newcommand{\keywords}{Javascript, Haskell, Parser, Interpreter, Type Checker}
48 % This is just to keep the swedish letters at one place in case there are problems with encoding
49 \newcommand{\city}{Göteborg}
50 \newcommand{\country}{Sweden}
9e57339b » Adam Bengtsson
2010-05-18 massa endringar
51 \newcommand{\university}{Chalmers University of Technology\\ Gothenburg University}
e215d0fc » Adam Bengtsson
2010-05-18 justify fixat
52 \newcommand{\thesis}{Bachelor's thesis}
53 \newcommand{\telephone}{+ 46 (0)31-772 1000}
54 \newcommand{\postcode}{SE-412 96}
55 % End of input.
56
57 % Use section number first in numbering
58 \numberwithin{equation}{section}
59 \numberwithin{figure}{section}
60 \numberwithin{table}{section}
61
62 % Setting up the marginals a bit larger
63 %\textheight=730pt % default 609pt, ~710 if you dont use a4wide
64 %\headsep=0pt % default 25pt, since we have no headers in this document
65 %\headheight=0pt% 12 pt
66 %\voffset=-0.4in % default 0
67
68 % Set up headers to match styleguide
69 \pagestyle{fancy}
70 \renewcommand{\headrulewidth}{0pt}
71 \fancyhead{}
72 \fancyfoot{}
73 \fancyfoot[C]{\footnotesize \includegraphics[height=2.5mm]{figures/Logo.pdf}, \textit{\departmentname}, \thesis\ \YYYYNN}
74 \fancyfoot[RO,LE]{\thepage}
75
76 % To use code use \lstinputlisting[langauge=matlab,style=mystyle]{somematlabfile.m}
77 % Here is a suitable style for code.
78
79 %\lstset{language=Haskell}
80 %\lstset{keywordstyle=\color{blue}\textbf}
81 %\lstset{stringstyle=\color{red}}
82
83 \lstdefinestyle{mystyle}{showstringspaces=false, basicstyle=\scriptsize\ttfamily,
84 frame=shadowbox, breaklines=true, numbers=left, commentstyle=\color{gray},
85 keywordstyle=\color{blue}\textbf, stringstyle=\color{red}}
86
87 % Metadata ion the PDF file (makes it searchable)
88 \hypersetup{pdfauthor={\authorsc},pdftitle={\mytitle},pdfsubject={\thesis},pdfkeywords={\keywords}}
89
90 % The following part is automatically generated, go to document start
91 \begin{document}
92 \thispagestyle{empty}
93 \begin{tikzpicture}[remember picture,overlay]
94 \node[yshift=-6.4cm] at (current page.north west)
95 {\begin{tikzpicture}[remember picture, overlay]
96 % First draw the grid and then the Logo and avancez logo.
97 \draw[clip] (0cm,6.4cm)--(\paperwidth,6.4cm)--(\paperwidth,0cm)--(0.725\paperwidth,0cm)
98 .. controls (0.703\paperwidth,0) and (0.703\paperwidth,0.8cm)..
99 (0.68\paperwidth,0.8cm)--(0cm,0.8cm)--cycle;
100 \draw[step=5mm,black] (0,0) grid (\paperwidth,6.4cm);
101 \node[anchor=west,xshift=2.05cm,yshift=3.27cm,rectangle]{\includegraphics[width=13.2cm]{figures/Logo.pdf}};
102 \node[anchor=west,xshift=15.65cm,yshift=3.3cm,rectangle]{\includegraphics[width=3.6cm]{figures/Avancez.pdf}};
9e57339b » Adam Bengtsson
2010-05-18 massa endringar
103 % \node[anchor=west,xshift=1.15cm,yshift=0.1cm,rectangle]{\includegraphics[width=13.2cm]{figures/gulogga.png}};
104
e215d0fc » Adam Bengtsson
2010-05-18 justify fixat
105 \end{tikzpicture}};
106 \end{tikzpicture}
107 \ \vfill
108 \makeatletter\@ifundefined{coverfigure}{}{
109 \begin{center}
110 \includegraphics[width=\textwidth,height=0.4\paperheight,keepaspectratio]{\coverfigure}
111 \end{center}
112 }\makeatother
113 {\huge\noindent \mytitle\par} % title, 21
114 {\large\noindent \ \par} % subtitle, 16
115 %{\normalsize\noindent\textit{Master of Science Thesis}\par};
116 {\normalsize\noindent\textit{\thesis\ in \nameofprogramme}\par} % 14
117 \vskip 5mm
118 {\Large\noindent \uppercase\expandafter{\authors}\par}% 18
119 \vskip 6mm
120 {\small\noindent
121 Department of \departmentname\\
122 \textit{Division of \divisionnameA}
123 \makeatletter\@ifundefined{divisionnameB}{}{\textit{and Division of \divisionnameB}}\makeatother\\
124 \uppercase\expandafter{\university}\\
125 \city, \country\ \writtenyear\\
126 \thesis\ \YYYYNN\par}
127
128 \newpage
129 \thispagestyle{empty}
130 \mbox{}
131
132 \newpage
133 \thispagestyle{empty}
134 \begin{center}
135 {\uppercase\expandafter{\thesis}\ \YYYYNN\par}
136 \vskip 40mm
137 {\Large \mytitle\par}
138 \vskip 5mm
139 \makeatletter\@ifundefined{mysubtitle}{}{{\mysubtitle\par}}\makeatother
140 \vskip 5mm
141 {\thesis\ in \nameofprogramme\par} % (if applicable) (if applicable)
142 {\uppercase\expandafter{\authors}\par}
143 \vfill
144 {Department of Computer Science\par}
145 {\textit{Division of \divisionnameA}
146 \makeatletter\@ifundefined{divisionnameB}{}{\textit{and Division of \divisionnameB}}\makeatother
147 \par}
148 {\uppercase\expandafter{\university}\par}
149 \vskip 2mm
150 {\city, \country\ \writtenyear\par}
151 \end{center}
152
153 \newpage
154 {\noindent \mytitle\\
155 \makeatletter\@ifundefined{mysubtitle}{}{\mysubtitle\\}\makeatother
156 {\uppercase\expandafter{\authors}}\par}
157 \vskip 10mm
158 {\noindent \copyright {\uppercase\expandafter{\authorsc}}, \writtenyear\par}
159 \vskip 20mm
160 {\noindent \thesis\ \YYYYNN\\
161 Department of \departmentname\\
162 \makeatletter\@ifundefined{divisionnameB}{}{ and Division of \divisionnameB}\makeatother
163 \\
164 \university\\
165 \postcode\ \city\\
166 \country\\
167 Telephone: \telephone\par}
168 \vfill
169 \makeatletter\@ifundefined{covercaption}{}{{\noindent Cover:\\\covercaption\par}\vskip 5mm}\makeatother
170 {\noindent \nameofprinters
171 %/ Department of \departmentname
172 \\\city, \country\ \writtenyear\par}
173 \thispagestyle{empty}
174
175 \newpage
176 %\thispagestyle{justpage}
177 \setcounter{page}{1}
178 \pagenumbering{Roman}
179 %{\noindent \mytitle\\
180 %\makeatletter\@ifundefined{mysubtitle}{}{\mysubtitle\\}\makeatother
181 %\thesis\ in \nameofprogramme\\ % (if applicable)
182 %{\uppercase\expandafter{\authors}}\\
183 %Department of \departmentname\\
184 %Division of \divisionnameA
185 %\makeatletter\@ifundefined{divisionnameB}{}{ and Division of \divisionnameB}\makeatother\\
186 %\university\par}
187
188
189 \hyphenpenalty=10000
190 \tolerance=5000
191
192 %\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 }
193
194 \phantomsection\addcontentsline{toc}{section}{Abstract}\input{kapitel/abstract}
195 %\noindent Keywords: \keywords
196
197 % Either a swedish translation, or an emtpy page.
198 \newpage
199 \phantomsection\addcontentsline{toc}{section}{Sammanfattning}\input{kapitel/sammanfattning}
200
201 \newpage
202 \mbox{}
203
204 %\newpage
205 \phantomsection\addcontentsline{toc}{section}{Innehåll}
206 \tableofcontents
207
208 % Here you can add preface and notations
209 %\cleardoublepage
210 %\phantomsection\addcontentsline{toc}{section}{Preface}\input{Preface}
211 %\vskip 1cm
212 %\noindent \city\ \writtenmonth\ \writtenyear\\
213 %\authorsc
214 %\newpage
215 %\phantomsection\addcontentsline{toc}{section}{Notations}\input{Notations}
216
217 \cleardoublepage
218 \setcounter{page}{1}
219 \pagenumbering{arabic}
220
221
222 % Real contents of report starts here
223 % Splitting it up to several files help when working together.
224 % Floatbarriers prevent figures from beeing placed into the next chapter.
225 \input{kapitel/inledning}\FloatBarrier
226 \newpage
227 %\input{kapitel/teori}\FloatBarrier
228 %\newpage
229 \input{kapitel/metod.tex}\FloatBarrier
230 \newpage
231 \input{kapitel/resultat.tex}\FloatBarrier
232 \newpage
233 \input{kapitel/diskussion.tex}\FloatBarrier
234 \newpage
235 \input{kapitel/slutsatser.tex}\FloatBarrier
236 \newpage
237 % \input{Method}\FloatBarrier
238 % \input{Results}\FloatBarrier
239 % \input{Conclusions}
240 % \input{Recommendations}
241
242 % And the bilbiography saved as mybib.bib
243 \bibliographystyle{plainnat}
244 \bibliography{kallor}
245
246 % Appendices
247
248 \end{document}
249
Something went wrong with that request. Please try again.