-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCode.tex
More file actions
91 lines (77 loc) · 5.61 KB
/
Code.tex
File metadata and controls
91 lines (77 loc) · 5.61 KB
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
% =======================================================
% =========== CODE EDITING ===========
% =======================================================
\newcommand{\fontCode} { \ttfamily\bfseries } %Use: \fontCode for font
\newcommand{\fontCodeTiny} { \fontCode\tiny } %Sizes
\newcommand{\fontCodeFoot} { \fontCode\footnotesize } %Sizes
\newcommand{\fontCodeScript} { \fontCode\scriptsize } %Sizes
\newcommand{\fontCodeCostume} { \fontCode\fontsize{10}{7} } %Sizes
% ===== CODE EDITOR =============
\lstdefinestyle{CompilandoStyle} { %This is Code Style
backgroundcolor = \color{BlueGrey900MD}, %Background Color
basicstyle = \fontCodeTiny\color{white}, %Style of text
commentstyle = \color{BlueGrey200MD}, %Comment style
stringstyle = \color{Green300MD}, %String style
keywordstyle = \color{Blue300MD}, %keywords style
numberstyle = \tiny\color{TealMD}, %Size of a number
frame = none, %Adds a frame around the code
breakatwhitespace = true, %Style
breaklines = true, %Style
showstringspaces = false, %Hate those spaces
breaklines = true, %Style
keepspaces = true, %Style
numbers = left, %Style
numbersep = 10pt, %Style
xleftmargin = \parindent, %Style
tabsize = 4, %Style
inputencoding = utf8/latin1 %Allow me to use special chars
}
% ===== CODE EDITOR =============
\lstdefinestyle{CompilandoStylePurity} { %This is Code Style
backgroundcolor = \color{white}, %Background Color
basicstyle = \fontCodeTiny\color{BlueGrey900MD}, %Style of text
commentstyle = \color{Green300MD}, %Comment style
stringstyle = \color{Teal700MD}, %String style
keywordstyle = \color{Blue700MD}, %keywords style
numberstyle = \tiny\color{TealMD}, %Size of a number
frame = none, %Adds a frame around the code
breakatwhitespace = true, %Style
breaklines = true, %Style
showstringspaces = false, %Hate those spaces
breaklines = true, %Style
keepspaces = true, %Style
numbers = left, %Style
numbersep = 11pt, %Style
xleftmargin = \parindent, %Style
tabsize = 4, %Style
inputencoding = utf8/latin1 %Allow me to use special chars
}
% ===== CODE EDITOR =============
\lstdefinestyle{CompilandoStyleSolarized} { %This is Code Style
backgroundcolor = \color{SolarizedBase}, %Background Color
basicstyle = \fontCodeFoot\color{SolarizedFont}, %Style of text
commentstyle = \color{Green300MD}, %Comment style
stringstyle = \color{Teal700MD}, %String style
keywordstyle = \color{Blue700MD}, %keywords style
numberstyle = \tiny\color{TealMD}, %Size of a number
frame = none, %Adds a frame around the code
breakatwhitespace = true, %Style
breaklines = true, %Style
showstringspaces = false, %Hate those spaces
breaklines = true, %Style
keepspaces = true, %Style
numbers = none, %Style
tabsize = 4, %Style
inputencoding = utf8/latin1 %Allow me to use special chars
}
\lstset{style = CompilandoStyleSolarized} %Use this style
% ================================================================
% ================= INSERT CODE =====================
% ================================================================
\lstinputlisting[language=C]{Code.c}
\lstinputlisting[language=C, linerange={a-b, c-d}, gobble=x]{Code.c}
\begin{lstlisting}[language=C, linerange={a-b, c-d}, gobble=x]
Code(fun T<x>A) {
...
}
\end{lstlisting}