%%%%%%%%%% cnsrep2.sty %%%%%%%%%%
%%%%%% based on espcrc2.sty %%%%%%%%%%
% C(amera) R(eady) C(opy) document-style option. (two-column format).
% Version 2.7: 19 January 1999
% To be used with LaTeX version 2.09 (14 January 1992 or later), or LaTeX2e.
%
% $Id: espcrc2.sty 2.8 2000/07/24 09:12:51 spepping Exp spepping $
%
% Copyright (C) 1992 by Elsevier Science Publishers. All rights reserved.
%
% IMPORTANT NOTICE:
%
% You are not allowed to change this file. You may however copy this file 
% to a file with a different name and then change the copy. 
% 
% You are NOT ALLOWED to distribute this file alone. You are NOT ALLOWED 
% to take money for the distribution or use of this file (or a changed 
% version) except for a nominal charge for copying etc. 
% 
% You are allowed to distribute this file under the condition that it is 
% distributed together with espcrc2.tex.
% 
% If you receive only this file from someone, complain! 
%
%
%
% Usage: \documentclass{article}
% \usepackage{fleqn,cnsrep2c}
%
\def\fileversion{v2.7}
\def\filedate{19 January 1999}

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

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

% VERTICAL SPACING:        
\topmargin -10mm     % Nominal distance from top of page to top 
                                  % of box containing running head.
% DIMENSION OF TEXT:
\textheight 240mm    % Height of text part of page
\textwidth 170mm     % Width of text part of page, i.e of line

%%- \setlength{\columnsep}{5mm}      % Horizontal space between columns
\columnseprule 0pt                % No vertical rule between columns

% 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{\@startsection{section}{1}{\z@}
  {0.75\@bls plus 0.2\@bls}{0.35\@bls}{\normalsize\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}
  {0.25\@bls plus 0.1\@bls}{\@eps}{\normalsize\bf}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}
  {0.25\@bls plus 0.1\@bls}{\@eps}{\normalsize\bf}}
\def\paragraph{\@startsection{paragraph}{4}{\parindent}
  {0.25\@bls plus 0.1\@bls}{0.5em}{\normalsize\bf}}
\def\subparagraph{\@startsection{subparagraph}{4}{\parindent}
  {0.25\@bls plus 0.1\@bls}{0.5em}{\normalsize\bf}}

\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
% from here modified by T. Uesaka 15/Apr/2003 
%\long\def\@makefigurecaption#1#2{\vskip 3mm  #1. #2\par}
%\long\def\@makefigurecaption#1#2{%
%  \vskip\abovecaptionskip
%  \sbox\@tempboxa{#1: #2}%
%  \ifdim \wd\@tempboxa >\hsize
%     #1: #2\par
%  \else
%    \global \@minipagefalse
%    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
%  \fi
%  \vskip\belowcaptionskip}
\long\def\@makecaption#1#2{\normalsize
\vskip 10pt
\par\hangindent=0.5cm\hangafter=1\noindent 
 \setbox\@tempboxa\hbox{\small #1. #2}
 \ifdim \wd\@tempboxa >\hsize \unhbox\@tempboxa\par \else \hbox
to\hsize{\hfil\box\@tempboxa\hfil}
 \fi}
% to here modified by T. Uesaka 15/Apr/2003 

\floatsep 3mm plus 1pt minus 1pt % 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

% BIBLIOGRAPHY
\def\thebibliography#1{\section*{References}\list{[\arabic{enumi}]}
  {\settowidth\labelwidth{#1.}\leftmargin=1.67em
   \labelsep\leftmargin \advance\labelsep-\labelwidth
   \itemsep\z@ \parsep\z@
   \usecounter{enumi}}\def\makelabel##1{\rlap{##1}\hss}%
   \def\newblock{\hskip 0.11em plus 0.33em minus -0.07em}
   \sloppy \clubpenalty=4000 \widowpenalty=4000 \sfcode`\.=1000\relax}

% Collapse citation numbers to ranges.  
\newcount\@tempcntc
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@ifundefined
       {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea
        \def\@citea{,\penalty\@m\ }{\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
    {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}%
     \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne
       \@citea\def\@citea{,\penalty\@m}
       \hbox{\csname b@\@citeb\endcsname}%
     \else
      \advance\@tempcntb\@ne
      \ifnum\@tempcntb=\@tempcntc
      \else\advance\@tempcntb\m@ne\@citeo
      \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}}

\def\@citeo{\ifnum\@tempcnta>\@tempcntb\else\@citea
  \def\@citea{,\penalty\@m}%
  \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else
   {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else
\def\@citea{--}\fi
    \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi}

% 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
% \twocolumn                    % Formatting is in 2 columns, with
\sloppy                         % paragraphs that can be loosely set,
\emergencystretch=1pc           % (with 1 pc extra for emergencies),
\flushbottom                    % and pages of equal length
\ps@crcplain                    % modified 'plain' page style

\DeclareRobustCommand\lambdabar{%
  \bgroup
    \def\@tempa{%
      \hbox{%
        \raise.73\ht\z@
        \hb@xt@\z@{%
          \kern.25\wd\z@
          \vrule \@width.5\wd\z@\@height.1\p@\@depth.1\p@
          \hss
        }%
        \box\z@
      }%
    }%
    \mathchoice
      {\setbox\z@\hbox{$\displaystyle     \lambda$}\@tempa}%
      {\setbox\z@\hbox{$\textstyle        \lambda$}\@tempa}%
      {\setbox\z@\hbox{$\scriptstyle      \lambda$}\@tempa}%
      {\setbox\z@\hbox{$\scriptscriptstyle\lambda$}\@tempa}%
  \egroup
}%


