\usepackage{times}

\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage{stackengine}
\usepackage{wrapfig}
\usepackage{etoolbox}
\usepackage{fancyvrb}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage{adjustbox}
\usepackage{algorithm}
% \usepackage{minted}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
% \usepackage[table,xcdraw,dvipsnames,x11names]{xcolor}
\usepackage{xcolor}
\usepackage{amsfonts}       % blackboard math symbols
\usepackage{booktabs}       % professional-quality tables
\usepackage{float}
\usepackage{fnpos}
% \usepackage{ftnxtra}
\usepackage{graphicx}
\usepackage{microtype}      % microtypography
\usepackage{nicefrac}       % compact symbols for 1/2,
\usepackage[textsize=footnotesize]{todonotes}
\usepackage{xspace}
\usepackage{mathtools}
\usepackage{enumitem}
\usepackage{thmtools}
% \usepackage{wrapfig}
\usepackage{bbm}
% \usepackage[capitalize,noabbrev]{cleveref}
\usepackage{wrapfig}
\usepackage{transparent}
\usepackage{enumitem}
\usepackage{changepage} 
\usepackage{pythonhighlight}
\usepackage{xurl}
\usepackage{subcaption}
\usepackage{svg}
\usepackage{booktabs}
% \usepackage{xcolor}


\usepackage[most]{tcolorbox}
\usetikzlibrary{shadows}
\definecolor{mine}{RGB}{205, 232, 248}%
\definecolor{minedark}{RGB}{160, 190, 210}%
\definecolor{revision}{RGB}{210, 22, 123}

