%##############################################################################
%
%            *** DO NOT MODIFY THIS FILE IN ANY WAY WHATSOEVER ***
%
% This was epac.sty in text format, as of 23 October 1991.
%
%      MODIFIED BY J. POOLE       FOR EPAC'96
%      MODIFIED BY S. KOSCIELNIAK FOR PAC'97
%      MODIFIED BY M. COMYN       FOR PAC'97 POST-CONFERENCE PROCESSING
%
% This is the official style file of the U.S. Particle Accelerator Conference.
%
% Usage is:
%               \documentclass[option]{pac97}
%
% option = letterpaper for US Letter   paper size
% option = a4paper     for European A4 paper size
%
% Instructions for authors are provided in the files pac97_usguide.tex and
% pac97_a4guide.tex which can be used as models for papers to be submitted.
%
%
%            *** DO NOT MODIFY THIS FILE IN ANY WAY WHATSOEVER ***
%
%##############################################################################

\def\fileversion{1.4}
\def\filedate{1997/10/10}
\def\docdate {1997/10/10}

% Use Michel Goossens' dense lists

\let\Otemize =\itemize
\let\Onumerate =\enumerate
\let\Oescription =\description

% Zero the vertical spacing parameters

\def\Nospacing{\itemsep=0pt\topsep=0pt\partopsep=0pt\parskip=0pt\parsep=0pt}

% Redefine the `list' environments in terms of the original values

\newenvironment{Itemize}{\Otemize\Nospacing}{\endlist}
\newenvironment{Enumerate}{\Onumerate\Nospacing}{\endlist}
\newenvironment{Description}{\Oescription\Nospacing}{\endlist}

\renewcommand{\topfraction}{.95}
\renewcommand{\bottomfraction}{.95}
\renewcommand{\textfraction}{0.1}
 

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{pac97}[\filedate\space Version \fileversion]

%##############################################################################
% \topmargin changed from -1.0mm to -4.0mm              # M. Comyn 23/07/1997 #
%##############################################################################

\DeclareOption{letterpaper}
   { \AtEndOfClass{\setlength{\topmargin}{-4.0mm}\setlength{\voffset}{-25.4mm}}
    \typeout{>> US Letter paper size option}}

%##############################################################################
% \topmargin changed from  15.0mm to  13.6mm            # M. Comyn 23/07/1997 #
% \voffset   changed from -27.4mm to -25.4mm            # M. Comyn 23/07/1997 #
%##############################################################################

\DeclareOption{a4paper}
   { \AtEndOfClass{\setlength{\topmargin}{13.6mm}\setlength{\voffset}{-25.4mm}}
    \typeout{>> European A4 paper size option}}

\DeclareOption*
   {\typeout{>> Passed option unknown by pac97.cls to Article Class}}

\ProcessOptions

\PassOptionsToClass{\CurrentOption}{article}

% make a class file by customization of a given general class 

\LoadClass[10pt]{article}

% Note, the article class does not set \topmargin
% but the size10.cls option will set \topmargin.
% BUT the \AtEndOfClass{..} will then over-ride \topmargin.

\RequirePackage{times}
 
\typeout{---------------------------------------------------}
\typeout{For PAC'97 ELECTRONIC PUBLICATION for LaTeX2e users}
\typeout{---------------------------------------------------}
 
%
% DIMENSION OF TEXT:
 
\setlength{\textheight}{241.3mm}
\setlength{\textwidth}{170.2mm}
\setlength{\oddsidemargin}{20mm}
\setlength{\evensidemargin}{20mm}
\setlength{\columnsep}{5.08mm}
\setlength{\columnseprule}{0pt}        % zero width rule between columns.

% there is NO \bottommargin command and so vertical positioning
% of text is accomplished by setting \topmargin.

%##############################################################################
% \hoffset changed from -24.4mm to -25.4mm              # M. Comyn 23/07/1997 #
%##############################################################################

\setlength{\hoffset}{-25.4mm}     

% `subtract out' the driver-margins, to place
% the reference point at top-left corner of page


% 72.27 pt (point) =1.0 ins.
% 1 pc (pica) =12 pt
%default \headheight=12pt = 0.166in = 0.42cm
%default \headsep=25pt = 0.346in = 0.8786cm
%default \footskip=30pt = 0.4151in = 1.054cm
%default footheight=\headheight
 
 
\def\@oddhead{}  % empty header
\def\@evenhead{}
\def\@oddfoot{}  % empty footer
\def\@evenfoot{}
 
%-----------------------------------------------------------------------
% We acknowledge the borrowing of the clever part of
% Steven Gildea's definition of \section
% from geophysi.sty.
%
% \section is tricky because we want to both support \section* and have
% the section title uppercased.
 
 
%##############################################################################
% \boldmath added to section definition                 # M. Comyn 10/10/1997 #
%##############################################################################

