%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  ARTADJ DOCUMENT SUBSTYLE
%%     Makes adjustments to the basic ARTICLE document style and the
%%     various point size substyles (i.e., ART10, ART11, and ART12).
%%
%% Adapted from various people at UMass, updated for Latex2e

\makeatletter   % Make '@' a letter to allow access to private macros of
                %   LaTeX and Plain TeX.

%%%%%%
%  Fix up bugs/annoyances 

\showboxdepth=0                  % make warning messages brief
\showboxbreadth=0

%%%%%%
%%  Page layout
 
\if@twoside
   \oddsidemargin 0.4truein
   \textwidth     6.1truein
\else
   \oddsidemargin 0.25truein
   \textwidth     6.25truein
\fi

\topmargin      0.0truein
\evensidemargin 0.0truein
\textheight     8.25truein
%\footheight     0.25truein
\footskip       0.75truein
\headheight     0.25truein
\headsep        0.25truein

%%%%%%
%%  Margin notes

\marginparwidth 0.0truein
\marginparsep   0.0truein
\marginparpush  0.0truein

% Definition of 'customheadings' page style.  
%
\def\ps@customheadings{\let\@mkboth\@gobbletwo
\def\@oddhead{\hbox{}\rightmark}%
\def\@oddfoot{}\def\@evenhead{\leftmark\hbox {}}%
\def\@evenfoot{}\def\sectionmark##1{}\def\subsectionmark##1{}}

% patch to table of contents -- it used to screw up the headers
%
\def\tableofcontents{\section*{Contents}\@starttoc{toc}}
\def\listoffigures{\section*{List of Figures}\@starttoc{lof}}
\def\listoftables{\section*{List of Tables}\@starttoc{lot}}
%\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
%  \vskip \z@ plus .2pt
%  {\hangindent #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
%    \parskip \z@  %% added this line to prevent paragraph spacing between lines
%    \parindent #2\relax\@afterindenttrue
%   \interlinepenalty\@M
%   \leavevmode 
%   \@tempdima #3\relax
%    #4\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill 
%   \hbox to\@pnumwidth{\hfil\rm #5}\par}\fi}



%%%%%%
%%  Section Titles

\def\thesection       {\arabic{section}}                % 2  section two
\def\thesubsection    {\thesection.\arabic{subsection}} % 2.1 subsection two.one

\newcommand{\smallheadings}{%
  \def\section{\@startsection {section}{1}{\z@}{3.5ex plus 1ex minus
      .2ex}{2.3ex plus .2ex}{\large\bf}}
  \def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus 1ex minus
     .2ex}{1.5ex plus .2ex}{\normalsize\bf}}
  \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{3.25ex plus 1ex minus
     .2ex}{1.5ex plus .2ex}{\normalsize\bf}}
  }

\def\section{\@startsection {section}{1}{\z@}{3.5ex plus 1ex minus
    .2ex}{2.3ex plus .2ex}{\Large\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus 1ex minus
   .2ex}{1.5ex plus .2ex}{\large\bf}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{3.25ex plus 1ex minus
   .2ex}{1.5ex plus .2ex}{\normalsize\bf}}

%%%%%%%%%%
%%  Citation patch
\def\citedelim{,}      % redefine this to change the delimiter (e.g., to ';')

\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{\citedelim {}}\@ifundefined
       {b@\@citeb}{\@citeb{\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
    \hbox{\csname b@\@citeb\endcsname}}}{#1}}


%%%%%%%%%%%
%%  Fix annoying bugs in article style
%%

%%% abstract -- don't indent

\def\abstract{\if@twocolumn
\section*{Abstract}
\else \small 
\begin{center}
{\bf Abstract\vspace{-.5em}\vspace{0pt}} 
\end{center}
\quote    % no, don't indent the damn abstract (was "\quotation")
\fi}

\def\endabstract{\if@twocolumn\else\endquotation\fi}

%%% bibliography -- don't mark the header

\def\thebibliography#1{\section*{References}\list
  {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumi}}
    \def\newblock{\hskip .11em plus .33em minus -.07em}
    \sloppy
    \sfcode`\.=1000\relax}

\let\endthebibliography=\endlist

%  WAS:
% \def\@cite#1#2{[{#1\if@tempswa , #2\fi}]}
% \def\@biblabel#1{[#1]\hfill}
% SHOULD BE:  if optional arg is given, it replaces the [nn] form with (arg)
% \def\@cite#1#2{\if@tempswa (#2)\else[#1]\fi}
% \def\@biblabel#1{[#1]\hfill}

% to support named.bst, added aeh 4/26/95
\let\@internalcite\cite
\def\cite{\def\citeauthoryear##1##2{##1, ##2}\@internalcite}
\def\shortcite{\def\citeauthoryear##1{##2}\@internalcite}
\def\@biblabel#1{\def\citeauthoryear##1##2{##1, ##2}[#1]\hfill}

%%% appendix

\def\appendix{\par
   \setcounter{section}{0}
   \setcounter{subsection}{0}
   \def\thesection{\Alph{section}.}}

% Ack: Acknowledgements same as No 5 head, 36pt above, added aeh
% 4/26/95
\def\xONxii{\normalsize}
\def\acknowledgments{\@startsection
     {subparagraph}{6}{\z@}{-24pt plus 6pt minus 1pt}{-.5em}%
        {\xONxii\it}*{Acknowledgments:\/}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \write\@auxout{\string\bibstyle{plain}}

\def\bibliographystyle#1{\write\@auxout{\string\bibstyle{#1}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\makeatother    % Make '@' a non-letter to disallow access to private macros
                %   of LaTeX and Plain TeX.
