\RequirePackage{relsize} % for \smaller
\RequirePackage{amsmath} % for \text{}

% Author, Copyright junk
\newcommand{\copytitle}{
  \begin{center}
    Copyright \copyright\ \today\ by W.\ Trevor King\\
    \smaller{This document is distributed under the GNU Free Documentation License.}
  \end{center}
}

% define theorem environments
\newtheorem{thm}{Theorem}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}{Lemma}

\newcommand{\U}[1]{\text{ #1}}		        % units shortcut
\newcommand{\E}[1]{\ensuremath{\cdot 10 ^{#1}}}	% exponent shortcut
\newcommand{\dg}{\ensuremath{^{\circ}}}         % degree symbol ^o
\newcommand{\vect}[1]{\ensuremath{\mathbf{#1}}} % make vectors bold

\newcommand{\ihat}{\vect{\hat{i}}}
\newcommand{\jhat}{\vect{\hat{j}}}
\newcommand{\khat}{\vect{\hat{k}}}
\newcommand{\rhat}{\vect{\hat{r}}}

\newcommand{\avg}[1]{\ensuremath{\left\langle {#1} \right\rangle}} % average
\newcommand{\dt}[1]{\ensuremath{\dot{#1}}} % first deriv with respect to time
\newcommand{\ddt}[1]{\ensuremath{\ddot{#1}}} % 2nd deriv with respect to time
% the proper d to be used in derivatives and integrals
\newcommand{\dd}{\ensuremath{\mathrm d}}
% derivative of #2 with respect to #1
\newcommand{\deriv}[2]{\ensuremath{\frac{\dd{#2}}{\dd{#1}}}}
% #1th order derivative of #3 with respect to #2
\newcommand{\nderiv}[3]{\ensuremath{\frac{\dd^{#1}{#3}}{\dd{#2}^{#1}}}}
% partial derivative of #2 with respect to #1
\newcommand{\pderiv}[2]{\ensuremath{\frac{\partial#2}{\partial#1}}}
% #1th order partial derivative of #3 with respect to #2
\newcommand{\npderiv}[3]{\ensuremath{\frac{\partial^{#1}{#3}}{\partial{#2}^{#1}}}}

% parenthesis, for example (some stuff] would be \p({some stuff}]
\newcommand{\p}[3]{\left#1 #2 \right#3}

% parts for multi-part problems and solutions (use problempack.sty instead)
%\newcommand{\Part}[1]{\textcolor{Red}{(#1)}}
% highlight answers in solutions
%\newcommand{\ans}[1]{\textcolor{Red}{#1}}

% struts for table spacing
\newcommand{\Tstrut}{\rule{0pt}{2.6ex}}
\newcommand{\Bstrut}{\rule[-1.2ex]{0pt}{0pt}}

% \numberwithin{equation}{section}% number equations by section
% \setcounter{secnumdepth}{0}     % turn off section numbering below this level


% tighter lists, a la alvin alexander
% http://www.devdaily.com/blog/post/latex/control-line-spacing-in-itemize-enumerate-tags/

\newenvironment{packed_enum}{
\begin{enumerate}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{enumerate}}

\newenvironment{packed_item}{
\begin{itemize}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{itemize}}
