%%%%%%%%%% cospar.sty %%%%%%%%%%

\def\fileversion{v0.9}
\def\filedate{15 June 2000}

\typeout{Document-style option `cospar' \fileversion \space\space
         <\filedate>}

% SIDE MARGINS:                   
% PDFLaTeX \oddsidemargin  -15mm              % Left margin on odd-numbered pages.
\oddsidemargin  -10mm              % Left margin on odd-numbered pages.
%%\evensidemargin  -10mm              % Left margin on even-numbered pages.

% VERTICAL SPACING:        
\topmargin      -15mm              % Nominal distance from top of page to top 
                                  % of box containing running head.
%\headheight     1mm              % No running headline, and no
\headsep        24pt              % space between running headline and text.
\footskip       30pt              % Baseline-baseline distance between
                                  % running footline and last line of text.

% DIMENSION OF TEXT:
\textheight 250mm                 % Height of text part of page
\textwidth 180mm                  % Width of text part of page, i.e of line
%PDFLaTeX \textwidth 190mm                 % Width of text part of page, i.e of line

% PARAGRAPHING
\parskip 0pt                      % No extra vertical space between paragraphs.
\parindent 1em                    % Width of paragraph indentation.

% SECTIONAL UNITS:
\newdimen\@bls                    % \@b(ase)l(ine)s(kip)
\@bls=\baselineskip               % \@bls ~= \baselineskip for \normalsize
\advance\@bls -1ex                % (fudge term)
\newdimen\@eps                    %
\@eps=0.0001pt                    % \eps = very small positive quantity

%%\def\section{\parindent 1em
\def\section{\@startsection{section}{9}{\z@}
  {1\@bls plus 0.1\@bls}{\@eps}{\normalsize\bf}}
\def\subsection{\@startsection{subsection}{9}{\z@}
  {1\@bls plus 0.1\@bls}{\@eps}{\normalsize\bf}}
\def\subsubsection{\@startsection{subsubsection}{9}{\z@}
  {1\@bls plus 0.1\@bls}{\@eps}{\noindent\underline}}

%%  {1\@bls plus 0.1\@bls}{\@eps}{\noindent\underline}}

\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
  \def\@svsec{}\else 
  \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname.\hskip0.5em}\fi
  \@tempskipa #5\relax
  \ifdim \@tempskipa>\z@
    \begingroup 
      #6\relax
      \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}%
    \endgroup
    \csname #1mark\endcsname{#7}\addcontentsline
      {toc}{#1}{\ifnum #2>\c@secnumdepth \else
        \protect\numberline{\csname the#1\endcsname}\fi #7}%
  \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}}

% FIGURES AND TABLES
\long\def\@makefigurecaption#1#2{\vskip 10mm \sf #1. #2\par}

\long\def\@maketablecaption#1#2{\vskip 10mm \sf #1. #2\par}
%%\long\def\@maketablecaption#1#2{\hbox to \hsize{\parbox[t]{\hsize}
%%  {#1 \\ #2}}\vskip 0.3ex}

\def\fnum@figure{Fig. \thefigure}
\def\figure{\let\@makecaption\@makefigurecaption \@float{figure}}
\@namedef{figure*}{\let\@makecaption\@makefigurecaption \@dblfloat{figure}}

% \def\fnum@table{Table \thetable}
\def\table{\let\@makecaption\@maketablecaption \@float{table}}
\@namedef{table*}{\let\@makecaption\@maketablecaption \@dblfloat{table}}

% PDFLaTeX 10mm
\floatsep 8mm plus 4pt minus 4pt % Space between adjacent floats moved
                                  % to top or bottom of text page.
\textfloatsep=\floatsep           % Space between main text and floats
                                  % at top or bottom of page.
\intextsep=\floatsep              % Space between in-text figures and 
                                  % text.

% FOOTNOTE
\long\def\@makefntext#1{\parindent 1em\noindent\hbox{${}^{\@thefnmark}$}#1}

% EQUATION
\mathindent=0em

% TITLE
\def\maketitle{\begingroup        % Initialize generation of front-matter
%   \let\thanks\@gobble
    \thispagestyle{empty}
    \def\thefootnote{\fnsymbol{footnote}}%
    \newpage \global\@topnum\z@ 
    \@maketitle \@thanks
  \endgroup
  \let\maketitle\relax \let\@maketitle\relax
  \gdef\@thanks{}\let\thanks\relax
  \gdef\@address{}\gdef\@author{}\gdef\@title{}\let\address\relax}

\def\@maketitle{\null             % Actual formatting of \maketitle
% PDFLaTeX  \vskip 10mm                     % Vertical space above title.
\vskip 4mm                     % Vertical space above title.
  \centering                    % Front-matter text is ragged right
  \hyphenpenalty\@M               % and is not hyphenated.
  {\LARGE \bf \@title \par}           % Title set in larger font. 
  \vskip 10mm                     % One line of vertical space after title.
  {\normalsize                    % each author set in the normal 
   \@author \par}                 % typeface size 
  \vskip\@bls                     % One line of vertical space after author.
  {\it \@address}                       % all addresses
  \par}                           % One line of vertical space at the end.

\newcounter{address} 
%%\def\theaddress{\alph{address}}
\def\theaddress{\arabic{address}}
\def\@makeadmark#1{\hbox{$^{\rm #1}$}}   

\def\address#1{\addressmark\begingroup
  \xdef\@tempa{\theaddress}\let\\=\relax
  \def\protect{\noexpand\protect\noexpand}\xdef\@address{\@address
  \protect\addresstext{\@tempa}{#1}}\endgroup}
\def\@address{}

\def\addressmark{\stepcounter{address}%
  \xdef\@tempb{\theaddress}\@makeadmark{\@tempb}}

\def\addresstext#1#2{\leavevmode \begingroup
  \centering \hyphenpenalty\@M \@makeadmark{#1}#2\par \endgroup
%%  \vskip\@bls}
    }

% ABSTRACT:
%%\def\abstract{\vskip 0ex plus 2ex % extra glue after \maketitle
\def\abstract{%
\vskip 8mm % extra glue
\begin{center}  
{\bf ABSTRACT}
\end{center}  
\parindent  0em
% PDFLaTeX \vskip 4mm
}
         
\def\endabstract{
\vskip 12mm
\relax}

% BIBLIOGRAPHY

\def\thebibliography#1{\section*{REFERENCES}
   \def\item{\par\hangindent1em\parindent0em}
}

% PAGE STYLES
\def\ps@crcplain{\let\@mkboth\@gobbletwo
     \def\@oddhead{\reset@font{\sl\rightmark}\hfil \rm\thepage}%
     \def\@evenhead{\reset@font\rm \thepage\hfil\sl\leftmark}%
     \let\@oddfoot\@empty
     \let\@evenfoot\@oddfoot}

% INITIALIZATION
\ps@crcplain                      % modified 'plain' page style

