-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcode_format.sty
More file actions
99 lines (91 loc) · 2.29 KB
/
code_format.sty
File metadata and controls
99 lines (91 loc) · 2.29 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
89
90
91
92
93
94
95
96
97
98
99
\lstdefinestyle{customcpp}{
numbers=left,
numberstyle=\tiny,
belowcaptionskip=1\baselineskip,
breaklines=true,
xleftmargin=\parindent,
language=C++,
showstringspaces=false,
basicstyle=\footnotesize\ttfamily,
keywordstyle=\bfseries\color{green!40!black},
commentstyle=\itshape\color{purple!40!black},
identifierstyle=\color{blue},
stringstyle=\color{orange},
}
\lstdefinestyle{customjava} {
language=Java,
backgroundcolor=\color{lightgray},
breaklines=true,
% numbers=left,
% numberstyle=\tiny,
basicstyle=\ttfamily,
keywordstyle=\bfseries\color{green!40!black},
commentstyle=\itshape\color{purple!40!black},
identifierstyle=\color{blue},
stringstyle=\color{orange},
}
\lstdefinestyle{myxml} {
backgroundcolor=\color{lightgray},
language=XML,
breaklines=true,
% numbers=left,
% numberstyle=\tiny,
basicstyle=\ttfamily,
keywordstyle=\bfseries\color{green!40!black},
commentstyle=\itshape\color{purple!40!black},
identifierstyle=\color{blue},
stringstyle=\color{orange},
}
\lstdefinestyle{mysh} {
backgroundcolor=\color{lightgray},
language=sh,
breaklines=true,
% numbers=left,
% numberstyle=\tiny,
basicstyle=\ttfamily,
keywordstyle=\bfseries\color{green!40!red},
commentstyle=\itshape\color{purple!40!black},
identifierstyle=\color{blue},
stringstyle=\color{orange},
}
\lstdefinestyle{mysql} {
backgroundcolor=\color{lightgray},
language=SQL,
breaklines=true,
basicstyle=\ttfamily,
keywordstyle=\bfseries\color{green!40!red},
commentstyle=\itshape\color{purple!40!black},
identifierstyle=\color{blue},
stringstyle=\color{orange},
}
\lstdefinestyle{normal} {
language=sh,
basicstyle=\ttfamily,
breaklines=true,
keywordstyle=\bfseries\color{green!40!red},
commentstyle=\itshape\color{purple!40!black},
identifierstyle=\color{blue},
stringstyle=\color{orange},
}
\lstset{style=normal}
\ctexset {
part/pagestyle = empty,
chapter = {
format = \raggedright,
pagestyle = empty,
},
section = {
name = {第,部分},
number = \chinese{section},
},
subsection = {
name = {第,节},
number = \chinese{subsection},
}
}
\pagestyle{fancy}
\titleformat{\section}
{\LARGE\bfseries\sffamily\color{RoyalBlue}}
{\includegraphics[height=2em]{hadoop/hadoop2.png} \thesection{}.}
{1em}
{\huge\scshape}