

% BALTZER document class.
% Requires LATEX 2e.
% Developed for BALTZER Science Publishers by VTeX Ltd.
%
% The baltzer.cls file works well with LaTeX2e <1996/06/01>
% and newer.
% Users working with LaTeX2e older that 1996/06/01
% may want to change in baltzer.cls the commands
% ***
%\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
%\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
%\protected@edef\@svsec{\@seccntformat{#1}\relax}%
%***
% to the follwing corresponding commands
%***
%\DeclareRobustCommand{\cal}{\@fontswitch\relax\mathcal}
%\DeclareRobustCommand{\mit}{\@fontswitch\relax\mathnormal}
% \protect\edef\@svsec{\@seccntformat{#1}\relax}%
%*** 
%and change the name of cls file after that.
\def\fmt@name{a}
\def\fmt@version{97/02/21} 
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{baltzer}[\fmt@version, BALTZER Style \fmt@name]
%
%\gdef\@copyrightline{J.C. Baltzer AG, Science Publishers}
%
\newcommand\partname{Part}
\newcommand\contentsname{Contents}
\newcommand\listfigurename{List of Figures}
\newcommand\listtablename{List of Tables}
\newcommand\refname{References}
\newcommand\indexname{Index}
\newcommand\figurename{Figure}
\newcommand\tablename{Table}
\newcommand\abstractname{}
\newcommand\keywordsname{Keywords}
\newcommand\classificationname{AMS Subject classification}
%
\DeclareOption{10pt}{\let\eleven@pt\relax}
\DeclareOption{11pt}{\def\eleven@pt{}}
%
% Numbering switches:
\newif\if@seceqn   \@seceqnfalse   \DeclareOption{seceqn}{\@seceqntrue} 
\newif\if@secfloat \@secfloatfalse \DeclareOption{secfloat}{\@secfloattrue}
\newif\if@secthm                   \DeclareOption{secthm}{\@secthmtrue} 
%
\newif\if@wned \@wnedfalse
\DeclareOption{onecolumn}{\global\@twocolumnfalse}
\DeclareOption{twocolumn}{\global\@twocolumntrue\global\@wnedtrue}
\DeclareOption{wned}{\global\@wnedtrue}
\DeclareOption{pagframe}{\@ifundefined{footheight}{\newdimen\footheight}{}\input pagframe.sty\relax}
%
\DeclareOption{WN}{\gdef\@journal{Wireless Networks}}
\DeclareOption{AOR}{\gdef\@journal{Annals of Operations Research}}
\DeclareOption{AMAI}{\gdef\@journal{Annals of Mathematics and Artificial Intelligence}}
\DeclareOption{ASE}{\gdef\@journal{Annals of Software Engineering}}
\DeclareOption{ACO}{\gdef\@journal{Advances in Computational Mathematics}}
\DeclareOption{CLU}{\gdef\@journal{Cluster Computing}}
\DeclareOption{ICN}{\gdef\@journal{Interoperable Communication Networks}}
\DeclareOption{NMA}{\gdef\@journal{Numerical Algorithms}}
\DeclareOption{HFI}{\gdef\@journal{Hyperfine Interactions}}
\DeclareOption{QSS}{\gdef\@journal{Queueing Systems}}
\DeclareOption{MNT}{\gdef\@journal{Mobile Networks and Applications}\gdef\@copyrightline{Baltzer Science Publishers BV}}
\DeclareOption{CGS}{\gdef\@journal{Computational Geosciences}\gdef\@copyrightline{Baltzer Science Publishers BV}}
\DeclareOption{QSS}{\gdef\@journal{Queueing Systems}}
\DeclareOption{TS}{\gdef\@journal{Telecommunication Systems}}
\DeclareOption{JMC}{\gdef\@journal{Journal of Mathematical Chemistry}}
\DeclareOption{WWW}{\gdef\@journal{World Wide Web}\gdef\@copyrightline{Baltzer Science Publishers BV}}
\DeclareOption{ANU}{\gdef\@journal{Annals of Numerical Mathematics}}
\DeclareOption{TOC}{\gdef\@journal{Topics in Catalysis}}
\DeclareOption{EMA}{\gdef\@journal{Environmental Modeling and Assessment}\gdef\@copyrightline{Baltzer Science Publishers BV}}
\DeclareOption{CTL}{\gdef\@journal{Catalysis Letters}}
\DeclareOption{CTS}{\gdef\@journal{Catalysis Surveys}\gdef\@copyrightline{Baltzer Science Publishers BV}}
\DeclareOption{TRL}{\gdef\@journal{Tribology Letters}}
%
\ExecuteOptions{11pt,onecolumn}
\ProcessOptions
%
%**********************************  FONTS
%
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\mathsc}
\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
\DeclareMathSizes{16}{16}{\@xiipt}{\@xpt}
%
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand\baselinestretch{1.2}
\newcommand\titlesize{\@setfontsize\titlesize{16}{20.5}}
%
\@ifundefined{eleven@pt}{
\typeout{Ten point}
\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xpt\@xiipt%
   \abovedisplayskip 6.5\p@ \@plus3pt%
   \abovedisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \belowdisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \belowdisplayskip\abovedisplayskip%
   \let\@listi\@listI}
\newcommand\small{%
   \@setfontsize\small\@ixpt{11}%
   \abovedisplayskip 6.5\p@ \@plus3pt%
   \abovedisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \belowdisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \def\@listi{\leftmargin\leftmargini
               \topsep 4\p@ \@plus2\p@ \@minus2\p@
               \parsep \z@ \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip%
}
\newcommand\footnotesize{\@setfontsize\footnotesize\@viiipt{10}%
   \abovedisplayskip 6.5\p@ \@plus3pt%
   \abovedisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \belowdisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \def\@listi{\leftmargin\leftmargini
               \topsep 4\p@ \@plus2\p@ \@minus2\p@
               \parsep \z@ \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip%
}
\newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
\newcommand\large{\@setfontsize\large\@xiipt{14}}
\newcommand\Large{\@setfontsize\Large\@xivpt{16}}
\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
}{%
\typeout{Eleven point}
\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xipt{13}%
   \abovedisplayskip 6.5\p@ \@plus3pt%
   \abovedisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \belowdisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \belowdisplayskip \abovedisplayskip%
   \let\@listi\@listI}
\newcommand\small{%
   \@setfontsize\small\@xpt\@xiipt%
   \abovedisplayskip 6.5\p@ \@plus3pt%
   \abovedisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \belowdisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \def\@listi{\leftmargin\leftmargini
               \topsep 4\p@ \@plus2\p@ \@minus2\p@
               \parsep \z@ \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip%
}
\newcommand\footnotesize{%
   \@setfontsize\footnotesize\@ixpt{11}%
   \abovedisplayskip 6.5\p@ \@plus3pt%
   \abovedisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \belowdisplayshortskip 6.5\p@ \@plus1pt \@minus1pt%
   \def\@listi{\leftmargin\leftmargini
               \topsep 4\p@ \@plus2\p@ \@minus2\p@
               \parsep \z@ \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip%
}
\newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
\newcommand\large{\@setfontsize\large\@xiipt{14}}
\newcommand\Large{\@setfontsize\Large\@xivpt{16}}
\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
%
\def\big#1{{\hbox{$\left#1\vbox to9.31\p@{}\right.\n@space$}}}
\def\Big#1{{\hbox{$\left#1\vbox to12.59\p@{}\right.\n@space$}}}
\def\bigg#1{{\hbox{$\left#1\vbox to15.88\p@{}\right.\n@space$}}}
\def\Bigg#1{{\hbox{$\left#1\vbox to19.16\p@{}\right.\n@space$}}}
}
\normalsize  % Choose the normalsize font.
\newdimen\@bls \@bls=\baselineskip
\def\joinrel{\mathrel{\mkern-3.5mu}}
%
%*************************** SECTIONS
\def\nohyphen{\pretolerance=10000 \tolerance=10000
\hyphenpenalty=10000 \exhyphenpenalty=10000}

\newskip\Bls@  \Bls@=22pt plus 2pt minus 2pt% approx. 2 baselineskip
\newskip\bls@  \bls@=11pt plus 1pt minus 3pt% approx. 1 baselineskip
\newskip\eps@  \eps@=0.0001pt               % small positive skip

\newcommand\section{\@startsection{section}{1}%
  {\z@}{\Bls@}{\bls@}{\normalsize\bfseries\nohyphen\raggedright}}
\newcommand\subsection{\@startsection{subsection}{2}%
  {\z@}{12pt plus 3pt}{\bls@}{\normalsize\itshape\nohyphen\raggedright}}
\newcommand\subsubsection{\@startsection{subsubsection}{3}%
  {\z@}{\baselineskip}{\eps@}{\normalsize\itshape\nohyphen\raggedright}}
\newcommand\paragraph{\@startsection{paragraph}{4}%
  {\z@}{\bls@}{-1em}{\normalfont\normalsize\itshape}}
\newcommand\subparagraph{\@startsection{subparagraph}{5}%
  {\parindent}{\eps@}{-1em}{\normalfont\normalsize\itshape}}
%
\setcounter{secnumdepth}{3}
%
\def\@seccntformat#1{\csname the#1\endcsname .\ }%
\newdimen\@hang
\if@twocolumn
        \@hang=1pc
\else
        \@hang=2pc
\fi
\def\@sect#1#2#3#4#5#6[#7]#8{%
  \ifnum #2>\c@secnumdepth
    \let\@svsec\@empty
  \else
    \refstepcounter{#1}%
    \protected@edef\@svsec{\@seccntformat{#1}\relax}%
  \fi
  \@tempskipa #5\relax
  \ifdim \@tempskipa>\z@
    \begingroup
      #6{%
       \setbox\z@\hbox{\@svsec}\hangindent\@hang\noindent\copy\z@%
        \ifdim\wd\z@<\@hang\@tempdima\@hang\advance\@tempdima -\wd\z@%
        \hskip\@tempdima\fi%
        \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\relax
      \@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}}
%
% Appendix
%
\newcommand\appendix{\par
   \section*{Appendix}
   \setcounter{section}{0}%
   \setcounter{subsection}{0}%
   \def\thesection{\Alph{section}}}
%
% ACKNOWLEDGEMENTS
%
\newcommand\acknowledgements{\section*{Acknowledgements}}%
%
% ****************  LISTS 
\newdimen\labelwidthi
\newdimen\labelwidthii
\newdimen\labelwidthiii
\newdimen\labelwidthiv
%
\newdimen\widthenumi
\newdimen\widthenumii
\newdimen\widthenumiii
\newdimen\widthenumiv
%
\newcommand\normal@labelsep{0.5em}
\labelsep\normal@labelsep
%
\settowidth{\labelwidthi}{(iii)}
\settowidth{\labelwidthii}{(d)}
\settowidth{\labelwidthiii}{(iii)}
\settowidth{\labelwidthiv}{(M)}
%
\settowidth{\widthenumi}{10.}
\settowidth{\widthenumii}{(d)}
\settowidth{\widthenumiii}{iii.}
\settowidth{\widthenumiv}{M.}
%
\leftmargini\labelwidthi    \advance\leftmargini\labelsep
\leftmarginii\labelwidthii  \advance\leftmarginii\labelsep
\leftmarginii\labelwidthiii \advance\leftmarginiii\labelsep
\leftmarginii\labelwidthiv  \advance\leftmarginiv\labelsep
%
\def\setleftmargin#1#2{\settowidth{\@tempdima}{#2}\labelsep\normal@labelsep
  \csname labelwidth#1\endcsname\@tempdima
  \@tempdimb\@tempdima \advance\@tempdimb\labelsep
  \csname leftmargin#1\endcsname\@tempdimb}
%
\newdimen\e@labelwidth
\newdimen\itemize@indent
%
\def\@listI{\leftmargin\leftmargini
  \labelwidth\labelwidthi \labelsep\normal@labelsep
  \e@labelwidth\widthenumi
  \itemize@indent .25pc
  \listparindent 1pc}
\def\@listii{\leftmargin\leftmarginii
  \labelwidth\labelwidthii \labelsep\normal@labelsep
  \e@labelwidth\widthenumii 
  \itemize@indent 0pt
  \listparindent 1pc}
\def\@listiii{\leftmargin\leftmarginiii
  \labelwidth\labelwidthiii \labelsep\normal@labelsep
  \topsep\z@ \partopsep\z@ \parsep\z@ \itemsep\z@
  \e@labelwidth\widthenumiii
  \listparindent 1pc}
\def\@listiv{\leftmargin\leftmarginiv
  \labelwidth\labelwidthiv \labelsep\normal@labelsep
  \topsep\z@ \partopsep\z@ \parsep\z@ \itemsep\z@
  \e@labelwidth\widthenumiv
  \listparindent 1pc}
\let\@listi\@listI
\@listi

\def\labelenumi{\theenumi.}
\def\theenumi{\arabic{enumi}}

\def\labelenumii{{\rmfamily\upshape (\theenumii)}} 
\def\theenumii{\alph{enumii}} 
\def\p@enumii{\theenumi}

\def\labelenumiii{\theenumiii.}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\theenumi(\theenumii)}

\def\labelenumiv{\theenumiv.}
\def\theenumiv{\Alph{enumiv}} 
\def\p@enumiv{\p@enumiii\theenumiii}

\def\setenumwidth#1#2{\setbox0=\hbox{#2}\csname widthenum#1\endcsname\wd0}
%
\newskip\@halfline
\@halfline=6pt plus 3 pt minus 2pt 
%
% ENUMERATE
\def\enumerate{\@ifnextchar[{\@enumerate}{\@enumerate[]}}
\def\@enumerate[#1]{\ifnum \@enumdepth >4 \@toodeep\else
 \advance\@enumdepth \@ne 
 \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
 \list {\csname label\@enumctr\endcsname}%
 {\usecounter{\@enumctr}\def\makelabel##1{{\hfill\rmfamily\upshape ##1}}
 \ifx.#1.\settowidth{\labelwidth}{\kern\e@labelwidth}\else
         \settowidth{\labelwidth}{#1}\fi
                \labelsep=.5em
                \itemindent=\labelwidth \advance\itemindent\labelsep
                \leftmargin=\the\itemindent\itemindent=\z@
                \partopsep\z@ \topsep\@halfline \parsep\z@ \itemsep\@halfline
 \listparindent\z@}\fi}
\let\endenumerate=\endlist
%
\newcommand\labelitemi{$\m@th\bullet$}
\newcommand\labelitemii{$\m@th\ast$} 
\newcommand\labelitemiii{$\m@th\ast$}               %\ast
\newcommand\labelitemiv{{\footnotesize +}}          %\footnotesize +
%
% ITEMIZE
\def\itemize{\ifnum \@itemdepth >3 \@toodeep\else
  \advance\@itemdepth \@ne
  \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}\list
    {\csname\@itemitem\endcsname}{\settowidth{\labelwidth}
                {\csname\@itemitem\endcsname}
                \def\makelabel##1{##1}
                \labelsep.5em
	\itemindent=\labelwidth \advance\itemindent\labelsep%
        \advance\itemindent\itemize@indent%
		\leftmargin\the\itemindent \itemindent=\z@
                \partopsep\z@ \topsep\@halfline \parsep\z@
		\itemsep3pt \listparindent\z@} \fi}
\let\enditemize=\endlist
%
% VERSE
\newenvironment{verse}
 {\let\\=\@centercr
  \list{}{\itemsep\z@
  \itemindent \z@
  \listparindent\z@
  \rightmargin 1em
  \leftmargin \rightmargin}\item[]}
 {\endlist}
% QUOTATION
\newenvironment{quotation}
  {\list{}{\itemindent\z@
  \leftmargin 1pc \rightmargin \z@
  \parsep 0pt plus 1pt}\item[]}
  {\endlist}
% QUOTE
\newenvironment{quote}
 {\list{}{\itemindent\z@
  \leftmargin 1pc \rightmargin\z@}\item[]}
 {\endlist}
%
% DESCRIPTION 
%
% To change the formatting of the label, you must redefine 
% \descriptionlabel. 
\def\descriptionlabel#1{\hspace\labelsep \bfseries #1}
\newenvironment{description}
 {\list{}{\labelwidth\z@ 
  \leftmargin 1pc \itemindent-\leftmargin
  \let\makelabel\descriptionlabel}}
 {\endlist}
%
\newenvironment{describe}[1]%has a size argument for labelwidth. 
% Not a user command
{\begin{list}{}%
  {\partopsep0pt\topsep0pt\itemindent0pt%
   \listparindent0pt\labelwidth#1%
   \leftmargin\labelwidth%
   \labelsep0pt%
   \parsep0pt%
   \relax%
   \renewcommand{\makelabel}[1]{##1}%
  }%
}%
{\end{list}}
%
\newdimen\steps@indent
\setlength\steps@indent{3pc}
\newenvironment{steps} 
{\begin{describe}{\steps@indent}\let\makelabel\algolabel\let\step\item}
{\end{describe}}
%
\def\algolabel#1% text of label
{\setbox\z@\hbox{{\bf Step #1}.\hfill}%
\ifdim\wd\z@<\labelwidth%
  \wd\z@\labelwidth%
  \fi%
  \box\z@%
}
%
\@ifundefined{square}{%
\newdimen\@A@
\def\@square#1{\hbox to #1{\vrule width.4pt\hss\hbox{\kern-.4pt\vbox to 
#1{\hrule height.4pt width#1\vss\hrule height.4pt}}\hss\vrule 
width.4pt}}
\def\square{\mathchoice{\@A@=.64pt\@square{\tf@size\@A@}}%
{\@A@=.64pt\@square{\tf@size\@A@}}{\@A@=.67pt\@square{\sf@size\@A@}}%
{\@A@=.8pt\@square{\ssf@size\@A@}}}
}{}
% PROOF ENVIRONMENT
\gdef\qed{\relax\ifmmode~\hfill\square\else\unskip\nobreak 
    ~\hfill$\square$\fi}
%
\newenvironment{pf}%
  {\par\addvspace{12pt plus1pt minus3pt}\noindent
   {\em\proofname}\kern 1em\ignorespaces}%
  {\qed\par\addvspace{12pt plus1pt minus3pt}}
\def\proofname{Proof.}
%
\@namedef{pf*}#1{\par\begingroup\def\proofname{#1.}\pf\endgroup\ignorespaces}
\@namedef{endpf*}{\par\addvspace{12pt plus1pt minus3pt}}
%
% ***************** COUNTERS
\newcounter{part}
\newcounter{section}
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]
%
\def\thepart{\Roman{part}}
\def\thesection{\arabic{section}}
\def\thesubsection{\thesection.\arabic{subsection}}
\def\thesubsubsection{\thesubsection.\arabic{subsubsection}}
%
\newcounter{table}
\newcounter{figure}
%
\if@seceqn
 \@addtoreset{equation}{section}
 \def\theequation{\arabic{section}.\arabic{equation}}
\else
 \def\theequation{\arabic{equation}}
\fi
%
\if@secfloat
 \@addtoreset{table}{section}
 \def\thetable{\arabic{section}.\arabic{table}}
 \@addtoreset{figure}{section}
 \def\thefigure{\arabic{section}.\arabic{figure}}
\else
 \def\thefigure{\arabic{figure}}
 \def\thetable{\arabic{table}}
\fi
%
% ****************************  BIBLIOGRAPHY
%
\newdimen\bibindent
\setlength\bibindent{0em}
\newenvironment{thebibliography}[1]
     {\section*{\refname}\footnotesize\rmfamily\upshape%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy\clubpenalty8000\widowpenalty7000%
      \sfcode`\.=1000\relax}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
\let\@openbib@code\@empty
%
\newcount\@tempcntc
% Numbered citation style
\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}{\bfseries ?}\@warning
   {Citation `\@citeb' on page \thepage \space undefined}\special{mt:badrefs}}%
  {\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}
%
% *********** MATH
%
\def\tfrac#1#2{{\textstyle\frac{#1}{#2}}}
\def\dfrac#1#2{{\displaystyle\frac{#1}{#2}}}
%
\newcommand\dvt{\colon\ }
\newcommand\dvtx{\nobreak\,\colon\relax}
%
\def\equation{\@ifnextchar[{\@equation}{\@equation[]}}
\def\@equation[#1]{$$\refstepcounter{equation}\ifx.#1.\else%
        \def\@eqnnum{{\normalfont \normalcolor (#1)}}\fi}
%
\newif\if@eqstarnum \@eqstarnumfalse
\@namedef{equation*}{\@ifnextchar[{\@equationstar}{\@equationstar[]}}
\def\@equationstar[#1]{$$\ifx.#1.\@eqstarnumfalse\else%
\@eqstarnumtrue\def\@eqnnum{{\normalfont \normalcolor (#1)}}\fi}
\@namedef{endequation*}{\if@eqstarnum\eqno\hbox{\@eqnnum}\fi$$\global\@ignoretrue}
%
% **************************** FOOTNOTE *
%
\def\footnoterule{\hfill}%
\newdimen\foot@leftskip 
\def\setfootskip#1{\setbox\@tempboxa\hbox{#1}%
\global\foot@leftskip=\wd\@tempboxa}
\setfootskip{$^{\mathrm{1}}\,$}
\long\def\@makefntext#1{\footnotesize
\leftskip\foot@leftskip\leavevmode\noindent\hbox{}\llap{$^{\mathrm{\@thefnmark}}\,$}%
\parindent1em #1}
%
\let\old@output\@outputpage
\def\@outputpage{\old@output\setfootskip{$^{1}\,$}
\let\@outputpage\old@output}
%
% NEWTHEOREM and PROCLAIM environments 
%
\typeout{NEWTHEOREM and PROCLAIM environments loaded^^J}
\@ifundefined{theorem@style}{\RequirePackage{theorem}}{}
%
% Changes for environments without counters support
%
\gdef\@xnthm#1#2[#3]{\expandafter\@ifdefinable\csname #1\endcsname
   {%
    \@definecounter{#1}\@addtoreset{#1}{#3}%
    \expandafter\xdef\csname the#1\endcsname
      {\expandafter \noexpand \csname the#3\endcsname
       \@thmcountersep \@thmcounter{#1}}%
    \def\@tempa{\global\@namedef{#1}}%
    \expandafter \@tempa \expandafter{%
      \csname th@\the \theorem@style
            \expandafter \endcsname \the \theorem@bodyfont
     \@thm{#1}{#2}}%
    \global \expandafter \let \csname end#1\endcsname \@endtheorem
    \def\@tempb{\global\@namedef{#1*}}%
    \expandafter \@tempb \expandafter{%
      \csname th@\the \theorem@style
            \expandafter \endcsname \the \theorem@bodyfont
     \@thmstar{#2}}%
    \global \expandafter \let \csname end#1*\endcsname \@endtheorem
   }}
\gdef\@ynthm#1#2{\expandafter\@ifdefinable\csname #1\endcsname
   {\@definecounter{#1}%
    \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
    \def\@tempa{\global\@namedef{#1}}\expandafter \@tempa
     \expandafter{\csname th@\the \theorem@style \expandafter
     \endcsname \the\theorem@bodyfont \@thm{#1}{#2}}%
    \global \expandafter \let \csname end#1\endcsname \@endtheorem
    \def\@tempb{\global\@namedef{#1*}}\expandafter \@tempb
     \expandafter{\csname th@\the \theorem@style \expandafter
     \endcsname \the\theorem@bodyfont \@thmstar{#2}}%
    \global \expandafter \let \csname end#1*\endcsname \@endtheorem}}
\gdef\@othm#1[#2]#3{\expandafter\@ifdefinable\csname #1\endcsname
  {\expandafter \xdef \csname the#1\endcsname
     {\expandafter \noexpand \csname the#2\endcsname}%
    \def\@tempa{\global\@namedef{#1}}\expandafter \@tempa
     \expandafter{\csname th@\the \theorem@style \expandafter
     \endcsname \the\theorem@bodyfont \@thm{#2}{#3}}%
    \global \expandafter \let \csname end#1\endcsname \@endtheorem
    \def\@tempb{\global\@namedef{#1*}}\expandafter \@tempb
     \expandafter{\csname th@\the \theorem@style \expandafter
     \endcsname \the\theorem@bodyfont \@thmstar{#3}}%
    \global \expandafter \let \csname end#1*\endcsname \@endtheorem}}
\gdef\@thm#1#2{\refstepcounter{#1}%
   \trivlist
   \@topsep \theorempreskipamount%
   \@topsepadd \theorempostskipamount%
   \@ifnextchar [%
   {\@ythm{#1}{#2}}%
   {\@begintheorem{#2}{\csname the#1\endcsname}\ignorespaces}}
\gdef\@thmstar#1{%
   \trivlist
   \@topsep \theorempreskipamount%
   \@topsepadd \theorempostskipamount%
   \@ifnextchar [%
   {\@ythmstar{#1}}%
   {\@@begintheorem{#1}\ignorespaces}}
\def\@ythmstar#1[#2]{%
  \@@opargbegintheorem{#1}{#2}\ignorespaces}
\global\let\@xthm\relax
%
\gdef\th@plaindot{\normalfont\itshape
  \def\@begintheorem##1##2{%
        \item[\hskip\labelsep \theorem@headerfont ##1\ ##2\@thmcountersep]}%
  \def\@@begintheorem##1{%
        \item[\hskip\labelsep \theorem@headerfont ##1\@thmcountersep]}%
\def\@opargbegintheorem##1##2##3{%
   \item[\hskip\labelsep \theorem@headerfont ##1\ ##2]\mdseries ##3\@thmcountersep}
\def\@@opargbegintheorem##1##2{%
   \item[\hskip\labelsep \theorem@headerfont ##1]\mdseries ##2\@thmcountersep}}
%
\gdef\th@proclaim{\normalfont\upshape
  \def\@begintheorem##1##2{%
        \item[\hskip\labelsep \normalfont\itshape ##1\ ##2\@thmcountersep]}%
  \def\@@begintheorem##1{%
        \item[\hskip\labelsep \normalfont\itshape ##1\@thmcountersep]}%
\def\@opargbegintheorem##1##2##3{%
   \item[\hskip\labelsep \normalfont\itshape ##1\ ##2]\upshape ##3\@thmcountersep}
\def\@@opargbegintheorem##1##2{%
   \item[\hskip\labelsep \normalfont\itshape ##1]\upshape ##2\@thmcountersep}}
%
%DEFAULT VALUES
\global\setlength\theorempreskipamount{13pt plus 1pt minus 1pt}
\global\setlength\theorempostskipamount{13pt plus 1pt minus 1pt}
\def\@thmcounter#1{\noexpand\arabic{#1}}
\gdef\@thmcountersep{.}
%
\theorembodyfont{\upshape}
\theoremstyle{plaindot}
{
\if@secthm
  \newtheorem{thm}{Theorem}[section]
\else
  \newtheorem{thm}{Theorem}
\fi
\newtheorem{algorithm}[thm]{Algorithm}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{prob}[thm]{Problem}
\newtheorem{defn}[thm]{Definition}
\newtheorem{exmp}[thm]{Example}}
{\theoremstyle{proclaim} \newtheorem{rem}[thm]{Remark}}
%
\if@secthm
 \@addtoreset{thm}{section}
 \def\thethm{\thesection.\arabic{thm}}
\else
 \def\thethm{\arabic{thm}}
\fi
%
% ************************** FLOATS: FIGURES, TABLES, ALGORITHM
%
\setcounter{topnumber}{5}
\def\topfraction{0.99}
\def\textfraction{0.05}
\def\floatpagefraction{0.9}
\setcounter{bottomnumber}{5}
\def\bottomfraction{0.99}
\setcounter{totalnumber}{10}
\def\dbltopfraction{0.99}
\def\dblfloatpagefraction{0.8}
\setcounter{dbltopnumber}{5}
%
\def\@tableboxreset{%
        \reset@font
        \centering\tablesize
        \@setnobreak
        \@setminipage
}
%
% FIGURES
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename~\thefigure.}
\def\figure{\let\@makecaption\@makefigurecaption\@float{figure}}
\let\endfigure\end@float
\@namedef{figure*}{\let\@makecaption\@makefigurecaption\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}
%
\long\def\@makefigurecaption#1#2{\@captionsize
  \vskip 9pt
    {\leftskip=0pt plus 0.5fil \rightskip=0pt plus -0.5fil
    \parfillskip=0pt plus 1fil #1 #2\par} 
  }
%
% TABLE
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename~\thetable}
\newdimen\tablewidth 
%
\newenvironment{table}{\let\@makecaption\@maketablecaption\let\hline\thline
  \let\footnoterule\relax\let\@floatboxreset\@tableboxreset\@float{table}}
{\end@float}
%
\newenvironment{table*}{\let\@makecaption\@maketablecaption\let\hline\thline 
  \let\footnoterule\relax\tablewidth\textwidth\let\@floatboxreset\@tableboxreset
  \@dblfloat{table}}
{\end@dblfloat}
%
\long\def\@maketablecaption#1#2{\@captionsize
    \hbox to\hsize{\hfil\parbox[t]{\tablewidth}{\leftskip=0pt plus 0.5fil \rightskip=0pt plus -0.5fil
    \parfillskip=0pt plus 1fil #1\par #2\par}\hfil}}
%
\arrayrulewidth .4pt
\def\thline{%
\noalign{\ifnum0=`}\fi\vskip 3pt\hrule \@height \arrayrulewidth \futurelet
   \reserved@a\t@xhline}
\def\t@xhline{\ifx\reserved@a\hline
                \vskip \doublerulesep
                \vskip-\arrayrulewidth
             \else \vskip 3pt\fi
      \ifnum0=`{\fi}}
%
% SUBFIGURE, SUBEQUATION AND SUBTABLE ENVIRONMENTS
%
\def\subfigure{\@ifnextchar[{\@subfigure}{\@subfigure[alph]}}
\def\@subfigure[#1]{\refstepcounter{figure}%
  \def\@testoption{arabic}
  \def\@testparam{#1}
  \begingroup
  \edef\old@figure{\the\c@figure}%
  \edef\old@thefigure{\thefigure}%
  \setcounter{figure}{0}%
  \ifx\@testoption\@testparam
     \def\thefigure{\old@thefigure.\csname #1\endcsname{figure}}
   \else
     \def\thefigure{\old@thefigure\csname #1\endcsname{figure}}
   \fi}
\def\endsubfigure{%
  \setcounter{figure}{\old@figure}%
  \endgroup
  \global\@ignoretrue}
\def\subequation{\@ifnextchar[{\@subequation}{\@subequation[alph]}}
\def\@subequation[#1]{\refstepcounter{equation}%
  \def\@testoption{arabic}
  \def\@testparam{#1}
  \begingroup
  \edef\old@equation{\the\c@equation}%
  \edef\old@theequation{\theequation}%
  \setcounter{equation}{0}%
  \ifx\@testoption\@testparam
    \def\theequation{\old@theequation.\csname #1\endcsname{equation}}
  \else
    \def\theequation{\old@theequation\csname #1\endcsname{equation}}
  \fi}
\def\endsubequation{%
  \setcounter{equation}{\old@equation}%
  \endgroup
  \global\@ignoretrue}
\def\subtable{\@ifnextchar[{\@subtable}{\@subtable[alph]}}
\def\@subtable[#1]{\refstepcounter{table}%
  \def\@testoption{arabic}
  \def\@testparam{#1}
  \begingroup
  \edef\old@table{\the\c@table}%
  \edef\old@thetable{\thetable}%
  \setcounter{table}{0}%
  \ifx\@testoption\@testparam
     \def\thetable{\old@thetable.\csname #1\endcsname{table}}
  \else
     \def\thetable{\old@thetable\csname #1\endcsname{table}}
  \fi}
\def\endsubtable{%
  \setcounter{table}{\old@table}%
  \endgroup
  \global\@ignoretrue}
%
%************ HEADINGS
%
%\newcommand\@copyright{\copyright\ \@copyrightline\hfill}
%
\def\sectionmark#1{}
\def\subsectionmark#1{}
%
\def\ps@plain{\let\@mkboth\@gobbletwo
     \def\@oddhead{}\def\@oddfoot{\small\rmfamily\upshape\hfil\thepage
     \hfil}\def\@evenhead{}\let\@evenfoot\@oddfoot}
%
\def\ps@copyright{\let\@mkboth\@gobbletwo
\def\@oddhead{\footnotesize\@journal\ \@volume\ (\the\@pubyear)\ \@pagerange\hfill\thepage}%
%\def\@oddhead{\footnotesize\@journal\hfill\thepage}%
  \let\@evenhead\@oddhead%
%  \def\@oddfoot{\parindent 0pt
%    \parbox{\textwidth}%
%       {\vskip10pt\footnotesize\leavevmode\@copyright}}%
  \def\@oddfoot{}%
  \let\@evenfoot\@oddfoot%
}
\def\ps@headings{\let\@mkboth\@gobbletwo
  \def\@oddfoot{}\def\@evenfoot{}%      
  \def\@evenhead{\footnotesize\rlap{\thepage}\hfil{\em \leftmark}\hfil%
     \hbox{}}%
  \def\@oddhead{\footnotesize\hfil{\em\rightmark}%
    \hfil \llap{\thepage}}%
    \def\leftmark{\@runauthor\@runtitle} \let\rightmark\leftmark}
%
%****************************** FRONTMATTER *
%
\newtoks\t@glob@notes
\newtoks\t@loc@notes
\newcount\note@cnt
\newcounter{author}
\newcount\n@author
\def\n@author@{}
\newcounter{address}
%
\newdimen\sv@mathsurround
\newcount\sv@hyphenpenalty
%
\newcount\prev@elem \prev@elem=0
\newcount\cur@elem  \cur@elem=0
\chardef\e@pretitle=1
\chardef\e@title=1
\chardef\e@subtitle=1
\chardef\e@author=2
\chardef\e@address=3
%
\newif\if@newelem
\newif\if@firstauthor
\newif\if@preface
\newif\if@hasabstract
\newif\if@haskeywords
\newif\if@history
%
\newbox\fm@box
\newdimen\fm@size
\newbox\t@abstract
\newbox\t@keywords
% 
\def\add@tok#1#2{\global#1\expandafter{\the#1#2}}
\def\add@xtok#1#2{\begingroup
  \no@harm
  \xdef\@act{\global\noexpand#1{\the#1#2}}\@act
\endgroup}
%
\def\beg@elem{\global\t@loc@notes={}\global\note@cnt\z@}
\def\@xnamedef#1{\expandafter\xdef\csname #1\endcsname}
\def\no@harm{%
  \let\\=\relax  \let\rm\relax
  \let\ss=\relax \let\ae=\relax \let\oe=\relax
  \let\AE=\relax \let\OE=\relax
  \let\o=\relax  \let\O=\relax
  \let\i=\relax  \let\j=\relax
  \let\aa=\relax \let\AA=\relax
  \let\l=\relax  \let\L=\relax
  \let\d=\relax  \let\b=\relax \let\c=\relax
  \let\bar=\relax
  \def\protect{\noexpand\protect\noexpand}}
%
\def\proc@elem#1#2{\begingroup
    \no@harm
    \let\thanks\@gobble
    \@xnamedef{@#1}{#2}%
  \endgroup
  \prev@elem=\cur@elem
  \cur@elem=\csname e@#1\endcsname
  \expandafter\elem@nothanks#2\thanks\relax}
%
\def\elem@nothanks#1\thanks{\futurelet\@peektok\elem@thanks}
\def\elem@thanks{\ifx\@peektok\relax
  \else \expandafter\elem@morethanks \fi}
\def\elem@morethanks#1{\thanks@optarg[]{#1}\add@thanks{#1}\elem@nothanks}
%
\def\add@thanks#1{%
  \global\advance\note@cnt\@ne
    \ifnum\note@cnt>\@ne \add@xtok\t@loc@notes{\note@sep}\fi
    \add@xtok\t@loc@notes{\thefootnote}%
}
\def\add@addressref#1{%
  \global\advance\note@cnt\@ne
    \ifnum\note@cnt>\@ne \add@xtok\t@loc@notes{\note@sep}\fi
    \add@tok\t@loc@notes{\ref{#1}}%
}
\def\note@sep{,}
%
\def\thanks@optarg[#1]#2{%
    \add@tok\t@glob@notes{\footnotetext}%
    \refstepcounter{footnote}%
    \add@xtok\t@glob@notes{[\the\c@footnote]}%
    \add@tok\t@glob@notes{{#2}}%
        \ignorespaces}%
%
% FRONTMATTER
%
\newdimen\a@title@skip \setlength\a@title@skip{16pt}
\newdimen\b@history@skip \setlength\b@history@skip{12pt}
\newdimen\b@section@skip \setlength\b@section@skip{2pt}
%
\def\frontmatter{%
  \global\t@glob@notes={}\global\c@author\z@
  \global\c@address\z@
  \sv@mathsurround\mathsurround \m@th
  \global\n@author=0\n@author@\relax
  \global\advance\n@author\m@ne
  \global\@firstauthortrue
  \global\@hasabstractfalse
  \global\@prefacefalse
  \newcount\c@sv@footnote
  \global\c@sv@footnote=\c@footnote
  \open@fm \ignorespaces}
%
\def\preface{\@prefacetrue}
%
% ENDFRONTMATTER
%
\def\raggedbox{\@ifnextchar[{\@raggedbox}{\@raggedbox[\@flushglue]}}
\def\@raggedbox[#1]#2#3{%
  \let\\\@centercr\@rightskip#3 \rightskip\@rightskip
  \leftskip#2\parindent\z@\parfillskip#1}
%
\def\i@centering{\raggedbox[\z@skip]{2pc plus 1fil}{2pc plus 1fil}}
%
\def\@pagenumprefix{}
\def\endfrontmatter{%
  \ifnum\c@footnote>0\setfootskip{$^{\mathrm{\thefootnote}}$}\fi%
  \global\c@footnote=\c@sv@footnote
  \global\n@author=\c@author \@writecount
  \global\@topnum\z@
  \ifx\@firstpage\@lastpage
    \gdef\@pagerange{?--?} %{\@pagenumprefix\@firstpage}
  \else
    \gdef\@pagerange{\@pagenumprefix\@firstpage--\@pagenumprefix\@lastpage}
  \fi
  \thispagestyle{copyright}%
  \if@preface \else
  \if@history \history@fmt \fi\fi
  \if@twocolumn\else
    \output@glob@notes
  \fi
  \if@preface
    \@hasabstractfalse
  \fi
  \if@hasabstract
    \vskip 2\@bls
    \unvbox\t@abstract
  \fi
  \if@haskeywords\vbox{\unvbox\t@keywords}\else\fi
  \ifx\@classification\empty@data \else {\raggedright\leftskip2pc\vbox\bgroup\footnotesize
\vskip 4pt\textbf{\classificationname:\ }\@classification\par\egroup}\fi
  \vskip 2\@bls
  \close@fm
  \if@twocolumn
     \output@glob@notes 
  \fi
  \global\@prefacefalse
  \global\leftskip\z@
  \global\@rightskip\z@
  \global\rightskip\@rightskip
  \global\mathsurround\sv@mathsurround
  \let\title\relax       \let\author\relax
  \let\address\relax
  \let\frontmatter\relax \let\endfrontmatter\relax
  \let\@maketitle\relax  \let\@@maketitle\relax
  \normal@text}
%
\let\maketitle\relax
%
\newdimen\t@xtheight
\def\init@settings{
\splittopskip=\topskip \splitmaxdepth=\maxdepth
\t@xtheight\textheight \advance\t@xtheight-\splittopskip}
%
\def\open@fm{
  \global\setbox\fm@box=\vbox\bgroup
  \hsize=\textwidth
  \centering
  \sv@hyphenpenalty\hyphenpenalty
  \hyphenpenalty\@M}
%
\def\close@fm{\par \egroup
  \fm@size=\dp\fm@box \advance\fm@size by \ht\fm@box
  \@whiledim\fm@size>\t@xtheight \do{%
    \global\setbox\@tempboxa=\vsplit\fm@box to \t@xtheight
    \unvbox\@tempboxa \newpage
    \fm@size=\dp\fm@box \advance\fm@size by \ht\fm@box}
  \if@twocolumn
    \emergencystretch=1pc \twocolumn[\unvbox\fm@box]
  \else
    \unvbox\fm@box
  \fi}
%
\def\output@glob@notes{\bgroup
  \the\t@glob@notes
  \egroup}
%
\def\normal@text{\global\let\\=\@normalcr
  \global\leftskip\z@ \global\@rightskip\z@ \global\rightskip\@rightskip
  \global\parfillskip\@flushglue}
%
\def\@writecount{\write\@mainaux{\string\global
  \string\@namedef{n@author@}{\the\n@author}}%
}
%
% TITLE
\newbox\t@pretitle
\def\pretitle#1{%
  \beg@elem%
  \proc@elem{pretitle}{#1}%
  \def\title@notes{\the\t@loc@notes}%
  \setbox\t@pretitle=\hbox{\pretitle@size\@pretitle\,\hbox{$^{\mathrm{\title@notes}}$}\par}%
  \ignorespaces}
%
\def\title#1{%
  \beg@elem
  \title@note@fmt
  \add@tok\t@glob@notes
    {\title@note@fmt}%
  \proc@elem{title}{#1}%
  \def\title@notes{\the\t@loc@notes}%
  \title@fmt{\@title}{\title@notes}%
  \ignorespaces}
%
\def\title@fmt#1#2{%
  \vbox to 34pt{\vss\leavevmode\unhbox\t@pretitle\vss}
  {\if@twocolumn\i@centering\fi\title@size #1\,\hbox{$^{\mathrm{#2}}$}\par}%
  \vskip\a@title@skip%
  }
%
\def\subtitle#1{%
  \beg@elem
  \proc@elem{subtitle}{#1}%
  \def\title@notes{\the\t@loc@notes}%
  \subtitle@fmt{\@subtitle}{\title@notes}%
  \ignorespaces}
%
\def\subtitle@fmt#1#2{%
  {\if@twocolumn\i@centering\fi\subtitle@size #1\,\hbox{$^{\mathrm{#2}}$}\par}%
  \vskip\a@title@skip%
  }
%
\def\title@note@fmt{\def\thefootnote{\sxarabic{footnote}}}
%
% AUTHOR
%
\newdimen\b@author@skip
\setlength\b@author@skip{12pt}
%
\def\author{\@ifnextchar[{\author@optarg}{\author@optarg[]}}
%
\def\author@optarg[#1]#2{\stepcounter{author}%
  \beg@elem%
  \if@firstauthor \first@author \global\@firstauthorfalse \fi%
  \@for\@tempa:=#1\do{\expandafter\add@addressref\expandafter{\@tempa}}%
  \proc@elem{author}{#2}%
  \author@fmt{\the\c@author}{\the\t@loc@notes}{\@author}}%
%
\def\author@fmt#1#2#3{\@newelemtrue%
  \ifnum\prev@elem=\e@author \global\@newelemfalse \fi%
  \if@newelem \author@fmt@init\b@author@skip 12pt \fi%
  \edef\@tempb{#2}\ifx\@tempb\@empty%
    \hbox{#3}\else\hbox{#3\,$^{\mathrm{#2}}$}%
  \fi}
%
\def\first@author{\author@note@fmt%
  \add@tok\t@glob@notes{\author@note@fmt}\b@author@skip\z@}%
%
\def\author@fmt@init{%
  \par
  \vskip \b@author@skip
  \leavevmode\authors@size}
%
\def\and{\unskip~and~}
%
\def\author@note@fmt{%
  \def\thefootnote{\sxarabic{footnote}}}
%
\def\sxarabic#1{%
        \expandafter\ifcase\value{#1} \or *\or **\or *** \or **** \or *****\fi
}
%
% ADDRESS
%
\def\email#1{\\{\upshape E-mail:\ #1}}
%
\def\address{\@ifstar{\address@star}%
  {\@ifnextchar[{\address@optarg}{\address@noptarg}}}
%
\def\address@optarg[#1]#2{\refstepcounter{address}%
  \beg@elem
  \proc@elem{address}{#2}%
  \address@fmt{\the\c@address}{\the\t@loc@notes}{\@address}\label{#1}%
  \ignorespaces}
%
\def\address@noptarg#1{\refstepcounter{address}%
  \beg@elem
  \proc@elem{address}{#1}%
  \address@fmt{\z@}{\the\t@loc@notes}{\@address}%
  \ignorespaces}
%
\def\address@star#1{%
  \beg@elem
  \proc@elem{address}{#1}%
  \address@fmt{\m@ne}{\the\t@loc@notes}{\@address}%
  \ignorespaces}
%
\def\theaddress{\alph{address}}
%
\def\address@fmt#1#2#3{\@newelemtrue
  \ifnum\prev@elem=\e@address \@newelemfalse \fi
  \if@newelem \address@fmt@init \fi
  \bgroup\parskip\z@\noindent \footnotesize\itshape
  \ifnum#1=\z@
    #3\,$^{\mathrm{#2}}$\space%
  \else
    \ifnum#1=\m@ne
      $^{\phantom{\mathit{\theaddress}}\,}$#3\,$^{\mathrm{#2}}$%
    \else
      $^{\mathit{\theaddress}\,}$#3\,$^{\mathrm{#2}}$%
    \fi
  \fi
  \par\egroup}
%
\def\address@fmt@init{%
        \def\@currentlabel{\theaddress}%
  \par
  \vskip 4pt plus 1pt minus 1pt}
%
% ABSTRACT
%
\def\abstract{\@ifnextchar[{\@abstract}{\@abstract[]}}
\def\@abstract[#1]{%
  \global\@hasabstracttrue
  \hyphenpenalty\sv@hyphenpenalty
  \global\setbox\t@abstract=\vbox\bgroup
  \leftskip2pc
  \@rightskip2pc \rightskip\@rightskip \parfillskip\@flushglue
  \footnotesize
  \parindent 1pc
  {\bfseries\abstractname}
  \ignorespaces}
\def\endabstract{\par \egroup}
%
% KEYWORDS
\global\@haskeywordsfalse
\def\keywords{\global\@haskeywordstrue\global\setbox\t@keywords=\vbox\bgroup\raggedbox{2pc}{2pc}%
        \footnotesize\kern 4pt\textbf{\keywordsname:\ }\ignorespaces}
\def\endkeywords{\par\egroup}
\def\classification#1{\def\@tempa{#1}\ifx\@tempa\@empty\else\gdef\@classification{#1}\fi}
  \def\@classification{\@nil}
%
% JORNAL, VOLUME, ISSUE
%
% Running title
\def\runningtitle#1{\gdef\@runtitle{#1}}   \def\@runtitle{}
\def\runningauthor#1{{\def\etal{et al.}\gdef\@runauthor{#1\@runsep}}} \def\@runauthor{}
\def\runningsep#1{\gdef\@runsep{#1}}
\def\@runsep{\ /\ }
%
\def\journal#1{\gdef\@journal{#1}}     
        \@ifundefined{@journal}{\gdef\@journal{Preprint}}{}
\def\volume#1{\gdef\@volume{#1}}       \def\@volume{0}
\def\issue#1{\gdef\@issue{#1}}         \def\@issue{0}
%
\newcount\@pubyear
\newcount\@copyear
\@pubyear=\number\year
\@copyear\@pubyear \advance\@copyear-1900
\def\pubyear#1{\global\@pubyear#1
  \global\@copyear\@pubyear \global\advance\@copyear-1900
  \ignorespaces}
%
\def\firstpage#1{\def\@tempa{#1}\ifx\@tempa\@empty\else
  \gdef\@firstpage{#1}\gdef\@lastpage{#1}%
  \global\c@page=#1 \ignorespaces\fi
  }
\def\@firstpage{1}
\def\lastpage#1{\def\@tempa{#1}\ifx\@tempa\@empty\else
  \gdef\@lastpage{#1}\ignorespaces\fi}
\def\@lastpage{1}
\def\@pagerange{1--0}
%
% Received, accepted etc.
%
\def\received#1{\def\@tempa{#1}\ifx\@tempa\@empty\else\gdef\@received{#1}\global\@historytrue\fi}
  \def\@received{\@nil}
\def\revised#1{\def\@tempa{#1}\ifx\@tempa\@empty\else\gdef\@revised{#1}\fi}
  \def\@revised{\@nil}
\def\accepted#1{\def\@tempa{#1}\ifx\@tempa\@empty\else\gdef\@accepted{#1}\fi}
  \def\@accepted{\@nil}
\def\communicated#1{\def\@tempa{#1}\ifx\@tempa\@empty\else\gdef\@communicated{#1}\fi}
  \def\@communicated{\@nil}
\def\dedicated#1{\def\@tempa{#1}\ifx\@tempa\@empty\else\gdef\@dedicated{#1}\fi}
  \def\@dedicated{\@nil}
\def\presented#1{\def\@tempa{#1}\ifx\@tempa\@empty\else\gdef\@presented{#1}\fi}
  \def\@presented{\@nil}
%
\def\received@prefix{Received~}
\def\revised@prefix{; revised~}
\def\accepted@prefix{; accepted~}
\def\communicated@prefix{\\Communicated~by~}
\def\dedicated@prefix{\bgroup\vskip\b@history@skip\leavevmode\itshape}
\def\history@prefix{}
%
\def\received@postfix{}
\def\revised@postfix{}
\def\accepted@postfix{}
\def\communicated@postfix{}
\def\dedicated@postfix{\egroup}
\def\history@postfix{}
%
\def\empty@data{\@nil}
%
\def\history@fmt{%
  \bgroup\small
  \vskip\b@history@skip
  \ifx\@received\empty@data \else
    \leavevmode
    \history@prefix
    \received@prefix\@received \received@postfix%
    \ifx\@revised\empty@data \else
      \revised@prefix\@revised \revised@postfix%
    \fi
    \ifx\@accepted\empty@data \else
      \accepted@prefix\@accepted \accepted@postfix%
    \fi
    \ifx\@communicated\empty@data \else
      \communicated@prefix\@communicated \communicated@postfix%
    \fi
    \ifx\@dedicated\empty@data \else
      \dedicated@prefix \@dedicated \dedicated@postfix
    \fi
    \history@postfix
  \fi
  \par \egroup}
%
% Biography
%
\newcount\ilines
\newcount\photoheight
\photoheight=10
\def\biography@size{\footnotesize}
%
\def\biography{\@ifnextchar[{\@biography}{\@biography[photo]}}
\def\@biography[#1]{
\def\\{\hfill\break\hbox{}\kern1em}\let\par\\%
\def\email##1{\hfill\break\hbox{}{\upshape E-mail:\ ##1}}%
\addvspace{.5cm}\noindent%
\ifx.#1.\else\hangindent=2.7cm \hangafter=-\photoheight\fi%
\biography@size\ignorespaces%
}
\def\endbiography{\@@par\ilines=\the\prevgraf\ifnum\ilines<\photoheight
\advance\ilines by-\photoheight\vskip-\ilines\baselineskip\fi\let\par\@@par}
%
% ==================================================================
% DIMENSIONS 
\newcommand\@abstractsize{\footnotesize}
\newcommand\@captionsize{\footnotesize}
\newcommand\tablesize{\footnotesize}
\newcommand\pretitle@size{\titlesize\itshape}
\newcommand\title@size{\titlesize}
\newcommand\subtitle@size{\titlesize}
\newcommand\authors@size{\normalsize}
\newcommand\address@size{\footnotesize}
%
\setlength\headsep{1.3\baselineskip}
\setlength\footskip{18pt}
\setlength\topskip{10pt}
\setlength\parskip{0pt}
\setlength\topsep{6.5pt}
\setlength\partopsep{0pt}
\setlength\footnotesep{6.65pt}
%
\setlength\marginparwidth{0pt}
\setlength\marginparsep{0pt}
\setlength\marginparpush{0pt}
% 
\setlength\fboxsep{7pt}
\setlength\fboxrule{0.4pt}
%
\setlength\floatsep{13pt plus 2pt minus 2pt}
\setlength\textfloatsep{10pt plus6pt minus 2pt}
\setlength\intextsep{15pt plus 2pt minus 2pt}
% For floats on a separate float page or column:
\setlength\@fptop{0pt plus 1fil}
\setlength\@fpsep{10pt plus 1000fil}
\setlength\@fpbot{0pt plus 1fil}
% Double-column floats in two-column mode.
\setlength\dblfloatsep{13pt plus 2pt minus 2pt}
\setlength\dbltextfloatsep{10pt plus 2pt minus 2pt}
\setlength\@dblfptop{0pt plus 1fil}
\setlength\@dblfpsep{10pt plus 1000fil}
\setlength\@dblfpbot{0pt plus 1fil}
%
% BREAKS PENALTIES
\@lowpenalty   51
\@medpenalty  151
\@highpenalty 301
\@beginparpenalty -\@lowpenalty
\@endparpenalty   -\@lowpenalty
\@itempenalty     -\@lowpenalty
%
% PAGE BREAKING PENALTIES
\clubpenalty=4000           % 'Club line'  at bottom of page.
\widowpenalty=9000         % 'Widow line' at top of page.
\displaywidowpenalty=9000  % 'Widow line' at top of page before DMath
\tolerance=1600             % Lines of text can be a bit more loose,
\hbadness=1600              % and reporting this is not necessary
\hfuzz=1pt                  % do not be to critical about boxes
%
\setlength\arraycolsep{1pt}
\setlength\tabcolsep{6pt}
\setlength\columnsep{1pc}
\setlength\columnwidth{20pc}
\setlength\voffset{-1in}
\setlength\hoffset{-1in}
\if@wned
  \setlength\paperwidth{21cm}
  \setlength\paperheight{27.7cm}
  \setlength\textheight{56.8pc}
  \setlength\textwidth{41pc}
  \advance\voffset by 26pt
  \advance\hoffset by 51pt
  \setlength\oddsidemargin{0pt}
  \setlength\evensidemargin{0pt}
  \setlength\baselineskip{12pt plus .1pt minus .1pt}
  \setlength\parindent{1pc}
  \setlength\headheight{12pt}
  \setlength\topmargin{1cm}
  \setlength{\skip\footins}{10pt}
\else
  \setlength\paperwidth{17.5cm}
  \setlength\paperheight{25.3cm}
  \setlength\textwidth{32pc}
  \setlength\textheight{196mm}
  \advance\voffset by 35pt
  \advance\hoffset by 25pt
  \setlength\oddsidemargin{42pt}   
  \setlength\evensidemargin{0pt}
  \advance\evensidemargin \paperwidth
  \advance\evensidemargin -\textwidth
  \advance\evensidemargin -\oddsidemargin
  \setlength\baselineskip{13pt plus .1pt minus .1pt}
  \setlength\parindent{2pc}
  \setlength\headheight{13pt}
  \setlength\topmargin{45pt}
  \setlength{\skip\footins}{11pt}
\fi
% Default initializations
\if@twocolumn\setlength\tablewidth{\columnwidth}
\else\setlength\tablewidth{\textwidth}\fi
\ps@headings   
\@twosidetrue
\pagenumbering{arabic}    
\init@settings
\endinput


