\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{moma09}[2008/09/24 (c) A. Bouhamidi, K. Jbilou]
%
\ProcessOptions
\LoadClass[twoside]{article}
%
\RequirePackage{chngpage}
\RequirePackage{theorem}
\RequirePackage{times}
\RequirePackage{fancyhdr}
\RequirePackage{amssymb,amsmath}
\RequirePackage{enumerate}
%\RequirePackage[frame,a4,center,noinfo]{crop}
\RequirePackage{graphicx}
%


\renewcommand{\abstractname}{\bfseries\sffamily Abstract}
%
%
%-------------------------------------------------------------------------
\setlength{\paperwidth}{17cm}
\setlength{\paperheight}{22cm}
%
\setlength{\textwidth}{13.0cm}
%--------------------------------------------------------------------
\newcommand{\qed}{\square}

\newcounter{NoAuthors}
\newcounter{NoAddresses}
\def\author{\@ifnextchar[{\Xauthor}{\Xauthor[]}}
\def\Xauthor[#1]#2{%
        \expandafter\def\csname @AuthorLabel\theNoAuthors\endcsname{#1}%
        \expandafter\def\csname @ListOfAuthors\theNoAuthors\endcsname{#2}%
        \stepcounter{NoAuthors}%
}
\def\address{\@ifnextchar[{\Xaddress}{\Xaddress[]}}
\def\Xaddress[#1]#2{%
        \expandafter\def\csname @addressLabel\theNoAddresses\endcsname{#1}%
        \expandafter\def\csname @eachAddress\theNoAddresses\endcsname{#2}%
        \stepcounter{NoAddresses}%
}
\def\shortauthor#1{\gdef\@sauthor{#1}}
\def\shorttitle#1{\gdef\@stitle{#1}}
\def\maketitle{%
        \renewcommand\thefootnote{\fnsymbol{footnote}}

        \newcounter{Loop}
        \newcounter{AuthorAnd}
        \newcounter{AuthorComma}
        \setcounter{AuthorComma}{\theNoAuthors}
        \addtocounter{AuthorComma}{-1}
        \def\@AuthSep{\ifnum\c@Loop=\c@AuthorComma\relax\else,\space\fi}

        \begingroup
        \def\AuthorBlock{%
          \setcounter{Loop}{0}%
          \loop%
          \ifnum\number\theLoop<\number\theNoAuthors%
          \csname @ListOfAuthors\theLoop\endcsname\unskip%
          \textsuperscript{\csname @AuthorLabel\theLoop\endcsname}%
          \@AuthSep%
          \stepcounter{Loop}%
          \repeat%
        }
        \def\AddressBlock{%
          \setcounter{Loop}{0}
          \loop%
          \ifnum\number\theLoop<\number\theNoAddresses%
          \textsuperscript{\csname @addressLabel\theLoop\endcsname}%
          \unskip\csname @eachAddress\theLoop\endcsname\par\vskip3pt%
          \stepcounter{Loop}%
          \repeat%
        }
        \null\addvspace{0pt}\begingroup
        \list{}{\leftmargin 0pt \rightmargin 0pt%
          \topsep \z@\parsep0\p@ \@plus\p@\itemsep0pt%
          \listparindent 0em\labelsep \z@}%
      \item[]\relax{{\strut\LARGE\bfseries\sffamily\@title\strut}}%
        \endlist
        \addvspace{20pt}
        \begingroup
        \list{}
        {\leftmargin 0pt\rightmargin 0pt%
          \topsep \z@\parsep0\p@ \@plus\p@\itemsep0pt%
          \listparindent 0em\labelsep \z@}%
      \item[]\relax{\large\sffamily\AuthorBlock}\par%
        \addvspace{10pt}%
        \endgroup
        \begingroup\list{}
        {\leftmargin 0pt\rightmargin 0pt%
          \topsep \z@\parsep0\p@ \@plus\p@\itemsep0pt%
          \listparindent 0em\labelsep \z@}%
      \item[]\relax
        \scriptsize\itshape\sffamily\AddressBlock%
        \endlist\endgroup\addvspace{10pt}%
        \@thanks\endgroup\addvspace{20pt}%
        \endgroup
        \thispagestyle{empty}
}
%
%
\renewenvironment{abstract}{%
  \small\begin{adjustwidth}{1em}{1em}\subsubsection*{\center\large\abstractname}}%
  {\end{adjustwidth}}
%
%
%

%\renewcommand\thepage{}