\newcommand{\rebuttal}[1]{{#1}}
\newcommand{\highlight}[1]{\colorbox{mine}{$\displaystyle #1$}}

%%%%%%%%%%%%%%%% Notations %%%%%%%%%%%%%%%%
\usepackage[]{nomencl}   
    \makenomenclature
\renewcommand{\nomname}{Notations}

\makeatletter
\newcommand\myscriptsize{\@setfontsize\myscriptsize{8pt}{9pt}}
\makeatother


\providetoggle{nomsort}
\settoggle{nomsort}{true} % true = sort by use, false = sort as usual

\makeatletter
\iftoggle{nomsort}{%
    \let\old@@@nomenclature=\@@@nomenclature        
        \newcounter{@nomcount} \setcounter{@nomcount}{0}%
        \renewcommand\the@nomcount{\two@digits{\value{@nomcount}}}% Ensure 10>01
        \def\@@@nomenclature[#1]#2#3{% Taken from package documentation
          \addtocounter{@nomcount}{1}%
        \def\@tempa{#2}\def\@tempb{#3}%
          \protected@write\@nomenclaturefile{}%
          {\string\nomenclatureentry{\the@nomcount\nom@verb\@tempa @[{\nom@verb\@tempa}]%
          \begingroup\nom@verb\@tempb\protect\nomeqref{\theequation}%
          |nompageref}{\thepage}}%
          \endgroup
          \@esphack}%
      }{}
\makeatother
\setlength{\nomlabelwidth}{1.8cm}
% \sloppy

%%%%%%%%%%%%%%%% Warnings %%%%%%%%%%%%%%%%
\usepackage{silence}
\WarningFilter[pdftoc]{hyperref}{Token not allowed in a PDF string}
\WarningFilter{latex}{float}
\WarningsOff
\WarningFilter{latex}{`h' float specifier changed to `ht'}


%%%%%%%%%%%%%%%% Theorems %%%%%%%%%%%%%%%%
\newtheorem{assumption}{Assumption} 
\newtheorem{conj}{Conjecture} 
\declaretheorem[name=Corollary]{cor} % thmtools is needed
\declaretheorem[name=Lemma]{lem}
\declaretheorem[name=Remark]{rem}
\declaretheorem[name=Theorem]{thm}
\declaretheorem[name=Proposition]{prop}
\declaretheorem[name=Definition]{defn}
\declaretheorem[name=Assumption]{assump}
% \newenvironment{proof}{\emph{Proof:}}{\hfill$\square$}
\usepackage{tikz}
\newcommand*\circled[2]{{\small\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=2pt,fill=#2!20] (char) {#1};}}}
\tikzstyle{every picture}+=[remember picture]

\usepackage[most]{tcolorbox}
\usetikzlibrary{shadows}
\tcbuselibrary{theorems}
\def\defeq{\mathrel{\ensurestackMath{\stackon[1pt]{=}{\scriptstyle\Delta}}}}

\definecolor{functionclass}{RGB}{113, 153, 194}
\definecolor{lossfunction}{RGB}{119, 221, 119}
\definecolor{regterm}{RGB}{255, 179, 71}

% \usepackage{tcolorbox}
% \usepackage{calrsfs}

% ========= Set up algorithm comments ========= %
%\algnewcommand{\LineComment}[1]{\Statex \(\quad \ \ \textcolor{LightSteelBlue3}{\triangledown} \quad \) \textcolor{LightSteelBlue3}{$/^{\star}$ #1 $^{\star}/$}}

% \algnewcommand{\LineComment}[1]{\Statex \(\quad \ \ \textcolor{LightSteelBlue3}{\triangledown} \quad \) \textcolor{LightSteelBlue3}{$/^{\star}$ #1 $^{\star}/$}}

% \algnewcommand{\NoIndLineComment}[1]{\Statex \(\textcolor{LightSteelBlue3}{\triangledown} \quad \) \textcolor{LightSteelBlue3}{$/^{\star}$ #1 $^{\star}/$}}

% \renewcommand{\algorithmiccomment}[1]{\hfill\textcolor{LightSteelBlue3}{$\triangleright$} \quad \textcolor{LightSteelBlue3}{$/^{\star}$ #1 $^{\star}/$}}
% \definecolor{cplanner}{named}{Orange3}
% \definecolor{cactor}{named}{RoyalBlue1}


%%%%%%%%%%%%%%%% Colors %%%%%%%%%%%%%%%%
\newcounter{exa}
\definecolor{gblue}{RGB}{66,133,244}
\definecolor{gred}{RGB}{219,68,55}
\definecolor{gyellow}{RGB}{244,180,0}
\definecolor{ggreen}{RGB}{15,157,88}
\definecolor{lpcolor}{RGB}{42,74,138}
\definecolor{morelcolor}{RGB}{185,18,32}
\definecolor{bgcolor}{RGB}{230,245,208}
\definecolor{framecolor}{RGB}{244,109,67}
\definecolor{mulberry}{rgb}{0.77, 0.29, 0.55}
\hypersetup{colorlinks=true,
            citecolor=gblue,
            urlcolor=ggreen,
            linkcolor=purple}
\definecolor{Chocolate3}{RGB}{205, 105, 29}
\definecolor{LightSteelBlue3}{RGB}{162, 181, 205}
\definecolor{DodgerBlue4}{RGB}{16, 78, 139}

%%%%%%%%%%%%%%%% Examples %%%%%%%%%%%%%%%%
\tcbset{
myexample/.style={
  enhanced,
  colback=yellow!10!white,
  colframe=red!50!black,
  fonttitle=\scshape,
  titlerule=0pt,
  title={\refstepcounter{exa}example~\theexa.},
  title style={fill=yellow!10!white},
  coltitle=red!50!black,
  drop shadow,
  highlight math style={reset,colback=LightBlue!50!white,colframe=Navy}
  }
  }
\newtcolorbox{texample}{myexample}

\newtheorem{exampp}{Example}
\usepackage{framed}
\colorlet{shadecolor}{gray!20}
\newenvironment{examp}
   {\begin{shaded}\begin{exampp}}
   {\end{exampp}\end{shaded}}


%%%%%%%%%%%%%% colored def %%%%%%%%%%%%%%
% \tcbuselibrary{theorems}
% \newtcbtheorem
%   []% init options
%   {definition}% name
%   {Definition}% title
%   {%
%     colback=green!5,
%     colframe=green!35!black,
%     fonttitle=\bfseries,
%   }% options
%   {def}% prefix
\colorlet{LightLavender}{green!5}
\tcbset{on line, 
        boxsep=4pt, left=0pt,right=0pt,top=0pt,bottom=0pt,
        colframe=white,colback=LightLavender,  
        highlight math style={enhanced}
        }

%%%%%%%%%%%%%%%% Markers %%%%%%%%%%%%%%%%
\newcommand{\notes}[1]{{\color{gray}[Note: #1]}}
\newcommand{\ziyu}[1]{{\color{gray}[Ziyu: #1]}}
\newcommand{\td}[1]{{\color{gray}[TODO: #1]}}
\newcommand{\fix}[1]{{\color{violet}#1}}
\allowdisplaybreaks

\newcommand*{\img}[1]{%
    \raisebox{-.05\baselineskip}{%
        \includegraphics[
        height=.7\baselineskip,
        width=\baselineskip,
        keepaspectratio,
        ]{#1}%
    }%
}

% ========= Set up highlighters ========= %
% \newcommand{\emphgreen}[1]{\colorbox{Green3!10!white}{$\displaystyle#1$}}
% \newcommand{\emphgold}[1]{\colorbox{Goldenrod!50}{$\displaystyle#1$}}
% \newcommand{\emphmelon}[1]{\colorbox{Melon!10}{$\displaystyle#1$}}
% \newcommand{\emphapricot}[1]{\colorbox{Apricot!10}{$\displaystyle#1$}}
% \newcommand{\emphmarine}[1]{\colorbox{Aquamarine!10}{$\displaystyle#1$}}
% \newcommand{\emphsky}[1]{\colorbox{SkyBlue!30}{$\displaystyle#1$}}
% \newcommand{\emphgray}[1]{\colorbox{gray!10}{$\displaystyle#1$}}
% \newcommand{\emphpurple}[1]{\colorbox{purple!10}{$\displaystyle#1$}}
% \newcommand{\emphred}[1]{\colorbox{Red!10}{$\displaystyle#1$}}
% % \newcommand{\emphgoal}[1]{\colorbox{Orange3!10}{$\displaystyle#1$}}
% % \newcommand{\emphtactic}[1]{\colorbox{RoyalBlue1!10}{$\displaystyle#1$}}
% \newcommand{\emphsmall}[1]{\colorbox{purple!10}{$#1$}}
% \newcommand{\emphsmallt}[1]{\colorbox{purple!10}{#1}}

% \newcommand{\emphinline}[2]{\colorbox{#1!30}{\hspace{-2.5pt}$\scriptstyle #2$\hspace{-2.5pt}}}

\usepackage{mathtools}
\input{macro.tex}
\definecolor{myblue}{RGB}{34, 66, 122} 
\renewcommand{\eqref}[1]{Eq.~\ref{#1}}
\newcommand{\secref}[1]{Section~\ref{#1}}

\usepackage[toc,page,header]{appendix}
\usepackage{minitoc}

\renewcommand \thepart{}
\renewcommand \partname{}