-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tex
57 lines (46 loc) · 1.4 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
\documentclass[a4paper, 11pt]{report}
\usepackage{preamble}
\usepackage{ifthen}
\usepackage{multicol}
\setlength{\columnseprule}{0.1pt}
\usepackage{setspace}
\usepackage{pgffor}
\usepackage{subfiles}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\setlength {\marginparwidth }{2cm}
\input{macros}
\newcounter{exercise}[chapter]
\newenvironment{exercise}[2][]{\refstepcounter{exercise}\ifthenelse{\equal{#1}{}}{\noindent\vspace{0.5cm}{\textbf{Exercise \thechapter.\theexercise} \textsc{#2}\\}\addcontentsline{toc}{section}{Exercise \theexercise. #2}}{} }{}
\providecommand{\soldone}{}
\newenvironment{solution}[1][]{\renewcommand{\soldone}{\equal{#1}{}}\ifthenelse{\soldone}{\par\vspace{0.4cm}\noindent{\bfseries Solution : }}{}}{\ifthenelse{\soldone}{\hfill $\whitesquaregamma$ \par\vspace{0.4cm}}{}}
\newcommand\TwoDigits[1]{%
\ifnum#1<10 0#1\else #1\fi
}
\newcommand*{\MaxNumOfChapters}{40}
\providecommand{\main}{.}
\title{
\begin{Huge}
Modern intro to Online Learning -- Exercise Solutions
\end{Huge}
}
\author{Ludovic Schwartz}
\date{}
\setlength{\parskip}{.3em}
\begin{document}
\maketitle
\clearpage
\begin{small}
\tableofcontents
\end{small}
\foreach \c in {1,2,...,\MaxNumOfChapters}{%
\edef\FileName{chapter_\TwoDigits{\c}/main}
\IfFileExists{\FileName} {%
\subfile{\FileName}%
}{%
% files does not exist, so nothing to do
}%
}%
\clearpage
\bibliography{ref}
\end{document}