% For Oxford University Press, 200 Madison Avenue, NYC, NY 10016
% Corresponds roughly to the style used in ``Atmospheric Radiation'' by
% Goody and Yung
%
% Usage: \documentstyle[oxford,times,makeidx,draft]{report}
%
% Copyright (C) 1990 Edward W Sznyter (ews@cs.Stanford.EDU)
%
% $Date: 90/10/24 18:10:51 $
% $Revision: 1.3 $
%
% 9/30/90	Modified according to marks of 9/4/90 from
%		Jeffery Robbins/Fred Schneider.
%		In toc, page numbers flush right instead of comma-separated
%		from the entry. Periods after section numbers.
%		Different spacing between consecutive heads
%		Footnotes: 7/8 -> 8/10
%		Tables: body size 7/8 -> 8/10 (my mistake)
%		Captions: 8/9 -> 8/10.  FIG size change.
%		No running head on float pages
%
% 10/20/90	unnumbered chapter heads were CN font.
%		Fig/table captions 8/10 -> 9/10

\long\def\comment#1{}

\ds@twoside
\headheight=9pt
\headsep=15pt   % 2pc-9pt
\textheight=45pc
\textwidth=27pc
% no drop folios except on full-page figures and tables
\footskip=0pt           %    Distance from baseline of box containing foot
                        %    to baseline of last line of text.
\parindent=2em
\parskip=0pt
\frenchspacing

\def\small{\@setsize\small{11pt}\ixpt\@ixpt
\abovedisplayskip 8.5pt plus 3pt minus 4pt%
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2pt%
\belowdisplayshortskip 4pt plus2pt minus 2pt
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\rightmargin\leftmargin
\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
\itemsep \parsep}}

\def\footnotesize{\@setsize\footnotesize{10pt}\viiipt\@viiipt
\abovedisplayskip 6pt plus 2pt minus 4pt%
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus 1pt%
\belowdisplayshortskip 3pt plus 1pt minus 2pt
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\rightmargin\leftmargin
\topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
\itemsep \parsep}}

\def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
\def\tiny{\@setsize\tiny{6pt}\vpt\@vpt}
\def\large{\@setsize\large{14pt}\xiipt\@xiipt}
\def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
\def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
\def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}

\def\viONix{\@setsize\viONix{9pt}\vipt\@vipt}
\def\viiONviii{\@setsize\viiONviii{8pt}\viipt\@viipt}
\def\viiiONix{\@setsize\viiiONix{9pt}\viiipt\@viiipt}
\def\viiiONx{\@setsize\viiiONx{10pt}\viiipt\@viiipt}
\def\ixONx{\@setsize\ixONx{10pt}\ixpt\@ixpt}
\let\ixONxi=\small
\def\xiiONxiv{\@setsize\xiiONxiv{14pt}\xiipt\@xiipt}
\def\xviiONxviii{\@setsize\xviiONxxii{18pt}\xviipt\@xviipt}

\font\smallcaps = timesb scaled 640

\normalsize  % Choose the normalsize font.


% put the chapter counter in counter 1, so we can dviselect
\countdef\c@chapter=1 \c@chapter=0

% toc. Period after section number.  Increase width of section number

\def\numberline#1{\hbox to\@tempdima{#1.\hfil}}

\def\l@chapter#1#2{\addpenalty{-\@highpenalty}  
   \vskip 1.0em plus 1pt  % space above chapter line
   \@tempdima 1.9em       % width of box holding chapter number
   \begingroup
     \parindent \z@ \rightskip \@pnumwidth 
     \parfillskip -\@pnumwidth   
     \bf                  % Boldface.
     \leavevmode          % TeX command to enter horizontal mode.       
      \advance\leftskip\@tempdima  %% added 5 Feb 88 to conform to 
      \hskip -\leftskip            %% 25 Jan 88 change to \numberline
     #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
     \penalty\@highpenalty %% added 24 May 89 as suggested by J. Leichter
   \endgroup}
      
\def\l@section{\@dottedtocline{1}{1.5em}{2.6em}}
\def\l@subsection{\@dottedtocline{2}{3.8em}{3.5em}}


% index

\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
\columnseprule \z@
\viiiONx
\columnsep 35pt\twocolumn[\@makeschapterhead{Index}]
    \@mkboth{INDEX}{INDEX}\thispagestyle{empty}\parindent\z@
    \parskip\z@ plus .3pt\ixONxi\relax\let\item\@idxitem}

\def\@idxitem{\par\hangindent 2pc}

\def\subitem{\par\hangindent 2pc \hspace*{1pc}}

\def\subsubitem{\par\hangindent 2pc \hspace*{1pc}}

\def\indexspace{\par \vskip 2pc plus .5pc minus .3pc\relax}

