%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Proc. Summer School-style requires LaTeX 2e
% Style file for Proc. Summer School on Diff. Geometry
% (c) ebk, 12/98
%
% DO NOT MODIFY THIS FILE!
%
% Usage: see bottom

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% changes in the article style
%
% changes sectioning headers
% compare article.cls, latex.ltx
%
\def\@seccntformat#1{\csname the#1\endcsname.\ }
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\reset@font\normalsize\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus- .2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\reset@font\normalsize\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\reset@font\normalsize\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {3.25ex \@plus .2ex \@minus .2ex}%
                                    {-1em}%
                                    {\reset@font\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
                                       {3.25ex \@plus .2ex \@minus .2ex}%
                                       {-1em}%
                                       {\reset@font\normalsize\bfseries}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% changes list (itemize, ...) environment
%
\setlength\partopsep{0\p@ \@plus 0\p@ \@minus 0\p@}
\def\@listI{\setlength\leftmargin{\leftmargini}
            \setlength\parsep {\parskip}%
            \setlength\topsep {0\p@ \@plus 0\p@ \@minus 0\p@}%
            \setlength\itemsep{\smallskipamount}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% set offsets
\hoffset-1in
\voffset-1.23in

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% set skips to TeX defaults
\parskip0pt plus 1pt
\parindent20pt

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% set margins A4: 297mm x 209mm
\newdimen\footheight
\topmargin21mm
\headheight12pt
\headsep17pt
\topskip12pt
\footheight12pt
\footskip24pt
%
\oddsidemargin1in
\evensidemargin17.6mm
\textwidth166mm
%
\textheight216mm
\let\tmpshipout\shipout
\def\shipout{\global\let\shipout\tmpshipout%
\global\textheight226mm%
\tmpshipout}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% set fonts
\def\PDGfontsmall{\small\rm}
\def\PDGfontaddress{\small\it}
\def\PDGfonttitle{\LARGE\bf}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define counter
\newcounter{PDGcurrarticle}
\newcounter{PDGcurrstartpage}
\newcounter{PDGcurrstoppage}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define temporary stuff
%
\newcommand{\invisible}{\rule{0pt}{0pt}}
%
\newcommand{\footnotestar}[1]{%
\renewcommand{\thefootnote}{\fnsymbol{footnote}}%
\footnote{#1}%
\renewcommand{\thefootnote}{\arabic{footnote}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define pdg logo

\def\preparePDGlogo{\newbox\pdglogonumber
\newdimen\pdglogoheight \newdimen\overfullamount
\setbox\pdglogonumber=\vbox{%
  \PDGfontsmall\noindent Proc. Summer School on Diff. Geometry\\
  Dep. de Matem\'atica, Universidade de Coimbra\\
  September 1999,
  \pageref{PDGcurrstartpage\arabic{PDGcurrarticle}}-%
  \pageref{PDGcurrstoppage\arabic{PDGcurrarticle}}.}
\pdglogoheight=\ht\pdglogonumber
\overfullamount=\pdglogoheight \advance\overfullamount -12pt}

% the minipage width 100mm is sufficient
\newcommand{\PDGlogo}{\noindent%
\begin{minipage}{100mm}
\preparePDGlogo \box\pdglogonumber \par\vspace*{-\overfullamount}
\end{minipage}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define and set PDG pagestyle
\makeatletter
\def\ps@PDG{\let\@mkboth\@gobbletwo
  \def\@oddhead{\ifnum\value{page}=\value{PDGcurrstartpage}\PDGlogo\hfill
  \else \hfill{\PDGfontsmall\PDGcurrheader}\hfill\thepage\fi}
  \def\@oddfoot{\ifnum\value{page}=\value{PDGcurrstartpage}\hfill
  \else\hfill\fi}
  \def\@evenhead{\thepage\hfill{\PDGfontsmall\PDGcurrheader}\hfill}
  \let\@evenfoot\@empty
}
\makeatother
\pagestyle{PDG}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define address environment
\newcommand{\PDGaddress}[1]{\begin{center}\PDGfontaddress #1\end{center}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define PDGarticle environment
% arg
% 1. title
% 2. header (title abbreviation)
% 3. autorname(s)
% 4. authoraddress(es) (with \PDGaddress)
\newenvironment{PDGarticle}[4]%
{\stepcounter{PDGcurrarticle}
\def\PDGcurrtitle{#1}
\def\PDGcurrheader{#2}
\def\PDGcurrauthors{#3}
{\ifodd\value{page}
\else
  \thispagestyle{empty}\invisible\newpage
\fi}
\setcounter{PDGcurrstartpage}{\value{page}}
\label{PDGcurrstartpage\arabic{PDGcurrarticle}}
\vspace*{15mm}
\begin{center}
\PDGfonttitle\baselineskip23pt\PDGcurrtitle
\end{center}
\vspace*{5mm}
\centerline{\PDGcurrauthors}
#4
\vspace*{20mm}
\setcounter{section}{0}
\setcounter{footnote}{0}
\normalsize\rm
}%
{\invisible\vspace*{5mm}\\
\normalsize\rm
\label{PDGcurrstoppage\arabic{PDGcurrarticle}}
\setcounter{PDGcurrstoppage}{\value{page}}
\vfill\newpage
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PDGabstract environment
\newenvironment{PDGabstract}[1]%
{\noindent\hspace{8mm}
\begin{minipage}{148mm}
{\bf #1.}}%
{\end{minipage}
\vspace*{10mm}\par}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% print message
\message{PDG-style loaded (c) ebk 1998}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% USAGE                                                     %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \documentstyle[12pt,twoside,<other>]{article}
% % where <other> are author specific style files
% \usepackage{pdg2e}
% \begin{document}
% \begin{PDGarticle}
% {<title>}
% % the title of your article
% {<header>}
% % the header displayed at the top of each page (except the first).
% % This has to be of the form: <name(s) of author(s)>:<title>
% % where title may be abbreviated
% {name(s) of author(s)}
% {<address(es) of author(s)>}
% % this should be done by repeated use of the PDGaddress environment
% \begin{PDGabstract}{<abstractname>}
% % where <abstractname> is the word printed at the beginning of
% % the PDGabstract environment, e.g. Abstract, Zusammenfassung
% % or R\'{e}sum\'{e}e
% ...<abstract>
% \end{PDGabstract}
% ...<article>
% \end{PDGarticle}
% \end{document}
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% EXAMPLE                                                   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \documentclass[12pt,twoside]{article}
% \usepackage{pdg2e}
% \begin{document}
% \begin{PDGarticle}
% {Using \LaTeX 2e and the PDG-style}
% {Bernd Wegner: Using \LaTeX 2e and the PDG-style}
% {Bernd Wegner}
% {\PDGaddress{Technische Universit\"at Berlin, Fachbereich 3 Mathematik\\
% Stra\ss{}e des 17. Juni 136, D-10627 Berlin}}
% \begin{PDGabstract}{Abstract}
% This document is an example for using the PDG-style
% in an \LaTeX 2e-document.
% \end{PDGabstract}
% Begin of article.
%
% ...
%
% End of article.
% \end{PDGarticle}
% \end{document}


