% CUP Journal of Fluid Mechanics document style JFM.STY
% v1.1, 16 November 1993
% Copyright (1993) Cambridge University Press

% This software may only be used in the preparation of journal articles
% or books or parts of books to be published by Cambridge University Press.
% Any other use constitutes an infringement of copyright.

%     by Joey Sams.
%     based on JFP.STY (by Graham White) and MSCS.STY (by Sue Brooks).
%     based on ARTICLE DOCUMENT STYLE
%     by Leslie Lamport
% for LaTeX version 2.09
%
% incorporating also parts of authordate.sty, by David Rhead, of
% the Cripps Computing Centre (February 1990).
%
% v 0.91  6 October 1992 JAS with minor changes.
% v 0.92  21 October 1992 MAW (to fix \enumerate and create a
%         theorem environment; to change cm fonts to mt and
%         load a bold italic face; to redefine \theequation
%         inside appendices)
% v 0.93  24 December 1992 Alison Woollatt to change floatpagefraction,
%         include \flushbottom, add copyright line.
% v 0.94  11 January 1993 Alison Woollatt to correct shortcite and
%         improve spacing around eqnarrays
% v 1.00  8 February 1993 RM \pubyear, \ns, \and
% v 1.01  23 April 1993 Alison Woollatt remove lines around figs, add
%         \norule, \followon, remove dot from Appendix when \section{}
%         is used, remove shortcite, change bibliography, add font switch
% v 1.02  26 April 1993 Alison Woollatt, add subequation and subeqnarray
% v 1.03  14 May 1993 Alison Woollatt, correct headsep and titlepage r/h
% v 1.04  17 June 1993 Alison Woollatt, 10.5pt size and jfm symbols in Times
% v 1.1   16 November 1993 Mark Reed, nfss 1,2 compatible; correct style
%         in section/subsection/reference headers, Alison Woollatt

\newif\ifoldfss
\newif\ifnfssone
\newif\ifnfsstwo
\def\f@s@s{}%
%
\@ifundefined{DeclareFontShape}%
  {%
   \@ifundefined{selectfont}%
    {\global\oldfsstrue\let\reset@font=\relax}% old font selection scheme
    {\global\nfssonetrue\def\f@s@s{with NFSS release 1,\space}}%
  }%
  {\global\nfsstwotrue\def\f@s@s{with NFSS release 2,\space}}%
