%
% Macros Dj. 
%


%%% Pour passer en mode mathématiques automatiquement 
\newcommand{\EM}{\ensuremath}

%%% URLs pour sortie non PDF
\newcommand{\NOPDF}{\usepackage{url}}
%FIXME: Problème avec les ~ et # dans les paramètres, qu'il faut protéger par 
%FIXME: \string à la main. Cela devrait être fait automatiquement par les
%FIXME: macros.
% Requière Babel pour \string et hyperref si PDF
%\newcommand{\mURL}[2]{\texttt{#1\string://#2}}
%\newcommand{\WEB}[1]{\mURL{http}{#1}}
%\newcommand{\FTP}[1]{\mURL{ftp}{#1}}
%\newcommand{\Mwrap}[2]{#2}
%\newcommand{\MAIL}[2]{\texttt{#1\string@#2}}

%%% Pour sortie PDF
\newcommand{\PDFABLE}[1]{%   #1 = ae ou bien pslatex 
\newif\ifpdf%
\ifx\pdfoutput\undefined% %%LaTeX2e
 \pdffalse%
\else% %%PdfLaTeX
 \pdftrue%
 \pdfoutput=1%
 \pdfcompresslevel=9%
\fi%
\ifpdf%
 \usepackage{#1}%
 \usepackage[pdftex,%
             a4paper,%
             colorlinks,%
             citecolor=blue,%
             pagebackref,%
             plainpages=false]{hyperref}%
\else%
 \usepackage{url}
\fi}
%%%

%%% Pour théorèmes etc...  Nécessite le paquetage amsthm ou bien classe amsart
\newcommand{\THMEN}{%
 \theoremstyle{plain}%
 \newtheorem{thm}{Theorem}[section]%
 \newtheorem{cor}[thm]{Corollary}%
 \newtheorem{prop}[thm]{Proposition}%
 \newtheorem{lem}[thm]{Lemma}%
 \theoremstyle{definition}%
 \newtheorem{defi}[thm]{Definition}%
 \theoremstyle{remark}%
 \newtheorem{rem}[thm]{Remark}%
 \newtheorem{xpl}[thm]{Example}%
 \newtheorem{exe}[thm]{Exercise}%
 \newtheorem{hyp}[thm]{Hypothesis}%
}
\newcommand{\THMFR}{%
 \theoremstyle{plain}%
 \newtheorem{thm}{Théorème}[section]%
 \newtheorem{cor}[thm]{Corollaire}%
 \newtheorem{prop}[thm]{Proposition}%
 \newtheorem{lem}[thm]{Lemme}%
 \theoremstyle{definition}%
 \newtheorem{defi}[thm]{Définition}%
 \theoremstyle{remark}%
 \newtheorem{rem}[thm]{Remarque}%
 \newtheorem{xpl}[thm]{Exemple}%
 \newtheorem{exo}[thm]{Exercice}%
 \newtheorem{hyp}[thm]{Hypothèse}%
}
%%%

%%% Sections et subsection en + petit
\makeatletter
\newcommand{\SMALLSECS}{%
 \renewcommand{\section}{\@startsection%
  {section}%                           % name
  {1}%                                 % level
  {0em}%                               % indent
  {\baselineskip}%                     % beforeskip
  {0.5\baselineskip}%                  % afterskip
  {\normalfont\large\bfseries}}%       % style
 \renewcommand{\subsection}{\@startsection%
  {subsection}%                        % name
  {2}%                                 % level
  {0em}%                               % indent
  {\baselineskip}%                     % beforeskip
  {0.25\baselineskip}%                 % afterskip
  {\normalfont\bfseries}}%             % style
}
\makeatother

%%% Limites
\newcommand{\limL}[1]
 {\underset{#1\to+\infty}{\overset{\cL}{\longrightarrow}}}
\newcommand{\limn}[1]
 {\underset{#1\to+\infty}{\longrightarrow}}
\newcommand{\limPS}[1]
 {\underset{#1\to+\infty}{\overset{\text{p.s}}{\longrightarrow}}}


%%% Heure 
\makeatletter
\newcommand{\timenow}{\@tempcnta\time
\@tempcntb\@tempcnta
\divide\@tempcntb60
\ifnum10>\@tempcntb0\fi\number\@tempcntb
\multiply\@tempcntb60
\advance\@tempcnta-\@tempcntb
:\ifnum10>\@tempcnta0\fi\number\@tempcnta}
\makeatother

%%% Doubles lettres 
\newcommand{\dA}{\EM{\mathbb{A}}}
\newcommand{\dB}{\EM{\mathbb{B}}}
\newcommand{\dC}{\EM{\mathbb{C}}}
\newcommand{\dD}{\EM{\mathbb{D}}}
\newcommand{\dE}{\EM{\mathbb{E}}}
\newcommand{\dF}{\EM{\mathbb{F}}}
\newcommand{\dG}{\EM{\mathbb{G}}}
\newcommand{\dH}{\EM{\mathbb{H}}}
\newcommand{\dI}{\EM{\mathbb{I}}}
\newcommand{\dJ}{\EM{\mathbb{J}}}
\newcommand{\dK}{\EM{\mathbb{K}}}
\newcommand{\dL}{\EM{\mathbb{L}}}
\newcommand{\dM}{\EM{\mathbb{M}}}
\newcommand{\dN}{\EM{\mathbb{N}}}
\newcommand{\dO}{\EM{\mathbb{O}}}
\newcommand{\dP}{\EM{\mathbb{P}}}
\newcommand{\dQ}{\EM{\mathbb{Q}}}
\newcommand{\dR}{\EM{\mathbb{R}}}
\newcommand{\dS}{\EM{\mathbb{S}}}
\newcommand{\dT}{\EM{\mathbb{T}}}
\newcommand{\dU}{\EM{\mathbb{U}}}
\newcommand{\dV}{\EM{\mathbb{V}}}
\newcommand{\dW}{\EM{\mathbb{W}}}
\newcommand{\dX}{\EM{\mathbb{X}}}
\newcommand{\dY}{\EM{\mathbb{Y}}}
\newcommand{\dZ}{\EM{\mathbb{Z}}}

%%% Lettres droites
\newcommand{\rA}{\EM{\mathrm{A}}}
\newcommand{\rB}{\EM{\mathrm{B}}}
\newcommand{\rC}{\EM{\mathrm{C}}}
\newcommand{\rD}{\EM{\mathrm{D}}}
\newcommand{\rE}{\EM{\mathrm{E}}}
\newcommand{\rF}{\EM{\mathrm{F}}}
\newcommand{\rG}{\EM{\mathrm{G}}}
\newcommand{\rH}{\EM{\mathrm{H}}}
\newcommand{\rI}{\EM{\mathrm{I}}}
\newcommand{\rJ}{\EM{\mathrm{J}}}
\newcommand{\rK}{\EM{\mathrm{K}}}
\newcommand{\rL}{\EM{\mathrm{L}}}
\newcommand{\rM}{\EM{\mathrm{M}}}
\newcommand{\rN}{\EM{\mathrm{N}}}
\newcommand{\rO}{\EM{\mathrm{O}}}
\newcommand{\rP}{\EM{\mathrm{P}}}
\newcommand{\rQ}{\EM{\mathrm{Q}}}
\newcommand{\rR}{\EM{\mathrm{R}}}
\newcommand{\rS}{\EM{\mathrm{S}}}
\newcommand{\rT}{\EM{\mathrm{T}}}
\newcommand{\rU}{\EM{\mathrm{U}}}
\newcommand{\rV}{\EM{\mathrm{V}}}
\newcommand{\rW}{\EM{\mathrm{W}}}
\newcommand{\rX}{\EM{\mathrm{X}}}
\newcommand{\rY}{\EM{\mathrm{Y}}}
\newcommand{\rZ}{\EM{\mathrm{Z}}}

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

%%% Lettres grasses 
\newcommand{\bA}{\ensuremath{\mathbf{A}}}
\newcommand{\bB}{\ensuremath{\mathbf{B}}}
\newcommand{\bC}{\ensuremath{\mathbf{C}}}
\newcommand{\bD}{\ensuremath{\mathbf{D}}}
\newcommand{\bE}{\ensuremath{\mathbf{E}}}
\newcommand{\bF}{\ensuremath{\mathbf{F}}}
\newcommand{\bG}{\ensuremath{\mathbf{G}}}
\newcommand{\bH}{\ensuremath{\mathbf{H}}}
\newcommand{\bI}{\ensuremath{\mathbf{I}}}
\newcommand{\bJ}{\ensuremath{\mathbf{J}}}
\newcommand{\bK}{\ensuremath{\mathbf{K}}}
\newcommand{\bL}{\ensuremath{\mathbf{L}}}
\newcommand{\bM}{\ensuremath{\mathbf{M}}}
\newcommand{\bN}{\ensuremath{\mathbf{N}}}
\newcommand{\bO}{\ensuremath{\mathbf{O}}}
\newcommand{\bP}{\ensuremath{\mathbf{P}}}
\newcommand{\bQ}{\ensuremath{\mathbf{Q}}}
\newcommand{\bR}{\ensuremath{\mathbf{R}}}
\newcommand{\bS}{\ensuremath{\mathbf{S}}}
\newcommand{\bT}{\ensuremath{\mathbf{T}}}
\newcommand{\bU}{\ensuremath{\mathbf{U}}}
\newcommand{\bV}{\ensuremath{\mathbf{V}}}
\newcommand{\bW}{\ensuremath{\mathbf{W}}}
\newcommand{\bX}{\ensuremath{\mathbf{X}}}
\newcommand{\bY}{\ensuremath{\mathbf{Y}}}
\newcommand{\bZ}{\ensuremath{\mathbf{Z}}}

%%% Quelques lettres grecques 
\newcommand{\al}{\alpha}
\newcommand{\be}{\beta}
\newcommand{\De}{\Delta}
\newcommand{\de}{\delta}
\newcommand{\ga}{\gamma}
\newcommand{\Ga}{\Gamma}
\newcommand{\g}{\gamma}
\newcommand{\gn}{\g_n}
\newcommand{\gt}[1]{\g^{\otimes #1}}
\newcommand{\la}{\lambda}
\newcommand{\La}{\Lambda}
\newcommand{\lan}{\la_n}
\newcommand{\na}{\nabla}
\newcommand{\Om}{\Omega}
\newcommand{\om}{\omega}
\newcommand{\ph}{\Phi}
\newcommand{\Si}{\Sigma}
\newcommand{\si}{\sigma}
\newcommand{\Te}{\Theta}
\newcommand{\te}{\theta}
\newcommand{\ta}{\tau}
\newcommand{\veps}{\varepsilon}
\newcommand{\vphi}{\varphi}

%%% Prototype de fonction avec dimensionnement
\newcommand{\p}[4]{{#3}\!\left#1{#4}\right#2} 

%%% Normes et assimilées 
\newcommand{\ABS}[1]{\EM{{\left| #1 \right|}}} % |1|
\newcommand{\BRA}[1]{\EM{{\left\{#1\right\}}}} % {1}
\newcommand{\DP}[1]{\EM{{\left<#1\right>}}} % <1>
\newcommand{\NRM}[1]{\EM{{\left\Vert #1\right\Vert}}} % ||1||
\newcommand{\NI}[1]{\EM{{\left\Vert #1\right\Vert}_\infty}} % norme infinie
\newcommand{\OSC}[1]{\EM{{\p(){\mathrm{osc}}{#1}}}} % norme infinie
\newcommand{\PAR}[1]{\EM{{\left(#1\right)}}} % (1)
\newcommand{\PD}[2]{\EM{{\frac{\partial #1}{\partial #2}}}} % par. der.
\newcommand{\SBRA}[1]{\EM{{\left[#1\right]}}} % [1]
\newcommand{\VT}[1]{\EM{{\Vert #1\Vert}_{\mbox{{\scriptsize VT}}}}}
\newcommand{\LIP}[1]{\EM{\|#1\|_{\mathrm{Lip}}}}
\newcommand{\pd}{\EM{\partial}}

%%% Fonctions et fonctionnelles 
\newcommand{\sentf}{\bH}
\newcommand{\sent}[1]{\p(){\sentf}{#1}}
\newcommand{\bentf}[1]{\bH_{#1}}
\newcommand{\bent}[2]{\p(){\bentf{#1}}{#2}}
\newcommand{\eentf}{\bN}
\newcommand{\eent}[1]{\p(){\eentf}{#1}}
\newcommand{\entf}[1]{\mathbf{Ent}_{#1}}
\newcommand{\ent}[2]{\p(){\entf{#1}}{#2}}
\newcommand{\ientf}[1]{\bH^{#1}}
\newcommand{\ient}[2]{\p(){\ientf{#1}}{#2}}
\newcommand{\rentf}{\mathbf{Ent}}
\newcommand{\rent}[2]{\p(){\rentf}{#1\,\vert\,#2}}
\newcommand{\entr}{\mathbf{Ent}_r}
\newcommand{\enef}[1]{\boldsymbol{\mathcal{E}}_{#1}}
\newcommand{\ene}[2]{\p(){\enef{#1}}{#2}}
\newcommand{\imutf}{\bI}
\newcommand{\imut}[1]{\p(){\imutf}{#1}}
\newcommand{\fcrf}{\dI}
\newcommand{\fcr}[1]{\p(){\fcrf}{#1}}
\newcommand{\fishf}{\bJ}
\newcommand{\fish}[1]{\p(){\fishf}{#1}}
\newcommand{\fishmf}{\dJ}
\newcommand{\fishm}[1]{\p(){\fishmf}{#1}}
\newcommand{\moyf}[1]{\bE_{#1}}
\newcommand{\moy}[2]{\p(){\moyf{#1}}{#2}}
\newcommand{\corrf}[1]{\mathbf{Cor}_{#1}}
\newcommand{\corr}[3]{\p(){\corrf{#1}}{#2,#3}}
\newcommand{\covf}[1]{\mathbf{Cov}_{#1}}
\newcommand{\cov}[3]{\p(){\covf{#1}}{#2,#3}}
\newcommand{\suppf}{\mathrm{supp}}
\newcommand{\supp}[1]{\suppf\PAR{#1}}
\newcommand{\varf}[1]{\mathbf{Var}_{#1}}
\newcommand{\var}[2]{\p(){\varf{#1}}{#2}}
\newcommand{\Kf}{\bK}
\newcommand{\K}[1]{\p(){\Kf}{#1}}
\newcommand{\vrs}[1]{\mathbf{L}_{#1}}

%%% Ensembles, espaces de fonctions... 
\newcommand{\C}[1]{\p(){\cC}{#1}}
\newcommand{\Cb}[1]{\p(){\cC_b}{#1}}
\newcommand{\Cc}[1]{\p(){\cC_c}{#1}}
\newcommand{\Cn}[2]{\p(){\cC^{#1}}{#2}}
\newcommand{\Ci}[1]{\Cn{\infty}{#1}}
\newcommand{\Cic}[1]{\p(){\cC_c^\infty}{#1}}
\newcommand{\Cnc}[2]{\p(){\cC_c^{#1}}{#2}}
\newcommand{\Cnb}[2]{\p(){\cC_b^{#1}}{#2}}
\newcommand{\Cib}[1]{\p(){\cC_b^\infty}{#1}}
\newcommand{\leb}[2]{\p(){\bL^{#1}}{#2}}
\newcommand{\lebb}[1]{\bL^{#1}}

%%% Determinant, trace...
\newcommand{\Tr}{\mathrm{Tr\,}}
\newcommand{\Det}[1]{\mathrm{Det}\,}
\newcommand{\TR}[1]{\p(){\mathrm{Tr}}{#1}}
\newcommand{\DET}[1]{\p(){\mathrm{Det}}{#1}}
\newcommand{\SIG}[1]{\p(){\mathrm{Sign}}{#1}}
\newcommand{\ID}{\mathbf{Id}}
\newcommand{\Mo}{\mathbf{1}}
\newcommand{\Vo}{\mathrm{1}}

%%% Semi-groupes, générateurs, carré-du-champ... 
\newcommand{\CD}{CD(\rho ,\infty)}
\newcommand{\GA}{\boldsymbol{\Gamma}}
\newcommand{\GD}{\GA_{\!\!{\mathbf 2}}}
\newcommand{\GI}{\mathbf{L}}
\newcommand{\GR}{\nabla}
\newcommand{\LA}{\boldsymbol{\Delta}}
\newcommand{\PT}[1][t]{\mathbf{P}_{\!#1}}
\newcommand{\SGf}[1]{{\mathbf P}_{#1}}
\newcommand{\SG}[2]{\p(){\SGf{\!#1}}{#2}}
\newcommand{\isopf}{\mathbf{I}}
\newcommand{\isop}[1]{\p(){\isopf}{#1}}
\newcommand{\disop}[1]{\p(){\isopf'}{#1}}
\newcommand{\ddisop}[1]{\p(){\isopf''}{#1}}
\newcommand{\HESS}[1]{\GR^2\!{#1}}
\newcommand{\Hess}[1]{{\p(){\mathrm{Hess}}{#1}}}
\newcommand{\HAM}{\mathbf{H}}
\newcommand{\POT}{\mathbf{V}}
\newcommand{\PF}{\mathbf{Z}}
\newcommand{\DOM}{{\p(){\mathcal{D}_2}{\GI}}}
\newcommand{\D}{\mathbf{D}}

%%% Topo
\newcommand{\inter}[1]{{\overset{\circ}{#1}}} % interior
\newcommand{\ADH}[1]{\mathbf{adh}(#1)}
\newcommand{\INT}[1]{\mathbf{int}(#1)}

%%% Racourcis vers des noms propres 
\newcommand{\bern}{\textsc{Bernoulli}}
\newcommand{\bob}{\textsc{Bobkov}}
\newcommand{\boc}{\textsc{Bochner}}
\newcommand{\cs}{\textsc{Cauchy}-\textsc{Schwarz}}
\newcommand{\fub}{\textsc{Fubini}}
\newcommand{\gaus}{\textsc{Gauss}}
\newcommand{\hol}{\textsc{Hölder}}
\newcommand{\jen}{\textsc{Jensen}}
\newcommand{\lap}{\textsc{Laplace}}
\newcommand{\ls}{\sobo{} logarithmique}
\newcommand{\mink}{\textsc{Minkowski}}
\newcommand{\mrkv}{\textsc{Markov}}
\newcommand{\ou}{\textsc{Ornstein-Uhlenbeck}}
\newcommand{\poin}{\textsc{Poincaré}}
\newcommand{\pois}{\textsc{Poisson}}
\newcommand{\ric}{courbure de \textsc{Ricci}}
\newcommand{\shan}{\textsc{Shannon}}
\newcommand{\sobo}{\textsc{Sobolev}}

%%% Divers
\newcommand{\SSK}[1]{\substack{#1}}
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}
\newcommand{\bs}{\EM{\backslash}} 
\newcommand{\Inf}{\boldsymbol{\inf}}
\newcommand{\Sup}{\boldsymbol{\sup}}
\newcommand{\ds}[1]{\EM{\displaystyle{#1}}}
\newcommand{\eg}{\overset{\Delta}{=}}
\newcommand{\fdefeq}{\overset{\text{déf.}}{=}}
\newcommand{\edefeq}{\overset{\text{def.}}{=}}
\newcommand{\defeq}{:=}
\newcommand{\equ}{\; \Leftrightarrow \;}
\newcommand{\ex}{\exists \,}
\newcommand{\imp}{\Rightarrow  \;}
\newcommand{\ssi}{{\it ssi}}
\newcommand{\tout}{\forall \,}
\newcommand{\tq}{\,|\,}
\newcommand{\1}{\hbox{1}\!\!\hbox{I}}

%EOF

