%
% LaTeX style for Publ. Astron. Obs. Belgrade, (version 1.2).
% Written by Predrag Jovanovic, 2002.
%
%   FONTS
%  *******
\font \usualfont=cmr10
\font \titlefont=cmbx10
\font \smallfont=cmr9
\font \smallbold=cmbx9
\font \subsecfont=cmr8
\font \smallitalic=cmti9
\font \runningfont=cmr6

%   TITLE
%  *******
\def \title#1{{\topskip 3.5cm \baselineskip 6.5mm  \leftskip =0pt plus 10cm
     \rightskip =0pt plus 10cm \parfillskip =0pt
     {\uppercase{\titlefont #1}}    \vskip 6mm plus 2mm}}
 
%   AUTHORS
%  *********
\def \authors#1{{\uppercase{\smallfont \centerline{#1}}\vskip 1mm}}
 
%   ADDRESS
%  *********
\def \address#1{{\baselineskip=3.5mm \leftskip =0pt plus 10cm
     \rightskip =0pt plus 10cm \parfillskip =0pt
     {\smallitalic #1}
     \vskip 4mm}}
 
%   EMAIL
%  *******
\def \Email#1#2#3{\vskip -4.5mm
     \centerline{\smallitalic E--mail #1@#2.#3}
     \vskip 4mm}
 
%   DATES
%  *******
\def \dates#1#2#3{{\centerline{\smallfont (Received :#1;
     \def \revised{#2}
     \ifx \revised \empty \else revised :#2; \fi
     accepted :#3)}
     \vskip 4mm}}
 
%   ABSTRACT
%  **********
\long\def \abstract#1{{\baselineskip=3.5mm
     {\smallbold \noindent Abstract.\ \ }\smallfont #1
     \vskip 4mm}}
 
%   KEYWORDS
%  **********
\def \keywords#1{{\noindent \smallbold Keywords:}{\smallfont #1}}

%   REFERENCES
%  ************
% References have to be preceded by \references and concluded
% by \endreferences; titles of the articles have to be quoted,
% titles of journals and books are in italic (use \journal),
% and volume numbers are bold (use \vol).
 
\def \references{\vskip 0mm plus .05\vsize \penalty -250
     \vskip 0mm plus -.05\vsize
     {\vskip 6.5mm plus 1mm minus 1mm
     \centerline{\titlefont References}
     \nobreak \vskip 3mm \nobreak}
     \leftskip=4mm \parindent=-4mm \baselineskip = 3.5mm \smallfont}
 
\def \vol#1{{\smallbold #1}}
 
\def \journal#1{{\smallitalic #1}}
 
\def \endreferences{\par \leftskip=0mm \parindent=4mm \parskip=0mm
     \baselineskip =4.5mm \usualfont}

%   SECTION
%  *********
% The sections are numbered automatically 1.,2.,3.,etc.
% The section number is given by the counter \seccount.
\newcount \seccount      %\seccount is the counter for the sections
\seccount=0
\newcount \subseccount   %\subseccount is the counter for the subsections
 
\def \sectionc{\the \seccount.\ }      %\sectionc defines how the section
                                       %number is printed
 
\def \section#1\par{\advance \seccount by 1
                    \global \subseccount =0
     {\vskip 0mm plus .05\vsize \penalty -250 \vskip 0mm plus -.05\vsize
     \vskip 4.5mm plus 1mm minus 1mm
     \leftskip =0pt plus 10cm \rightskip =0pt plus 10cm \parfillskip =0pt
     {\titlefont \sectionc #1}
     \vskip 0mm}
     \futurelet \nexttoken \lookforsubsec}
 
\def \lookforsubsec{\ifx \nexttoken \subsection \vskip -3.3mm \fi
     \nobreak \vskip 3mm \nobreak \noindent}
 
%   SUBSECTION
%  ************
% The subsections are numbered automatically n.1, n.2, etc. (where n is the
% section number). The subsection number is given by the counter \subseccount.
 
\def \subsectionc{\the \seccount. \the \subseccount. \hskip 2mm}
                                                %\subsectionc defines how the
                                                %subsection number is printed
 
\def \subsection#1\par{\advance \subseccount by 1
     \vskip 0mm plus .02\vsize \penalty -150 \vskip 0mm plus -.02\vsize
     \vskip 3.3mm plus 1mm minus 1mm
     \noindent
     {\uppercase{\subsecfont \subsectionc #1}}
     \nobreak \vskip 1.5mm \nobreak \noindent}

%   RUNNING TITLES
%  ****************
\newcounter{publno}
\newcounter{publyear}
\newcounter{firstpage}
\newcounter{lastpage}
\def \publ{\bf Publ. Astron. Obs. Belgrade No.\ \thepublno\ ({\thepublyear}), \thefirstpage\ - \thelastpage\hfil\it\papertype} 
\def \@evenfoot{\hfil\thepage\hfil}
\def \@oddfoot{\hfil\thepage\hfil}
%\setlength{\headheight}{1.5\baselineskip} 
\setlength{\headsep}{3em} 
\def \@evenhead{\begin{minipage}{\textwidth}\hfil\slshape\rightmark\hfil\vspace{-7pt} \rule{\textwidth}{0.6pt}\end{minipage}}
\def \@oddhead{\begin{minipage}{\textwidth}\ifnum\thepage = \thefirstpage\slshape\publ%
               \else\hfil\slshape\leftmark\hfil\fi\vspace{-7pt} \rule{\textwidth}{0.6pt}\end{minipage}}

%   PAGE FORMAT
%  *************
\setlength{\textheight}{20cm} 
\setlength{\textwidth}{13cm} 
\setlength{\oddsidemargin}{1.4cm} 
\setlength{\evensidemargin}{1.4cm} 

