1 \usepackage{listings} |
1 \usepackage{listings} |
2 \usepackage{etoolbox} |
2 \usepackage{etoolbox} |
3 \setmonofont[Scale=.95]{Consolas} |
3 %\setmonofont[Scale=.95]{Consolas} |
4 \newfontfamily{\consolas}{Consolas} |
4 %\newfontfamily{\consolas}{Consolas} |
|
5 |
|
6 \makeatletter |
|
7 \let\old@lstKV@SwitchCases\lstKV@SwitchCases |
|
8 \def\lstKV@SwitchCases#1#2#3{} |
|
9 \makeatother |
|
10 \usepackage{lstlinebgrd} |
|
11 \makeatletter |
|
12 \let\lstKV@SwitchCases\old@lstKV@SwitchCases |
|
13 |
|
14 \lst@Key{numbers}{none}{% |
|
15 \def\lst@PlaceNumber{\lst@linebgrd}% |
|
16 \lstKV@SwitchCases{#1}% |
|
17 {none:\\% |
|
18 left:\def\lst@PlaceNumber{\llap{\normalfont |
|
19 \lst@numberstyle{\thelstnumber}\kern\lst@numbersep}\lst@linebgrd}\\% |
|
20 right:\def\lst@PlaceNumber{\rlap{\normalfont |
|
21 \kern\linewidth \kern\lst@numbersep |
|
22 \lst@numberstyle{\thelstnumber}}\lst@linebgrd}% |
|
23 }{\PackageError{Listings}{Numbers #1 unknown}\@ehc}} |
|
24 \makeatother |
|
25 |
|
26 |
|
27 |
5 |
28 |
6 \definecolor{codered}{rgb}{0.6,0,0} % for strings |
29 \definecolor{codered}{rgb}{0.6,0,0} % for strings |
7 \definecolor{codegreen}{rgb}{0.25,0.5,0.35} % comments |
30 \definecolor{codegreen}{rgb}{0.25,0.5,0.35} % comments |
8 \definecolor{codepurple}{rgb}{0.5,0,0.35} % keywords |
31 \definecolor{codepurple}{rgb}{0.5,0,0.35} % keywords |
9 \definecolor{codedocblue}{rgb}{0.25,0.35,0.75} % doc |
32 \definecolor{codedocblue}{rgb}{0.25,0.35,0.75} % doc |