%
\typeout{Document Style `JFM journal style' \f@s@s v1.1 16 November 1993}
%
% Journals use two-sided printing.
%
\@twosidetrue
\@mparswitchtrue
\def\ds@draft{\overfullrule 5pt}
%
\@options

%  ****************************************
%  *               FONTS                  *
%  ****************************************
%
\lineskip 1pt
\normallineskip 1pt
\def\baselinestretch{1}
\def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt
                % 10/12 in Computer Modern; 10.5/12 in Times
 \abovedisplayskip 6.5pt plus 1pt minus 1pt
 \belowdisplayskip \abovedisplayskip
 \abovedisplayshortskip 3pt plus 1pt
 \belowdisplayshortskip  \abovedisplayshortskip}
\def\small{\@setsize\small{10pt}\ixpt\@ixpt% 9 on 10
 \abovedisplayskip 6pt plus 1pt minus 1pt
 \belowdisplayskip \abovedisplayskip
 \abovedisplayshortskip 3pt plus 1pt
 \belowdisplayshortskip  \abovedisplayshortskip % SFB 0.96
}
\def\footnotesize{\small}
\def\indexsize{\@setsize\indexsize{9pt}\viiipt\@viiipt} % 8 on 9
\def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt} % 7 on 8
\def\tiny{\@setsize\tiny{6pt}\vpt\@vpt} % 5 on 6
\def\large{\@setsize\large{13pt}\xipt\@xipt} % 11 on 13
\def\Large{\@setsize\Large{18pt}\xivpt\@xivpt} % 14 on 18
\def\LARGE{\@setsize\LARGE{19pt}\xviipt\@xviipt} % 17 on 19
\def\huge{\@setsize\huge{25pt}\xxpt\@xxpt} % 20 on 25
\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt} % 25 on 30

\let\fontswitch=\relax

\ifx\CUP@mtlplain@loaded\undefined
  \newfont{\qsmall}{cmr10 scaled 975} % 9.75pt rm, used in quotations
  \newfont{\qsmit}{cmti10 scaled 975} % 9.75pt italic
  \newfont{\qsbf}{cmbx10 scaled 975} %9.75 pt bold
  \newfont{\qssf}{cmss10 scaled 975}%9.75pt sans
  \newfont{\boldit}{cmbxti10} % bold italic, added by MAW
\else
  \newfont{\qsmall}{mtr10 scaled 975} % 9.75pt rm, used in quotations
  \newfont{\qsmit}{mtti10 scaled 975} % 9.75pt italic
  \newfont{\qsbf}{mtbx10 scaled 975} %9.75 pt bold
  \newfont{\qssf}{mtss10 scaled 975}%9.75pt sans
  \newfont{\boldit}{mtbxti10} % bold italic, added by MAW
\fi
%

%%%%%%%%%% NFSS release 2

\ifnfsstwo
  \ifx\CUP@mtlplain@loaded\undefined
  \else
    \def\xpt{\fontsize{10.5}{12pt}\selectfont}
    \def\@xpt{10.5}
    \define@mathsizes{10.5}{7}{5}
  \fi
\fi
% End NFSS release 2 code

%%%%%%%%%% NFSS release 1

\ifnfssone
%
  \def\mk@fontshape#1#2#3#4{% Standard sizes plus 10.5pt (for 10pt)
    \new@fontshape{#1}{#2}{#3}{%
      <5>#4 at 5pt<6>#4 at 6pt<7>#4 at 7pt<8>#4 at 8pt%
      <9>#4 at 9pt<10>#4 at 10.5pt<11>#4 at 11pt<12>#4 at 12pt%
      <14>#4 at 14pt<17>#4 at 17pt<20>#4 at 20pt<25>#4 at 25pt}{}%
  }
%
  \def\mkdef@fontshape#1#2#3#4{% Standard LaTeX sizes...
    \new@fontshape{#1}{#2}{#3}{%
      <5>#4 at 5pt<6>#4 at 6pt<7>#4 at 7pt<8>#4 at 8pt%
      <9>#4 at 9pt<10>#4 at 10pt<11>#4 at 11pt<12>#4 at 12pt%
      <14>#4 at 14pt<17>#4 at 17pt<20>#4 at 20pt<25>#4 at 25pt}{}%
  }
%
  \ifx\CUP@mtlplain@loaded\undefined
  \else
%
% Macro to allow use of CM fonts for \sections (only a temp. measure).
%
    \gdef\fontswitch{%
%
%     Kill off mtex10 (for duration of \section) and use cmex10.
%
      \expandafter\let\csname cmex/m/n/10\endcsname=\undefined
      \expandafter\font\csname cmex/m/n/10\endcsname=cmex10
      \textfont 3 = \csname cmex/m/n/10\endcsname
      \scriptfont 3 = \csname cmex/m/n/10\endcsname
      \scriptscriptfont 3 = \csname cmex/m/n/10\endcsname
      \expandafter\let\expandafter\tenex \the\textfont 3
%
%     Use CM roman, math italic, symbol, bold roman, bold math italic and
%     bold symbol in math mode (for duration of \section).
%
      \let\mv@normal=\mv@mynormal
      \let\mv@bold=\mv@mybold
      \mathversion{normal}%
%
      \def\rmdefault{mycmr}%  make \mediumseries give CM roman family
      \def\sfdefault{mycmss}% make \sf give CM sans-serif family
      \def\ttdefault{mycmtt}% make \tt give CM typewriter family
      \def\bfdefault{bx}% \
      \def\itdefault{it}%  \ default
      \def\sldefault{sl}%  / assignments
      \def\scdefault{sc}% /
      \family{mycmr}\series{bx}\shape{n}\selectfont%  select \bf
    }
%
%   Define CM font shapes (in standard LaTeX sizes).
%
    \mkdef@fontshape{mycmr}{m}{n}{cmr10}%
    \mkdef@fontshape{mycmr}{m}{sl}{cmsl10}%
    \mkdef@fontshape{mycmr}{m}{it}{cmti10}%
    \mkdef@fontshape{mycmr}{m}{sc}{cmcsc10}%
    \mkdef@fontshape{mycmr}{m}{u}{cmu10}%
    \mkdef@fontshape{mycmr}{b}{n}{cmb10}%
    \mkdef@fontshape{mycmr}{bx}{n}{cmbx10}%
    \mkdef@fontshape{mycmr}{bx}{sl}{cmbxsl10}%
    \mkdef@fontshape{mycmr}{bx}{it}{cmbxti10}%
    \mkdef@fontshape{mycmss}{m}{n}{cmss10}%
    \mkdef@fontshape{mycmss}{m}{sl}{cmssi10}%
    \mkdef@fontshape{mycmss}{sbc}{n}{cmssdc10}%
    \mkdef@fontshape{mycmss}{bx}{n}{cmssbx10}%
    \mkdef@fontshape{mycmtt}{m}{n}{cmtt10}%
    \mkdef@fontshape{mycmtt}{m}{it}{cmitt10}%
    \mkdef@fontshape{mycmtt}{m}{sl}{cmsltt10}%
    \mkdef@fontshape{mycmtt}{m}{sc}{cmtcsc10}%
    \mkdef@fontshape{mycmm}{m}{it}{cmmi10}%
    \mkdef@fontshape{mycmm}{b}{it}{cmmib10}%
    \mkdef@fontshape{mycmsy}{m}{n}{cmsy10}%
    \mkdef@fontshape{mycmsy}{b}{n}{cmbsy10}%
    \mkdef@fontshape{mylasy}{m}{n}{lasy10}%
    \mkdef@fontshape{mylasy}{b}{n}{lasyb10}%
%
%   Define CM font shapes for math mode.
%
    \define@mathgroup\mv@mynormal{0}{mycmr}{m}{n}%
    \define@mathgroup\mv@mynormal{1}{mycmm}{m}{it}%
    \define@mathgroup\mv@mynormal{2}{mycmsy}{m}{n}%
    \define@mathgroup\mv@mybold{0}{mycmr}{bx}{n}%
    \define@mathgroup\mv@mybold{1}{mycmm}{b}{it}%
    \define@mathgroup\mv@mybold{2}{mycmsy}{b}{n}%
%
%   Redefine Monotype Times font shapes in standard LaTeX sizes plus 10.5pt
%   (substituted for 10pt size).
%
    \mk@fontshape{cmr}{m}{n}{mtr10}%
    \mk@fontshape{cmr}{m}{sl}{mtsl10}%
    \mk@fontshape{cmr}{m}{it}{mtti10}%
    \mk@fontshape{cmr}{m}{sc}{mtcsc10}%
    \mk@fontshape{cmr}{m}{u}{mtu10}%
    \mk@fontshape{cmr}{b}{n}{cmb10}%
    \mk@fontshape{cmr}{bx}{n}{mtbx10}%
    \mk@fontshape{cmr}{bx}{sl}{mtbxsl10}%
    \mk@fontshape{cmr}{bx}{it}{mtbxti10}%
    \mk@fontshape{cmss}{m}{n}{mtss10}%
    \mk@fontshape{cmss}{m}{sl}{mtssi10}%
    \mk@fontshape{cmss}{sbc}{n}{cmssdc10}%
    \mk@fontshape{cmss}{bx}{n}{mtssbx10}%
    \mk@fontshape{cmtt}{m}{n}{mttt10}%
    \mk@fontshape{cmtt}{m}{it}{cmitt10}%
    \mk@fontshape{cmtt}{m}{sl}{mtsltt10}%
    \mk@fontshape{cmtt}{m}{sc}{cmtcsc10}%
    \mk@fontshape{cmm}{m}{it}{mtmi10}%
    \mk@fontshape{cmm}{b}{it}{mtmib10}%
    \mk@fontshape{cmsy}{m}{n}{mtsy10}%
    \mk@fontshape{cmsy}{b}{n}{mtbsy10}%
    \mk@fontshape{lasy}{m}{n}{mtlasy10}%
    \mk@fontshape{lasy}{b}{n}{mtlasb10}%
  \fi
\fi
% End NFSS release 1 code


%%%%%%%%%% Old font selection scheme

\ifoldfss
%
% define 11pt to be always computer modern for section heads
%
% eleven point
  \font\elvrm  = cmr10    \@halfmag % roman  
  \font\elvmi  = cmmi10   \@halfmag % math italic
    \skewchar\elvmi ='177          %  for placement of accents
% \font\elvmib = cmmib10   \@halfmag % bold math italic
  \font\elvsy  = cmsy10   \@halfmag % math symbols
    \skewchar\elvsy ='60           %   for placement of math accents
% \font\elvsyb = cmbsy10  \@halfmag % bold symbols
  \font\elvit  = cmti10   \@halfmag % text italic
  \font\elvsl  = cmsl10   \@halfmag % slanted
  \font\elvbf  = cmbx10   \@halfmag % exelvded bold 
% \font\elvbfs = cmbxsl10 \@halfmag % exelvded bold slanted
  \font\elvtt  = cmtt10   \@halfmag % typewriter
    \hyphenchar\elvtt = -1         %  suppress hyphenation in \tt font
% \font\elvtti = cmitt10  \@halfmag % italic typewriter
% \font\elvtts = cmsltt10 \@halfmag % slanted typewriter
  \font\elvsf  = cmss10   \@halfmag % sans serif
% \font\elvsfi = cmssi10  \@halfmag % italic sans serif
% \font\elvsfb = cmssbx10 \@halfmag % bold sans serif
% \font\elvsc  = cmcsc10  \@halfmag % small caps
  \font\elvly  = lasy10  \@halfmag % LaTeX symbols
% \font\elvlyb = lasyb10 \@halfmag % bold LaTeX symbols
% \font\elvuit = cmu10    \@halfmag % unslanted italic
%
  \ifx\CUP@mtlplain@loaded\undefined
  \else
% tenptfive point
    \font\tenptfiverm  = mtr10 at 10.5pt     % roman
    \font\tenptfivemi  = mtmi10 at 10.5pt    % math italic
      \skewchar\tenptfivemi ='177           % for placement of accents
%   \font\tenptfivemib = mtmib10 at 10.5pt   % bold math italic
    \font\tenptfivesy  = mtsy10 at 10.5pt    % math symbols
      \skewchar\tenptfivesy ='60            % for placement of math accents
%   \font\tenptfivesyb = mtbsy10 at 10.5pt   % bold symbols
    \font\tenptfiveex  = mtex10 at 10.5pt    % math extension
    \font\tenptfiveit  = mtti10 at 10.5pt    % text italic
    \font\tenptfivesl  = mtsl10 at 10.5pt    % slanted
    \font\tenptfivebf  = mtbx10 at 10.5pt    % extended bold
%   \font\tenptfivebfs = mtbxsl10 at 10.5pt  % extended bold slanted
    \font\tenptfivett  = mttt10 at 10.5pt    % typewriter
      \hyphenchar\tenptfivett = -1     % suppress hyphenation in \tt font
%   \font\tenptfivetti = cmitt10 at 10.5pt   % italic typewriter ** 
%   \font\tenptfivetts = mtsltt10 at 10.5pt  % slanted typewriter
    \font\tenptfivesf  = mtss10 at 10.5pt    % sans serif
%   \font\tenptfivesfi = mtssi10 at 10.5pt   % italic sans serif
%   \font\tenptfivesfb = mtssbx10 at 10.5pt  % bold sans serif
%   \font\tenptfivesc  = mtcsc10 at 10.5pt   % small caps
    \font\tenptfively  = mtlasy10 at 10.5pt  % LaTeX symbols
%   \font\tenptfivelyb = mtlasb10 at 10.5pt  % bold LaTeX symbols
%   \font\tenptfiveuit = mtu10 at 10.5pt     % unslanted italic
%
% seven point extras
    \font\sevsl  = mtsl10   at 7pt  %\@ptscale7 % slanted
    \font\sevbf  = mtbx10   at 7pt              % extended bold
    \font\sevtt  = mttt10   at 7pt  %\@ptscale7 % typewriter
    \font\sevsf  = mtss10   at 7pt  %\@ptscale7 % sans serif
%
% five point extras
    \font\fivit  = mtti10   at 5pt  %scaled 714 % text italic
    \font\fivsl  = mtsl10   at 5pt  %\@ptscale5 % slanted
    \font\fivbf  = mtbx10   at 5pt  %scaled 714 % extended bold
    \font\fivtt  = mttt10   at 5pt  %\@ptscale5 % typewriter
    \font\fivsf  = mtss10   at 5pt  %\@ptscale5 % sans serif
%
% redefine xpt to output x.vpt
    \def\xpt{%
      \textfont\z@\tenptfiverm \scriptfont\z@\sevrm
        \scriptscriptfont\z@\fivrm
      \textfont\@ne\tenptfivemi \scriptfont\@ne\sevmi
        \scriptscriptfont\@ne\fivmi
      \textfont\tw@\tenptfivesy \scriptfont\tw@\sevsy
        \scriptscriptfont\tw@\fivsy
      \textfont\thr@@\tenptfiveex \scriptfont\thr@@\tenptfiveex
        \scriptscriptfont\thr@@\tenptfiveex
      \def\unboldmath{\everymath{}\everydisplay{}\@nomath\unboldmath
                      \textfont\@ne\tenptfivemi \textfont\tw@\tenptfivesy
                      \textfont\lyfam\tenptfively\@boldfalse}\@boldfalse
      \def\boldmath{\@ifundefined{tenptfivemib}{%
                      \global\font\tenptfivemib\@mbi
                      \global\font\tenptfivesyb\@mbsy
                      \global\font\tenptfivelyb\@lasyb\relax
                      \@addfontinfo\@xpt
        {\def\boldmath{\everymath{\mit}\everydisplay{\mit}%
           \@prtct\@nomathbold
           \textfont\@ne\tenptfivemib \textfont\tw@\tenptfivesyb
           \textfont\lyfam\tenptfivelyb \@prtct\@boldtrue}}}{}%
           \@xpt\boldmath}%
      \def\prm{\fam\z@\tenptfiverm}%
      \def\pit{\fam\itfam\tenptfiveit}\textfont\itfam\tenptfiveit
        \scriptfont\itfam\sevit \scriptscriptfont\itfam\fivit
      \def\psl{\fam\slfam\tenptfivesl}\textfont\slfam\tenptfivesl 
         \scriptfont\slfam\sevsl \scriptscriptfont\slfam\fivsl
      \def\pbf{\fam\bffam\tenptfivebf}\textfont\bffam\tenptfivebf 
        \scriptfont\bffam\sevbf \scriptscriptfont\bffam\fivbf 
      \def\ptt{\fam\ttfam\tenptfivett}\textfont\ttfam\tenptfivett
        \scriptfont\ttfam\sevtt \scriptscriptfont\ttfam\fivtt
      \def\psf{\fam\sffam\tenptfivesf}\textfont\sffam\tenptfivesf
        \scriptfont\sffam\sevsf \scriptscriptfont\sffam\fivsf
      \def\psc{\@getfont\psc\scfam\@xpt{mtcsc10 at 10.5pt}}%
      \def\ly{\fam\lyfam\tenptfively}\textfont\lyfam\tenptfively 
         \scriptfont\lyfam\sevly \scriptscriptfont\lyfam\fivly 
      \@setstrut \rm}
    \def\@xpt{}
  \fi
\fi
% End old font selection scheme code


\def\qit{\qsmit \baselineskip 10.75pt}
\def\qbf{\qsbf \baselineskip 10.75pt}
\def\qsf{\qssf \baselineskip 10.75pt}
\def\qrm{\qsmall \baselineskip 10.75pt}
\normalsize

%  ****************************************
%  *            PAGE LAYOUT               *
%  ****************************************
%
% SIDE MARGINS:
\oddsidemargin  2pc
\evensidemargin 2pc
\marginparwidth 2.0cm
\marginparsep 10pt

% VERTICAL SPACING:
\topmargin 2.5pc
\headheight 12pt
\headsep 6pt % ajw (from 8pt)
\topskip 12pt
\footheight \z@
\footskip \z@
\newskip\halflineskip
\halflineskip=6pt plus .5pt minus .5pt
\newskip\affilskip % used by authors to separate affiliations on title page
\affilskip=3pt

% DIMENSION OF TEXT:
\textheight = 49\baselineskip \advance\textheight by \topskip
\textwidth 32pc
\columnsep 10pt
\columnseprule 0pt

% FOOTNOTES:
\footnotesep 0.pt
\skip\footins 9pt plus 3pt

% FLOATS:
% \def\topfigrule{\vskip\floatsep\hbox{\rule{\textwidth}{.5pt}}\vskip-%
% \floatsep}
\floatsep 10pt plus 2pt minus 1pt
\textfloatsep=12pt plus 6pt
\intextsep\floatsep
\@maxsep 15pt
\dblfloatsep\floatsep
\dbltextfloatsep\floatsep
\@dblmaxsep 15pt
\@fptop 0pt plus 0fil
\@fpsep 10pt plus 0fil
\@fpbot 0pt plus 3fil
\@dblfptop 0pt plus 0fil
\@dblfpsep 10pt plus 0fil
\@dblfpbot 0pt plus 3fil
\marginparpush 5pt


%  ****************************************
%  *           PARAGRAPHING               *
%  ****************************************
%
\parskip \z@ plus .3pt
\parindent 1em
\partopsep 0pt plus 1pt
\@lowpenalty   51
\@medpenalty  151
\@highpenalty 301
\@beginparpenalty -\@lowpenalty
\@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty
\clubpenalty=0
\widowpenalty=10000


%  ****************************************
%  *                 PARTS                *
%  ****************************************
%
\def\part{\par \addvspace{4ex}\@afterindentfalse
 \secdef\@part\@spart}
\def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne
  \refstepcounter{part}
  \addcontentsline{toc}{part}{Part \thepart: #1}
 \else \addcontentsline{toc}{part}{#1}
 \fi
 {\parindent 0pt \centering %changed ggw
  \ifnum \c@secnumdepth >\m@ne
   \reset@font\large\rm PART
   \ifcase\thepart \or ONE \or TWO \or THREE \or FOUR \or FIVE
    \or SIX \or SEVEN \or EIGHT \or NINE \or TEN \else \fi
   \par \nobreak
  \fi
  \reset@font\LARGE\rm #2 \markboth{}{}\par }
 \nobreak \vskip 3ex \@afterheading}
\def\@spart#1{{\parindent 0pt \centering % changed ggw
  \reset@font\LARGE\rm #1\par}
 \nobreak \vskip 3ex \@afterheading}


%  ****************************************
%  *               SECTIONS               *
%  ****************************************
%

\def\@raggedright{\rightskip=\@flushglue \let\\=\@centercr \parindent=0pt}
\def\@raggedcenter{\centering\rightskip=\@flushglue \let\\=\@centercr}

%
\def\section{\setcounter{equation}{0}
 \@startsection {section}{1}{\z@}
 {20pt plus 6pt minus 2pt}%    beforeskip; neg = suppress indent
 {3pt plus 0pt minus 0pt}%     afterskip
 {\reset@font\fontswitch\large\bf\@raggedright}}%     style
\def\subsection{\@startsection{subsection}{2}{\z@}
 {-9pt plus -3pt minus -3pt}
 {3pt plus 0pt minus 0pt}
 {\reset@font\normalsize\it\@raggedcenter}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}
 {9pt plus 3pt minus 3pt}
 {3pt plus 0pt minus 0pt}
 {\raggedright\reset@font\normalsize\it}}
\def\paragraph{}
\def\subparagraph{}
%
\def\emptys@t{}
\def\@sect#1#2#3#4#5#6[#7]#8{%
 \ifnum #2>\c@secnumdepth
  \def\@svsec{}%
 \else
  \refstepcounter{#1}
  \ifnum #2>1% upright rm for numbers in subsections -- jas
   \edef\@svsec{{\noexpand\reset@font\noexpand\rm\csname 
                 the#1\endcsname.}\hskip 0.5em} % ajw 
  \else
                 \def\apphe@d{#8}
   \edef\@svsec{\ifappendix Appendix \fi\csname the#1\endcsname\relax
                 \ifx \apphe@d\emptys@t 
                 \else 
                   .\hskip 0.5em
                 \fi
   }
  \fi
 \fi
 \@tempskipa #5\relax
 \ifdim \@tempskipa>\z@
  \begingroup #6\relax
   \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
  \endgroup
  \csname #1mark\endcsname{#7}%
  \ifnum #2=1% sections only
   \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth \else
    \ifappendix Appendix~\csname the#1\endcsname%
    \else \protect\numberline{\csname the#1\endcsname.}#7\fi
    \fi}
%     \protect\numberline{\csname the#1\endcsname.}\ifappendix\else #7\fi\fi}
  \else
   \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth \else
      \protect\numberline{\csname the#1\endcsname.}#7\fi}
  \fi
 \else %
  \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname {#7}
    \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth \else
     \protect\numberline{\csname the#1\endcsname.}
    \fi#7}}%
 \fi
 \@xsect{#5}}
\newif\ifappendix \appendixfalse
\def\appendix{\par
 \setcounter{section}{0}
 \def\theequation{\Alph{section}\,\arabic{equation}} % (MAW)
%\def\thesection{Appendix \Alph{section}}
 \def\thesection{\Alph{section}}
 \def\thesubsection{\thesection.\arabic{subsection}}
 \def\thesubsubsection{\thesubsection.\arabic{subsubsection}}
 \appendixtrue}

\setcounter{secnumdepth}{3} % number sections, subsections and subsubsections
                            % but not paragraphs or subparagraphs.


%  ****************************************
%  *       PART & SECTION NUMBERS       *
%  ****************************************
%
\newcounter{part}
\newcounter {section}
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {paragraph}[subsubsection]
%\newcounter {subparagraph}[paragraph]
\def\thepart          {\arabic{part}}
\def\thesection       {\arabic{section}}
\def\thesubsection    {\thesection.\arabic{subsection}}
\def\thesubsubsection {\thesubsection.\arabic{subsubsection}}
\def\theparagraph     {\thesubsubsection.\arabic{paragraph}}
%\def\thesubparagraph  {\theparagraph.\arabic{subparagraph}}


%  ****************************************
%  *               SKIPS                  *
%  ****************************************
%
\newskip\@indentskip
\newskip\smallindent
\newskip\@footindent
\newskip\@leftskip
\@indentskip=2.5em
\smallindent=1em
\@footindent=\smallindent
\@leftskip=\z@


%  ****************************************
%  *                LISTS                 *
%  ****************************************
%
\leftmargini\z@
\labelsep\z@
\labelwidth\z@
%
% label macros for Range-Left and Range-Right labels
%\def\makeRLlabel#1{\rlap{#1}\hss}
%\def\makeRRlabel#1{\hss\llap{#1}}
\def\makeitemlabel#1{\hspace\labelwidth\hspace\labelsep\hfill #1}
%
% set leftmargin to labelwidth + labelsep of OUTER list:
\def\@listI{\parsep\z@ \topsep\z@ \partopsep\z@ \itemsep\z@ \rightmargin\z@
 \leftmargin\labelwidth \advance\leftmargin\labelsep}
\def\@listi{\@listI \leftmargin\leftmargini \itemindent 1em}
\def\@listii{\@listI \advance\leftmargin 1em}
\def\@listiii{\@listI}
\def\@listiv{\@listI}
\def\@listv{\@listI}
\def\@listvi{\@listI}
\@listi
%
% ITEMIZE
\def\itemize{\ifnum \@itemdepth >3 \@toodeep
 \else \advance\@itemdepth \@ne
  \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
  \list{\csname\@itemitem\endcsname}%
  {\labelsep .5em \settowidth{\labelwidth}{\csname\@itemitem\endcsname}
    \let\makelabel\makeitemlabel}%
 \fi}
\def\labelitemi{$\bullet$} % ggw
\def\labelitemii{$\circ$}
\def\labelitemiii{---} % ggw
\def\labelitemiv{--} % ggw
%
% ENUMERATE
\def\enumerate{\ifnum \@enumdepth >3 \@toodeep
 \else \advance\@enumdepth \@ne
 \edef\@enumctr{enum\romannumeral\the\@enumdepth}\fi
%\@ifnextchar [{\@enumeratetwo}{\@enumeratetwo[(a)]}}
 \@ifnextchar [{\@enumeratetwo}{\@enumeratetwo[i]}}
\def\@enumeratetwo[#1]{%
 \list{\csname label\@enumctr\endcsname}%
  {\settowidth\labelwidth{#1} \labelsep .5em
   \advance\itemindent\labelsep \advance\itemindent\labelwidth
   \usecounter{\@enumctr}}}
%
\def\labelenumi{{\reset@font\rm(}\theenumi{\reset@font\rm)}}
\def\theenumi{{\reset@font\it\alph{enumi}}}
\def\labelenumii{{\reset@font\rm(}{\theenumii}{\reset@font\rm)}}
\def\theenumii{{\reset@font\it\alph{enumii}}}
\def\p@enumii{\theenumi.\theenumii}
\def\labelenumiii{\theenumiii.}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\p@enumii.\theenumiii}
\def\labelenumiv{\theenumiv}
\def\theenumiv{\roman{enumiv}}
\def\p@enumiv{\p@enumiii.\theenumiv}
%
% DESCRIPTION
\def\descriptionlabel#1{\hspace\labelsep \reset@font\bf #1}
\def\description{\list{}{\labelwidth\z@%\itemindent-\leftmargin
  \ifnum\@listdepth=1\else\advance\leftmargin 1em\fi
  \let\makelabel\descriptionlabel}}
\let\enddescription\endlist


%  ****************************************
%  *            DISPLAYED TEXT            *
%  ****************************************
%
% VERSE
\def\verse{\let\\=\@centercr
 \list{}{\itemsep\z@
  \itemindent -\@indentskip
  \listparindent \itemindent
  \rightmargin\leftmargin
  \advance\leftmargin \@indentskip}\item[]}
\let\endverse\endlist
%
% QUOTATION
\def\quotation{\list{}{\listparindent\smallindent
  \itemindent\listparindent
  \leftmargin\z@\rightmargin\leftmargin
  \topsep\halflineskip
  \parsep 0pt plus 1pt}\item[]\qsmall\baselineskip 10.75pt}
\let\endquotation=\endlist
% QUOTE
\def\quote{\par\list{}{\leftmargin\z@\rightmargin\leftmargin}\item[]%
 \qsmall\baselineskip 10.75pt\rule{0pt}{10pt}\ignorespaces}
\let\endquote=\endlist


%  ****************************************
%  *         OTHER ENVIRONMENTS           *
%  ****************************************
%
% THEOREM
% The following modifies two internal routines called by Latex's
% \newtheorem command, which JFM.sty users are encouraged to use
% for their own purposes, such as creating Lemma 1.2,
% Definition 2.3, etc.
%
%\def\theoremlabel#1{\hspace\labelsep \reset@font\sc #1}
%\def\@begintheorem#1#2{\list{}{\topsep\halflineskip \labelsep .5em
% \let\makelabel\theoremlabel}\item[#1\ #2.]\reset@font\it }
%\def\@opargbegintheorem#1#2#3{\list{}{\topsep\halflineskip \labelsep .5em
% \let\makelabel\theoremlabel}\item[#1\ #2\ (#3).]\reset@font\it }
%\def\@endtheorem{\endlist}
%
\def\@begintheorem#1#2{\par\vskip\halflineskip{\reset@font\sc #1\ #2.}\hskip.5em\reset@font\it}
\def\@opargbegintheorem#1#2#3{\par\vskip\halflineskip
 {\reset@font\sc #1\ #2\ (#3).}\hskip.5em\reset@font\it}
\def\@endtheorem{\vskip\halflineskip\par}
%
% A line added to make the guide for authors true (MAW):
\newtheorem{theorem}{Theorem}[section]
%
% PROOF
\newsavebox{\proofbox}
\sbox{\proofbox}{\unitlength 1pt\begin{picture}(7,7)%
  \put(0,0){\framebox(7,7){}}\end{picture}}
%\def\proof{\list{}{\topsep\halflineskip \labelwidth\z@ \labelsep .5em
% \let\makelabel\makeitemlabel} \item[{\reset@font\it Proof.}]}
%\def\endproof{\hspace*{\fill}\usebox{\proofbox}\endlist}
\def\proof{\par\vskip\halflineskip {\reset@font\it Proof.}\hskip.5em\relax}
\def\endproof{\hspace*{\fill}\usebox{\proofbox}\vskip\halflineskip\par}
\@namedef{proof*}{\proof}
\@namedef{endproof*}{\vskip\halflineskip\par}
%
% REMARK works like \newtheorem but without the ability to number,and
% produces displayed paragraph in same style as proof.
\def\newremark#1#2{\newenvironment{#1}{\list{}{\topsep\halflineskip \labelwidth\z@
 \labelsep .5em \let\makelabel\makeitemlabel} \item[{\reset@font\it #2.}]}{\endlist}}
%
% EQUATION and EQNARRAY
%
\def\theequation{\thesection.\arabic{equation}}

% subeqn.sty follows
% Copyright (c) 1990 by Stephen Gildea
% Permission to copy all or part of this work is granted, provided
% that the copies are not made or distributed for resale, and that
% the copyright notice and this notice are retained.

\newtoks\@stequation

\ifoldfss% 
  \def\f@ce{\it}% if OFSS, you can have italic character
  \else
    \ifnfssone%
      \def\f@ce{}% if NFSS1, you can't (yet...)
    \else
      \ifnfsstwo%
        \def\f@ce{}% if NFSS2, you can't (yet...)
      \fi
    \fi
\fi

\def\subequations{\refstepcounter{equation}%
  \edef\@savedequation{\the\c@equation}%
  \@stequation=\expandafter{\theequation}%   %only want \theequation
  \edef\@savedtheequation{\the\@stequation}% % expanded once
  \edef\oldtheequation{\theequation}%
  \setcounter{equation}{0}%
  \def\theequation{\oldtheequation{\f@ce\alph{equation}}}}

\def\endsubequations{\setcounter{equation}{\@savedequation}%
  \@stequation=\expandafter{\@savedtheequation}%
  \edef\theequation{\the\@stequation}\global\@ignoretrue}

% subeqnarray.sty
% Copyright (C) 1988 by Johannes Braams, Dr Neher Laboratories

\newcounter{subequation}[equation]
\def\thesubequation{\theequation{\f@ce\@alph\c@subequation}}
%  \@subeqnnum: Produces the equation number for the
%     subeqnarray environment.  The following definition is for
%     flushright numbers; for flushleft numbers, see leqno.doc.
%     The {\reset@font\rm ... } puts the subequation number in 
%     italic type even if an subeqnarray environment appears in 
%     an roman environment.
%
\def\@subeqnnum{{\reset@font\rm (\thesubequation)}} 
%
%    A new label command to refer to subequations. It works
%    like the \label command and was taken from LaTeX.TeX
%
%  \slabel{FOO} then writes the following on file \@auxout :
%        \newlabel{FOO}{{eval(\@currentlabel)}{eval(\thepage)}}
%
\def\slabel#1{\@bsphack\if@filesw {\let\thepage\relax
   \xdef\@gtempa{\write\@auxout{\string
      \newlabel{#1}{{\thesubequation}{\thepage}}}}}\@gtempa
   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
%
%    Here's the subeqnarray environment,
%        it steps the equation counter,
%        sets the subequation counter equal to 1
%        and behaves much like the eqnarray environment.
%
% changed to remove space either side of alignment
\def\subeqnarray{\stepcounter{equation}
\let\@currentlabel=\theequation\global\c@subequation\@ne
\global\@eqnswtrue
\global\@eqcnt\z@\tabskip\@centering\let\\=\@subeqncr
$$\halign to \displaywidth\bgroup\@eqnsel\hskip\@centering
  $\displaystyle\tabskip\z@{##}$&\global\@eqcnt\@ne
%  \hskip 2\arraycolsep \hfil${##}$\hfil
   \hfil${\;##\;}$\hfil
%  &\global\@eqcnt\tw@ \hskip 2\arraycolsep $\displaystyle\tabskip\z@{##}$\hfil
  &\global\@eqcnt\tw@ $\displaystyle\tabskip\z@{##}$\hfil % ajw
  \tabskip\@centering&\llap{##}\tabskip\z@\cr}

\def\endsubeqnarray{\@@subeqncr\egroup
                     $$\global\@ignoretrue}

\def\@subeqncr{{\ifnum0=`}\fi\@ifstar{\global\@eqpen\@M
    \@ysubeqncr}{\global\@eqpen\interdisplaylinepenalty \@ysubeqncr}}

