-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.sty
121 lines (103 loc) · 4.12 KB
/
style.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
\ProvidesPackage{style}
\RequirePackage{listings}
\RequirePackage{xcolor}
\RequirePackage{float}
\RequirePackage{subcaption}
% The following packages are loaded by sapthesis
% \RequirePackage{amsmath}
% % to insert images
% \RequirePackage{graphicx}
% to correctly insert stressed characters
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage{multirow}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage[style=alphabetic]{biblatex}
\RequirePackage[nottoc]{tocbibind}
\RequirePackage{bibentry}
% to put links in table of contents
\RequirePackage{hyperref}
\setcounter{biburllcpenalty}{9000}
\hypersetup{
colorlinks=false, %set true if you want colored links
linktoc=all, %set to all if you
}
% Define Colors
\RequirePackage{color}
\lst@definelanguage{Python}{%
morekeywords={access, and, break, class, continue, def, del, elif, else,%
except, exec, finally, for, from, global, if, import, in, is, lambda,%
not, or, pass, print, raise, return, try, while},
morekeywords=[2]{abs, all, any, basestring, bin, bool, bytearray,%
callable, chr, classmethod, cmp, compile, complex, delattr, dict, dir,%
divmod, enumerate, eval, execfile, file, filter, float, format,
frozenset, getattr, globals, hasattr, hash, help, hex, id, input, int,%
isinstance, issubclass, iter, len, list, locals, long, map, max,%
memoryview, min, next, object, oct, open, ord, pow, property, range,%
raw_input, reduce, reload, repr, reversed, round, set, setattr, slice,%
sorted, staticmethod, str, sum, super, tuple, type, unichr, unicode,%
vars, xrange, zip, apply, buffer, coerce, intern},%
sensitive=true,%
morecomment=[l]\#,%
morestring=[b]’,%
morestring=[b]",%
morecomment=[s]{’’’}{’’’},% used for documentation text % (mulitiline strings)
morecomment=[s]{"""}{"""},% added by Philipp Matthias Hahn
morestring=[s]{r’}{’},% ‘raw’ strings
morestring=[s]{r"}{"},%
morestring=[s]{r’’’}{’’’},%
morestring=[s]{r"""}{"""},%
morestring=[s]{u’}{’},% unicode strings
morestring=[s]{u"}{"},%
morestring=[s]{u’’’}{’’’},%
morestring=[s]{u"""}{"""}%
}%
\RequirePackage{textcomp}
\definecolor{IDLEorange}{RGB}{255,119,0} % pretty close to real orange
\definecolor{IDLEpurple}{RGB}{144,0,144}
\definecolor{IDLEgreen}{RGB}{0,170,0}
\definecolor{IDLEred}{RGB}{221,0,0}
%% Corrected to ‘‘web-safe’’
\definecolor{orange2}{RGB}{255,102,0}
\definecolor{purple2}{RGB}{153,0,153} % there’s actually no standard purple
\definecolor{green2}{RGB}{0,153,0} % a darker green
\definecolor{red2}{RGB}{221,0,0}
\definecolor{verylightgray}{RGB}{216,216,216}
% \RequirePackage{lstlinebgrd}
% Except for green and purple, the other colors are pretty good in standard
% hue
\lstset{%
language=Python, % the language
basicstyle=\normalsize\ttfamily, % size of the fonts for the code
% Color settings to match IDLE style
keywordstyle=\color{orange}, % core keywords
keywordstyle={[2]\color{purple2}}, % built-ins
stringstyle=\color{green2},%
commentstyle=\color{red},%
% linebackgroundcolor=\ifodd\value{lstnumber}\color{verylightgray}\else\color{white}\fi,
upquote=true, % requires textcomp
extendedchars=true,
literate={á}{{\'a}}1 {ã}{{\~a}}1 {é}{{\'e}}1 {ò}{\`{o}}1 {à}{\`{a}}1 {è}{\`{e}}1 {ù}{\'{u}}1,
captionpos=b, % Position of the Caption (t for top, b for bottom)
tabsize=2, % number of spaces indented when discovering a tab
columns=fixed, % make all characters equal width
keepspaces=true, % does not ignore spaces to fit width, convert tabs to spaces
showstringspaces=false, % lets spaces in strings appear as real spaces
breaklines=true, % wrap lines if they don't fit
xleftmargin=.25in,
xrightmargin=.25in
}
\RequirePackage{dsfont}
\newcommand{\Rset}{$\mathds{R}$}
\newcommand{\Zset}{$\mathds{Z}$}
\RequirePackage{minted}
\setminted[python]{
frame=single,
breaklines,
}
\usemintedstyle{perldoc}
% change chapter text
\RequirePackage{fancyhdr}
\renewcommand{\chaptername}{Capitolo}
\RequirePackage{nameref}