%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%This is My own package. <by Innokenti Semoushin>%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{demopack}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%begin *���������, ���������� ��� �����%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ATTENTION!!! - ��� ��� ������� �������� ������ ������ ��� ������ �� PS%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%\textwidth=479pt ��� ����������� ����� �� 20 �� ����� � ������%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%\textheight=675pt ��� ���� 25 �� ����� �� ������ - ��� ����� � ���.%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Vertical unit lenghts: ������=21��, �����=25.4��                  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\voffset=0pt          %OK!!=0mm.                                     %%%
\topmargin=-22pt      %OK!!=-22pt=-7.76��.                           %%%
\headheight=17pt      %OK!!=17pt=6mm.                                %%%
\headheight=17pt      %OK!!=17pt=6mm.                                %%%
\headsep=20pt         %OK!!=20pt=7mm.                                %%%
%!%\textheight=648pt     %OK!!=648pt=228��. ����� ����� 25�� �� � ���.%%%%%
\textheight=675pt     %OK!!=675pt=238��.                             %%%
\footskip=28pt        %OK!!=28pt=9.88mm=~10mm.                       %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Horizontal unit lenghts: ������ ������=164��.                     %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%!%\textwidth=465pt  %OK!!=465pt=164��. ���������=25��, ����������=21��.%%%
%!% � ��������=21��, ���������=25��.                                  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\textwidth=479pt      %OK!!=478pt=169��.                             %%%
%%%Odd numbered (right-hand) pages:                                  %%%
%%%���������=25��, ����������=21��.                                  %%%
%!%\oddsidemargin=0pt %OK!!=0mm.                                        %%%
\oddsidemargin=-11pt %OK!!=-5mm.                                        %%%
%%%Even numbered (left-hand) pages:                                  %%%
%%%��������=21��, ���������=25��.                                  %%%
%!%\evensidemargin=-10pt  %OK!!=-10pt=-28.3��.                          %%%
\evensidemargin=-12pt  %OK!!=-10pt=-28.3��.                          %%%
%%%%%%%%%%%%%%%%%%%end *���������, ���������� ���%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%set by Julia Tsyganova:%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsthm}           % ������� AMS                          %%%
% �������� ��������� ���� �������                                    %%%
\theoremstyle{plain}                                                 %%%
\newtheorem{proposition}{�����������}[section]                       %%%
\newtheorem{lemma}{�����}[section]                                   %%%
\theoremstyle{definition}                                            %%%
\newtheorem{definition}{�����������}[section]                        %%%
\newtheorem{theorem}{�������}[section]                               %%%
\theoremstyle{remark}                                                %%%
\newtheorem{remark}{���������}[section]                              %%%
\newtheorem{example}{������}[section]                                %%%
%!%\renewcommand{\contentsname}{����������}                          %%%
\newcommand{\res}{\mathop{\mathrm{res}}\limits}                      %%%
\unitlength=1mm                                                      %%%
\emergencystretch=5pt                                                %%%
%\renewcommand{\baselinestretch}{1.3} % ���������� ��������           %%%
%%%\parindent=1.25cm                                                 %%%
\righthyphenmin=2                                                    %%%
\lefthyphenmin=2                                                     %%%
\sloppy                                                              %%%
%\newcommand{\displaystyle}{\ds}                                     %%%
\newcommand{\vp}{\vphantom{{\dfrac{\mathstrut}{\mathstrut}}^2}}      %%%
\newlength{\taskskip}                                                %%%
\setlength{\taskskip}{0.5cm}                                         %%%
\newcommand{\vtskip}{\vspace{\taskskip}}                             %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%    Changing standard Bibliography heading added by Semoushin:    %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%***��������***%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%\renewcommand{\bibname}{����������������� ������} - This command%%%
%%%                                          must be put in ANY PLACE%%%
%%%AFTER the \begin{document} command.!!!In your own .sty package, it%%%
%%%                                                    does not work!%%%
%%% �� �� ����� ��������� � �������� ����� ������ � ����� ������:    %%%
%%% \renewcommand{\refname}{������ �������������� ����������}        %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\@biblabel}[1]{#1.\hfill} %%%������ � ������ ����������%%%
%%%                                                ��� [] � � ������.%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%   �aption redefininition for "figure" and "table" environments   %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newsavebox{\tempbox}                                                %%%
\renewcommand{\@makecaption}[2]{\vspace{10pt}%%%                     %%%
\sbox{\tempbox}{#1. #2}%%%                                           %%%
\ifthenelse{\lengthtest{\wd\tempbox > \linewidth}}%%%                %%%
{\begin{center}\begin{tabular}{@{}p{0.95\linewidth}@{}}{#1.   %%%%%%%%%%
#2}\end{tabular}\par\end{center}}%<--If Caption is more than one line%%%
%%%{ #1. #2\par }%<--Caption is more than one line(a simpler version)%%%
{\begin{center}#1. #2\end{center}}%<--If Caption equals one line     %%%
}%%%                                                                 %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%