-
Notifications
You must be signed in to change notification settings - Fork 0
/
latex_template.tex
121 lines (104 loc) · 2.71 KB
/
latex_template.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
\documentclass[oneside,a4paper]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{etoolbox}
\usepackage{fancyhdr}
%\usepackage{titling}
\usepackage[page]{totalcount}
\usepackage{palatino}
\usepackage{graphicx}
\usepackage{todonotes}
\usepackage{url}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows}
\usepackage{listings}
\usepackage{titlesec}
\renewcommand{\headrulewidth}{0pt}
\usepackage{fontspec}
\setmainfont{Georgia}
\setsansfont{Gill Sans}
\title{Dokumentets titel}
\author{\sffamily Coding Pirates (afdeling)}
\date{\sffamily Indsæt dato her}
\setkomafont{title}{\sffamily\bfseries}
\makeatletter
\let\doctitle\@title
\patchcmd{\@maketitle}{\sffamily\huge}{\sffamily\HUGE}{}{}
\makeatother
\titleformat{\section}
{\Large\sffamily\bfseries}
{\thesection}
{1em}
{}
\titleformat{\title}
{\Large\sffamily\bfseries}
{\thetitle}
{1em}
{}
\fancypagestyle{cptitle}{
\fancyhf{}
\fancyhead[C]{\includegraphics[height=1.3in, keepaspectratio=true]{logo.png}}
\fancyfoot[C]{Side \thepage\ af \totalpages}
}
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[L]{\raisebox{-0.5\height}{\includegraphics[height=0.35in, keepaspectratio=true]{logo.png}}}
\fancyhead[R]{\doctitle}
\fancyfoot[C]{Side \thepage\ af \totalpages}
}
\pagestyle{plain}
\lstdefinelanguage{JavaScript}{
keywords={break, case, catch, continue, debugger, default, delete,
do, else, false, finally, for, function, if, in, instanceof, new,
null, return, switch, this, throw, true, try, typeof, var, void,
while, with},
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]',
morestring=[b]",
ndkeywords={class, export, boolean, throw, implements, import, this},
keywordstyle=\color{blue}\bfseries,
ndkeywordstyle=\color{darkgray}\bfseries,
identifierstyle=\color{black},
commentstyle=\color{purple}\ttfamily,
stringstyle=\color{red}\ttfamily,
sensitive=true,
extendedchars=true,
literate=%
{æ}{{\ae}}1
{å}{{\aa}}1
{ø}{{\o}}1
{Æ}{{\AE}}1
{Å}{{\AA}}1
{Ø}{{\O}}1
}
\lstset{
basicstyle=\ttfamily\footnotesize,
keywordstyle=\bfseries,
captionpos=b,
language=JavaScript
}
\begin{document}
\maketitle
\thispagestyle{cptitle}
% \chapter{Start}
% \begin{enumerate}
% \item Opret en bruger på \url{http://khanacademy.org}. Brug
% evt. \url{http://da.khanacademy.org} for dansk.
% \item Tryk på ``Subjects'' (``Emner'' på dansk)
% \item Vælg ``Computer programming'' i menuen (``Programmering'' på dansk)
% \item New program / Nyt program
% \end{enumerate}
\section{Første afsnit}
Tast følgende eksempel ind:
\begin{lstlisting}
var minfunktion = function() {
a = b;
c = d;
}
\end{lstlisting}
Eller lav en liste med bullets:
\begin{itemize}
\item Første bullet
\item Anden bullet
\end{itemize}
\end{document}