% from JZ's style

% ----------------------------------
% JZ's hide-show routine
% I moved it to the main tex file so vscode can autocomplete it
% ----------------------------------
% for generally hiding some texts with a toggle on or off:
\usepackage{comment}

% Define the CUT environment
\newenvironment{CUT}{}{}

% Command to toggle the CUT environment
\newcommand{\toggleCUT}[1]{%
  \if#1t%
    \renewenvironment{CUT}{\color{gray}}{\color{black}}%
  \else%
    \excludecomment{CUT}%
  \fi%
}


% Set the initial state (t to show, f to hide)
\toggleCUT{t}
\toggleCUT{f}

% Required package for colors
\RequirePackage{xcolor}

 % Place this in the preamble of your document


% Required packages for mathbb and other math symbols
% \RequirePackage{amssymb}
% \RequirePackage{amsmath}
% \RequirePackage{amsthm}

% % Theorem environments
% \theoremstyle{definition}
% \newtheorem{theorem}{Theorem}
% \newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
% \newtheorem{corollary}{Corollary}
% \newtheorem{remark}{Remark}
\newtheorem{example}{Example}

\usepackage{enumitem} % for tighter itemize
\newenvironment{tightenum}{
  \begin{enumerate}[itemsep=0pt, parsep=0pt, topsep=0pt, partopsep=0pt]
}{
  \end{enumerate}
}

\newenvironment{tightitem}{
  \begin{itemize}[itemsep=0pt, parsep=0pt, topsep=0pt, partopsep=0pt]
}{
  \end{itemize}
}

