%% ETATOIM  DOCUMENT CLASS -- Released November 28, 1995
%%    for LaTeX version 2e
%%    J�ri Lippus, Eesti TA K�berneetika Instituut
%% Copyright (C) Eesti TA Kirjastus  
%%
%% This is a class file for use instead of the article class to produce
%% camera-ready papers for the Proceedings of the Estonian Academy of
%% Sciences, Phys.-Math. series


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     1. Sissejuhatus
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Alustuseks teatame. et tegemist on etatoim stiiliga,
% see peaks t�hendama Eesti Ta Toimetiste artikli
% stiili. Et saada artikli l�plikku kujundust, tuleb
% m�ned n�ansid viia koosk�lla ka artikli tekstis.
\NeedsTeXFormat{LaTeX2e}
% Seej�rel anname v�imaluse tr�kkida laia reavahega dblsp 12:46 31.01.1996 
\newif\if@dblsp

\ProvidesClass{etatoim}[1995/11/28 Eesti TA Toimetised]
\DeclareOption{draft}{\PassOptionsToClass{draft}{article}}
\DeclareOption{times}{%
%\input{[OT1,T1]fontenc} %
%\input{times.sty}
}
\DeclareOption{dblsp}{\@dblsptrue}
\ProcessOptions
\LoadClass[11pt,twoside,a4paper]{article}
%
%                                                        
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     2. �ldine kujundus
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{Cyrillic fonts.}
%
% Kirillitsa sellisel kujul defineerida on ajutine lahendus.
% Edaspidi tuleks need definitsioonid anda korrektsemalt.
\input cyracc.def
\font\twlcyr=wncyr10 at 11pt 
\font\twlcyb=wncyb10 at 11pt
\font\twlcyi=wncyi10 at 11pt
\font\nincyr=wncyr9 
\font\nincyb=wncyb9 
\font\nincyi=wncyi9 
%
% TA Toimetised tahavad, et artiklid oleksid kirjas 11/13 punkti
% ja v�ikese kirjaga osad 9/11 punkti. %AmS-TeX-i kasutamisel oleme
% neid suurusi sobitanud 10/11 ja 1.2 korda suurendatud reaga.%
% Seet�ttu, et saada t�pselt �hesugust kujundust m�lemal juhul
% oleme ka siin m��tmeid natuke muutnud. V�ikeses
% kirjas on ainult l�hikesed l�igud ja seet�ttu loodame, et  toimetajad
% ei pane seda t�hele. Vastavalt oleme v�hendanud ka valemite peale
% ja alla j��vat vaba ruumi.

\renewcommand\normalsize{%
   \if@dblsp%
     \@setfontsize\normalsize\@xipt{22}%
   \else%
     \@setfontsize\normalsize\@xipt{13}%
   \fi%
   \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \def\cyr{\twlcyr\cyracc}%
   \def\cyb{\twlcyb\cyracc}%
   \def\cyi{\twlcyi\cyracc}%
   \let\@listi\@listI}
\normalsize
\renewcommand\small{%
   \if@dblsp%
     \@setfontsize\small{9.6}{18}%
   \else%
     \@setfontsize\small{9.6}{10.8}%
   \fi%
   \def\cyr{\nincyr\cyracc}%
   \def\cyb{\nincyb\cyracc}%
   \def\cyi{\nincyi\cyracc}%
   \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 9\p@ \@plus3\p@ \@minus5\p@
               \parsep 4.5\p@ \@plus2\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}
\renewcommand\footnotesize{%
   \if@dblsp%
     \@setfontsize\footnotesize{9.6}{18}%
   \else%
     \@setfontsize\footnotesize{9.6}{10.8}%
   \fi%
   \def\cyr{\nincyr\cyracc}%
   \def\cyb{\nincyb\cyracc}%
   \def\cyi{\nincyi\cyracc}%
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 6\p@ \@plus2\p@ \@minus2\p@
               \parsep 3\p@ \@plus2\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}

\renewcommand\large{\@setfontsize\large{14}{16.8}}

