docs/diploma
changeset 10:558301bfa9b5
customized listings and code env
author | meillo@marmaro.de |
---|---|
date | Fri, 19 Sep 2008 10:43:22 +0200 |
parents | 8ac9b9fda474 |
children | 32cfe2127cb1 |
files | thesis/header.tex |
diffstat | 1 files changed, 34 insertions(+), 7 deletions(-) [+] |
line diff
1.1 --- a/thesis/header.tex Fri Sep 19 01:15:26 2008 +0200 1.2 +++ b/thesis/header.tex Fri Sep 19 10:43:22 2008 +0200 1.3 @@ -2,7 +2,8 @@ 1.4 1.5 \usepackage[utf8]{inputenc} 1.6 \usepackage{graphicx} 1.7 - \usepackage{listings} 1.8 + \usepackage{url} 1.9 + 1.10 \usepackage{makeidx} 1.11 \makeindex 1.12 1.13 @@ -10,8 +11,8 @@ 1.14 \setlength{\parskip}{1.0ex plus 1.0ex minus 0.5ex} 1.15 \setcounter{tocdepth}{3} 1.16 1.17 + \pagestyle{headings} 1.18 %\pagestyle{fancy} 1.19 - \pagestyle{headings} 1.20 %\lhead[\leftmark]{\thepage} 1.21 %\chead[]{} 1.22 %\rhead[\thepage]{\rightmark} 1.23 @@ -19,10 +20,9 @@ 1.24 %\cfoot[]{} 1.25 %\ofoot[\thepage]{\thepage} 1.26 1.27 - \usepackage{url} 1.28 1.29 % formating 1.30 - %\renewcommand{\path}[1]{\texttt{#1}} 1.31 + \renewcommand{\path}[1]{\textit{#1}} 1.32 \newcommand{\name}[1]{\emph{#1}} 1.33 \newcommand{\NAME}[1]{{\footnotesize\textsc{#1}}} 1.34 1.35 @@ -30,9 +30,6 @@ 1.36 \let\OLDcleardoublepage\cleardoublepage 1.37 \renewcommand{\cleardoublepage}{\thispagestyle{empty}\OLDcleardoublepage} 1.38 1.39 - % abbreviations 1.40 - \newcommand{\m}{\emph{masqmail}} 1.41 - 1.42 1.43 %%%% BEGIN DEBUG %%%% 1.44 %\usepackage{showidx} 1.45 @@ -46,3 +43,33 @@ 1.46 \linespread{1.05} % Palatino needs more leading (space between lines) 1.47 1.48 1.49 + 1.50 + \usepackage{listings} 1.51 + \lstset{ 1.52 + basicstyle=\ttfamily\footnotesize, 1.53 + numberstyle=\tiny, 1.54 + basewidth=0.45em, 1.55 + numbers=left, 1.56 + stepnumber=1, 1.57 + numbersep=2em, 1.58 + showstringspaces=true, 1.59 + showtabs=true, 1.60 + tab=\rightarrowfill, 1.61 + frame=lines, 1.62 + tabsize=4, 1.63 + captionpos=b, 1.64 + breaklines=false, 1.65 + breakatwhitespace=true 1.66 + } 1.67 + 1.68 + 1.69 + \newenvironment{code}[2] { 1.70 + \begin{center} 1.71 + \lstset{label=#1,caption=#2} 1.72 + \begin{list}{}{\setlength{\rightmargin}{2em}\setlength{\leftmargin}{2em}} 1.73 + \item\ttfamily\footnotesize 1.74 + }{ 1.75 + \end{list} 1.76 + \end{center} 1.77 + } 1.78 +