%==============================================================================
% BasePreamble                                                       (10.23.13)
%==============================================================================



%------------------------------------------------------------------------------
% Misc.
%------------------------------------------------------------------------------
\vfuzz2pt       % Don't report over-full v-boxes if over-edge is small
\hfuzz2pt       % Don't report over-full h-boxes if over-edge is small

%\numberwithin{equation}{section}

%==============================================================================
% Macros
%==============================================================================

%------------------------------------------------------------------------------
% Misc Commands
%------------------------------------------------------------------------------
%\newfont{\ISS}{cmssi10}

\def\labelitemi{--}

\newcommand{\uL}{\mathcal L}
\newcommand{\uT}{\mathcal T}
\newcommand{\uM}{\mathcal M}
\newcommand{\uD}{\mathcal D}

\DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}
\DefineVerbatimEnvironment{boxedcode}{Verbatim}{fontsize=\small,frame=single,framesep=2mm}

\newcommand{\memoheader}[2]{\noindent{\makebox[0.75in][l]{\bf #1}}{\parbox[t]{6in}{#2}} \linebreak\linebreak}

\newcommand{\degC}[1]{\ensuremath{#1^{\circ}\mathrm{C}}}
\newcommand{\matlab}{\textsc{Matlab}}

\newcommand{\figex}[1]{\framebox{Figure Example: \sc{#1}}}
\newcommand{\ex}[1]{\framebox{Worked Example: \sc{#1}}}

%------------------------------------------------------------------------------
% Misc Math
%------------------------------------------------------------------------------
\newcommand{\minimize}[1]{\operatornamewithlimits{minimize}_{#1}}
\newcommand{\Minimize}[1]{\operatornamewithlimits{Minimize}_{#1}}

\newcommand{\norm}[1]{\left\Vert#1\right\Vert}
\newcommand{\abs}[1]{\left\vert#1\right\vert}
\newcommand{\set}[1]{\left\{#1\right\}}

\providecommand{\sgn}[1]{\operatorname{sgn}\left(#1\right)}

\newcommand{\qed}{\ensuremath{\quad \square} \vspace{0.2in}}

\providecommand{\tall}{\vphantom{\overset{A}{B}}}
\providecommand{\Tall}{\vphantom{\underset{\overset{A}{B}}{C}}}

\newcommand{\onehalf}{\textstyle \frac{1}{2} \displaystyle}

\renewcommand{\arraystretch}{1.25}
\setcounter{MaxMatrixCols}{20}

\newcommand{\mtdef}[2]{#1 &=& \textrm{#2}}
\newcommand{\mdef}[2]{#1 &=& #2}

\newcommand{\eq}[1]{\begin{equation}  #1 \end{equation}}
\newcommand{\eqa}[1]{\begin{eqnarray}  #1 \end{eqnarray}}


\newcommand{\texts}[1]{\hspace{5mm} \text{#1} \hspace{5mm}}
\newcommand{\RA}{\hspace{5mm} \Rightarrow \hspace{5mm}}
\newcommand{\RAs}[1]{\hspace{#1} \Rightarrow \hspace{#1}}



%--------------------------------------------------------fi----------------------
% Complex variable commands
%------------------------------------------------------------------------------
\newcommand{\conjg}[1]{\overline{#1}}
\newcommand{\conj}[1]{\overline{#1}}

\providecommand{\Real}[1]{\ensuremath{\Re{\left\{#1\right\}}}}
\providecommand{\Imag}[1]{\ensuremath{\Im{\left\{#1\right\}}}}

%------------------------------------------------------------------------------
% Calculus commands
%------------------------------------------------------------------------------
\providecommand{\mderiv}[1]{\frac{\mathinner{D#1}}{\mathinner{Dt}}}
\providecommand{\deriv}[2]{\frac{\mathinner{d#1}}{\mathinner{d#2}}}
\providecommand{\dderiv}[2]{\frac{\mathinner{d^2#1}}{\mathinner{d#2^2}}}
\providecommand{\ddderiv}[2]{\frac{\mathinner{d^3#1}}{\mathinner{d#2^3}}}
\providecommand{\nderiv}[3]{\frac{\mathinner{d^{#3}#1}}{\mathinner{d#2^{#3}}}}
\providecommand{\pderiv}[2]{\frac{\mathinner{\partial#1}}{\mathinner{\partial#2}}}
\providecommand{\ppderiv}[2]{\frac{\mathinner{\partial^2#1}}{\mathinner{\partial#2^2}}}
\providecommand{\pppderiv}[2]{\frac{\mathinner{\partial^3#1}}{\mathinner{\partial#2^3}}}
\providecommand{\ppppderiv}[2]{\frac{\mathinner{\partial^4#1}}{\mathinner{\partial#2^4}}}
\providecommand{\pqderiv}[3]{\frac{\mathinner{\partial^2#1}}{\mathinner{\partial#2\partial#3}}}
\providecommand{\ppqderiv}[3]{\frac{\mathinner{\partial^3#1}}{\mathinner{\partial#2^2 \partial#3}}}
\providecommand{\ppqqderiv}[3]{\frac{\mathinner{\partial^4#1}}{\mathinner{\partial#2^2 \partial#3^2}}}

%------------------------------------------------------------------------------
% Matrix/Vector commands
%------------------------------------------------------------------------------
\DeclareMathAlphabet{\mathmat}{OT1}{cmss}{bx}{n}
\newcommand{\mats}[1]{\mathmat{#1}}
\newcommand{\mat}[1]{\mathmat{#1}}
\newcommand{\ma}[1]{\mathmat{#1}}

%\newcommand{\ve}[1]{\ensuremath{\text{\textbf{\textit{vec}}}\negmedspace\left(#1\right)}}
\newcommand{\ve}[1]{\ensuremath \mathbf{#1}}
\newcommand{\veb}[1]{\ensuremath \boldsymbol{#1}}
\newcommand{\tr}[1]{\ensuremath{\text{\textbf{\textit{tr}}}\negmedspace\left(#1\right)}}
\newcommand{\unit}[1]{\ensuremath  \hat{\ve{ #1}}}
\newcommand{\corf}{\ensuremath \boldsymbol{\Omega} }
\newcommand{\om}{\ensuremath \boldsymbol{\omega} }


%------------------------------------------------------------------------------
% Statistics commands
%------------------------------------------------------------------------------
\newcommand{\ev}[1]{\ensuremath{\text{\textbf{\textit{E}}}\negmedspace\left(#1\right)}}
\newcommand{\std}[1]{\ensuremath{\text{\textbf{\textit{Std}}}\negmedspace\left(#1\right)}}
\newcommand{\var}[1]{\ensuremath{\text{\textbf{\textit{Var}}}\negmedspace\left(#1\right)}}
\newcommand{\cov}[1]{\ensuremath{\text{\textbf{\textit{Cov}}}\negmedspace\left(#1\right)}}
\newcommand{\pr}[1]{\ensuremath{\text{\textbf{\textit{Pr}}}\negmedspace\left(#1\right)}}
\newcommand{\corr}[1]{\ensuremath{\text{\textbf{\textit{Corr}}}\negmedspace\left(#1\right)}}

\newcommand{\erf}{\operatorname{erf}}
\newcommand{\erfc}{\operatorname{erfc}}

%------------------------------------------------------------------------------
% Indent paragraph left and right
%------------------------------------------------------------------------------
\newenvironment{inmargins}[1]
{\begin{list}{}{\leftmargin=#1 \rightmargin=#1 \parsep=0pt \partopsep=0pt}\item[]}{\end{list}}

%------------------------------------------------------------------------------
% Boxed paragraph
%------------------------------------------------------------------------------
\newlength{\boxedparwidth}
\setlength{\boxedparwidth}{.92\textwidth} \setlength{\arrayrulewidth}{0.02in}
\newenvironment{boxedtext}%
    {\begin{center}
        \begin{tabular}{|@{\hspace{.10in}}c@{\hspace{.15in}}|} \hline
        \begin{minipage}[t]{\boxedparwidth}
        \setlength{\parindent}{.20in}\centering}%
    {\end{minipage} \\ \hline \end{tabular} \end{center}}


%------------------------------------------------------------------------------
% Boxed equation
%------------------------------------------------------------------------------    
\newcommand{\boxedeq}[2]{\begin{empheq}[box={\fboxsep=6pt\fbox}]{align}\label{#1}#2\end{empheq}}
    
%------------------------------------------------------------------------------
% Boxed paragraph  - WIDE
%------------------------------------------------------------------------------
\newlength{\boxedparwidthII}
\setlength{\boxedparwidthII}{1.15\textwidth} \setlength{\arrayrulewidth}{0.02in}
\newenvironment{boxedtextwide}%
    {\begin{center}
        \begin{tabular}{|@{\hspace{.10in}}c@{\hspace{.15in}}|} \hline
        \begin{minipage}[t]{\boxedparwidthII}
        \setlength{\parindent}{.20in}} %
    { \end{minipage} \\ \\  \hline \end{tabular} \end{center}}

%------------------------------------------------------------------------------
% The general "SCRIPT" macro for groundwater presentations.
%
%                    5
%                   111   4
%                  1111
%                   111
%                   111
%                  11111  3
%                    2
%------------------------------------------------------------------------------
\newcommand{\Script}[5]
{
   {\overset{#5}{\underset{#2}{#1}}}\vphantom{#1}^{#4}_{#3}
}

%----------------------------------------------------------------------------------------
%  Set the Theorem style
%----------------------------------------------------------------------------------------

\theoremstyle{break} \theorembodyfont{\rmfamily}

\setlength{\theorempreskipamount}{12pt}

\setlength{\theorempostskipamount}{12pt}

\newtheorem{convention}{Convention}
\newtheorem{axiom}{Axiom}


\endinput