%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       3. Artikli p�is
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%       3.1 Markerid
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\toksdef\toks@@=2
\def\@toiminfo{}
\def\@presented{}
\def\@abstract{}
\def\@address{}
\def\@curraddr{}
\def\@email{}
\def\@date{}
\def\@keywords{}
\def\@subjclass{}
\def\mult@{\relax}
\newlength\par@ind
\setlength{\par@ind}{\parindent}
\def\hang@{\hangindent\par@ind}
\def\par@item{\par\hang@\textindent}
\def\textindent#1{\indent \llap{#1\enspace}\ignorespaces}
%
% \thanks tuleb defineerida teistmoodi kui standardses artikli
% klassis. Aadresside jaoks on oma konstruktsioon, seda juhts�na
% kasutatakse ainult t�nuavaldusteks. Need pannakse numbrita 
% joonealuseks m�rkuseks. 29/11/95
\def\thanks#1{{\let\@thefnmark\relax
\@footnotetext{#1}}}
%
% \toiminfo{info tekst} 
% Artikli alguses on TA Toimetistes alati lehek�lje �leval servas
% ajakirja nimi, aasta, k�ide, number ja lehek�ljed. Need andmed
% paneb toimetus sulgusde sisse. Automaatselt lisatakse
% inglise keeles, et tegemist on f��s.-mat. seeriaga. Kui seda
% lisamist ei soovita, tuleb \toiminfo j�rele kirjutada
% \nofrills. Minu arvates peaks info olema eesti keeles, eriti 
% arvestades, et n�iteks Math. Reviews ja Zentralblatt kasutavad 
% eestikeelset nimetust.
%       
\def\toiminfo#1{\gdef\@toiminfo{#1}}
%
% \multiauthor
% Seda markerit kasutatakse, kui artiklil on mitu autorit, kellel on
% erinevad aadressid. Tulemuseks on taane aadresside ja e-maili 
% aadresside ees. Taande sisse pannakse viitem�rgid.
% 
\def\multiauthor{\gdef\mult@{\par@item}}
%
% \address{}
% \curraddr{}
% \email{}
% Samuti standardne kasutus. Kui on artiklil mitu autorit ja on 
% kasutatud markerit \multiauthor, siis peab kohe markeri \address
% j�rel olema kas {\footnotemark[1]} v�i siis {\footnotemark[2]}. 
% Samuti tuleb neid kolme
% markerite paari kasutada niisuguses j�rjestuses, et �he autori
% aadressile j�rgneb tema k�esolev aadress, kui seda on tavalisest
% aadressist erinev ja siis e-maili aadress ning seej�rel tuleb
% info teise autori kohta. K�esoleva aadressi ja e-maili juurde
% viitem�rki ei panda. 
%
%\def\address#1{\gdef\@address{#1}}
%\def\curraddr#1{\gdef\@curraddr{#1}}
%\def\email#1{\gdef\@email{#1}}
\let\frills@\relax
\let\nofrillscheck\relax
\newcount\addresscount@
\addresscount@\z@
\def\address#1{\global\advance\addresscount@\@ne
  \expandafter\gdef\csname address\number\addresscount@\endcsname
  {\nobreak\noindent\small\rm\mult@#1\par}}
\def\curraddr{\let\savedef@\curraddr
  \def\curraddr##1{\let\curraddr\savedef@
  \toks@\expandafter\expandafter\expandafter{%
       \csname address\number\addresscount@\endcsname}%
  \toks@@{##1}%
  \expandafter\xdef\csname address\number\addresscount@\endcsname
  {\the\toks@\endgraf\noexpand\nobreak
    \noindent\mult@{}{\noexpand\rm
    \frills@{{\noexpand\rm Current address:}\space}%
    \def\noexpand\usualspace{\space}\the\toks@@\unskip}}}%
  \nofrillscheck\curraddr}
\def\email{\let\savedef@\email
  \def\email##1{\let\email\savedef@
  \toks@{\def\usualspace{{\rm\enspace}}\endgraf\noindent\mult@{}\small}%
  \toks@@{##1 \par}%
  \expandafter\xdef\csname email\number\addresscount@\endcsname
  {\the\toks@\frills@{{\noexpand\rm E-mail:}%
     \noexpand\enspace}\the\toks@@}}%
  \nofrillscheck\email}
%
% \presented{esitaja nimi}
% 
% Seda markerit kasutab toimetus, et m�rkida, kes on artikli
% avaldamiseks esitanud. Automaatselt lisatakse nimele ette
% 'Presented by'. 
%
\def\presented#1{\gdef\@presented{#1}}
%
% \date{reale kirjutatav tekst}
%
% Seda markerit kasutab ka toimetus, et panna artikli toimetusse
% saabumise ja avaldamiseks v�tmise kuup�evad. Mingit teksti
% automaatselt ei lisata.
%              
\def\date#1{\gdef\@date{#1}}
%
% \abstract{Abstract text} 
%
% Seda markerit tavalises artikli stiilis ei ole. Sulgude sisse
% tuleb kirjutada abstracti tekst. Seda tohib olla �ks l�ik.
% S�na 'Abstract' lisatakse ette automaatselt.
%	  	
\def\abstract#1{\gdef\@abstract{#1}}
%
% \keywords{v�tmes�nade tekst}
%
% Kasutus sama, mis standardsel juhul. Kasutatakse ainult teisi
% fonte. Automaatselt lisatakse ette 'Key words:' ja l�ppu punkt.
%
\def\keywords#1{\gdef\@keywords{#1}}
%
% \subjclass{klassifikatsiooni koodid}
%
% Seda markerit kasutatakse, kui on vaja n�idata ainekoode
% vastavalt AMS klassifikaatorile.
%
\def\subjclass#1{\gdef\@subjclass{#1}}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 	3.2 P�ise ehitamine
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Siit algab tegelik p�ise konstrueerimine. See peab olema j�rgmise
% kujuga:
%        
%  toimetuse info
%                                                3 kuni 5 cm vaba ruumi
%          Pealkiri 14 punktises poolpaksus kirjas
%                                                 12 punkti vahe
%                  Autori nimi 12 punktises kirjas 
%                                                 12 punkti vahe
%  Esimese autori aadress 
%  Esimese autori k�esolev aadress (kui vaja)
%  Esimese autori e-mail
%  Teise autori aadress
%  jne.               
%                                                 12 punkti vahe
%  Esitanud
%                                                 12 punkti vahe
%  Toimetusse saabumise kuup�ev
%                                                 12 punkti vahe
%  Abstract 9 punktises kirjas
%                                                  6 punkti vahe
%  V�tmes�nad
%                                                  6 punkti vahe
%  Klassifikatsioon
%                                                  24 punkti vahe
%  Artikli teksti algus                                                  
%                                                                             
\renewcommand\maketitle{\newpage
\begingroup
   \def\thefootnote{\alph{footnote}}%
{\small \noindent Proc. Estonian Acad. Sci. Phys. Math., \@toiminfo \par}
\vskip4truecmplus1truecmminus1truecm   
{\center\large \bf \@title \par}%
\vskip 14pt
{\center\@author \par}%
  \vskip 12pt
\ifx\addresscount@\z@\else
\count@\z@\loop\ifnum\count@<\addresscount@\advance\count@\@ne
\csname address\number\count@\endcsname
\csname email\number\count@\endcsname
\repeat \fi
%
\ifx\@presented\empty\else \vskip 12pt
{\small \noindent Presented by \@presented \par}\fi
\ifx\@date\empty\else \vskip 12pt
{\small \noindent \@date \par}\fi
\ifx\@abstract\empty\else \vskip 12pt
{\small \noindent {\bf Abstract.} \@abstract \par}\fi
\ifx\@keywords\empty\else \vskip 6pt
{\small \noindent {\bf Key words:} \@keywords .\par}\fi
\ifx\@subjclass\empty\else \vskip 6pt
{\small \noindent {\bf 1991 Mathematics Subject Classification:} 
   \@subjclass .\par}\fi
\endgroup
\setcounter{footnote}{0}%
 \let\maketitle\relax
}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       4. Teoreemid
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Teoreemidega on s�nad 'teoreem', 'lemma' jne poolpaksus kirjas.
% Erinevalt standardsest artikli stiilist on teoreemi t�hise
% j�rel punkt
%
\def\@begintheorem#1#2{\trivlist \item[\hskip \labelsep{\bf #1\ #2.}]\it}
\def\@opargbegintheorem#1#2#3{\trivlist
      \item[\hskip \labelsep{\bf #1\ #2\ (#3).}]\it}


%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       5. Viited
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Viited peavad olema numbrid nurksulgude sees. Erinevalt 
% standardsest artikli stiilist tahavad Toimetised, et numbrid
% oleksid v�iksemad ja indeksitena t�stetud.
%\def\@cite#1#2{[{\small\mdseries \hbox                    
% 	{$\m@th^{#1}$\if@tempswa , $\m@th^{#2}$\fi}}]}
%         
% T�iendus November 28, 1995 -- LaTeX2e jaoks, numbrid peavad olema
% indeksfondi suuruses ja v�iksemad v�ikese kirjaga tekstis
% T�iendus 16:17 12.12.1995 -- lisatud \mbox

\def\@cite#1#2{{\rm [\hbox{%  
	$\fontsize{\sf@size}{\f@baselineskip}\selectfont
	\m@th^{\mbox{#1}}$\if@tempswa , $\m@th^{\mbox{#2}}$\fi}]}}
%
% Lisaks �ks definitsioon viidete jaoks, kus peab olema sidekriips
% numbrite vahel, n�iteks [1-4]. Standardne LaTeX seda ei taha, sest
% selline t�histus ajab segi automaatse nummerdamise.
% \def\lcite#1{[{\small\mdseries \hbox{$\m@th^{#1}$}}]}
\def\lcite#1{{\rm [{\hbox{$\fontsize{\sf@size}{\f@baselineskip}%
	\selectfont\m@th^{\mbox{#1}}$}}]}}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       6. Alajaotused
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% P�him�tteliselt kasutame siin ka standardset definitsiooni.
% Muudetud on pealkirja ette ja alla j��v vaba ruum,
% vastavalt 24 punkti ja 12 punkti. �lemist ruumi saab natuke
% venitada ja kokku suruda vastavalt vajadusele. Esimese astme
% alapealkirjad tuleb kirjutada suurte t�htedega. Esimese ja teise
% astme alapealkirjad on poolpaksus, kolmanda astme alapealkirjad
% tavalises kirjas.
%                                   

\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {24pt plus 12pt minus 12pt}%
                                   {12pt}%
                           {\centering\reset@font\normalsize\bf}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {24pt plus 12pt minus 12pt}%
                                     {12pt}%
                            {\centering\reset@font\normalsize\bf}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {24pt plus 12pt \inus 12pt}%
                                     {12pt}%
                             {\centering\reset@font\normalsize\rm}}

\renewcommand\thesection{\arabic{section}.}
\renewcommand\thesubsection{\thesection\arabic{subsection}.}
\renewcommand\thesubsubsection{\thesection\arabic{subsubsection}.}

%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       7. Jooniste peal- ja allkirjad
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% �ldiselt standardne kuju. Muudetud on nii, et joonisele eraldatav ruum
% ei ole tekstist kitsam. Kasutatakse ka tavalisemaid fonte. Tabelite
% p�iseid siin ei k�sitle, sest tavaline LaTeX-i artikli klass ei erista
% piltide allkirju ja tabelite pealkirju.
%                   
\renewcommand\figurename{Fig.}
%\newlength\abovecaptionskip
%\newlength\belowcaptionskip
\setlength\abovecaptionskip{10\p@}
\setlength\belowcaptionskip{0\p@}
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\small #1. #2}%
  \ifdim \wd\@tempboxa >\hsize
    {\small #1. #2\par}
  \else
    \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
\long\def\topcaption[#1]#2{%
  \vskip\abovecaptionskip
  \hbox to \hsize{\small\it\hfil #1}
  \sbox\@tempboxa{\small\bf #2}%
  \ifdim \wd\@tempboxa >\hsize
    {\small\bf #2\par}
  \else
    \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       8. Joonealused m�rkused
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Siin on muudetud nii, et k�ik joonealused m�rkused on taandega.
% Taande sisse j��b m�rkuse number.
% 
%\newlength\par@ind
%\setlength{\par@ind}{14pt}
\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule width 1in
  \kern 2.6\p@}
\long\def\@makefntext#1{%
      \@setpar{\@@par
       \@tempdima = \hsize
     %  \advance\@tempdima-24pt
       \parshape 2 0pt \@tempdima \par@ind \@tempdima}%
       \par
   \noindent
   \hbox to \par@ind{\hss\@makefnmark\hss}#1}

%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       9. Kirjanduse loetelu
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Muudetud v�rreldes standardse kirjanduse loetelu kujundusega
% on viite teise ja j�rgnevate ridade taanet, see on kahekordne
% tavalise taande suurus.
%
\renewcommand\refname{REFERENCES}
\renewcommand\@biblabel[1]{#1.}
\renewcommand\bibindent{\parindent}

\renewenvironment{thebibliography}[1]
     {\section*{\refname
        \@mkboth{\uppercase{\refname}}{\uppercase{\refname}}}%
      \small\list{\@biblabel{\arabic{enumiv}}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
              \advance\leftmargin\bibindent
              \itemindent -\bibindent
              \listparindent \itemindent
            \itemsep \z@  
   	    \parsep \z@
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\arabic{enumiv}}}%
%        \newcommand\newblock{\par}
        \renewcommand\newblock{\par}
      \sloppy\clubpenalty4000\widowpenalty4000%
      \sfcode`\.=\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       10. Kogu lehek�lje paigutus
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% Jooksvaid p�iseid ei ole. Lehek�lje numbrit on lastud veidi
% allapoole v�rreldes standardkujundusega. Lehek�lje numbrid
% on paremal ja vasakul all nurgas vastavalt paaritutel ja paaris-
% lehek�lgedel.
%
\setlength{\footskip}{1.3cm}
\renewcommand{\@oddfoot}{\small \hfill \thepage}
\renewcommand{\@evenfoot}{\small \thepage \hfill}
%
% L�puks lehek�lje m��dud ja paigutus korralikult a4 lehek�lje
% keskele.
% 
\setlength{\oddsidemargin}{2cm}
\setlength{\evensidemargin}{1.5cm}
\setlength{\topmargin}{0cm}
\setlength{\textwidth}{12.5cm}
\setlength{\textheight}{21.7cm}

\endinput
