bzr branch
http://gegoxaren.bato24.eu/bzr/%2Bjunk/LaTeX_Template
5
by Gustav Hatvigsson
Added some changes that have accumelated over time. |
1 |
\documentclass[a4paper, 11pt]{report} |
1
by Gustav Hartvigsson
"initial" code... |
2 |
|
3 |
\usepackage{hyperref} |
|
4 |
\usepackage[utf8]{inputenc} |
|
5 |
\usepackage[T1]{fontenc} |
|
6 |
\usepackage[swedish]{babel} |
|
7 |
||
8 |
\usepackage{rotating} |
|
9 |
\usepackage{epstopdf} |
|
10 |
\usepackage{graphicx} |
|
11 |
\usepackage{fancyvrb} |
|
12 |
\usepackage{subfig} |
|
5
by Gustav Hatvigsson
Added some changes that have accumelated over time. |
13 |
\usepackage{pstricks} |
1
by Gustav Hartvigsson
"initial" code... |
14 |
|
5
by Gustav Hatvigsson
Added some changes that have accumelated over time. |
15 |
%\usepackage{lmodern}
|
16 |
\usepackage{DejaVuSerifCondensed} |
|
17 |
\usepackage{DejaVuSansMono} |
|
1
by Gustav Hartvigsson
"initial" code... |
18 |
|
19 |
\usepackage{sverb} |
|
20 |
||
21 |
\usepackage{fullpage} |
|
22 |
||
23 |
\usepackage{csquotes} |
|
24 |
\usepackage[style=authoryear,natbib=true]{biblatex} |
|
25 |
\bibliography{biblography} |
|
26 |
||
5
by Gustav Hatvigsson
Added some changes that have accumelated over time. |
27 |
\usepackage{texlogos} |
28 |
||
1
by Gustav Hartvigsson
"initial" code... |
29 |
\fvset{numbers=left} |
30 |
||
5
by Gustav Hatvigsson
Added some changes that have accumelated over time. |
31 |
|
1
by Gustav Hartvigsson
"initial" code... |
32 |
%%%%%%%%%%%%%%%%%%%%%%% Code and such enviorment setup
|
33 |
\usepackage{color} |
|
34 |
\usepackage{xcolor} |
|
35 |
\usepackage{listings} |
|
36 |
||
37 |
\definecolor{dkgreen}{rgb}{0,0.6,0} |
|
38 |
\definecolor{gray}{rgb}{0.5,0.5,0.5} |
|
39 |
\definecolor{mauve}{rgb}{0.58,0,0.82} |
|
40 |
\lstset{ % |
|
41 |
basicstyle=\footnotesize\ttfamily, % the size of the fonts that are used for the code |
|
42 |
numbers=left, % where to put the line-numbers
|
|
43 |
numberstyle=\tiny\color{gray}, % the style that is used for the line-numbers |
|
44 |
stepnumber=1, % the step between two line-numbers. If it's 1, each line
|
|
45 |
% will be numbered
|
|
46 |
numbersep=5pt, % how far the line-numbers are from the code
|
|
47 |
backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color} |
|
48 |
showspaces=false, % show spaces adding particular underscores
|
|
49 |
showstringspaces=false, % underline spaces within strings
|
|
50 |
showtabs=false, % show tabs within strings adding particular underscores
|
|
51 |
frame=single, % adds a frame around the code
|
|
52 |
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. commens (green here)) |
|
53 |
tabsize=2, % sets default tabsize to 2 spaces
|
|
54 |
captionpos=b, % sets the caption-position to bottom
|
|
55 |
breaklines=true, % sets automatic line breaking
|
|
56 |
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
|
|
57 |
title=\lstname, % show the filename of files included with \lstinputlisting; |
|
58 |
% also try caption instead of title
|
|
59 |
keywordstyle=\color{blue}\ttfamily, % keyword style |
|
60 |
commentstyle=\color{dkgreen}\ttfamily, % comment style |
|
61 |
stringstyle=\color{mauve}\ttfamily, % string literal style |
|
62 |
escapeinside={\%*}{*)}, % if you want to add a comment within your code |
|
5
by Gustav Hatvigsson
Added some changes that have accumelated over time. |
63 |
morekeywords={}, % if you want to add more keywords to the set |
64 |
%%%%%
|
|
65 |
% åäö
|
|
66 |
literate={ö}{{\"o}}1 |
|
67 |
{ä}{{\"a}}1 |
|
68 |
{å}{{\aa}}1 |
|
69 |
{Å}{{\AA}}1 |
|
70 |
{Ä}{{\"A}}1 |
|
71 |
{Ö}{{\"O}}1 |
|
1
by Gustav Hartvigsson
"initial" code... |
72 |
}
|
73 |
%%%%%%%%%%%%%%%%%%%%%%%% END Code and such enviorment setup
|
|
74 |
||
75 |
%%%%%%%%%%%%%%%%%%%%%%%% Vala Highlighting
|
|
76 |
\lstdefinelanguage{Vala}[Sharp]{C}% |
|
77 |
{morekeywords={CCode,DBus,Test,cname,cheader_filename,type_id,% |
|
78 |
marshaller_type_name,get_value_function,set_value_function,% |
|
79 |
default_value,IntegerType,rank,type_signature,size_t,int8,int16,% |
|
80 |
int32,uint32,uint16,uint8,int64,uint64,float,double,time_t,% |
|
81 |
SimpleType,unichar,cprefix,has_type_id,get,set,ref_function,% |
|
82 |
unref_function,free_function,has_target,Compact,delegate,% |
|
83 |
destroy_function,PrintFormat,Diagnostics,FILE,LINE,METHOD,% |
|
84 |
errordomain,array_length_type,has_array_length,is_null_terminated,% |
|
85 |
ReturnsModifiedPointer,dup_function,weak,owned,unowned,value,var,% |
|
86 |
connect,async,public,private},% |
|
87 |
morecomment=[s]{"""}{"""} |
|
88 |
}[keywords,strings]
|
|
89 |
||
90 |
||
91 |
%%%%%%%%%%%%%%%%%%%%%%%% END of Vala Highlighting
|
|
92 |
||
93 |
%%%%%%%%%%%%%%%%%%%%%%% FIX LIST SPACING
|
|
94 |
\newenvironment{itemize*}% |
|
95 |
{\begin{itemize}% |
|
96 |
\setlength{\itemsep}{0pt}% |
|
97 |
\setlength{\parskip}{0pt}}% |
|
98 |
{\end{itemize}} |
|
99 |
%%%%%%%%%%%%%%%%%%%%%% END FIX LIST SPACING
|
|
100 |
||
101 |
%%%%%%%%%%%%%%%%%%%%%%% FIX CHAPTERS
|
|
102 |
\usepackage{titlesec} |
|
103 |
\titleformat{\chapter} |
|
104 |
{\normalfont\LARGE\bfseries}{\thechapter}{1em}{} |
|
105 |
\titlespacing*{\chapter}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex} |
|
106 |
%%%%%%%%%%%%%%%%%%%%%% END FIX CHAPTERS
|
|
107 |
||
4
by Gustav Hartvigsson
Fixed the links... Now they are colourd.. |
108 |
%%%%%%%%%%%%%%%%%%%%%% FIX HREF
|
109 |
\usepackage{xcolor} |
|
110 |
\definecolor{dark-red}{rgb}{0.4,0.15,0.15} |
|
111 |
\definecolor{dark-blue}{rgb}{0.15,0.15,0.4} |
|
112 |
\definecolor{medium-blue}{rgb}{0,0,0.5} |
|
113 |
\definecolor{dark-green}{rgb}{0,0.5,0} |
|
114 |
\hypersetup{ |
|
115 |
colorlinks, |
|
116 |
linkcolor={dark-red}, |
|
117 |
citecolor={dark-green}, |
|
118 |
urlcolor={dark-blue}, |
|
5
by Gustav Hatvigsson
Added some changes that have accumelated over time. |
119 |
pdftitle={Report tilel}, % title FIXME |
120 |
pdfauthor={Gustav Hartvigsson}, % author FIXME |
|
4
by Gustav Hartvigsson
Fixed the links... Now they are colourd.. |
121 |
}
|
122 |
%%%%%%%%%%%%%%%%%%%%%% END FIX HREF
|
|
1
by Gustav Hartvigsson
"initial" code... |
123 |
|
5
by Gustav Hatvigsson
Added some changes that have accumelated over time. |
124 |
\title{Report titel} % FIXME |
1
by Gustav Hartvigsson
"initial" code... |
125 |
\author{Gustav Hartvigsson \\ |
126 |
a08gusha@student.his.se \\
|
|
127 |
Institutionen för kommunikation och information \\
|
|
3
by Gustav Hartvigsson
Fiked an error.. |
128 |
Högskolan i Skövde}
|
1
by Gustav Hartvigsson
"initial" code... |
129 |
|
130 |
\begin{document} |
|
131 |
\maketitle
|
|
132 |
||
133 |
\begin{abstract} |
|
134 |
\center
|
|
135 |
en kort sammanfattning av raporten. |
|
136 |
\end{abstract} |
|
137 |
||
138 |
\tableofcontents
|
|
139 |
||
140 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
141 |
||
142 |
\chapter{Introduktion} |
|
143 |
||
144 |
\section{Projektets syfte} |
|
145 |
||
146 |
För att använda citat som här \cite{bazaar:com:main} använd |
|
147 |
\texttt{cite} kommandot. |
|
148 |
||
149 |
Men glöm inte att använda \texttt{biblatex} på \texttt{.aux} filen. |
|
150 |
||
151 |
\medskip \noindent |
|
152 |
För att simulera styckes brått använd: |
|
153 |
\begin{lstlisting}[language=tex] |
|
154 |
\medskip \noindent |
|
155 |
bla bla bla |
|
156 |
\end{lstlisting} |
|
157 |
kan även använda \texttt{smallskip} eller \texttt{bigskip}. |
|
158 |
||
159 |
\section{Frågeställning} |
|
160 |
||
161 |
aoeuuaoeu. Detta är en sektion |
|
162 |
||
163 |
\subsection{något} |
|
164 |
||
165 |
bla bla bla. Detta är en under sektion. |
|
166 |
||
167 |
\subsubsection{något mindre?} |
|
168 |
||
169 |
taoetnd oeuthta da. Detta är en under under sektion. |
|
170 |
||
171 |
\section{Metod} |
|
172 |
||
173 |
aoeuueaoeu |
|
174 |
||
175 |
\section{Presentation} |
|
176 |
||
177 |
oaeuueua |
|
178 |
||
179 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
180 |
||
181 |
\chapter{Problem} |
|
182 |
||
183 |
bla bla aothut tahoteuhth kmkehtuöc. |
|
184 |
||
185 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
186 |
||
187 |
\chapter{Design} |
|
188 |
||
189 |
bla bla aoeuthtaoheut. |
|
190 |
||
191 |
\begin{figure}[h!] |
|
192 |
\centering
|
|
193 |
\includegraphics[keepaspectratio, scale = 0.4]{./seUt.png} |
|
194 |
\caption{såhär kan det se ut att kompilera ett tex dokument.} |
|
195 |
\label{graph:seUt} |
|
196 |
\end{figure} |
|
197 |
||
198 |
I figur \ref{graph:seUt} på sidan \pageref{graph:seUt} ser man hur det kan se |
|
199 |
kompilera ett tex dokument till en pdf fil. Detta går på bara någon sekund |
|
200 |
så det går fort. |
|
201 |
||
202 |
Lägg märket till att bilden även hamnar bland förteckningarna. |
|
203 |
||
204 |
Samma sak gäller för tabeller. |
|
205 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
206 |
||
207 |
\chapter{Kod} |
|
208 |
||
209 |
\section{headerFilNamn.h} |
|
210 |
||
211 |
\begin{verbatim} |
|
212 |
||
213 |
kod här (utan indentering) |
|
214 |
Indenteringar syns när man använder verbatim |
|
215 |
Därför får man inte ha verbatimen indenterad. |
|
216 |
||
217 |
Och tänk på att göra radbrytningar, verbatim vet inte var sidan slutar... som här tillexempel. |
|
218 |
||
219 |
\end{verbatim} |
|
220 |
||
221 |
\section{definitionsFilNamn.cpp} |
|
222 |
||
223 |
\begin{verbatim} |
|
224 |
||
225 |
kod här utan indentering |
|
226 |
||
227 |
\end{verbatim} |
|
228 |
||
229 |
\section{enAnnanFil.cpp} |
|
230 |
||
231 |
\input{./enAnnanFil.cpp.tex} %% Exempel på att man kan dela upp dokementet i |
|
232 |
%% flera tex filer om man vill, vissa
|
|
233 |
%% rekomenderar även detta.
|
|
234 |
||
235 |
Textet i den där inputen ser ut så här: |
|
236 |
\lstinputlisting[language=tex]{./enAnnanFil.cpp.tex} |
|
237 |
||
238 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
239 |
||
240 |
\chapter{Analys} |
|
241 |
||
242 |
bla bla aothut tahoteuhth kmkehtuöc |
|
243 |
||
244 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
245 |
||
246 |
\chapter{Slutsatts} |
|
247 |
||
248 |
aoeuoeau aoeu aoeu aoeuthaoheu nthdaoedu thadoeuthd ahodeutd atodeunt adotudao |
|
249 |
eduathdoeundatodutadonudaothdeut aodu thd htdaoehtud atodenu tdaodeutadoeuthda |
|
250 |
aoudh daodeu tdaodu tadourädöudohtxuhaodeud ado åäöpyfgcrl, aoeuiauithd |
|
251 |
aoeudaoehduh.. aoetuh |
|
252 |
||
253 |
\chapter{Bra att veta} |
|
254 |
||
255 |
\textbf{Ta bort det här kapitlet från filen innan ni lämnar in!} |
|
256 |
||
257 |
\medskip \noindent |
|
258 |
För att göra ett \texttt{.pdf}-dokument av \texttt{.tex} filerna och |
|
259 |
\texttt{.bib} filerna kör man följande komandon: |
|
260 |
\begin{verbatim} |
|
261 |
pdflatex Rapporten.tex #Första komileringen |
|
262 |
pdflatex Rapporten.tex #Fixare problemen |
|
263 |
biblatex Rapporten.aux #lägger in bibografin i rapporten |
|
264 |
pdflatex Rapporten.tex #fixerar allt så det fungerar, |
|
265 |
#eller något. |
|
266 |
\end{verbatim} |
|
267 |
||
268 |
Notera att ni bara behöver köra de två försa komandona första gången ni |
|
269 |
kompelerar dokumentet. Men om något inte visas i dokumentet när ni är |
|
270 |
kör \texttt{pdflatex} testa att köra det igen. |
|
271 |
||
272 |
Jag brukar göra ett skript för att uföra detta: |
|
273 |
\lstinputlisting[language=bash, caption=Kompilera.sh]{./Kompilera.sh} |
|
274 |
dessa här skripten kan se lite olika ut, vissa använder till och med |
|
275 |
\texttt{Makefile}s, men då är det mer avanserat. |
|
276 |
||
277 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
278 |
\begingroup
|
|
279 |
\newpage
|
|
280 |
||
281 |
\addvspace{15em} |
|
282 |
||
283 |
\large \centering \textbf{ Slutord } |
|
284 |
||
285 |
\bigskip
|
|
286 |
||
287 |
\centering
|
|
288 |
||
289 |
Här skall slutordet vara (om man vill ha ett det vill säga...). |
|
290 |
||
291 |
\endgroup
|
|
292 |
||
293 |
||
294 |
||
295 |
||
296 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
297 |
||
298 |
\begingroup %% hakk to make the lists on teh same page. |
|
299 |
||
300 |
\chapter{Förteckningar}\let\chapter=\section |
|
301 |
||
302 |
\listoffigures
|
|
303 |
||
304 |
\listoftables
|
|
305 |
||
306 |
\printbibliography
|
|
307 |
||
308 |
\endgroup %% end of hakk |
|
309 |
||
310 |
\end{document} |