\ProvidesClass{msm}[2007/03/20 v0.1]
\def\class@name{msm}%
\GenericInfo{}{\space
 Copyright (c) 2004 ITP TU Berlin.^^J
 Copyright (c) 2007 MSU Moscow.^^J
 Licensed under the LPPL:^^Jhttp://www.ctan.org/tex-archive/macros/latex/base/lppl.txt^^J
 \@gobble
}%
\LoadClass[12pt,a4paper]{article}
\RequirePackage{a4}
%\usepackage{amssymb,amsmath}
%\usepackage[T2A]{fontenc}
%\usepackage{babel}
\RequirePackage[utf8]{inputenc}
\RequirePackage[english]{babel}
%\RequirePackage[english,russian]{babel} % this causes pdflatex to use T3 fonts :(
%\RequirePackage{literat}
\RequirePackage{amsmath}
\RequirePackage{amstext}
\RequirePackage{amsfonts}
\RequirePackage{ifthen}

\AtBeginDocument{
  \pagestyle{empty}
}

\gdef\@contacts{}
\gdef\@author{}
\def\author[#1]#2{
	\ifx\@author\@empty\else\g@addto@macro\@author{, }\fi
	\g@addto@macro\@author{\mbox{\ifx\\#1\\\else\@textsuperscript{\textbf{#1}}\fi#2}}
}
\def\contacts[#1]#2{
	\ifx\@contacts\@empty\else\g@addto@macro\@contacts{\par}\fi
	\g@addto@macro\@contacts{\ifx\\#1\\\else\@textsuperscript{\textbf{#1}}\fi#2}
}

\def\maketitle{
	\begin{center}
  	{\bf\large \@title \par}
	  \vskip 1em                         % Vertical space after title.
  	{\@author}
  	\vskip 1em                         % Vertical space after title.
  	{\@contacts}
  	\vskip 1.5em                         % Vertical space after title.
	\end{center} \par
}

\renewenvironment{thebibliography}[1]
{
  \kern 1ex
  \centerline{\vrule width 0.5\textwidth height 0.1pt}
  \kern 1ex
  \list{\@biblabel{\@arabic\c@enumiv}}%
  {
    % \itemsep=0ex\topsep=0ex\partopsep=0ex\parskip=0ex\parsep=0ex %
                                % zero space
     \itemsep=1ex\topsep=0ex\partopsep=0ex\parskip=0ex\parsep=0ex %
    \settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \@openbib@code
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  \sloppy
  \clubpenalty4000
  \@clubpenalty \clubpenalty
  \widowpenalty4000%
  \sfcode`\.\@m}
{\def\@noitemerr
  {\@latex@warning{Empty `thebibliography' environment}}%
  \endlist}
