%
% @file preamble.tex
% @author Shoki Sugimoto (sugimoto@cat.phys.s.u-tokyo.ac.jp)
% @brief Preamble for a LaTeX document
% @version 1
% @date 2023-08-13
%
% @copyright Dedicated to the public domain under The Unlicense <https://unlicense.org>
%
\usepackage[utf8]{inputenc}
\usepackage{docmute} % Skips preambles of subfiles.
\newif\ifMain
\Mainfalse
\usepackage{graphicx, tikz, color} % for figures, no options when submitting to arXiv

\usepackage[notrig]{physics}
\usepackage{amsmath, amssymb} % for equations
\usepackage{mathtools} %for \coloneqq
% \usepackage{stmaryrd} %for double line brackets
\usepackage{siunitx} % for symbols of SI units.
\usepackage{csquotes} % for quotations such as \enquote
\usepackage{hyperref}
% \usepackage{doi, natbib, hypernat}
\hypersetup{
    unicode,
    colorlinks=true,
    citecolor=blue,
    linkcolor=magenta,
    urlcolor=blue,
    bookmarksnumbered=true,
    bookmarkstype=toc
}
\usepackage[style=phys, sorting=none]{biblatex}
\addbibresource{references.bib}

%%%%%%%%%%%%%%%%%%%% For Theorem environments %%%%%%%%%%%%%%%%%%%%
\usepackage{amsthm} % for theorem environments
\usepackage[framemethod=TikZ]{mdframed} % for framed environments
\renewcommand{\qed}{$\hfill\blacksquare$}
\usetikzlibrary{shadows,shadings}
\mdfdefinestyle{theoremstyle}{%
    linewidth = 0.5pt, roundcorner=5pt,%
    frametitlerule =true, %
    frametitlebackgroundcolor=blue!10,
    backgroundcolor=lightgray!20,
    shadow=true,
}
\mdtheorem[style=theoremstyle]{principle}{}
\mdtheorem[style=theoremstyle]{assumption}{Assumption}
\mdtheorem[style=theoremstyle]{definition}{Definition}[section]
\mdtheorem[style=theoremstyle]{theorem}{Theorem}[section]
\mdtheorem[style=theoremstyle]{lemma}{Lemma}[section]
\mdtheorem[style=theoremstyle]{proposition}{Proposition}[section]
\mdtheorem[style=theoremstyle]{corollary}{Corollary}[section]
\surroundwithmdframed[
  topline=false,
  rightline=false,
  bottomline=false,
  linewidth=5pt,linecolor=lightgray!50,
  leftmargin=0,
  skipabove=\medskipamount,
  skipbelow=\medskipamount
]{proof}
%%%%%%%%%%%%%%%%%%%% (END)For Theorem environments %%%%%%%%%%%%%%%%%%%%

\mdfdefinestyle{quotation}{%
    linewidth = 0.5pt, roundcorner=3pt,%
    frametitlerule =true, %
    frametitlebackgroundcolor=blue!10,
    backgroundcolor=lightgray!20,
    shadow=true, shadowsize=6pt
}
\newenvironment{shadedquotation}%
    {\begin{mdframed}[style=quotation]\begin{quotation}\itshape}
    {\end{quotation}\end{mdframed}}

\graphicspath{{./Figure/}}

%%%%%%%%%%%%%%%%%%%% For improvement %%%%%%%%%%%%%%%%%%%%
\setlength{\marginparwidth}{2cm}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{ulem}
\newcommand{\fix}[2]{\sout{#1} \textcolor{blue}{#2}}
\newcommand{\red}[1]{\textcolor{red}{#1}}
\newcommand{\blue}[1]{\textcolor{blue}{#1}}
%%%%%%%%%%%%%%%%%%%% (END)For improvement %%%%%%%%%%%%%%%%%%%%