From: Bjørn Rustad Date: Mon, 12 Mar 2012 16:51:29 +0000 (+0100) Subject: Style listings X-Git-Url: http://git.rustad.me/?a=commitdiff_plain;h=2e508dcb94a62e9fa5f19f9d8153bca29b629e63;p=optimering Style listings --- diff --git a/rapport.tex b/rapport.tex index ab3caaa..c3fc802 100644 --- a/rapport.tex +++ b/rapport.tex @@ -11,6 +11,26 @@ \usepackage{amssymb, amsmath} \setcounter{secnumdepth}{0} +\lstset{ + language=Matlab, + basicstyle=\footnotesize, + numbers=left, + stepnumber=1, % the step between two line-numbers. + numbersep=10pt, % how far the line-numbers are fromthe code + showspaces=false, % show spaces adding particularunderscores + showstringspaces=false, % underline spaces within strings + showtabs=false, % show tabs within strings addingparticular underscores + tabsize=4, % sets default tabsize to 2 spaces + xleftmargin=40pt, + captionpos=b, % sets the caption-position to bottom + breaklines=true, % sets automatic line breaking + breakatwhitespace=true, % sets if automatic breaks should onlyhappen at whitespace + keywordstyle=\color{black}, % keyword style + commentstyle=\color{dkgreen}, % comment style + stringstyle=\color{mauve}, % string literal style + numberstyle=\tiny, +} + \begin{document} \title{Semesterprosjekt i TMA4180 – Optimeringsteori}