summaryrefslogtreecommitdiff
path: root/templates/latex/article.tex
blob: c199be6851b22094ff087c270641b21e1361f543 (plain)
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
% article.tex
% Patrick Simianer <p@simianer.de>
% YYYY-MM-DD
\documentclass[a4paper, 11pt]{scrartcl}
\typearea{12}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\usepackage{amsmath, amssymb, latexsym}
\usepackage{hyperref, color}
\usepackage[pdftex]{graphicx}
\usepackage{listings}
\usepackage{ulem}
\usepackage{microtype}
\usepackage{lmodern,eulervm}

\definecolor{darkblue}{rgb}{0,0,.5}
\hypersetup{pdftex=true, colorlinks=true, breaklinks=true, linkcolor=darkblue}

%\parindent0pt

\definecolor{gray}{rgb}{.5,.5,.5}
\lstset{basicstyle=\small\ttfamily, commentstyle=\color{gray}, emphstyle=\sffamily\bfseries}
\lstset{keywordstyle=\sffamily\bfseries, commentstyle=\color{gray}, stringstyle=\color{black}}
\lstset{numbers=left, numberstyle=\tiny}

\begin{document}


\begin{equation}
  \sum\limits_{k=1}^n k = 1+2+\hdots+n = \frac{n(n+1)}{2}
\end{equation}

\section*{Aufgabe 1}
\subsection*{Programm: Hello, World!}
\lstset{language=C++, emph={main}}
\begin{lstlisting}{Hello, World!}
/* Ein Kommentar */
#include <iostream>

int main (int argc, char * const argv[]) {
  // und noch einer!
  std::cout << "Hello, World!\n";
  return 0;
}
\end{lstlisting}


\end{document}