%% MON TEMPLATE DE THESE

%% Language
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{dsfont}

%% Other useful packages
%\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage[linesnumbered,commentsnumbered,inoutnumbered]{algorithm2e}
\usepackage[x11names, svgnames, rgb]{xcolor}
% \usepackage{subfigure}
\usepackage{subcaption}
\usepackage{verbatim}
\usepackage{times}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.jpg,.pdf,.mps,.eps,.png}
\usepackage{amscd}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}  % XXX If using, comment the last lines in jmlr2e.sty
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{bbm}  % bold maths symbols
\usepackage{pdfpages}
\usepackage{bm}   % bold maths symbols
\usepackage{amsfonts}
\usepackage{MnSymbol}
\usepackage{todonotes}

%% Margins
\oddsidemargin=0pt
\textwidth=455pt
\textheight=620pt
\voffset=-20pt
\marginparwidth=0pt
\marginparpush=0pt
\marginparsep=0pt
\evensidemargin=0pt


%% Color definition
\usepackage{xcolor}
\definecolor{Bleu}{RGB}{0,0,204}  % rgb(0,0,204)
\definecolor{Violet}{RGB}{102,0,204}  % rgb(102,0,204)
\definecolor{darkgreen}{RGB}{0,180,0}  % rgb(0,180,0)
\definecolor{gold}{RGB}{255,184,0}  % rgb(255,184,0)
\definecolor{Rouge}{RGB}{204,0,0}  % rgb(204,0,0)
\definecolor{Highlight}{RGB}{251,0,0}  % rgb(251,0,0)


%% Bibliography and references
% \bibliographystyle{ieeetr}
% \bibliographystyle{alpha}
% \bibliographystyle{apalike}

\usepackage{hyperref}
\hypersetup{
colorlinks,
  citecolor=Bleu,
  linkcolor=Rouge,
  urlcolor=Violet}

\usepackage{breakcites} % repare pb de mise à la ligne des references


%% TikZ
\usepackage{tikz}
\usetikzlibrary{snakes,arrows,shapes}
% https://tex.stackexchange.com/a/226974/
\tikzset{
  font={\fontsize{10pt}{10}\selectfont}
}


%% Theorem English
\newtheorem{theorem}{Theorem}%[section]
\newtheorem{assumption}[theorem]{Assumption}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{defn}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}


%Calligraphic Shorthands
\newcommand{\cA}{\mathcal{A}}
\newcommand{\cB}{\mathcal{B}}
\newcommand{\cC}{\mathcal{C}}
\newcommand{\cD}{\mathcal{D}}
\newcommand{\cE}{\mathcal{E}}
\newcommand{\cF}{\mathcal{F}}
\newcommand{\cG}{\mathcal{G}}
\newcommand{\cH}{\mathcal{H}}
\newcommand{\cI}{\mathcal{I}}
\newcommand{\cJ}{\mathcal{J}}
\newcommand{\cK}{\mathcal{K}}
\newcommand{\cL}{\mathcal{L}}
\newcommand{\cM}{\mathcal{M}}
\newcommand{\cN}{\mathcal{N}}
\newcommand{\cO}{\mathcal{O}}
\newcommand{\cP}{\mathcal{P}}
\newcommand{\cQ}{\mathcal{Q}}
\newcommand{\cR}{\mathcal{R}}
\newcommand{\cS}{\mathcal{S}}
\newcommand{\cT}{\mathcal{T}}
\newcommand{\cU}{\mathcal{U}}
\newcommand{\cV}{\mathcal{V}}
\newcommand{\cW}{\mathcal{W}}
\newcommand{\cX}{\mathcal{X}}
\newcommand{\cY}{\mathcal{Y}}
\newcommand{\cZ}{\mathcal{Z}}

%Blackboard Bold Shorthands
\newcommand{\bE}{\mathbb{E}}
\newcommand{\bP}{\mathbb{P}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}

%Probability Shorthands
\def \ind{\mathds{1}}
\newcommand{\norm}[2]{\mathcal{N}\left(#1,#2\right)}
\newcommand{\BetaD}[2]{\text{Beta}\left(#1,#2 \right)}
\newcommand{\muhat}{\hat{\mu}}


% Bandit specific shorthands
\newcommand{\reg}{\text{R}}
\newcommand{\regfull}{\reg_{\bm{\theta}}(T,\cA)}
\newcommand{\br}{\text{BR}}
\newcommand{\Kinf}{\cK_{\text{inf}}\,}
\newcommand{\muA}{\hat{\mu}_a(t)}%moyenne empirique dans l'algorithme
\newcommand{\muS}{\hat{\mu}_{a,s}}
\newcommand{\thetaU}{\underline{\theta}}

% Statistical Shorthands
\newcommand{\K}{\mathrm{K}}
\newcommand{\Kb}{\mathrm{K}}


% Misc Math Operations Shorthands
\newcommand{\argmin}[1]{\underset{#1}{\text{argmin }}}
\newcommand{\argmax}[1]{\underset{#1}{\text{argmax }}}
\newcommand{\ngoesto}{\underset{n\rightarrow \infty}{\rightarrow}}
\newcommand{\Tgoesto}{\underset{T\rightarrow \infty}{\longrightarrow}}
\newcommand{\isequT}{\underset{T\rightarrow \infty}{\sim}}

\def \qed {\begin{flushright} $\qquad \Box $
  \end{flushright}}



% Coloring and working together
\def \red{\color{red}}
\def \black{\color{black}}


% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}


% Thanks to https://tex.stackexchange.com/a/53691/
\makeatletter
\newcommand{\mytag}[2]{%
  \text{#1}%
  \@bsphack
  \begingroup
    \@onelevel@sanitize\@currentlabelname
    \edef\@currentlabelname{%
      \expandafter\strip@period\@currentlabelname\relax.\relax\@@@%
    }%
    \protected@write\@auxout{}{%
      \string\newlabel{#2}{%
        {#1}%
        {\thepage}%
        {\@currentlabelname}%
        {\@currentHref}{}%
      }%
    }%
  \endgroup
  \@esphack
}
\makeatother
