-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsl-listings.sty
64 lines (58 loc) · 1.73 KB
/
sl-listings.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%%
%% sl-listings.sty
%%
%% Provides a wrapper class of listings with personal settings
%% Adapted by a document of Herbert Voss and an example of Uwe
%% Ziegenhagen
%% Also the code for providing a highlighting for diff-files is from
%% http://tex.stackexchange.com/a/106129/14622
%%
%% Created 2011-2013 Stephan Lukasczyk <[email protected]>
%%
%% This work is licensed under a Creative Commons
%% Attribution-ShareAlike 3.0 Germany License
%% See https://creativecommons.org/licenses/by-sa/3.0/de/deed.en_US
%% for license text
%%
\message{Customized wrapper of listings-package v0.3 2012/12/22 (sl)}
\ProvidesPackage{sl-listings}[2012/12/22 v0.3 (sl)]
\NeedsTeXFormat{LaTeX2e}[2001/06/01]
\RequirePackage{listings}
\RequirePackage{xcolor}
\definecolor{hellgelb}{rgb}{1,1,0.8}
\definecolor{colKeys}{rgb}{0,0,1}
\definecolor{colIdentifier}{rgb}{0,0,0}
\definecolor{colComments}{rgb}{1,0,0}
\definecolor{colString}{rgb}{0,0.5,0}
\definecolor{diffStart}{rgb}{0.3,0.3,0.3}
\definecolor{diffIncl}{rgb}{0,0.9,0}
\definecolor{diffRem}{rgb}{1,0,0}
\lstset{%
float=hbp,%
basicstyle=\ttfamily\footnotesize,%
identifierstyle=\color{colIdentifier},%
keywordstyle=\color{colKeys},%
stringstyle=\color{colString},%
commentstyle=\color{colComments},%
columns=flexible,%
tabsize=4,%
frame=single,%
extendedchars=true,%
showspaces=false,%
showstringspaces=false,%
numbers=left,%
numberstyle=\tiny,%
breaklines=true,%
backgroundcolor=\color{hellgelb},%
breakautoindent=true,%
captionpos=t,%
% linewidth=.9\linewidth,%
xleftmargin=.075\linewidth,%
xrightmargin=.075\linewidth%
}
\lstdefinelanguage{diff}{%
morecomment=[f][\color{diffStart}]{@@},
morecomment=[f][\color{diffIncl}]{+\ },
morecomment=[f][\color{diffRem}]{-\ },
}
\endinput