%% natepaper.sty - paper setup for Nate Derby
%% Latest edits: 6/16/09

\ProvidesPackage{natepaper}

\usepackage{natbib, graphics, color, epsfig, ifthen, relsize, moreverb, amssymb, amsmath, cancel, array, kbordermatrix, mathtools}
\usepackage[bottom]{footmisc}
\usepackage[bookmarks=false,pdfauthor={Nathaniel Derby (nderby@sprodata.com)}]{hyperref}
\usepackage[amsmath, thmmarks]{ntheorem}
\usepackage{tabularx}
\hyphenpenalty=5000
\bibliographystyle{natedcu}
\renewcommand{\refname}{}
\renewcommand{\arraystretch}{1}
\bibpunct{(}{)}{;}{a}{,}{,}

\def\us{\char`\_}

\DeclareGraphicsExtensions{.jpg, .png}
\addtolength{\parskip}{.5\baselineskip}

\newcommand{\me}{Nathaniel Derby}
\newcommand{\red}{\color{red}}
\newcommand{\blue}{\color{blue}}

\newcommand{\nateHeading}[4]{
\begin{tabularx}{\linewidth}{@{}XX@{}}
  \textbf{#1} & \hfill \textbf{#2} \\
  \textbf{#3} & \hfill \textbf{#4}
\end{tabularx}
    }

\newcommand{\nateHeadingShort}[2]{
\begin{tabularx}{\linewidth}{@{}XX@{}}
  \textbf{#1} & \hfill #2
\end{tabularx}
    }

\def \beginquote{ \par \begingroup \narrower}
\def \endquote{ \par \endgroup }


\newcommand{\E}{\mbox{E}}
\newcommand{\N}{\mbox{N}}
\newcommand{\U}{\mbox{U}}
\newcommand{\Exp}{\mbox{Exp}}
\newcommand{\B}{\mbox{B}}
\renewcommand{\P}{\mbox{P}}
\newcommand{\Pbf}{\mathbf{P}}
\newcommand{\pbf}{\mathbf{p}}
\newcommand{\Qbf}{\mathbf{Q}}
\newcommand{\Rbf}{\mathbf{R}}
\newcommand{\Ibf}{\mathbf{I}}
\newcommand{\Nbf}{\mathbf{N}}
\newcommand{\Mbf}{\mathbf{M}}
\newcommand{\Vbf}{\mathbf{V}}
\newcommand{\Zerobf}{\mathbf{0}}
\newcommand{\Onebf}{\mathbf{1}}
\newcommand{\Ps}{\mbox{\scriptsize P}}

\newcommand{\xbf}{\mathbf{x}}
\newcommand{\Xbf}{\mathbf{X}}
\newcommand{\ybf}{\mathbf{y}}
\newcommand{\Ybf}{\mathbf{Y}}
\newcommand{\bm}{\boldsymbol}
\newcommand{\Me}{\mbox{\emph{Me}}}
\newcommand{\Mo}{\mbox{\emph{Mo}}}

\newcommand{\fracb}{\displaystyle\frac}
\newcommand{\fracs}{\textstyle\frac}
\newcommand{\intb}{\displaystyle\int}
\newcommand{\limb}{\displaystyle\lim}
\newcommand{\prodb}{\displaystyle\prod}
\newcommand{\sumb}{\displaystyle\sum}
\newcommand{\capb}{\displaystyle\cap}
\newcommand{\cupb}{\displaystyle\cup}

\newcommand{\alphabf}{\mbox{\boldmath$\alpha$}}
\newcommand{\betabf}{\mbox{\boldmath$\beta$}}
\newcommand{\epsilonbf}{\mbox{\boldmath$\varepsilon$}}
\newcommand{\lambdabf}{\mbox{\boldmath$\lambda$}}
\newcommand{\mubf}{\mbox{\boldmath$\mu$}}
\newcommand{\sigmabf}{\mbox{\boldmath$\sigma$}}
\newcommand{\thetabf}{\mbox{\boldmath$\theta$}}
\newcommand{\thetabfs}{\mbox{\boldmath$\scriptstyle\theta$}}

\newcommand{\Corr}{\mbox{Corr}}
\newcommand{\Cov}{\mbox{Cov}}
\renewcommand{\mod}{\mbox{\scriptsize{ mod }}}
\newcommand{\rank}{\mbox{rank}}
\newcommand{\SD}{\mbox{SD}}
\newcommand{\Var}{\mbox{Var}}

\newcommand{\claim}{\textbf{Claim: }}
\newcommand{\note}{\textsc{Note: }}
\newcommand{\hint}{\textsc{Hint: }}
\newcommand{\extra}{\textbf{Extra Credit: }}
\renewcommand{\th}{{\mbox{\relsize{-2}th}}}
\newcommand{\rd}{{\mbox{\relsize{-2}rd}}}
\newcommand{\nd}{{\mbox{\relsize{-2}nd}}}
\newcommand{\st}{{\mbox{\relsize{-2}st}}}

\newcommand{\backskip}{\vspace{-2ex}}

\theoremstyle{plain}
\theorembodyfont{\rmfamily}
\theoremseparator{.}

\renewcommand{\theorempreskipamount}{20pt}
\renewcommand{\theorempostskipamount}{10pt}

\newtheorem{definition}{Definition}[section]
\newtheorem{dfn}{Definition}[section]

\theoremsymbol{$\Box$}
\newtheorem{exa}{Example}[section]

\theoremsymbol{}
\theoremprework{\renewcommand{\theorempreskipamount}{10pt} \renewcommand{\theorempostskipamount}{0pt}}
\theorempostwork{\renewcommand{\theorempreskipamount}{20pt} \renewcommand{\theorempostskipamount}{10pt}}

\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}{Lemma}[section]
\newtheorem{cor}{Corollary}[section]

\theoremsymbol{$\Box$}
\theoremstyle{nonumberbreak}
\theoremheaderfont{\itshape}
\theoremseparator{: \smallskip}
\newtheorem{sol}{Solution}
\theoremseparator{: \\[-3ex]}
\newtheorem{soa}{Solution}

\usepackage[paper=letterpaper, hmargin=0.75in, vmargin={0.5in,0.75in}]{geometry}
\parindent=0pt

\newenvironment{proof}
  {\textbf{Proof:}}
  {\hfill $\blacksquare$\vspace{15pt}}
