-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmlulisting.sty
57 lines (51 loc) · 1.66 KB
/
mlulisting.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
%! Package = mlulisting
%! Author = Fachschaftsrat Mathematik/Informatik der Studierendenschaft der Martin-Luther-Universität Halle-Wittenberg
%! Date = 2020/04/20
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mlulisting}[2020/04/20 v1.0]
\RequirePackage{listings}
\RequirePackage{listingsutf8} % UTF8 support in included listings.
% Colors:
\definecolor{lsnumber}{rgb}{0,0,0} % Zeilennummerfarbe
\definecolor{lscomment}{rgb}{0.25,0.5,0.35} % Kommentarfarbe
\definecolor{lskeyword}{rgb}{0.5,0,0.35} % Schlüsselwörterfarbe
\definecolor{lsstring}{rgb}{0.6,0,0} % Zeichenkettenfarbe
% Default code style:
\lstset{
language=C,
basicstyle=\ttfamily,
breakatwhitespace=false,
breaklines=true,
prebreak={\mbox{\(\hookleftarrow\)}},
numbers=left,
numberstyle=\color{lsnumber}\tiny,
numbersep=0.5em,
stepnumber=1,
commentstyle=\color{lscomment},
morecomment=[s][\color{lscomment}]{/**}{*/},
keepspaces=true,
keywordstyle=\bfseries\color{lskeyword},
stringstyle=\color{lsstring},
showtabs=false, showspaces=false,
showstringspaces=false,
tabsize=2,
}
% Haskell code style ("Konzepte der Programmierung" lecture):
\lstdefinestyle{haskell}{
language=haskell,
escapeinside={*'}{'*},
showstringspaces=false,
morecomment=[l]\%,
captionpos=b,
emphstyle={\bfseries},
}
% Prof. Molitor's assembler code style ("Einführung in Rechnerarchitektur" lecture):
\lstdefinestyle{massembler}{
language=[x86masm]Assembler,
morekeywords={
ldd, sto, shl, shr, rol, ror, sub, add, shli,
shri, roli, rori, subi, addi, or, and, xor,
xnor, jmp, beq, bneq, bgt, bo, ldpc, stpc
},
comment=[l]{\#},
}