-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlistings.tex
50 lines (45 loc) · 1.3 KB
/
listings.tex
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
\usepackage{microtype}
\renewcommand*\ttdefault{txtt}
\usepackage{listings}
\usepackage{textcomp}
\lstset{upquote=true}
\definecolor{keyword}{HTML}{2771a3}
\definecolor{pattern}{HTML}{b53c2f}
\definecolor{string}{HTML}{be681c}
\definecolor{relation}{HTML}{7e4894}
\definecolor{variable}{HTML}{107762}
\definecolor{comment}{HTML}{8d9094}
\lstset{
%numbers=left,
numbers=none,
stepnumber=1,
numbersep=5pt,
%basicstyle=\scriptsize\ttfamily,
basicstyle=\footnotesize\ttfamily,
keywordstyle=\color{keyword}\bfseries\ttfamily,
commentstyle=\color{comment}\ttfamily,
stringstyle=\color{string}\ttfamily,
identifierstyle=,
showstringspaces=false,
aboveskip=3pt,
belowskip=3pt,
columns=flexible,
keepspaces=true,
breaklines=true,
captionpos=b,
tabsize=2,
frame=single,
}
% see https://github.com/GraphBLAS/GrAPL19/blob/master/langsupport.tex
\lstdefinelanguage{Pythoncustom}
{%columns=fullflexible,
escapeinside={/*@}{@*/},breaklines=true,breakatwhitespace=true,%
basicstyle=\color{lightblue},keywordstyle=,%
lineskip=-.05\baselineskip,%morekeywords={}%pattern,in,is,to,from,out_edges,adj,once,fixed_point,vertex_property,edge_property,vertex,edge,meta,auto,concept,requires,concept_map},%
alsolanguage=Python,
literate = %
{\{}{\smaller{$\{$}}{1}%
{\}}{\smaller{$\}$}}{1}%
{<=}{$\leq$}{1}%
{-}{--}{1}%
}