]> git.rustad.me Git - optimering/commitdiff
Style listings
authorBjørn Rustad <bjorn@rustad.me>
Mon, 12 Mar 2012 16:51:29 +0000 (17:51 +0100)
committerBjørn Rustad <bjorn@rustad.me>
Mon, 12 Mar 2012 16:51:29 +0000 (17:51 +0100)
rapport.tex

index ab3caaaf47b79a232d09fa1bcf92e35c5c13831b..c3fc802f38ebc7153462c8f540964fa1900fc1db 100644 (file)
 \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}