\textwidth135mm
\textheight205mm
\evensidemargin25mm
\oddsidemargin25mm
\pagestyle{myheadings}
\tolerance1000

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\let\chapter=\section
\def\ext@figure{lot}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\udk#1{\def\theudk{#1}}
\def\author#1{\def\theauthor{#1}}
\def\title#1{\def\thetitle{#1}}
\def\grant#1{\def\thegrant{#1}\granttrue}
\def\ruscontauth#1{\def\theruscontauth{#1}}
\def\rusconttit#1{\def\therusconttit{#1}}
\def\colontit#1{\def\thecolontit{#1\dots}\colontittrue}
\def\engcontauth#1{\def\theengcontauth{#1}}
\def\engconttit#1{\def\theengconttit{#1}}
\def\date#1{\def\thedate{#1}}
\def\organization#1{\def\theorganization{#1}\organizationtrue}
\def\paper{\setcounter{equation}{0}
           \setcounter{figure}{0}
           \setcounter{footnote}{0}
           \setcounter{section}{0}
           \setcounter{subsection}{0}
           \setcounter{table}{0}
           \addcontentsline{toc}{section}{{\bf\theruscontauth}~{\it\therusconttit}}
           \addcontentsline{lof}{section}{{\bf\theengcontauth}~{\it\theengconttit}}
           \vbox to0pt{\dimen0=\textheight
                       \advance\dimen0 5mm%\baselineskip
                       \vbox to\dimen0{\vfill\hbox to0pt{\hskip-\parindent%
                       \footnotesize\copyright\ \theruscontauth, 2009.\hss}}\vss}
           \moveright50mm\vbox{\it \noindent
                               ������� �������������� ������������.\\
                               ���.1.���.9.2009}\vskip10mm
           {\noindent\bf ���~\theudk}\vskip10mm
           \begin{center}
             {\sc\thetitle}
             \ifgrant\footnote{\thegrant}\fi
           \end{center}
           \begin{center}{{\it\theauthor}}\end{center}
           \vskip5mm
           \markboth{\theruscontauth}
                    {\ifcolontit\thecolontit\else\therusconttit\fi}
           \thispagestyle{empty}}


\def\endpaper{\par\nobreak\medskip\small{\it\noindent
              \iforganization\theorganization
              \else{������������� �����������}\fi
              \hfill ���������~\thedate}
              \newpage
              %\ruscont
              %\englishcont
              \tableofcontents
              \listoffigures}

\def\annot{\small\list{}{\listparindent 1.5em
 \itemindent\listparindent
 \rightmargin\leftmargin\parsep 0pt plus 1pt}\item[]}
\let\endannot=\endlist

\def\summary{\section*{Summary}
             \par{\bf\theengcontauth}~\theengconttit\par\smallskip\nobreak}

\newif\ifcolontit\colontitfalse
\newif\ifgrant\grantfalse
\newif\iforganization\organizationfalse

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\addto\captionsrussian{\def\contentsname{����������}
                       \def\listfigurename{Contents}
                       \def\refname{����������}
                       \def\figurename{���.}
                       \def\tablename{����.}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\thesection{\arabic{section}}
\def\thesubsection{\thesection.\arabic{subsection}}

\def\initsect{\addtocounter{section}{1}\setcounter{subsection}{0}}

\def\rusordsection#1{\def\@currentlabel{\thesection}\vskip 2ex plus 1ex\goodbreak%
  \initsect\begin{center}\large\bf\S\thesection.\hskip .5em #1\end{center}}
\def\spsection#1#2{\vskip 2ex plus 1ex\goodbreak%
  \indent {\bf #2}\par}
\def\russection{\@ifnextchar*{\spsection}{\rusordsection}}


\def\ordsection#1{\def\@currentlabel{\thesection}\vskip 2ex plus 1ex\goodbreak%
  \initsect{\large\bf\thesection.\hskip .5em #1}\par}
\def\section{\@ifnextchar*{\spsection}{\ordsection}}


\def\subsection#1{\def\@currentlabel{\thesubsection}\vskip .8ex plus .5ex%
  \ifnum\c@subsection=0\par\else\goodbreak\fi\addtocounter{subsection}{1}%
  \normalsize\bf\thesubsection.\hskip .4em #1\rm\hskip .6em}

\def\theequation{\arabic{equation}}

\def\@biblabel#1{#1.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





