This repository has been archived by the owner on Jun 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefinitions.tex
63 lines (61 loc) · 1.98 KB
/
definitions.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Definitions and commands used across the document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
% \blankpage
% Add a blankpage without any numbering
%%
\newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage}
%%
% Rust syntax highlighting
%%
\definecolor{GrayCodeBlock}{RGB}{241,241,241}
\definecolor{BlackText}{RGB}{110,107,94}
\definecolor{RedTypename}{RGB}{182,86,17}
\definecolor{GreenString}{RGB}{96,172,57}
\definecolor{PurpleKeyword}{RGB}{184,84,212}
\definecolor{GrayComment}{RGB}{170,170,170}
\definecolor{GoldDocumentation}{RGB}{180,165,45}
\lstdefinelanguage{rust}
{
columns=fullflexible,
keepspaces=true,
frame=single,
framesep=0pt,
framerule=0pt,
framexleftmargin=4pt,
framexrightmargin=4pt,
framextopmargin=5pt,
framexbottommargin=3pt,
xleftmargin=4pt,
xrightmargin=4pt,
backgroundcolor=\color{GrayCodeBlock},
basicstyle=\ttfamily\color{BlackText},
keywords={
true,false,
unsafe,async,await,move,
use,pub,crate,super,self,mod,
struct,enum,fn,const,static,let,mut,ref,type,impl,dyn,trait,where,as,
break,continue,if,else,while,for,loop,match,return,yield,in
},
keywordstyle=\color{PurpleKeyword},
ndkeywords={
bool,u8,u16,u32,u64,u128,i8,i16,i32,i64,i128,char,str,
Self,Option,Some,None,Result,Ok,Err,String,Box,Vec,Rc,Arc,Cell,RefCell,HashMap,BTreeMap,
macro_rules
},
ndkeywordstyle=\color{RedTypename},
comment=[l][\color{GrayComment}\slshape]{//},
morecomment=[s][\color{GrayComment}\slshape]{/*}{*/},
morecomment=[l][\color{GoldDocumentation}\slshape]{///},
morecomment=[s][\color{GoldDocumentation}\slshape]{/*!}{*/},
morecomment=[l][\color{GoldDocumentation}\slshape]{//!},
morecomment=[s][\color{RedTypename}]{\#![}{]},
morecomment=[s][\color{RedTypename}]{\#[}{]},
stringstyle=\color{GreenString},
string=[b]"
}