% footnotes 8/10, no rule. 10 pt b/b between entries.

\skip\footins 18pt plus 6pt minus 3pt
\def\footnoterule{}
\footnotesep 10pt

% figures.  8/9 TB number, 8/9 TR caption Fig. #. em caption
\long\def\@makecaption#1#2{
   \vskip 10pt 
   \setbox\@tempboxa\hbox{\ixONx #1.\hskip 1em\rm #2}
   \ifdim \wd\@tempboxa >\hsize   % IF longer than one line:
       #1.\hskip 1em\rm #2\par %   THEN set as ordinary paragraph.
     \else                        %   ELSE  center.
       \hbox to\hsize{\hfil\box\@tempboxa\hfil}  
   \fi}
\def\fnum@figure{\ixONx\bf F{\smallcaps IG}. \thefigure}
% tables 9/10 TB number
\def\fnum@table{\ixONx\bf Table \thetable}
\def\tabletitlestrut{\vrule height 12pt width 0pt depth 6pt}
% table body 9/10.  to's no indent.
% table footnotes 7/8, 10pt b/b between fn and rule
\def\table[#1]{\@float{table}[#1]\ixONx}
\def\arraystretch{1.5}

% Float pages have ``plain'' style.
\def\@ytryfc #1{\begingroup \gdef\@flsucceed{\@elt #1}\gdef\@flfail
  {}\@tempdima\ht #1\let\@elt\@ztryfc \@trylist \ifdim \@tempdima >\@fpmin 
     \global\@fcolmadetrue\thispagestyle{plain}\else \@cons\@failedlist #1\fi
  \endgroup \if@fcolmade \let\@elt\@gobble \fi}



%
% Running heads: 8/8 Times Roman caps, centered.  folio flush outside.
% verso book title, recto chapter title
%
\def\ps@headings{\let\@mkboth\markboth
  \def\@oddfoot{}\def\@evenfoot{}%       No feet.
  \def\@evenhead{\viiiONix\rm\hss{\uppercase{\rightmark}}\hss\llap{\thepage}}
  \def\@oddhead{\viiiONix\rm\rlap{\thepage}\hss{\leftmark}\hss}
  % Normal chapter put the name with no number, centered.  Index and toc
  % put Index and toc on both sides
  \def\chaptermark##1{\markboth{\uppercase{\if\@chapapp\relax ##1
                                             \else \thechapter. ##1\fi}}
                               {\ifnum\c@secnumdepth >\m@ne \uppercase{\@title}
                                \else ##1\fi}}%
  \def\sectionmark##1{}}



%    ****************************************
%    *        CHAPTERS AND SECTIONS         *
%    ****************************************
%
%

\let\@chapapp=\relax
\def\appendix{\par
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \def\@chapapp{A}
  \def\thechapter{A\arabic{chapter}}}	% forces us to use \arabic{chapter}
					% in \@makechapterhead.


\def\@makechapterhead#1{             % Heading for \chapter command
  \vspace*{3.5pc}      % Space at top of text page. 7pc-18pt-headsep-headheight
  { \parindent 0pt \centering
    \ifnum \c@secnumdepth >\m@ne     % IF secnumdepth > -1 THEN
      \xviiONxviii\bf \thechapter % Print 'Chapter' and number.
    \par 
    \vskip 10pt \fi                    % Between number and title. 2pc-14pt
    \xiiONxiv\bf                        % Title.
    \uppercase{#1}\par
    \nobreak                         % TeX penalty to prevent page break.
    \vskip 2pc                      % Space between title and text. 3pc-12pt
    \nobreak
    \vskip 0pt		% fools the code to remove glue between section heads
  } }

\def\@makeschapterhead#1{             % Heading for \chapter* command
  \vspace*{7pc}\vspace*{-14pt}        % Space at top of page.
  { \parindent 0pt \centering 
    \xiiONxiv\bf                        % Title.
    \uppercase{#1}\par 
    \nobreak                        % TeX penalty to prevent page break.
    \vskip 2pc                      % Space between title and text.
  } }

% chapter head.  pagestyle is empty

\def\chapter{\clearpage      % Starts new page.
   \thispagestyle{empty}     % Page style of chapter page is empty
   \global\@topnum\z@        % Prevents figures from going at top of page.
   \@afterindentfalse        % Suppresses indent in first paragraph.  Change
   \secdef\@chapter\@schapter}   % to \@afterindenttrue to have indent.

\setcounter{secnumdepth}{2}     % number subsection
\setcounter{tocdepth}{2}        % and put them in the table of contents

% #1 head 10/12 Times bold, arabic number, em space, initial cap, lc, fl/lt.
% 30+12 pt b/b above, 6+12 pts b/b below
\def\section{\@startsection {section}{1}{\z@}{-31pt plus 6pt minus
     3pt}{7pt plus 2pt}{\normalsize\bf}{\normalsize\bf}}
% #2head 10/12 TR number, en space, TI head, 18+12 b/b above, 6+12pt b/b below.
\def\subsection{\@startsection{subsection}{2}{\z@}{-19pt plus 6pt minus
     3pt}{7pt plus 2pt}{\normalsize\it}{\normalsize\rm}}
% #3 head 10/12 TR, period, run in text.  18pt b/b above
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-7pt plus 4pt minus
     2pt}{-1pc plus 2pt}{\normalsize\rm}{\normalsize\rm}}

