%
%  PQFT.STY  BEGINNING
%



\def\citen#1{%
\edef\@tempa{\@ignspaftercomma,#1, \@end, }% ignore spaces in parameter list
\edef\@tempa{\expandafter\@ignendcommas\@tempa\@end}%
\if@filesw \immediate \write \@auxout {\string \citation
{\@tempa}}\fi
\@tempcntb\m@ne \let\@h@ld\relax \def\@citea{}%
\@for \@citeb:=\@tempa\do {\@cmpresscites}%
\@h@ld}
%
% for ignoring spaces in the input:
\def\@ignspaftercomma#1, {\ifx\@end#1\@empty\else
   #1,\expandafter\@ignspaftercomma\fi}
\def\@ignendcommas,#1,\@end{#1}
%
% For each citation, check if it is defined, if it is a number, and
% if it is a consecutive number that can be represented like 3-7.
%
\def\@cmpresscites{%
 \expandafter\let \expandafter\@B@citeB \csname b@\@citeb \endcsname
 \ifx\@B@citeB\relax % undefined
    \@h@ld\@citea\@tempcntb\m@ne{\bf ?}%
    \@warning {Citation `\@citeb ' on page \thepage \space undefined}%
 \else%  defined
    \@tempcnta\@tempcntb \advance\@tempcnta\@ne
    \setbox\z@\hbox\bgroup % check if citation is a number:
    \ifnum0<0\@B@citeB \relax
       \egroup \@tempcntb\@B@citeB \relax
       \else \egroup \@tempcntb\m@ne \fi
    \ifnum\@tempcnta=\@tempcntb % Number follows previous--hold on to it
       \ifx\@h@ld\relax % first pair of successives
          \edef \@h@ld{\@citea\@B@citeB }%
       \else % compressible list of successives
%         % use \hbox to avoid easy \exhyphenpenalty breaks
          \edef\@h@ld{\hbox{--}\penalty\@highpenalty
            \@B@citeB }%
       \fi
    \else   %  non-successor--dump what's held and do this one
       \@h@ld\@citea\@B@citeB
       \let\@h@ld\relax
 \fi\fi%
%%    To put space after the comma, use:
 \def\@citea{,\penalty\@highpenalty\hskip.13em plus.1em minus.1em}%
%%    For no space after comma, use:
%% \def\@citea{,\penalty\@highpenalty}%
%%
}
%
%  Replacement for \@citex:
%
\def\@citex[#1]#2{\@cite{\citen{#2}}{#1}}%
%
%  Replacement for \@cite.  Give one normal space before the citation.
%
\def\@cite#1#2{\leavevmode\unskip
  \ifnum\lastpenalty=\z@\penalty\@highpenalty\fi% highpenalty before
  \ [{\multiply\@highpenalty 3 #1%             % triple-highpenalties within
      \if@tempswa,\penalty\@highpenalty\ #2\fi % and before note.
    }]\spacefactor\@m}
%
\let\nocitecount\relax  % in case \nocitecount was used for drftcite
%






\makeatletter
% Specify the page layout
\voffset 15mm
\hoffset 10mm
\topmargin -50pt
\textwidth 140mm
\textheight 195mm
\oddsidemargin 0mm
\evensidemargin 0mm


% Talk title
\newlength{\TitleWidth}
\setlength{\TitleWidth}{0.95\textwidth}
\newsavebox{\@TitleBox}  % \TitleBox a'��?a`�?a^ � �? �?? ��^(a)� �
\renewcommand{\title}[1]{\savebox{\@TitleBox}[\textwidth][l]{\parbox{\TitleWidth}{\begin{flushleft}\LARGE{\sffamily#1}\end{flushleft}}}}

% Authors
\newlength{\AuthorWidth}
\setlength{\AuthorWidth}{0.8\textwidth}
\newsavebox{\@AuthorBox}
\renewcommand{\author}[1]%
       {\savebox{\@AuthorBox}[\textwidth][l]%
              {\parbox{\AuthorWidth}%
                     {\begin{flushleft}\large #1\end{flushleft}%s
                     }
              }
       }

% Institution
\newlength{\InstWidth}
\setlength{\InstWidth}{0.9\textwidth}
\newsavebox{\@InstBox}

\newif\ifinstitution
\institutionfalse
\newif\ifnotfirstline
\notfirstlinefalse

\newcounter{@InstCount}
\newcommand{\inst}[1]{\ifinstitution \ifnotfirstline\protect\par\else\notfirstlinetrue\fi\fi$^{\kern2pt #1}$}
\newcommand{\institutes}[1]{\savebox{\@InstBox}[\textwidth][c]{\institutiontrue\notfirstlinefalse\parbox{\InstWidth}{\begin{flushleft} #1\end{flushleft}} }}

% Abstract
\newlength{\AbstractWidth}
\setlength{\AbstractWidth}{0.8\textwidth}
\renewcommand{\abstract}[1]{\begin{center}\parbox{\AbstractWidth}{\footnotesize{\sffamily Abstract} --- #1}\end{center}}

% Header

\newcounter{Tpagenumber}


\renewcommand{\maketitle}{
\vspace*{-15mm}
\begin{center}
\usebox{\@TitleBox}\\[-4mm]   %
\usebox{\@AuthorBox}\\[-6mm]
\usebox{\@InstBox}
\end{center}\vspace*{-9mm}
%\thispagestyle{headings}
\setcounter{Tpagenumber}{\thepage}
}

\renewcommand{\section}{
\secdef\secA\secB
%       \@startsection{section}%
%       {1}%
%       {0mm}%
%       {1.2\baselineskip}%
%       {0.3\baselineskip}%
%       {\large\sffamily}
}
\newcommand{\secA}[2][default]{\addtocounter{section}{1}
\medskip\par\noindent{\large\sffamily\thesection\kern3mm #2}\par\vspace{2mm}
}
\newcommand{\secB}[1]{\noindent\medskip\par{\large\sffamily #1}\par\vspace{2mm}
}


\renewcommand{\subsection}{
    \secdef\subsecA\subsecB  }
\newcommand{\subsecA}[2][default]{\addtocounter{subsection}{1}
\medskip\par\noindent\hspace*{3mm}{\sffamily\thesubsection\kern3mm #2}\par
}
\newcommand{\subsecB}[1]{\noindent\hspace*{3mm}\medskip\par{\sffamily #1}\par
}

\renewcommand{\subsubsection}{
    \secdef\subsubsecA\subsubsecB}
\newcommand{\subsubsecA}[2][default]{\addtocounter{subsubsection}{1}
\medskip\par\noindent\hspace*{6mm}{\sffamily\thesubsubsection\kern3mm #2}\par
}
\newcommand{\subsubsecB}[1]{\noindent\hspace*{6mm}\medskip\par{\sffamily #1}\par
}


\renewcommand{\paragraph}{
       \@startsection{paragraph}%
       {4}%
       {6mm}%
       {-\baselineskip}%
       {-0.5\baselineskip}%
       {\normalsize\itshape}
}
\renewcommand{\subparagraph}{
       \@startsection{subparagraph}%
       {5}%
       {0mm}%
       {0\baselineskip}%
       {-0.5\baselineskip}%
       {\normalsize\itshape\underline}
}



\newsavebox{\@TitleRunning}
\newcommand{\titlerunning}[1]{\savebox{\@TitleRunning}{\footnotesize\textsl{#1}}}
\newsavebox{\@AuthorRunning}
\newcommand{\authorrunning}[1]{\savebox{\@AuthorRunning}{\footnotesize\textsl{#1}}}

\newsavebox{\@ConfTitle}
%\savebox{\@ConfTitle}{\parbox[t]{0.9\textwidth}{\slshape\scriptsize Proceedings of XII International Conference on Selected Problems of Modern Physics\\
%Dubna, June 8 -- 11, 2003}}
%\savebox{\@ConfTitle}{\parbox[t]{0.9\textwidth}{\slshape\footnotesize Selected Problems of Modern Physics}}
\savebox{\@ConfTitle}{\parbox[t]{\textwidth}{\scriptsize\itshape Proceedings of XII International
Conference on Selected Problems of Modern Physics,\\
Section I, Dubna, June 8--11, 2003.}}

\pagestyle{myheadings}
\renewcommand{\@oddhead}{\ifnum\theTpagenumber=\thepage\usebox{\@ConfTitle}\hfill\thepage%
\else{\ifodd\thepage\hfill \usebox{\@TitleRunning}\hspace{5mm}{\small\thepage}%
\else {\small\thepage}\hspace{5mm} {\small\usebox{\@AuthorRunning}}\hfill\fi}\fi}

\renewcommand{\@evenhead}{ {\small\thepage}\hspace{5mm}{\small \usebox{\@AuthorRunning}}\hfill}

%
% PQFT.STY    ENDFILE
%
