Add syntax highlighting [closes #19]

This commit is contained in:
Antti H S Laaksonen 2017-03-12 10:09:41 +02:00
parent 82562e4e70
commit d41fcea986
1 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,6 @@
\documentclass[twoside,12pt,a4paper,english]{book} \documentclass[twoside,12pt,a4paper,english]{book}
%\includeonly{chapter01,list} %\includeonly{chapter11,list}
\usepackage[english]{babel} \usepackage[english]{babel}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
@ -28,10 +28,16 @@
\usepackage{titlesec} \usepackage{titlesec}
\usepackage{skak} \usepackage{skak}
\usepackage{inconsolata}
\usetikzlibrary{patterns,snakes} \usetikzlibrary{patterns,snakes}
\pagestyle{plain} \pagestyle{plain}
\definecolor{keywords}{HTML}{44548A}
\definecolor{strings}{HTML}{00999A}
\definecolor{comments}{HTML}{990000}
\lstset{language=C++,frame=single,basicstyle=\ttfamily \small,showstringspaces=false,columns=flexible} \lstset{language=C++,frame=single,basicstyle=\ttfamily \small,showstringspaces=false,columns=flexible}
\lstset{ \lstset{
literate={ö}{{\"o}}1 literate={ö}{{\"o}}1
@ -41,6 +47,11 @@
\lstset{xleftmargin=20pt,xrightmargin=5pt} \lstset{xleftmargin=20pt,xrightmargin=5pt}
\lstset{aboveskip=12pt,belowskip=8pt} \lstset{aboveskip=12pt,belowskip=8pt}
\lstset{
commentstyle=\color{comments},
keywordstyle=\color{keywords},
stringstyle=\color{strings}
}
\date{Draft \today} \date{Draft \today}