docs/diploma

view thesis/header.tex @ 11:32cfe2127cb1

customized listings and code env
author meillo@marmaro.de
date Fri, 19 Sep 2008 10:43:38 +0200
parents 1d35768e1643
children f4d199ebf793
line source
1 \documentclass[english,a4paper,twoside,openright]{report}
3 \usepackage[utf8]{inputenc}
4 \usepackage{graphicx}
5 \usepackage{url}
7 \usepackage{makeidx}
8 \makeindex
10 \setlength{\parindent}{0em}
11 \setlength{\parskip}{1.0ex plus 1.0ex minus 0.5ex}
12 \setcounter{tocdepth}{3}
14 \pagestyle{headings}
15 %\pagestyle{fancy}
16 %\lhead[\leftmark]{\thepage}
17 %\chead[]{}
18 %\rhead[\thepage]{\rightmark}
19 %\ifoot[\textsc{Markus Schnalke}]{\textsc{Markus Schnalke}}
20 %\cfoot[]{}
21 %\ofoot[\thepage]{\thepage}
24 % formating
25 \renewcommand{\path}[1]{\textit{#1}}
26 \newcommand{\name}[1]{\emph{#1}}
27 \newcommand{\NAME}[1]{{\footnotesize\textsc{#1}}}
29 % \newcommand{\source}[1]{\hspace{1em}\textit{\scriptsize(Quelle: #1)}}
30 \let\OLDcleardoublepage\cleardoublepage
31 \renewcommand{\cleardoublepage}{\thispagestyle{empty}\OLDcleardoublepage}
34 %%%% BEGIN DEBUG %%%%
35 %\usepackage{showidx}
36 \usepackage{setspace}
37 %\doublespace
38 %%%% END DEBUG %%%%
41 \usepackage[T1]{fontenc}
42 \usepackage[sc,osf]{mathpazo}
43 \linespread{1.05} % Palatino needs more leading (space between lines)
47 \usepackage{listings}
48 \lstset{
49 basicstyle=\ttfamily\footnotesize,
50 numberstyle=\tiny,
51 basewidth=0.45em,
52 numbers=left,
53 stepnumber=1,
54 numbersep=2em,
55 showstringspaces=true,
56 showtabs=true,
57 tab=\rightarrowfill,
58 frame=lines,
59 tabsize=4,
60 captionpos=b,
61 breaklines=false,
62 breakatwhitespace=true
63 }
66 \newenvironment{code}[2] {
67 \begin{center}
68 \lstset{label=#1,caption=#2}
69 \begin{list}{}{\setlength{\rightmargin}{2em}\setlength{\leftmargin}{2em}}
70 \item\ttfamily\footnotesize
71 }{
72 \end{list}
73 \end{center}
74 }