-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNotebook.tex
More file actions
153 lines (126 loc) · 4.25 KB
/
Notebook.tex
File metadata and controls
153 lines (126 loc) · 4.25 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
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
\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,1.0cm}]{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[hidelinks]{hyperref} % For clickable table of contents
\usepackage{fancyhdr}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
\usepackage{blindtext}
\usepackage{lastpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\headheight 25pt
\fancyheadoffset{0pt}
\fancyfootoffset{0pt}
\setlength\headsep{5pt}
\fancyhf{} % clear existing header/footer entries
\lhead{Lund University - ECON101}
\chead{}
\rhead{\thepage}
\cfoot{}
\lfoot{}
\rfoot{}
\title{ECON101 Algorithm Competition notebook}
%get borders for document
\setlength{\columnseprule}{0.5pt} % Multicol separation line with
\setlength{\columnsep}{10pt} % Multicol separation margin
\setcounter{tocdepth}{1} % Table of contents depth
%setup code environment
\usepackage{listings}
\usepackage{xcolor}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
% Styles for main toc
\renewcommand{\chaptermark}[1]{\markboth{\emph{ #1}}{}}
\renewcommand{\cftbeforetoctitleskip}{-45pt}
\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.5}[1]{\color{black!80}{\{}}%
\endgroup
}
\newcommand*{\nicerbrace}{%
\begingroup
\fontencoding{T1}%
\fontfamily{pcr}% Courier
\selectfont
\scalebox{1.5}[1]{\color{black!80}{\}}}%
\endgroup
}
\newcommand{\codeheader}[2]{
{\par\noindent\footnotesize{\textbf{#1:} #2\par}}
}
\newcommand{\hardcolumnbreak}{\vfill\null\columnbreak}
\pdfsuppresswarningpagegroup=1
\patchcmd{\titlepage}{empty}{fancy}{}{}
\patchcmd{\chapter}{plain}{fancy}{}{}
\begin{document}
\begin{multicols*}{3}
\input{contest/contest}\\
\input{math/math}\\
\input{graph/graph}
\input{data-structures/data-structures}
\input{div/div}
\input{Geometry/geometry}
\input{NumberTheory/NumberTheory}
% to add numeriical, number theory, geometry, string, various
\end{multicols*}
\end{document}