tex: add listlistings for code colouring
This commit is contained in:
parent
c0abf64ee0
commit
78617e6130
1 changed files with 28 additions and 0 deletions
|
@ -13,6 +13,34 @@
|
|||
\usepackage{eurosym}
|
||||
\usepackage[english]{babel}
|
||||
\usepackage{eso-pic} % for background on cover
|
||||
\usepackage{listings}
|
||||
|
||||
% Define colors for code
|
||||
\definecolor{codegreen}{rgb}{0,0.4,0}
|
||||
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
|
||||
\definecolor{codepurple}{rgb}{0.58,0,0.82}
|
||||
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
|
||||
|
||||
\lstdefinestyle{mystyle}{
|
||||
backgroundcolor=\color{backcolour},
|
||||
commentstyle=\color{codegreen},
|
||||
keywordstyle=\color{magenta},
|
||||
numberstyle=\tiny\color{codegray},
|
||||
stringstyle=\color{codepurple},
|
||||
basicstyle=\ttfamily\small,
|
||||
breakatwhitespace=false,
|
||||
breaklines=true,
|
||||
captionpos=b,
|
||||
keepspaces=true,
|
||||
numbers=left,
|
||||
numbersep=5pt,
|
||||
showspaces=false,
|
||||
showstringspaces=false,
|
||||
showtabs=false,
|
||||
tabsize=2
|
||||
}
|
||||
|
||||
\lstset{style=mystyle}
|
||||
|
||||
|
||||
% table des annexes
|
||||
|
|
Loading…
Reference in a new issue