%
% Add an argument for setting the font of the number
%
\def\@startsection#1#2#3#4#5#6#7{\if@noskipsec \leavevmode \fi
   \par \@tempskipa #4\relax
   \@afterindenttrue
   \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi
   \if@nobreak \vskip -\lastskip\nobreak\vskip 2pt \everypar{}\else
     \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
     {\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}{#7}}}}

%
% This simply puts a period after the section number.
%
\def\@sect#1#2#3#4#5#6#7[#8]#9{\ifnum #2>\c@secnumdepth
     \def\@svsec{}\else 
     \refstepcounter{#1}\edef\@svsec{{#7\csname the#1\endcsname.}\hskip 1em}\fi
     \@tempskipa #5\relax
      \ifdim \@tempskipa>\z@ 
        \begingroup #6\relax
          \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #9\par}%
        \endgroup
       \csname #1mark\endcsname{#8}\addcontentsline
         {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                      \protect\numberline{\csname the#1\endcsname}\fi
                    #8}\else
        \def\@svsechd{#6\hskip #3\@svsec #9\csname #1mark\endcsname
                      {#8}\addcontentsline
                           {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                             \protect\numberline{\csname the#1\endcsname}\fi
                       #8}}\fi
     \@xsect{#5}}


%
% bibliography 9/11 TR x 27pc, block style 18 pt b/b between entries
% biblio head, 9pt TB, all caps, centered 20pt b/b above and below

\comment{%
\def\thebibliography{\@startsection{section}{99}{\z@}{9pt plus 3pt
    minus 2pt}{.1pt plus 2pt}{\ixONxi\bf}{\ixONxi\bf}*
                {\hbox to\hsize{\hfill BIBLIOGRAPHY\hfill}}
    \addcontentsline{toc}{section}{\numberline{}Bibliography}
    \setcounter{section}{0}
    \setcounter{secnumdepth}{100}     % number subsection, but never put in toc
%
% biblio #1 head, 9pt TB, 20pt b/b above, no extra space below
%
\def\section{\@startsection {section}{91}{\z@}{-9pt plus 4pt minus
     2pt}{.1pt}{\ixONxi\bf}{\ixONxi\bf}}
%
% biblio #2 head, 9pt TI, 18pt b/b above, no extra space below
%
\def\subsection{\@startsection{subsection}{92}{\z@}{-7pt plus 3pt minus
     2pt}{.1pt}{\ixONxi\it}{\ixONxi\rm}}
% make it 9/11 TR, 18pt itemsep
    \list{}{\ixONxi\rm\listparindent=2em\parindent=0pt\parsep=6pt\itemsep=0pt
        \labelsep=0pt\labelwidth=0pt\leftmargin=0pt\ixONxi}\item[]}

\let\endthebibliography=\endlist
}

% NL: number lists.  Indent both margins

\def\@listI{\leftmargin\leftmargini \rightmargin=\leftmargin
\parsep 4pt plus 2pt minus 1pt%
\topsep 6pt plus 2pt minus 4pt%
\itemsep 4pt plus 2pt minus 1pt}

\let\@listi\@listI
\@listi 
\def\@listii{\leftmargin\leftmarginii \rightmargin\leftmargin
   \labelwidth\leftmarginii\advance\labelwidth-\labelsep
   \topsep 4pt plus 2pt minus 1pt
   \parsep 2pt plus 1pt minus 1pt
   \itemsep \parsep}

\def\@listiii{\leftmargin\leftmarginiii \rightmargin\leftmargin
    \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
    \topsep 2pt plus 1pt minus 1pt 
    \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
    \itemsep \topsep}

\def\@listiv{\leftmargin\leftmarginiv \rightmargin\leftmargin
     \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}

\def\@listv{\leftmargin\leftmarginv \rightmargin\leftmargin
     \labelwidth\leftmarginv\advance\labelwidth-\labelsep}

\def\@listvi{\leftmargin\leftmarginvi \rightmargin\leftmargin
     \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}



%    ****************************************
%    *           INITIALIZATION             *
%    ****************************************
%
\pagestyle{headings}

