-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhexercises.sty
103 lines (89 loc) · 2.38 KB
/
hexercises.sty
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
\usepackage[a4paper, total={165mm,250mm}]{geometry}
\usepackage{listings}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{regexpatch}
\usepackage{realboxes}
\usepackage{textcomp}
\usepackage{xfrac}
\usepackage{tikzpagenodes}
\usepackage{inconsolata}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[ttdefault=true]{AnonymousPro}
\usepackage{parskip}
\usepackage{fontspec}
\usepackage{tikz}
\setlength{\parskip}{0em}
\definecolor{GitHubGray}{rgb}{0.9,0.9,0.9}
\lstset{
language=c,
breaklines=true,
keywordstyle=\bfseries\color{black},
basicstyle=\ttfamily\color{black}\fontsize{9pt}{10pt}\selectfont,
emphstyle={\em \color{gray}},
keepspaces=true,
showspaces=false,
showtabs=true,
tabsize=2,
upquote=true,
aboveskip=2pt,
belowskip=2pt,
framexleftmargin=2pt,
extendedchars=true,
inputencoding=utf8,
literate=
{à}{{\`a}}1
{è}{{\`e}}1
{é}{{\'e}}1
{É}{{\'E}}1
{ê}{{\^e}}1
{î}{{\^i}}1
{ö}{{\"o}}1
{°}{\textdegree}1
{ç}{{\c{c}}}1
}
% Listing
\mdfsetup{%
roundcorner=2pt,
innerleftmargin=3pt,
innertopmargin=3pt,
linecolor=black!60,%
linewidth=0.3pt,
innerbottommargin=3pt
}
\xpretocmd\lstinline{\Colorbox{GitHubGray}\bgroup\appto\lst@DeInit{\egroup}}{}{}
\DeclareRobustCommand*\school[1]{\gdef\@school{#1}}
\DeclareRobustCommand*\department[1]{\gdef\@department{#1}}
\DeclareRobustCommand*\seriesno[1]{\gdef\@seriesno{#1}}
\DeclareRobustCommand*\classroom[1]{\gdef\@classroom{#1}}
\input{revision}
\def\@maketitle{%
\newpage
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north west)}]
\node[anchor=north west,xshift=2.1cm,yshift=-1.5cm]{
\includegraphics[width=1.7cm]{assets/heig-vd-black.pdf}
};
\end{tikzpicture}
\null
\begin{center}%
{\LARGE Série d'exercices \@seriesno \par}%
\ifprintanswers Solution \fi
{\LARGE \bfseries\@title \par}%
\vskip 1.5em%
{\@classroom}%
\vskip 1.0em%
{\revisiondate}
\vskip 1.0em%
\end{center}%
\par
\noindent\rule{\textwidth}{0.4pt}\vskip 1em}
\newcommand{\CD}[1]{\lstinline{#1}}
\qformat{\textbf{Exercice \thequestion}\hfill}
\renewcommand{\questionshook}{\leftmargin=0pt%
\labelwidth=-\labelsep}
\firstpagefooter{\revision}{}{Page \thepage\ sur \numpages}