-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.tex
164 lines (141 loc) · 5.05 KB
/
main.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
\documentclass[9pt, a4paper, notitlepage]{extreport}
\usepackage[utf8]{inputenc} % Encoding UTF-8
\usepackage{listings} % Source code listings
\usepackage{framed} % Source code listings
\usepackage[a4paper,landscape,hmargin={0.5cm,0.5cm},vmargin={1.0cm,0.4cm}]{geometry}
\usepackage{multicol} % Split page in multiple columns
\usepackage{fancyhdr} % Fancy headers
\usepackage{amsbsy, amssymb, amsmath} % Enable math symbols
\usepackage{tocloft} % Custom Table of Contents
\usepackage{titletoc} % Design control over Table of Contents
\usepackage{ifthen} % To enable some conditional programming in LaTeX
\usepackage{courier} % To get bold typewriter typeface
\usepackage{graphicx} % To rotate page numbers
\usepackage{fix-cm} % Large font sizes
\usepackage{paralist} % For compact enumerations
\usepackage[inline]{enumitem} % For horizontal lists
\usepackage[parfill]{parskip} % For compact enumerations
\usepackage[dvipsnames]{xcolor}
\usepackage[normalem]{ulem}
\usepackage{titlesec}
\usepackage[hidelinks]{hyperref} % For clickable table of contents
\usepackage{lipsum} % dummy text
\usepackage{mathtools}
\usepackage{framed}
\usepackage{sourcecodepro} % Sets everything to sourcecodepro
\newcommand{\enablecolors}{
\lstset{basicstyle=\footnotesize\ttfamily\color{mygreen}}
\lstset{commentstyle=\color{darkgray}\normalfont\itshape}
\lstset{keywordstyle=\color{myblue}}
\lstset{identifierstyle=\color{black}}
}
\title{CP Sapienza Booklet}
\newcommand{\PDFColor}{0}
\newmarks\hdrmark
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\headheight 25pt
\rhead{\thepage}
\lhead{}
% \lhead{}\chead{\thepage}\rhead{}
\lhead{Sapienza Università di Roma}
\lfoot{}\cfoot{}\rfoot{}
\fancyheadoffset{0pt}
\fancyfootoffset{0pt}
\setlength\headsep{5pt}
% Styles for main toc
\renewcommand{\chaptermark}[1]{\markboth{\emph{ #1}}{}}
\renewcommand{\cftbeforetoctitleskip}{-5pt}
\renewcommand{\cftaftertoctitleskip}{10pt}
\renewcommand{\cftbeforechapskip}{11pt}
% \renewcommand\cftchapfont{\large\bfseries}
\renewcommand{\cftdotsep}{4.5}
% Proper carets and tildes
\newcommand*{\caret}{%
\begingroup
\fontencoding{T1}%
\fontfamily{pcr}% Courier
\selectfont
\string^%
\endgroup
}
\renewcommand*{\tilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}}
% Fatter {} which are more distinguishable from ()
% Makes pdf compile time 5-10% slower, but probably worth it still?
\newcommand*{\nicelbrace}{%
\begingroup
\fontencoding{T1}%
\fontfamily{pcr}% Courier
\selectfont
\scalebox{1.8}[1]{\color{black!80}{\{}}%
\endgroup
}
\newcommand*{\nicerbrace}{%
\begingroup
\fontencoding{T1}%
\fontfamily{pcr}% Courier
\selectfont
\scalebox{1.8}[1]{\color{black!80}{\}}}%
\endgroup
}
% Spacing around section and subsection titles
% \titlespacing*{\section}{-2pt}{2ex}{1.5ex}
% \titlespacing*{\subsection}{-2pt}{2ex}{1.5ex}
% \renewcommand{\thesection}{\arabic{section}}
\definecolor{mygreen}{HTML}{007000}
\definecolor{myblue}{HTML}{0000dd}
% Configure source code listings
\lstset{language=C++}
\lstset{morekeywords={alignas,alignof}}
\lstset{deletedirectives={line}}
\lstset{frame=t}
\lstset{tabsize=2}
\lstset{showstringspaces=false}
\lstset{breaklines=true}
\lstset{basicstyle=\footnotesize\ttfamily}
% \lstset{basicstyle=\small\ttfamily}
\lstset{commentstyle=\normalfont\itshape}
\lstset{literate={^}{\caret}{1} {~}{\tilde}{1} {\{}{\nicelbrace}{1} {\}}{\nicerbrace}{1}}
\lstset{emptylines=*1}
\lstset{inputencoding=utf8}
\lstset{aboveskip=3pt}
\lstset{belowskip=2pt}
% \lstset{postbreak=\mbox{\textcolor{blue}{$\hookrightarrow$}\space}}
\lstdefinelanguage{raw}{} % Raw language, no keywords.
\setlength{\columnseprule}{0.5pt} % Multicol separation line with
\setlength{\columnsep}{10pt} % Multicol separation margin
\setcounter{tocdepth}{2} % Table of contents depth
\setcounter{secnumdepth}{0} % No section numbers
\newcommand{\bigo}[1]{$\mathcal{O}(#1)$}
% \definecolor{shadecolor}{HTML}{dddddd}
% \newcommand{\todo}[1]{\begin{snugshade}\textbf{TODO: #1}\end{snugshade}}
\definecolor{shadecolor}{named}{lightgray}
\newcommand{\todo}[1]{\begin{shaded}\textbf{TODO: #1}\end{shaded}}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
% \warning command
\newcommand*{\TakeFourierOrnament}[1]{{%
\fontencoding{U}\fontfamily{futs}\selectfont\char#1}}
\newcommand*{\warning}{\TakeFourierOrnament{66}}
\newcommand{\snippet}[1]{\input|"./utils/gen_snippet.py #1"}
\begin{document}
\begin{multicols*}{3}
\begin{center}
\huge Sapienza Università di Roma
\vspace{1.5em}
\end{center}
\tableofcontents
\vfill\null
\columnbreak
\input{content/basics}
\input{content/data-structures}
\input{content/strings}
\input{content/bit-ops}
\input{content/maths}
\input{content/lp}
\input{content/graphs}
\input{content/flows}
\input{content/trees}
\input{content/geometry}
\end{multicols*}
\end{document}