% \newcommand{\jz}[1]{\text{\color{red}\textbf{JZ: }#1}}

%%shorthand%%
\newcommand{\dFdmu}{\frac{\delta F}{\delta \mu}\left[\mu\right]}
\newcommand{\dFdrho}{\frac{\delta F}{\delta \rho}\left[\rho\right]}
\newcommand{\dFdmuk}{\frac{\delta F}{\delta \mu}\left[\mu^k\right]} % first var evaluted at k step; explicit
\DeclareMathOperator*{\argmin}{argmin}
\DeclareMathOperator*{\argmax}{argmax}
\DeclareMathOperator*{\arginf}{arginf}
\DeclareMathOperator*{\argsup}{argsup}
% \DeclareMathOperator{\mmd}{MMD}
\newcommand{\dd}{\ \mathrm{d}}
% \newcommand{\rkhs}{\mathcal{H}}
\newcommand{\hiprod}[2]{\langle {#1, #2} \rangle _{\mathcal H}} %%RKHS inner product%%
\newcommand{\iprod}[2]{\langle {#1, #2} \rangle }
% \newcommand{\K}{\mathcal{K}} %%often used as integral operator%%
\newcommand{\E}{\mathbb{E}} %%exp operator%%
\newcommand{\R}{\mathbb{R}}
\newcommand{\DIV}{\mathrm{div}\,}
\newcommand{\const}{\mathrm{const.}}
\newcommand{\eviL}{(EVI)$_\lambda$}

%%transport problem shorthand%%
% \newcommand{\ET}{\mathsf{E\kern-1pt T}}
% \newcommand{\MET}{\mathsf{M\kern-1pt E\kern-1pt T}}
% \newcommand{\IPT}{\mathsf{I\kern-1pt P\kern-1pt T}}
% \newcommand{\MIPT}{\mathsf{M\kern-1pt I\kern-1pt P\kern-1pt T}}
% \newcommand{\EIPT}{\mathsf{E\kern-1pt I\kern-1pt P\kern-1pt T}}
% \newcommand{\WFR}{\mathsf{W\kern-1pt F\kern-1pt R}}

%%missing commands in markdown%%
\newcommand{\bm}[1]{\boldsymbol{\mathbf{#1}}}

%%shorthand dissipation potential%%
% \newcommand{\Rk}{\mathcal R_k} %%dissipation of MMD potentail%%
\newcommand{\Kotto}{\mathbb{K}_\text{Otto}} %%Otto operator for diffusion%%
\newcommand{\Mplus}{\mathcal{M}^+} %%nonneg measure%%

%%wgf jargon%%
\newcommand{\mslope}{|\nabla^- F|} % metric slope
\newcommand{\mder}{|\mu'|} % metric derivative

%%sum notation%%
\newcommand{\sumiN}{\frac{1}{N}\sum_{i=1}^N}
\newcommand{\sumijMN}{\frac{1}{MN}\sum_{i=1}^M\sum_{j=1}^N}
\newcommand{\sumijNN}{\frac{1}{MN}\sum_{i=1}^N\sum_{j=1}^N}
\newcommand{\sumijMM}{\frac{1}{MM}\sum_{i=1}^M\sum_{j=1}^M}
% \newcommand{\sumijMNUnbiased}{\frac{1}{MN}\sum_{i=1}^M\sum_{j=1, j\neq i}^N}
\newcommand{\sumijNNUnbiased}{\frac{1}{N(N-1)}\sum_{i=1}^N\sum_{j=1, j\neq i}^N}
\newcommand{\sumijMMUnbiased}{\frac{1}{M(M-1)}\sum_{i=1}^M\sum_{j=1, j\neq i}^M}

%%semi transparent%%
\newcommand{\semitransp}[2][35]{\textcolor{fg!#1}{#2}}

%%colored text%%
\newcommand{\redA}{{\color{red}\alpha}}
\newcommand{\blueB}{{\color{blue}\beta}}

\newcommand{\DF}{\mathrm{D} F} % differential of F


%% KL divergence and NGD %%
\newcommand{\mul}{\mu_\lambda}
\newcommand{\mulk}{\mu_{\lambda^k}}
\newcommand{\KL}{\operatorname{KL}}


%% acronym for distances  %%
\newcommand{\ET}{\mathsf{E\kern-1pt T}}
\newcommand{\MET}{\mathsf{M\kern-1pt E\kern-1pt T}}
\newcommand{\IPT}{\mathsf{I\kern-1pt P\kern-1pt T}}
\newcommand{\IMT}{\mathsf{I\kern-1pt M\kern-1pt T}}
\newcommand{\MIPT}{\mathsf{M\kern-1pt I\kern-1pt P\kern-1pt T}}
\newcommand{\EIPT}{\mathsf{E\kern-1pt I\kern-1pt P\kern-1pt T}}
\newcommand{\WFR}{\mathsf{W\kern-1pt F\kern-1pt R}}
\newcommand{\FR}{\mathsf{F\kern-1pt R}}
\newcommand{\He}{\mathsf{He}}
% \newcommand{\KFR}{\mathsf{K\kern-1pt{-}\kern-1pt F\kern-1pt R}}
\newcommand{\FRk}{\mathsf{F\kern-1pt R}_k}
\newcommand{\supp}[1]{\operatorname{supp}(#1)}

\DeclareMathOperator{\mmd}{MMD}
\DeclareMathOperator{\MMD}{MMD}
\DeclareMathOperator{\ksd}{KSD}
\DeclareMathOperator{\KSD}{KSD}

\newcommand{\wtwostein}{\ensuremath{W_2}-Stein\xspace}

\newcommand{\Lstein}{\ensuremath{\lambda}\text{-Stein}\xspace}

% \newcommand{\wtwosteinLm}{\ensuremath{W_2^\lambda}-Stein\xspace}

% \newcommand{\fstein}{F-Stein\xspace}

\DeclareMathOperator{\ipm}{IPM}

\DeclareMathOperator{\imm}{IMM}

\newcommand{\rkhs}{\mathcal{H}}

\newcommand{\K}{\mathcal{K}} %%often used as integral operator%%

\newcommand{\Tk}{\mathcal{T}_k} %%often used as (L2->H) integral operator%%

\newcommand{\Tkrho}{\mathcal{T}_{k,\rho}} %%often used as (L2->H) integral operator%%

\newcommand{\Tkmu}{\mathcal{T}_{k,\mu}} %%often used as (L2->H) integral operator%%

% \newcommand{\DF}{\mathrm{D} F} % differential of F

% \newcommand{\Mplus}{\mathcal{M}^+} %%nonneg measure%%

% \newcommand{\Rk}{\mathcal R_k} %%dissipation of MMD potentail%%

% \newcommand{\RfrMMD}{\mathcal R_\mathrm{FR-MMD}} %%dissipation of MMD potentail%% regularized

% \newcommand{\Kotto}{\mathbb{K}_\mathrm{Otto}} %%Otto operator for diffusion%%

\newcommand{\ID}{\operatorname{Id}} %%Identify operator

\newcommand{\Loj}{\L{}ojasiewicz\xspace}


%% short hand %%

\newcommand{\Pth}{{P_\theta}} % parameterized distribution

%% Alex's notation %%

% Blackboardbold 
\def\bbA{{\mathbb A}} \def\bbB{{\mathbb B}} \def\bbC{{\mathbb C}}
\def\bbD{{\mathbb D}} \def\bbE{{\mathbb E}} \def\bbF{{\mathbb F}}
\def\bbG{{\mathbb G}} \def\bbH{{\mathbb H}} \def\bbI{{\mathbb I}}
\def\bbJ{{\mathbb J}} \def\bbK{{\mathbb K}} \def\bbL{{\mathbb L}}
\def\bbM{{\mathbb M}} \def\bbN{{\mathbb N}} \def\bbO{{\mathbb O}}
\def\bbP{{\mathbb P}} \def\bbQ{{\mathbb Q}} \def\bbR{{\mathbb R}}
\def\bbS{{\mathbb S}} \def\bbT{{\mathbb T}} \def\bbU{{\mathbb U}}
\def\bbV{{\mathbb V}} \def\bbW{{\mathbb W}} \def\bbX{{\mathbb X}}
\def\bbY{{\mathbb Y}} \def\bbZ{{\mathbb Z}}
% Kalligraphische 
\def\calA{{\mathcal A}} \def\calB{{\mathcal B}} \def\calC{{\mathcal C}}
\def\calD{{\mathcal D}} \def\calE{{\mathcal E}} \def\calF{{\mathcal F}}
\def\calG{{\mathcal G}} \def\calH{{\mathcal H}} \def\calI{{\mathcal I}}
\def\calJ{{\mathcal J}} \def\calK{{\mathcal K}} \def\calL{{\mathcal L}}
\def\calM{{\mathcal M}} \def\calN{{\mathcal N}} \def\calO{{\mathcal O}}
\def\calP{{\mathcal P}} \def\calQ{{\mathcal Q}} \def\calR{{\mathcal R}}
\def\calS{{\mathcal S}} \def\calT{{\mathcal T}} \def\calU{{\mathcal U}}
\def\calV{{\mathcal V}} \def\calW{{\mathcal W}} \def\calX{{\mathcal X}}
\def\calY{{\mathcal Y}} \def\calZ{{\mathcal Z}}

%% alex notation for e, etc. %%
\def\d{\mathrm d}

\def\dd{\;\!\mathrm{d}} % differential for integration

\def\ee{\mathrm{e}} % Euler's number

\def\ii{\mathrm{i}} % imaginary unit


%% alex special fonts %%
% Blackboardbold 
\def\bbA{{\mathbb A}} \def\bbB{{\mathbb B}} \def\bbC{{\mathbb C}}
\def\bbD{{\mathbb D}} \def\bbE{{\mathbb E}} \def\bbF{{\mathbb F}}
\def\bbG{{\mathbb G}} \def\bbH{{\mathbb H}} \def\bbI{{\mathbb I}}
\def\bbJ{{\mathbb J}} \def\bbK{{\mathbb K}} \def\bbL{{\mathbb L}}
\def\bbM{{\mathbb M}} \def\bbN{{\mathbb N}} \def\bbO{{\mathbb O}}
\def\bbP{{\mathbb P}} \def\bbQ{{\mathbb Q}} \def\bbR{{\mathbb R}}
\def\bbS{{\mathbb S}} \def\bbT{{\mathbb T}} \def\bbU{{\mathbb U}}
\def\bbV{{\mathbb V}} \def\bbW{{\mathbb W}} \def\bbX{{\mathbb X}}
\def\bbY{{\mathbb Y}} \def\bbZ{{\mathbb Z}}
% Kalligraphische 
\def\calA{{\mathcal A}} \def\calB{{\mathcal B}} \def\calC{{\mathcal C}}
\def\calD{{\mathcal D}} \def\calE{{\mathcal E}} \def\calF{{\mathcal F}}
\def\calG{{\mathcal G}} \def\calH{{\mathcal H}} \def\calI{{\mathcal I}}
\def\calJ{{\mathcal J}} \def\calK{{\mathcal K}} \def\calL{{\mathcal L}}
\def\calM{{\mathcal M}} \def\calN{{\mathcal N}} \def\calO{{\mathcal O}}
\def\calP{{\mathcal P}} \def\calQ{{\mathcal Q}} \def\calR{{\mathcal R}}
\def\calS{{\mathcal S}} \def\calT{{\mathcal T}} \def\calU{{\mathcal U}}
\def\calV{{\mathcal V}} \def\calW{{\mathcal W}} \def\calX{{\mathcal X}}
\def\calY{{\mathcal Y}} \def\calZ{{\mathcal Z}}
% mathromam
\def\rma{{\mathrm a}} \def\rmb{{\mathrm b}} \def\rmc{{\mathrm c}} 
\def\rmd{{\mathrm d}} \def\rme{{\mathrm e}} \def\rmf{{\mathrm f}} 
\def\rmg{{\mathrm g}} \def\rmh{{\mathrm h}} \def\rmi{{\mathrm i}}
\def\rmj{{\mathrm j}} \def\rmk{{\mathrm k}} \def\rml{{\mathrm l}} 
\def\rmm{{\mathrm m}} \def\rmn{{\mathrm n}} \def\rmo{{\mathrm o}} 
\def\rmp{{\mathrm p}} \def\rmq{{\mathrm q}} \def\rmr{{\mathrm r}} 
\def\rms{{\mathrm s}} \def\rmt{{\mathrm t}} \def\rmu{{\mathrm u}} 
\def\rmv{{\mathrm v}} \def\rmw{{\mathrm w}} \def\rmx{{\mathrm x}} 
\def\rmy{{\mathrm y}} \def\rmz{{\mathrm z}} 
\def\rmA{{\mathrm A}} \def\rmB{{\mathrm B}} \def\rmC{{\mathrm C}} 
\def\rmD{{\mathrm D}} \def\rmE{{\mathrm E}} \def\rmF{{\mathrm F}} 
\def\rmG{{\mathrm G}} \def\rmH{{\mathrm H}} \def\rmI{{\mathrm I}} 
\def\rmJ{{\mathrm J}} \def\rmK{{\mathrm K}} \def\rmL{{\mathrm L}} 
\def\rmM{{\mathrm M}} \def\rmN{{\mathrm N}} \def\rmO{{\mathrm O}} 
\def\rmP{{\mathrm P}} \def\rmQ{{\mathrm Q}} \def\rmR{{\mathrm R}} 
\def\rmS{{\mathrm S}} \def\rmT{{\mathrm T}} \def\rmU{{\mathrm U}} 
\def\rmV{{\mathrm V}} \def\rmW{{\mathrm W}} \def\rmX{{\mathrm X}} 
\def\rmY{{\mathrm Y}} \def\rmZ{{\mathrm Z}}
% fette math
\def\FG{\mathbf} 
\def\mdot{\FG{:}}  \def\vdot{\FG{\cdot}} 
\def\bfa{{\FG a}} \def\bfb{{\FG b}} \def\bfc{{\FG c}} 
\def\bfd{{\FG d}} \def\bfe{{\FG e}} \def\bff{{\FG f}} 
\def\bfg{{\FG g}} \def\bfh{{\FG h}} \def\bfi{{\FG i}}
\def\bfj{{\FG j}} \def\bfk{{\FG k}} \def\bfl{{\FG l}} 
\def\bfm{{\FG m}} \def\bfn{{\FG n}} \def\bfo{{\FG o}} 
\def\bfp{{\FG p}} \def\bfq{{\FG q}} \def\bfr{{\FG r}} 
\def\bfs{{\FG s}} \def\bft{{\FG t}} \def\bfu{{\FG u}} 
\def\bfv{{\FG v}} \def\bfw{{\FG w}} \def\bfx{{\FG x}} 
\def\bfy{{\FG y}} \def\bfz{{\FG z}} 
\def\bfA{{\FG A}} \def\bfB{{\FG B}} \def\bfC{{\FG C}} 
\def\bfD{{\FG D}} \def\bfE{{\FG E}} \def\bfF{{\FG F}} 
\def\bfG{{\FG G}} \def\bfH{{\FG H}} \def\bfI{{\FG I}} 
\def\bfJ{{\FG J}} \def\bfK{{\FG K}} \def\bfL{{\FG L}} 
\def\bfM{{\FG M}} \def\bfN{{\FG N}} \def\bfO{{\FG O}} 
\def\bfP{{\FG P}} \def\bfQ{{\FG Q}} \def\bfR{{\FG R}} 
\def\bfS{{\FG S}} \def\bfT{{\FG T}} \def\bfU{{\FG U}} 
\def\bfV{{\FG V}} \def\bfW{{\FG W}} \def\bfX{{\FG X}} 
\def\bfY{{\FG Y}} \def\bfZ{{\FG Z}}
\def\BS{\boldsymbol} % griechisch  
\def\bfalpha{{\BS\alpha}}      \def\bfbeta{{\BS\beta}} 
\def\bfgamma{{\BS\gamma}}      \def\bfdelta{{\BS\delta}}
\def\bfepsilon{{\BS\varepsilon}} \def\bfzeta{{\BS\zeta}}
\def\bfeta{{\BS\eta}}          \def\bftheta{{\BS\theta}}
\def\bfiota{{\BS\iota}}        \def\bfkappa{{\BS\kappa}} 
\def\bflambda{{\BS\lambda}}    \def\bfmu{{\BS\mu}}       
\def\bfnu{{\BS\nu}}            \def\bfxi{{\BS\xi}}
\def\bfpi{{\BS\pi}}            \def\bfrho{{\BS\rho}}
\def\bfsigma{{\BS\sigma}}      \def\bftau{{\BS\tau}}
\def\bfphi{{\BS\phi}}          \def\bfchi{{\BS\chi}}   
\def\bfpsi{{\BS\psi}}          \def\bfomega{{\BS\omega}} 
\def\bfvarphi{{\BS\varphi}} 
\def\bfGamma{{\BS\Gamma}}      \def\bfDelta{{\BS\Delta}}
\def\bfTheta{{\BS\Theta}}      \def\bfLambda{{\BS\Lambda}}
\def\bfXi{{\BS\Xi}}            \def\bfPi{{\BS\Pi}}
\def\bfSigma{{\BS\Sigma}}      \def\bfPhi{{\BS\Phi}}
\def\bfPsi{{\BS\Psi}}          \def\bfOmega{{\BS\Omega}} 