\ProvidesPackage{dnd}

\RequirePackage[T1]{fontenc}
\RequirePackage[palatino, helvetica, courier, maths = palatino]{mdwfonts}
\RequirePackage{amssymb}
\RequirePackage[all, arc, dvips]{xy}
\RequirePackage[colour]{mdwtab}
\makeatletter

%%% maths
\let\epsilon\varepsilon
\let\le\leqslant \let\ge\geqslant

%%% tables
\def\tt#1{\multicolumn{\tab@columns}{c}{\textbf{#1}}}
\def\th#1{\textbf{#1}}
\newcolumntype\shade{?>{%
  \ifmod{\value{tabrow}}{2}{0}{\rowcolour{white}}{\rowcolour[gray]{0.9}}}%
}
\newcolumntype\noshade{?>{\rowcolour{white}}}
\def\c{\multicolumn{1}{c}}
\def\s#1{\rlap{$^{\hbox{\scriptsize\itshape#1}}$}}
\def\0{\hphantom0}

\newenvironment{tab*}[3]{%
  \refstepcounter{table}%
  \label{tab:#1}%
  \begin{tabular}[C]{\shade#3}%
    \hlx*{hv}%
    \tt{Table~\thetable.  #2}\\%
}{%
    \hlx*{vh}%
  \end{tabular}%
}
\newenvironment{tab}[3]
  {\begin{table}\begin{tab*}{#1}{#2}{#3}}
  {\end{tab*}\end{table}}

%%% dice
\def\dice#1{\dice@#1\relax}
\def\dice@#1d#2\relax{\ensuremath{\mathrm{#1d#2}}}
\let\d\dice

%%% fractions
\def\tfrac#1#2{^{#1}\!\!/\!_{#2}}

%%% xy-pic
\def\objectbox#1{%
  \vbox{\halign{\hfil\ignorespaces\strut##\unskip\hfil\cr#1\crcr}}}
\def\labelbox#1{\hbox{\small\,\strut#1\,}}
