107 lines
3.5 KiB
TeX
107 lines
3.5 KiB
TeX
\usepackage{float}
|
|
\usepackage{array}
|
|
\usepackage[inkscapelatex=false]{svg}
|
|
\usepackage{graphicx}
|
|
\usepackage{mwe}
|
|
\usepackage{subfig}
|
|
\graphicspath{ {./img/} }
|
|
|
|
\usepackage{xcolor}
|
|
\definecolor{maincolor}{RGB}{0,118,190}
|
|
|
|
\usepackage[nocheck]{fancyhdr}
|
|
\usepackage[a4paper, total={6in, 10in}]{geometry}
|
|
\RequirePackage{hyperref}
|
|
\hypersetup{colorlinks=true, linktoc=all, linkcolor=maincolor}
|
|
|
|
\usepackage{titlesec}
|
|
\usepackage{titletoc}
|
|
\usepackage{multicol}
|
|
|
|
% pour le code
|
|
\usepackage[final]{listings}
|
|
\lstdefinestyle{code}{
|
|
frame=single,
|
|
belowcaptionskip=1\baselineskip,
|
|
breaklines=true,
|
|
frame=single,
|
|
xleftmargin=\parindent,
|
|
language=SQL,
|
|
showstringspaces=false,
|
|
basicstyle=\footnotesize\ttfamily,
|
|
keywordstyle=\bfseries\color{green!40!black},
|
|
commentstyle=\itshape\color{purple!40!black},
|
|
stringstyle=\color{orange},
|
|
}
|
|
\lstset{style=code, language=SQL}
|
|
\usepackage{minted}
|
|
|
|
|
|
% Pour les extraits de code
|
|
\RequirePackage{tcolorbox}
|
|
\tcbuselibrary{skins,theorems,breakable,listings}
|
|
\lstdefinelanguage{JavaScript}{
|
|
morekeywords=[1]{type, break, continue, delete, else, for, function, if, in,
|
|
new, return, this, typeof, var, void, while, with, District, const},
|
|
% Literals, primitive types, and reference types.
|
|
morekeywords=[2]{false, null, true, boolean, number, undefined,
|
|
Array, Boolean, Date, Math, Number, String, Object},
|
|
% Built-ins.
|
|
morekeywords=[3]{eval, parseInt, parseFloat, escape, unescape},
|
|
sensitive,
|
|
morecomment=[s]{/*}{*/},
|
|
morecomment=[l]//,
|
|
morecomment=[s]{/**}{*/}, % JavaDoc style comments
|
|
morestring=[b]',
|
|
morestring=[b]"
|
|
}[keywords, comments, strings]
|
|
\lstset{basicstyle=\ttfamily,language=SQL,keywordstyle=\color{blue},belowskip=0.5\baselineskip}
|
|
|
|
\RequirePackage[inline]{enumitem}
|
|
\setlist{font=\color{maincolor}\sffamily\bfseries}
|
|
|
|
\tcbset{colback=white, colframe=maincolor}
|
|
\setcounter{tocdepth}{3}
|
|
\newcommand{\marginsecnumber}[1]{\makebox[0pt][r]{#1\hspace{1ex}}}
|
|
\newcommand{\achiev}[1]{\emph{achievement} #1}
|
|
\renewcommand*\contentsname{Sommaire}
|
|
|
|
\newcommand{\code}[1]{{\sffamily\color{maincolor}\texttt{#1}}} % type some 'code' like text
|
|
|
|
%define page style
|
|
\pagestyle{fancy}
|
|
\renewcommand{\headrulewidth}{.5pt}
|
|
\renewcommand{\footrulewidth}{.5pt}
|
|
\renewcommand{\headrule}{{\color{maincolor}\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
|
|
\renewcommand{\footrule}{{\color{maincolor}\vskip-\footruleskip\vskip-\footrulewidth\hrule width\headwidth height\footrulewidth\vskip\footruleskip}}
|
|
|
|
%
|
|
\lhead{}
|
|
\chead{}
|
|
\rhead{\textcolor{maincolor}{\leftmark}}
|
|
\lfoot{}
|
|
\cfoot{}
|
|
\rfoot{\sffamily\textcolor{maincolor}{\thepage}}
|
|
|
|
% Define maincolor variable
|
|
|
|
\renewcommand{\title}[1]{\noindent\textbf{\color{maincolor}\sffamily\Huge #1}\par\bigskip}
|
|
|
|
% Change section format
|
|
\titleformat{\section}[block]{\huge\sffamily\bfseries\color{maincolor}}{\marginsecnumber\thesection}{0pt}{}
|
|
\titlespacing{\section}{0pt}{*2.5}{.5ex plus .5ex}
|
|
|
|
% Change subsection format
|
|
\titleformat{\subsection}{\Large\sffamily\bfseries\color{maincolor}}{\marginsecnumber\thesubsection}{0pt}{}
|
|
\titlespacing{\subsection}{0pt}{*1.5}{.5ex plus .5ex}
|
|
|
|
|
|
% Change subsection format
|
|
\titleformat{\subsubsection}{\Large\sffamily\bfseries\color{maincolor}}{\marginsecnumber\thesubsubsection}{0pt}{}
|
|
\titlespacing{\subsubsection}{0pt}{*1.2}{.5ex plus .5ex}
|
|
|
|
% Change paragraph format
|
|
\titleformat{\paragraph}[runin]{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
|
|
\titlespacing*{\paragraph}{0pt}{1ex plus .5ex minus .5ex}{1em}\setcounter{secnumdepth}{4}
|
|
|
|
\newcommand{\ligne}[0]{{\color{maincolor}\hrule}} |