-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprelude.tex
56 lines (50 loc) · 1.51 KB
/
prelude.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
\documentclass[10pt]{article}
\usepackage[a4paper, total={18cm, 25cm}]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{fontspec}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\usepackage{lmodern}
\usepackage{parskip}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{multicol}
\usepackage{xpatch}
\usepackage{realboxes}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage[ttdefault=true]{AnonymousPro}
\usepackage{titlesec}
\graphicspath{ {./assets/} }
\definecolor{mygray}{rgb}{0.9,0.9,0.9}
\definecolor{points}{rgb}{0.5,0.5,0.5}
\titleformat{\section}{\bfseries\sffamily\large}{Problème \thesection~-- }{0.2em}{}
\titleformat*{\subsection}{\normalsize\bfseries}
\titleformat*{\subsubsection}{\small\bfseries}
\titlespacing*{\section}{0pt}{*2}{*1}
\titlespacing*{\subsection}{0pt}{*2}{*1}
\lstset{
language=c,
breaklines=true,
keywordstyle=\bfseries\color{black},
basicstyle=\ttfamily\color{black}\fontsize{9pt}{10pt}\selectfont,
emphstyle={\em \color{gray}},
emph={expression, expr, type, NAME, name, expr, value, filename, label, member, type},
keepspaces=true,
showspaces=false,
showtabs=true,
tabsize=3,
upquote=true,
backgroundcolor=\color{mygray},
aboveskip=2pt,
belowskip=2pt,
framexleftmargin=2pt,
}
\makeatletter
\xpretocmd\lstinline{\Colorbox{mygray}\bgroup\appto\lst@DeInit{\egroup}}{}{}
\makeatother
\newcommand\pts[1]{\small\color{points}\emph{(#1 pt)}}
\newcommand{\fixspacing}{\vspace{0pt plus 1filll}\mbox{}}