-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.tex
91 lines (76 loc) · 3.1 KB
/
style.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
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
%----------------------------------------------------------
% Styles
%----------------------------------------------------------
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\name}[1]{,,#1``}
% Change how \emph emphasizes inside an italic environment
%\renewcommand\eminnershape{}
%----------------------------------------------------------
% Font
%----------------------------------------------------------
% Change font to sans serif
%\renewcommand{\familydefault}{\sfdefault}
% Example font packages
% Don't use multiple at once except for different use cases like regular fonts (lmodern, gentium) and monospace fonts (inconsolata)
\usepackage{lmodern} % Default LaTeX font (but scalable)
%\usepackage{gentium}
%\usepackage{inconsolata}
%----------------------------------------------------------
% Depth of section entries
% 0 chapters only
% 1 chapters and sections
% 2 chapters - subsections
% 3 chapters - subsubsections
% 4 chapters - paragraphs
%----------------------------------------------------------
% Numbering of headers
\setcounter{secnumdepth}{2}
% Table of content entries
\setcounter{tocdepth}{2}
% PDF bookmarks
% Initial state of PDF bookmarks (open / closed) can also be defined
\hypersetup{
bookmarksdepth=2,
bookmarksopen=false
}
%----------------------------------------------------------
% Source code (listings)
%----------------------------------------------------------
% Code style colors
\definecolor{lstbgr}{RGB}{245,245,245}
\definecolor{lstkeyword}{RGB}{0,0,255}
\definecolor{lststring}{RGB}{163,21,21}
\definecolor{lstcomment}{RGB}{0,128,0}
% Default format
\lstset{
language=Python,% the language of the code
backgroundcolor=\color{lstbgr},% choose the background color
basicstyle=\ttfamily\footnotesize,% the size of the fonts that are used for the code
keywordstyle=\color{lstkeyword},% keyword style
stringstyle=\color{lststring},% the style that is used for strings
commentstyle=\color{lstcomment},% comment style
numberstyle=\ttfamily\footnotesize,% the style that is used for the line-numbers
tabsize=2,% sets default tabsize to 2 spaces
keepspaces=true,% keeps spaces in text
showstringspaces=false,% use a symbol for spaces in strings
breakatwhitespace=false,% sets if automatic breaks should only happen at whitespace
breaklines=true,% sets automatic line breaking
frame=single,% adds a frame around the code
captionpos=b,% where to put the caption
numbers=left,% where to put the line-numbers
numbersep=12pt,% how far the line-numbers are from the code
xleftmargin=26.2pt,% sets left margin for entire box to equal table margin
framexleftmargin=23pt,% sets left margin for frame to also surround line numbers
framexrightmargin=-3.2pt,% sets left margin for frame to be equal on both sides
}
% Define unformatted language style
\lstdefinelanguage{none}
{
identifierstyle=
}
%----------------------------------------------------------
% Define new words with hyphenation
%----------------------------------------------------------
\hyphenation{Back-slash}
\hyphenation{Tool-um-ge-bung}
\hyphenation{Tool-um-ge-bun-gen}