\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{joe_macros}
  [2011/01/11 v0.01 LaTeX package for my own purpose]

\setlength{\parindent}{0in}

%misc
\DeclareMathOperator{\under}{\rule{0.5cm}{0.15mm}}
\newcommand{\ttt}{\texttt}


% general math
\DeclareMathOperator{\RR}{\mb{R}}
\DeclareMathOperator{\CC}{\mb{C}}
\DeclareMathOperator{\NN}{\mb{N}}
\DeclareMathOperator{\QQ}{\mb{Q}}
\newcommand{\cbrt}[1]{\sqrt[3]{#1}}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
\newcommand{\mailto}[1]{\href{mailto:#1}{\texttt{#1}}}
\newcommand{\ol}{\overline}
\newcommand{\ul}{\underline}
\newcommand{\wt}{\widetilde}
\newcommand{\wh}{\widehat}
\newcommand{\eps}{\varepsilon}
\newcommand{\vphi}{\varphi}
\newcommand{\half}{\frac{1}{2}}

% real analysis
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\proj}{proj}
\DeclareMathOperator{\argmax}{argmax}
\DeclareMathOperator{\argmin}{argmin}
\DeclareMathOperator{\dist}{dist}

%algebra
\DeclareMathOperator{\aut}{Aut}
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\coker}{coker}
\DeclareMathOperator{\Ext}{Ext}
\DeclareMathOperator{\Tor}{Tor}
\DeclareMathOperator{\Id}{Id}
\DeclareMathOperator{\Gal}{Gal}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\Specm}{Spec-m}
\DeclareMathOperator{\Spec}{Spec}
\DeclareMathOperator{\Char}{char}
\DeclareMathOperator{\ch}{ch}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\Sym}{Sym}
\DeclareMathOperator{\Span}{Span}

% topology
\DeclareMathOperator{\Int}{Int}

% complex analysis
\DeclareMathOperator{\Ord}{Ord}
\DeclareMathOperator{\Res}{Res}
\DeclareMathOperator{\Log}{Log}
\DeclareMathOperator{\Deck}{Deck}

%stats
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\KL}{KL}
\newcommand{\MLE}[1]{#1_{\text{MLE}}}
\DeclareMathOperator{\contig}{\triangleleft}
\DeclareMathOperator{\Unif}{\operatorname{Unif}}
\DeclareMathOperator{\arginf}{\operatorname{arginf}}
\DeclareMathOperator{\argsup}{\operatorname{argsup}}
\DeclareMathOperator{\MSE}{MSE}
\DeclareMathOperator{\TV}{d_{\text{TV}}}
\DeclareMathOperator{\co}{co}
\DeclareMathOperator{\Ber}{Ber}


\newcommand{\bs}{\backslash}
\newcommand{\noi}{\noindent}
\newcommand{\bld}{\textbf}
\newcommand{\mc}{\mathcal}
\newcommand{\mb}{\mathbb}
\newcommand{\msc}{\mathscr}
\newcommand{\ds}{\displaystyle}
\newcommand{\mf}{\mathfrak}

% probability
\newcommand{\convd}{\xrightarrow{\text{d}}}
\newcommand{\convp}{\xrightarrow{\text{P}}}
\newcommand{\convas}{\xrightarrow{\text{a.s.}}}
\newcommand{\convlp}{\xrightarrow{L^p}}
\newcommand{\convlo}{\xrightarrow{L^1}}
\newcommand{\eqd}{\overset{\text{d}}=}
\newcommand{\iid}{\overset{\text{i.i.d.}}\sim}

% functional analysis
\newcommand{\weak}{\text{weak }}
\newcommand{\cc}{C_c^{\infty}}
\newcommand{\re}{\text{Re}}
\newcommand{\im}{\text{Im}}

% CS
\DeclareMathOperator{\polylog}{Polylog}
\DeclareMathOperator{\poly}{poly}

% commenting command
\newcommand{\com}[1]{{\color{red}\textbf{[[} #1 \textbf{]]}}}

\endinput