\def\section{\secdef\@sectionb\@sections}
\def\@sectionb[#1]#2{\@sections{#2}}
\def\@sections#1{\@startsection {section}{1}{\z@}
                {-2.8ex plus -0.8ex minus  -.1ex}{1.5ex plus .2ex}
                {\bf\boldmath\centering}{\uppercase{#1}}}
% Should there be any problem with this, we can revert to the following
% but then the onus is on the user to type the argument of \section in
% uppercase in the input file.
%
%\def\section{\@startsection {section}{1}{\z@}{-2.8ex plus -0.8ex minus
%    -.1ex}{1.5ex plus .2ex}{\bf\centering}}
%
%\def\section{\@startsection {name}{level}{indent}{before-skip}{after-skip}
%  -ve before_skip => suppress indentation of following paragraph.
%  plus/minus=> vertical stretchability/shrinkability

\def\subsection{\@startsection{subsection}{2}{\z@}
                {-2.6ex plus -.8ex minus  -.17ex}{1.2ex plus .17ex}{\it}}

\def\subsubsection{\@startsection{subsubsection}{3}{\z@}
     {-2.5ex plus -.7ex minus -.17ex}{1.ex plus .15ex}{\normalsize }}

%##############################################################################
% font size changed for paragraph                       # M. Comyn 23/07/1997 #
% from \normalsize to \small                            #                     #
%##############################################################################

\def\paragraph{\@startsection
     {paragraph}{4}{\z@}{2.5ex plus .7ex minus .17ex}{-1em}{\small\sl}}

%##############################################################################
% font size and shape changed for subparagraph          # M. Comyn 23/07/1997 #
% from \normalsize\bf to \small                         #                     #
%##############################################################################

\def\subparagraph{\@startsection
     {subparagraph}{4}{\parindent}{2.25ex plus .7ex minus .17ex}{-1em}{\small}}
 
\setcounter{secnumdepth}{3}
 
% This definition of \maketitle taken from article.sty, and has been
% somewhat modified.
 
\def\maketitle{\par
 \begingroup
   \def\thefootnote{\fnsymbol{footnote}}
   \def\@makefnmark{\hbox
       to 5pt{$^{\@thefnmark}$\hss}}
   \twocolumn[\@maketitle]
   \@thanks
 \endgroup
 \setcounter{footnote}{0}
 \let\maketitle\relax
 \let\@maketitle\relax
 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}
 
\newlength{\titleblockheight}       % so user can change it if need be
\setlength{\titleblockheight}{3.0cm}
 
%##############################################################################
% \vfil above title replaced by \vskip 3pt              # M. Comyn 23/07/1997 #
%                                                                             #
% {tabular}[t]{c} changed to {tabular}[t]{@{}c@{}}      # M. Comyn 01/08/1997 #
%##############################################################################

\def\@maketitle{\vbox to \titleblockheight {\hsize\textwidth
  \linewidth\hsize \vskip 3pt \centering
  {\Large\bf \@title \par}
  \vskip 1em%  Vertical space after title.
  {\large\begin{tabular}[t]{@{}c@{}} \@author \end{tabular}\par}
  \vfil}}
 
% The \copyrightspace command is used to produce a blank space in the first
% column where a copyright notice may go.  It works by producing a
% blank footnote of the appropriate size.  Note that it should appear
% after any \footnote commands that produce footnotes for the first
% column.   Adjusted to leave just 1cm.
 
\def\copyrightspace{\footnotetext[0]{\mbox{}\vrule height 1cm width 0pt}}
 
\def\abstract{\subsection*{Abstract}}
\def\endabstract{\par}
 
% Redefine to use smaller fonts
\def\thebibliography#1{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}
  \section*{REFERENCES\@mkboth
  {REFERENCES}{REFERENCES}}\small\list
  {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumi}}
    \def\newblock{\hskip .11em plus .33em minus .07em}
    \sloppy\clubpenalty4000\widowpenalty4000
    \sfcode`\.=1000\relax}
 
\let\endthebibliography=\endlist
 
\twocolumn
\sloppy        % influences stretching of white space between words
\parindent 1em
\leftmargini 2em    % set margins for use in list environments
\leftmargin\leftmargini
\leftmarginv .5em
\leftmarginvi .5em
\flushbottom   % make all pages same height,
               % adding extra vertical space where necessary

%-----------------------------------------------------------------------
% Here are some useful commands which facilitate correct formatting:
%
% To give a numerical value with units, e.g. \QTY{ 4.2 }{ MV\,n^{-1} }
% (this takes care that the units in an equation are in a roman font
%  and not in math-italic which is used for symbols, IMPORTANT!!)

\newcommand{\QTY}[2]{\mbox{\(#1\rm\,#2\)}}

%-----------------------------------------------------------------------
% To express a number in scientific notation, e.g. \Enum{1.7}{32}

\newcommand{\Enum}[2]{\mbox{\(#1\times10^{#2}\)}}

%-----------------------------------------------------------------------
% Numerical formula e.g. \NQTY{E}{GeV} gives [E/GeV]

\newcommand{\NQTY}[2]{\mbox{$[#1/{\rm #2}]$}} % symbol with units in

%-----------------------------------------------------------------------
%  Expectation value or average, e.g. \EV{ x^2 } gives  <x^2>

\newcommand{\EV}[1]{\left\langle #1 \right\rangle}% expectation value

%-----------------------------------------------------------------------
% These are convenient for quoting luminosity:

\newcommand{\LUMI}[1]{\QTY{#1}{cm^{-2}s^{-1}}}
\newcommand{\LUM}[2]{\LUMI{#1\times10^{#2}}}

% Thus a B-factory design might quote:         \LUM{3.0}{33}

%-----------------------------------------------------------------------

\def\gappeq{\mathrel{ \rlap{\raise.5ex\hbox{$>$}}
                      {\lower.5ex\hbox{$\sim$}}  } }

%  \gappeq is a compound symbol made out of a > sign on top of a tilde
%  usually used to mean "greater than or approximately equal to"
%  or "vaguely greater than"  by physicists.
%  It behaves as a mathematical relation in TeX's math modes, e.g.
%  $ a \gappeq b $    in the text and
%  $$ a \gappeq b $$  as a display.

\def\lappeq{\mathrel{ \rlap{\raise.5ex\hbox{$<$}}
                      {\lower.5ex\hbox{$\sim$}}  } }
%-----------------------------------------------------------------------



