% Required to support mathematical unicode
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{listings}
\lstset{inputencoding=utf8/latin1,language=Python}

\usepackage[french]{algorithm2e}%pseudocode
% Always typeset math in display style
\everymath{\displaystyle}

% Use a larger font size
\usepackage[fontsize=12pt]{scrextend}

% Standard mathematical typesetting packages
\usepackage{mathtools}  % Extension to amsmath
\usepackage[frenchstyle,narrowiints,partialup,nowarning]{kpfonts}
\usepackage[amsmath,hyperref,amsthm,framed,thmmarks]{ntheorem}

% Extras
\let\transp\undefined  % clash with mathtools
\usepackage{physics}  % Lots of useful shortcuts and macros
\usepackage{tikz-cd}  % For drawing commutative diagrams easily
\usepackage{xcolor}  % Add some colour to life
\usepackage{microtype}  % Minature font tweaks
\usepackage{tkz-tab} % french variation table
\usetikzlibrary{shapes,arrows}
% Common shortcuts
\def\bN{\boldmath{N}}
\def\bC{\boldmath{C}}
\def\bR{\boldmath{R}}
\def\bQ{\boldmath{Q}}
\def\bZ{\boldmath{Z}}

% Sometimes helpful macros
\newcommand{\func}[3]{#1\colon#2\to#3}
\newcommand{\vfunc}[5]{\func{#1}{#2}{#3},\quad#4\longmapsto#5}
\newcommand{\floor}[1]{\left\lfloor#1\right\rfloor}
\newcommand{\ceil}[1]{\left\lceil#1\right\rceil}
\newcommand\eqdef{\mathrel{\overset{\makebox[0pt]{\mbox{\tiny def}}}{=}}}
\DeclarePairedDelimiter{\intff}{\lbrack}{\rbrack}{#1;#2} % Intervalle fermé (à gauche & à droite) 
\DeclarePairedDelimiter{\intoo}{\rbrack}{\lbrack}{#1;#2}% Intervalle ouvert (à gauche et à droite)
\DeclarePairedDelimiter{\intof}{\rbrack}{\rbrack}{#1;#2} %Intervalle ouvert à gauche, fermé à droite
\DeclarePairedDelimiter{\intfo}{\lbrack}{\lbrack}{#1;#2}%Intervalle fermé à gauche, ouvert  à droite
% Some standard theorem definitions
\theoremstyle{break}                  % passage à la ligne
\theorembodyfont{\itshape}     % fonte
\newtheorem{theoreme}{Th\'eor\`eme}
\newtheorem{proposition}{Proposition}
\newtheorem{propriete}{Propri\'et\'e}
\newtheorem{lemme}{Lemme}
\theorembodyfont{\upshape} % nouvelle fonte
\newtheorem{exemple}{Exemple}
\newtheorem{remarque}{Remarque}
\newtheorem*{definition}{D\'efinition}
\newtheorem{convention}{Convention}
\newtheorem{note}{Note}
\tiny
