\documentclass{scrreprt} % European typography -> KOMA-Script documentclasses % classes are scrbook, scrreprt, scrartcl, scrlettr2 % a4paper is the default for all KOMA-Script classes \KOMAoptions{ paper=portrait, % portrait (default), or landscape BCOR=0mm, % no binding correction for single pages % default font size 11pt, for scrlettr2 it is 12pt fontsize=12pt, % larger for academic papers (12pt) headsepline=true, % separator line for the header footsepline=true, % separator line for the footer } \usepackage{scrhack} % fixes problems with listings % BCOR in KOMA-Scripts not with the geometry package % KOMA-Script uses package typearea for page layout, % automatically loaded. DIV = number of page columns % "DIV" defaults for A4 are 10pt:8, 11pt:10, 12pt:12 % default type area and margins (A4 and BCOR=0), mm: % 10pt DIV 8, 131.25 x 185.63 top 37.13 inner 26.25 % 11pt DIV 10, 147.00 x 207.90 top 29.70 inner 21.00 % 12pt DIV 12, 157.50 x 222.75 top 24.75 inner 17.50 % with KOMA-Script: use geometry only when necessary % \usepackage[margin=2cm,includefoot]{geometry} % documentclass options a4paper,portrait -> geometry % paper = total body (printable area) + margins % margin = 2 cm from each edge of the paper % includefoot includes foot into total body \usepackage[english]{babel} % american english text % \usepackage[ngerman]{babel} % german, new orthogr. \usepackage[utf8]{inputenc} % input UTF-8 characters \usepackage[T1]{fontenc} % T1 font encoding, not OT1 \usepackage{lmodern} % use the Latin Modern fonts \usepackage[sortlocale=auto,sorting=nyt, % sorting style=numeric-comp]{biblatex} % or authoryear-comp \addbibresource{lit_240112.bib} \usepackage{csquotes,xpatch} \usepackage{xcolor} % package for using colors \usepackage{graphicx} % package for images, graphics \usepackage{makeidx} % standard package for indexes \makeindex % when compiling, make index file ___.idx % package listings, only to typeset code of programs \usepackage{listings} % package for code integration \lstset{literate= % define umlauts and ß in listings {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {ß}{{\ss}}1 } \lstset{ language=Python, % programming language of the code basicstyle=\ttfamily, % general code style: tt font tabsize=4, % replace each tab with our spaces commentstyle=\color{blue}, % color comments blue keywordstyle=\color{green}, % color keywords green numbers=left, % line numbers left xleftmargin=8mm, % left margin (for line numbers) xrightmargin=3mm, % right margin (smaller frame) numberstyle=\footnotesize\ttfamily, % number style showstringspaces=false, % normal spaces in strings frame=trbl, % frame on top, right, left and bottom frameround=tttt % rounded corners in the frame } % \pagestyle{empty} % header and footer are empty \pagestyle{plain} % footer contains page number % warning: the handling of page numbers is difficult \begin{document} %\iffalse % if not commented out: do not compile this % -------------------------------------------------- \title{Rolling Stones} \subtitle{A report on petrokinesis} \author{Sisy Phos} \date{\today} \maketitle % print the title page with above items \tableofcontents % generate the table of contents % -------------------------------------------------- %\fi %\iffalse % if not commented out: do not compile this % -------------------------------------------------- \chapter{Reports shoud have chapters} \section{Title of first section of first chapter} Something \emph{important} and a \textbf{bold} word. % a floating environment (float) must be on one page % floats (figures, tables): positioned automatically \begin{figure}[h] % place image (approximately) here \centering % horizontal image position in the middle \def\fig{~/image/erdbev.jpg} % path to image file \IfFileExists{\fig} % check, if image file exists { \includegraphics[scale=0.3]{\fig} } { \textcolor{red}{Warning: missing image file} } \caption{This is a figure caption below the image.} \end{figure} Note: the first line of a new paragraph is indented. The word tetrapod\index{tetrapod} will be found in the index. Whitespace between words is reduced to one space. % key word in {} -> index, with actual page number % -------------------------------------------------- %\fi % \iffalse % if not commented out: do not compile this % -------------------------------------------------- \chapter{Here comes another chapter} \section{Title of first section of second chapter} \subsection{Crime doesn't pay} \subsubsection{Piracy} Pirates don't have it easy! \cite{hook2013a}. My Python program that greets the world: \par\medskip % new paragraph, with vertical spacing \begin{lstlisting} #!/usr/bin/env python3 print("Hello, world!") \end{lstlisting} % -------------------------------------------------- % \fi %\iffalse % if not commented out: do not compile this % -------------------------------------------------- \printbibliography % print the bibliography here \printindex % print the index here (using ---.idn) % -------------------------------------------------- %\fi \end{document}