-
Notifications
You must be signed in to change notification settings - Fork 1
/
Codebook.tex
165 lines (136 loc) · 4.74 KB
/
Codebook.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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
% ============================================= %
% %
% University of Miami ACM Codebook %
% %
% ============================================= %
\documentclass[10pt]{report}
% shows the margins
%\usepackage[showframe]{geometry}
%===============================================================================
\usepackage{listings}
\usepackage{courier}
\usepackage{color}
\usepackage{caption}
\usepackage[dvipsnames]{xcolor}
\usepackage[top=1.0in, bottom=1.0in, left=1.0in, right=1.0in]{geometry}
\usepackage{titlesec}
\usepackage[pdftex]{graphicx}
%===============================================================================
\titleformat{\chapter}{\bf\LARGE}{\thechapter}{1em}{}
\titleformat{\section}{\bf\Large}{\thesection}{1em}{}
\titleformat{\subsection}{\bf\large}{\thesubsection}{1em}{}
%===============================================================================
\definecolor{myorange}{RGB}{255,205,50}
\definecolor{darkorange}{RGB}{255,105,50}
\definecolor{darkgreen}{RGB}{0,120,0}
\definecolor{mygreen}{RGB}{0,190,0}
\definecolor{mygray}{RGB}{245,245,245}
\definecolor{codegreen}{RGB}{0,150,0}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
%===============================================================================
\lstset{
basicstyle=\normalsize\ttfamily,
numbers=left,
numberstyle=\footnotesize,
numbersep=5pt,
tabsize=2,
extendedchars=true,
breaklines=true,
keywordstyle=\color{codegreen},
frame=tlbr,
%keywordstyle=[1]\textbf,
%keywordstyle=[2]\textbf,
%keywordstyle=[3]\textbf,
%keywordstyle=[4]\textbf,
stringstyle=\color{red}\ttfamily,
showspaces=false,
showtabs=false,
xleftmargin=20pt,
xrightmargin = 0pt,
framexleftmargin=16pt, %controls position of left frame line
framexrightmargin=3pt, %controls position of right frame line
framexbottommargin=3pt,
framextopmargin=3pt,
backgroundcolor=\color{mygray},
showstringspaces=false,
%framesep = 2pt
}
\lstloadlanguages{
%C
%C++
Java
}
\DeclareCaptionFont{white}{\color{black}}
\DeclareCaptionFormat{listing}{\colorbox{myorange}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,normalsize}, skip = 10pt}
%===============================================================================
\makeatletter
% Basically the same as for `\l@section` etc, just `\@nodottedtocline` instead of `\@dottedtcline`:
\newcommand*\l@chapterinfo{\@nodottedtocline{0}{0.0em}{1.5em}}
\newcommand*\l@sectioninfo{\@nodottedtocline{1}{1.5em}{2.3em}}
\newcommand*\l@subsectioninfo{\@nodottedtocline{2}{3.8em}{3.2em}}
\newcommand*\l@subsubsectioninfo{\@nodottedtocline{3}{7.0em}{4.1em}}
\newcommand*\l@paragraphinfo{\@nodottedtocline{4}{10em}{5em}}
\newcommand*\l@subparagraphinfo{\@nodottedtocline{5}{12em}{6em}}
% Copied from the book class macro `\@dottedtocline`. Removed the dots and page number
\def\@nodottedtocline#1#2#3#4#5{%
\ifnum #1>\c@tocdepth \else
\vskip \z@ \@plus.2\p@
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima #3\relax
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{#4}\nobreak
\leaders\hbox{$\m@th
\mkern \@dotsep mu\hbox{\,}\mkern \@dotsep
mu$}\hfill
\nobreak
\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor }%
\par}%
\fi}
\makeatother
\def\chapterinfo#1{
\addcontentsline{toc}{chapterinfo}{
\noexpand\numberline{}#1}
}
\def\sectioninfo#1{
\addcontentsline{toc}{sectioninfo}{
\noexpand\numberline{}#1}
}
\def\subsectioninfo#1{%
\addcontentsline{toc}{subsectioninfo}{
\noexpand\numberline{}#1}
}
%====================
% reduces spacing for mod declaration
\makeatletter
\def\imod#1{\allowbreak\mkern10mu({\operator@font mod}\,\,#1)}
\makeatother
%===============================================================================
%\title{\Huge{\color{darkgreen}University of Miami \\ACM Codebook}}
\begin{document}
\newcommand{\comments}[1]{}
%\maketitle
%\includegraphics{Images/umlogo.jpeg}
\input{./Title.tex}
\tableofcontents
%===============================================================================
%==============================
\input{Mathematics}
%==============================
\input{GraphAlgorithms}
%==============================
\input{Geometry}
%==============================
\input{DynamicProgramming}
%==============================
\input{TreeDataStructures}
%==============================
\input{Miscellaneous}
%==============================
\input{LanguageSpecificReferences}
%==============================
%===============================================================================
\end{document}