\def\@ysubeqncr{\@ifnextchar [{\@xsubeqncr}{\@xsubeqncr[\z@]}}

\def\@xsubeqncr[#1]{\ifnum0=`{\fi}\@@subeqncr
   \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}}

\def\@@subeqncr{\let\@tempa\relax
    \ifcase\@eqcnt \def\@tempa{& & &}\or \def\@tempa{& &}
      \else \def\@tempa{&}\fi
     \@tempa \if@eqnsw\@subeqnnum\refstepcounter{subequation}\fi
     \global\@eqnswtrue\global\@eqcnt\z@\cr}

% Here's the subeqnarray* environment:

\let\@ssubeqncr=\@subeqncr
\@namedef{subeqnarray*}{\def\@subeqncr{\nonumber\@ssubeqncr}\subeqnarray}
\@namedef{endsubeqnarray*}{\global\advance\c@equation\m@ne%
                           \nonumber\endsubeqnarray}

% \jot = 3pt      % Extra space added between lines of an eqnarray  
%                   environment
% The macro \@eqnnum defines how equation numbers are to appear in equations.
% \def\@eqnnum{(\theequation)}  % (the default in LaTeX)
%
% The following substitution causes \eqnarray to give same spacing
% around =,>,<, etc. as in one-line equation.
\def\eqnarray{\stepcounter{equation}\let\@currentlabel=\theequation
\global\@eqnswtrue
\global\@eqcnt\z@\tabskip\@centering\let\\=\@eqncr
$$\halign to \displaywidth\bgroup\@eqnsel\hskip\@centering
  $\displaystyle\tabskip\z@{##}$&\global\@eqcnt\@ne
% \hskip 2\arraycolsep \hfil${##}$\hfil
  \hfil${\;##\;}$\hfil
% &\global\@eqcnt\tw@ \hskip 2\arraycolsep $\displaystyle\tabskip\z@{##}$\hfil 
  &\global\@eqcnt\tw@ $\displaystyle\tabskip\z@{##}$\hfil 
   \tabskip\@centering&\llap{##}\tabskip\z@\cr}
%
% TITLEPAGE
\def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  \else \newpage \fi \thispagestyle{empty}\c@page\z@}
\def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi}
\arraycolsep 5pt
\tabcolsep 3pt % this is half the space between cols. in a tabular env. ggw
\arrayrulewidth .5pt
\doublerulesep 1.5pt
\tabbingsep \labelsep
%\skip\@mpfootins = \skip\footins
\skip\@mpfootins = 5pt plus .4pt minus .4pt
\fboxsep = 3pt
\fboxrule = .5pt


%  ****************************************
%  *         TITLE AND ABSTRACT           *
%  ****************************************
%
\def\affiliation#1{\gdef\@affiliation{#1}}
\gdef\@affiliation{}

\def\maketitle{\appendixfalse\@ifnextchar [{\m@ketitleone}{\m@ketitletwo}}%
\def\m@ketitletwo{\m@ketitleone[n]}
\def\m@ketitleone[#1]{
 \par
 \begingroup
% no changes to footnoting necessary in JFM; keep at bottom of page -- jas
% \def\thefootnote{\fnsymbol{footnote}}
% \def\@makefnmark{\hbox to 0pt{${\@thefnmark}$\hss}}% fnmark now on line -- ggw
\bgroup
  \def\@makefntext##1{\begin{center} \hskip .5em
  \@thefnmark \ ##1\end{center}}
  % footnotes on the title page are centered.
  \newpage \global\@topnum\z@
  \@maketitle{#1}\thispagestyle{titlepage} \@thanks
\egroup
 \endgroup
 \setcounter{footnote}{0}
 \let\maketitle\relax \let\@maketitle\relax \gdef\@affiliation{}
 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}

\def\and{{\reset@font\indexsize\bf A\smallls N\smallls
          D\smallls\ns}}%\normalsize

\def\@maketitle#1{
 \newpage
 \vspace*{10pt}
 {\centering \sloppy
  {\reset@font\LARGE\bf \@title \par}
  \vskip 14pt plus 2pt minus 1pt
  {\reset@font\normalsize\bf\baselineskip=12pt By\ns \uppercase{\@author} \par}
  \vskip 4pt plus 1pt
  {\reset@font\small \@affiliation \par}
  \vskip 8pt plus 2pt minus 1pt
  {\reset@font\small (Received \@date)}
 \par}
 \vskip 8pt plus 2pt minus 1pt
}

\def\abstract{\par\reset@font\normalsize\noindent\ignorespaces}
\def\endabstract{\par\vskip 9pt plus 1pt minus 1pt
 \vbox{\centerline{\rule[4pt]{30pc}{.4pt}}}}


%  ****************************************
%  *            PAGE STYLES               *
%  ****************************************
%
\mark{{}{}}
\gdef\@author{\mbox{}} % SFB 0.96
\def\author{\@ifnextchar [{\@authortwo}{\@authorone}}
% make \and a simple 'and' for \@shortauthor
\def\@authortwo[#1]#2{\gdef\@author{#2}\gdef\@shortauthor{#1}}
\def\@authorone#1{\gdef\@author{#1}
 \begingroup\def\and{and}\gdef\@shortauthor{#1}\endgroup}
\def\shortauthor#1{\gdef\@shortauthor{#1}}
\gdef\@shortauthor{}
\gdef\@title{\mbox{}} % SFB 0.96
\def\title{\@ifnextchar [{\@titletwo}{\@titleone}}
\def\@titletwo[#1]#2{\gdef\@title{#2}\gdef\@shorttitle{#1}}
\def\@titleone#1{\gdef\@title{#1}\gdef\@shorttitle{#1}}
\def\shorttitle#1{\gdef\@shorttitle{#1}}
\gdef\@shorttitle{}
% SFB 0.96
\def\volume#1{\gdef\@volume{#1}}
\gdef\@volume{11}
\def\pagerange#1{\gdef\@pagerange{#1}}
\gdef\@pagerange{1--000}

\edef\@pubyear{\number\year}
\def\pubyear#1{\def\@pubyear{#1}}

\def\journal#1{\gdef\@journal{#1}}
\gdef\@journal{%
      \vbox to 6pt{\noindent%
      \parbox[t]{3in}{\reset@font\indexsize{\it J.\ Fluid\ Mech.}
      (\@pubyear), {\it vol.} \@volume, {\it pp.} \@pagerange\\[2.5pt] %ajw
      {Copyright \copyright\ \@pubyear\ Cambridge University Press}%
    }}} %RM
%
% \ps@empty and \ps@plain defined in LATEX.TEX
%
\def\ps@headings{\let\@mkboth\markboth
 \def\@oddhead{\phantom{\rm \thepage}\hfil{\it \@shorttitle} \hfil \rm \thepage}% altered ggw
 \def\@oddfoot{}
 \def\@evenhead{\rm \thepage \hfil \it \@shortauthor \hfil\phantom{\rm \thepage}}% altered ggw
 \def\@evenfoot{}
 \def\sectionmark##1{\markboth{##1}{}}
 \def\subsectionmark##1{\markright{##1}}}
\def\ps@myheadings{\let\@mkboth\@gobbletwo
 \def\@oddhead{\phantom{\rm\thepage}\hfill\it\rightmark\hfill\rm\thepage}
 \def\@oddfoot{}
 \def\@evenhead{\rm\thepage\hfill\it\leftmark\hfill\phantom{\rm\thepage}}
 \def\@evenfoot{}
 \def\sectionmark##1{}
 \def\subsectionmark##1{}}
\def\ps@titlepage{\let\@mkboth\@gobbletwo\vfuzz=5pt%
 \def\@oddhead{\@journal \hfil\llap{\thepage}}
 \def\@oddfoot{}
 \def\@evenhead{\@journal \hfil\llap{\thepage}}
 \def\@evenfoot{}
 \def\sectionmark##1{}
 \def\subsectionmark##1{}}


%  ****************************************
%  *         TABLE OF CONTENTS, ETC.      *
%  ****************************************
%
\def\@pnumwidth{1.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{2}
%\@undottedtocline{LEVEL}{INDENT}{NUMWIDTH}{TITLE}{PAGE}
\def\@undottedtocline#1#2#3#4#5{%
  \ifnum #1>\c@tocdepth
  \else
    \vskip \z@ plus .2pt
    {\hangindent #2\relax
      \rightskip \@tocrmarg \parfillskip -\rightskip
      \parindent #2\relax \@afterindenttrue
      \interlinepenalty\@M \leavevmode
      \@tempdima #3\relax {\reset@font\rm #4}\nobreak \hfill \nobreak
      \hbox to\@pnumwidth{\hfil\reset@font\rm #5}\par
    }
  \fi
} 
\def\tableofcontents{%
  \@restonecolfalse
  \if@twocolumn\@restonecoltrue\onecolumn\fi
  \vskip 4pt plus .5pt
  \centerline{\reset@font\sc CONTENTS}
  \vskip 3pt
  \@starttoc{toc}
  \if@restonecol\twocolumn\fi \par\vspace{12pt}%
}
%
\def\l@section#1#2{%
  \addpenalty{\@secpenalty}
  \@tempdima 1.5em
  \begingroup
  \parindent \z@ \rightskip \@pnumwidth
  \parfillskip -\@pnumwidth \reset@font\rm \leavevmode
  \advance\leftskip\@tempdima \hskip -\leftskip 
  {\reset@font\bf #1}\nobreak\hfil
  \nobreak\hbox to\@pnumwidth{\hss #2}\par 
  \endgroup
}
\def\l@subsection{\@undottedtocline{2}{2.5em}{2.3em}}
\def\l@subsubsection{\@undottedtocline{3}{3.8em}{3.2em}}
%
% The following are irrelevant for JFM -- jas
% \def\l@paragraph{\@undottedtocline{4}{7.0em}{4.1em}}
% \def\l@subparagraph{\@undottedtocline{5}{10em}{5em}}
% \def\listoffigures{\@restonecolfalse
%  \if@twocolumn\@restonecoltrue\onecolumn\fi
%  \section*{List of Figures}% altered -- ggw
%  \@starttoc{lof} \if@restonecol\twocolumn\fi}
% \def\l@figure{\@undottedtocline{1}{1.5em}{2.3em}}
% \def\listoftables{\@restonecolfalse
%  \if@twocolumn\@restonecoltrue\onecolumn\fi
%  \section*{List of Tables}% altered -- ggw
%  \@starttoc{lot} \if@restonecol\twocolumn\fi}
% \let\l@table\l@figure


%  ****************************************
%  *              THE INDEX               *
%  ****************************************
%
\newif\if@restonecol
\def\theindex{\section*{Index} % changed to U&LC -- ggw
 \addcontentsline{toc}{section}{Index}
 \reset@font\footnotesize \parindent\z@ \parskip\z@ plus .1pt\relax
 \let\item\@idxitem}
\def\@idxitem{\par\hangindent 1em}
\def\subitem {\par\hangindent 1em \hspace*{1em}}
\def\subsubitem{\par\hangindent 1em\hspace*{1em}}
\def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
\def\indexspace{\par\vskip\baselineskip \relax}


%  ****************************************
%  *             FOOTNOTES                *
%  ****************************************
%
%\def\footnoterule{}
\def\footnoterule{\setcounter{footnote}{0}}% To force numbering to start
%              at 1 on each page.  Works because numbers are
%              assigned at occurrence of the \footnote{} command; this
%              resets counter after they are printed.  This might not work
%              if next footnote falls close enough to page break to have
%              already been 'digested'. --JAS
%\def\@makefntext#1{\hskip1em\@thefnmark\hskip.5em#1}
\def\@makempfntext#1{\hskip1em\@thefnmark\hskip.5em #1}
\def\@makefntext#1{\setbox\@tempboxa\hbox{\hskip1em\@thefnmark\hskip.5em #1}
 \ifdim\wd\@tempboxa>\hsize \unhbox\@tempboxa\else
 \centerline{\unhbox\@tempboxa}\fi}
\long\def\@mpfootnotetext#1{\global\setbox\@mpfootins
    \vbox{\unvbox\@mpfootins \reset@font\footnotesize
    \hsize\columnwidth \@parboxrestore
%  \edef\@currentlabel{\csname p@mpfootnote\endcsname\@thefnmark}\@makefntext
   \edef\@currentlabel{\csname p@mpfootnote\endcsname\@thefnmark}\@makempfntext
     {\rule{\z@}{\footnotesep}\ignorespaces #1\strut}}}
\def\@fnsymbol#1{\ifcase#1\or \dag\or \ddag\or \P\or \|\or
 \dag\dag\or \ddag\ddag\or \P\P\or \|\| \else\@ctrerr\fi\relax}
%   \@makefnmark : A macro to generate the footnote marker from \@thefnmark
%         The default is \hbox{$^\@thefnmark$}, i.e., raised.
\def\@makefnmark{\hbox{\@thefnmark}}% used in text
\def\thempfootnote{\hbox{$^{\fnsymbol{mpfootnote}}$}}


%  ****************************************
%  *         FIGURES AND TABLES           *
%  ****************************************
%
\setcounter{topnumber}{3}
\def\topfraction{.9}
\setcounter{bottomnumber}{0}
\def\bottomfraction{.9}
\setcounter{totalnumber}{3}
\def\textfraction{.1}
\def\floatpagefraction{.9}
\setcounter{dbltopnumber}{3}
\def\dbltopfraction{.9}
\def\dblfloatpagefraction{.5}
%
\long\def\@makecaption#1#2{\vskip 5pt plus .4pt minus .4pt\begingroup\small
  \setbox\@tempboxa\hbox{{\reset@font\sc #1.} #2}
  \ifdim \wd\@tempboxa >2\hsize \unhbox\@tempboxa\par \else
  {\centering \unhbox\@tempboxa\par} \fi \endgroup}
%
\newcounter{table}
\def\thetable{\@arabic\c@table}
\def\fps@table{tp}
\def\ftype@table{1}
\def\ext@table{lot}
\def\fnum@table{Table~\thetable}
%\def\table{\@float{table}\rule{\textwidth}{.5pt}  
%\vskip\floatsep} 

\newif\iffollowon
\def\table{\fstyle@table\@float{table}
  \iffollowon
  \else
    \vspace*{9.5pt}% replace the space swallowed by TeX
  \fi
  \global\followonfalse
  \rule{\textwidth}{.5pt}\vskip\floatsep\relax
}

\def\followon{\global\followontrue}

\def\plaintable{\@float{table}}
%\let\endtable\end@float

\newif\ifrmrule
\def\endtable{% ajw
  \ifrmrule
    \global\rmrulefalse
  \else 
    \rule{\textwidth}{.5pt}%
  \fi
  \end@float
} 

\def\norule{\global\rmruletrue}

\@namedef{table*}{\@dblfloat{table}}
\@namedef{endtable*}{\end@dblfloat}
\def\fstyle@table{\reset@font\small\rm}
\def\fjust@table{\centering}%changed ggw
\def\fcapjust@table{\centering} %changed ggw
\def\fcapsize@table{\reset@font\small\sc}
\def\fcapstyle@table{\reset@font\small\rm}
%
\newcounter{figure}
\def\thefigure{\@arabic\c@figure}
\def\fps@figure{tp}
\def\ftype@figure{2}
\def\ext@figure{lof}
\def\fnum@figure{Figure~\thefigure}
\def\figure{\@float{figure}}
\let\endfigure\end@float
\@namedef{figure*}{\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}
\def\fstyle@figure{\reset@font\small\rm}
\def\fjust@figure{\centering}
\def\fcapjust@figure{\centering}% changed ggw
\def\fcapsize@figure{\reset@font\small\sc}
\def\fcapstyle@figure{\reset@font\small\rm}
\newif\ifwide@float
\wide@floatfalse
%
%\@caption{TYPE}[STEXT]{TEXT}
\def\@dblfloat{\wide@floattrue\@float}
\def\end@dblfloat{\if@twocolumn\egroup
 \ifnum\@floatpenalty <\z@ \@cons\@dbldeferlist\@currbox\fi
 \ifnum \@floatpenalty =-\@Mii \@esphack\fi\else\end@float\fi
 \wide@floatfalse}

%this is to preserve the old tabular environment in case it is needed
\let \oldtabular \tabular
\let \endoldtabular \endtabular

\def\tabular{\def\@halignto{to \textwidth}\tabskip=\tabcolsep plus 1fil\@tabular}
% This fixes tabular things so that they are full out l and r; the \tabskip setting
% is to put tabskip before the first column.
%    The following is to adjust the intercolumn spacing to put in
% enough stretch. ggw
\def\@tabarray{\@ifnextchar[{\@tarray}{\@ttarray}}
\def\@tarray[#1]#2{\t@barray[#1]{@{\tabskip=2\tabcolsep plus 3pt}
                                #2}}
\def\@ttarray#1{\t@barray[c]{@{\tabskip=2\tabcolsep plus 3pt}
                                #1 }}
\def\t@barray[#1]#2{\setbox\@arstrutbox=\hbox{\vrule
     height\arraystretch \ht\strutbox
     depth\arraystretch \dp\strutbox
     width\z@}\@mkpream{#2}\edef\@preamble{\halign \noexpand\@halignto
\bgroup \tabskip\z@ \@arstrut \@preamble \tabskip=\tabcolsep plus 1fil \cr}%
\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
  \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
  \bgroup \let\par\relax
  \let\@sharp##\let\protect\relax \lineskip\z@\baselineskip\z@\@preamble}


%  ****************************************
%  *           CUP specials               *
%  ****************************************
%
\def\smallls{\kern.12em} % for letterspacing the word AND
\def\ls{\kern.15em} % for letterspacing; .15em is a hair less than thinspace
\def\ns{\kern.5em} % for name-spacing
\renewcommand{\thefootnote}{\mbox{$\fnsymbol{footnote}$}}
\def\hline{\noalign{\ifnum0=`}\fi \vskip 6pt
 \hrule \@height \arrayrulewidth \vskip 6pt
 \futurelet \@tempa\@xhline}
\def\@xhline{\ifx\@tempa\hline \vskip -12pt
 \vskip \doublerulesep \fi \ifnum0=`{\fi}}
\newenvironment{acknowledgments}{\par\vskip 10pt plus 1pt minus 1pt}{\par}


%  ****************************************
%  *            MISCELLANEOUS             *
%  ****************************************
%
\def\today{\number\day\ \ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December
 \fi \ \number\year}


%  ****************************************
%  *           BIBLIOGRAPHY               *
%  ****************************************
% the immediately following code is taken from MSCS.sty, somewhat modified.
% \def\@biblabel#1{#1}
\def\@biblabel#1{} % remove label from bibliography listing
\def\thebibliography#1{%
\def\bibls{\kern.065em}% for letterspacing; normally .15em
\par\vskip 20pt plus 1pt minus 1pt
 \centerline{\reset@font\small\sc R\bibls E\bibls F\bibls E\bibls R\bibls E\bibls N\bibls C\bibls E\bibls S}
 \nobreak
 \vskip 4pt plus .5pt minus .5pt
 \nobreak
%\addcontentsline{toc}{section}{References} % removed for JFM -- jas
 \list{}{\labelwidth\z@ \leftmargin 2em \itemindent -2em \itemsep 1pt}
 \reset@font\small \parindent\z@
 \parskip\z@ plus .1pt\relax
 \def\newblock{\hskip .11em plus .33em minus .07em}
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax}
\let\endthebibliography=\endlist

% remove square brackets around citations

\def\@cite#1#2{{#1\if@tempswa , #2\fi}}

%  ****************************************
%  *           INITIALIZATION             *
%  ****************************************
%
\ifx\CUP@mtlplain@loaded\undefined \else \input jfmsym \fi
%
\ps@headings
\pagenumbering{arabic}
\onecolumn \let\onecolumn=\relax
%\def\twocolumn{\typeout{Two column mode not available with JFM style.}}
% We want twocolumn available for reviews, as in the type spec. ggw
\flushbottom
%\frenchspacing 
