\ProvidesPackage{rectopma}[2002/01/07]
%*************************************************
%*                                               *
%*               This  file  is                  * 
%*                                               *
%*                rectopma.sty                   *
%*                -------------                  *
%*                                               *
%*            RECycling  TOp   MAtter            *
%*                                               *
%*  Version :    January 5, 2002                 *
%*                                               *
%*  Author:     Battista Benciolini              *
%*                                               *
%*  Address:    Dip. Ing. Civile e Ambientale    *
%*              Via Mesiano, 77                  *
%*              I-38050  Trento                  *
%*                        ITALY                  *
%*                                               *
%*  e-mail:   Battista.Benciolini@ing.unitn.it   *
%*                                               *
%*************************************************
%
%
% PURPOSE
% =======
% 
% This package allows the re-use of the main content 
% of \title and \author anywhere in the document.  
%
% IMPORTANT NOTES
% ===============
%
% 1 - This file is part of a program (in the meaning specified 
%      by the LPPL) that includes two files posted in the same 
%      folder: 
%            - rectopma.sty  (= this file)
%            - TestTitle.tex (= sample and suggestions)
% 2 - This program may be used, distributed and/or modified under 
%     the conditions of the LaTeX Project Public License.
%     The latest version of this license is in:
%     http://www.latex-project.org/lppl.txt
%
% HISTORY
% =======
% 
%  (The mechanism implemented here have been originally 
%  encoded in others packages)
%
%  January 2002 : first version 
%
% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%
%
% The new if \ifintitle is used to govern the different format of 
% author and title when used in the top matter and when used 
% anywhere else. 
% (At present it is used only for intitlebreak and intitlebreakvs)
\newif\ifintitle \intitlefalse
%
% The commands \intitlebreak and \intitlebreakvs (vs= vertical skip) 
% are used to force a line break in the title that disappears when 
% the title itself is re-used outside the top matter of the paper.
\newcommand{\intitlebreak}{\ifintitle \\ \else\relax\fi}
\newcommand{\intitlebreakvs}{\ifintitle \vskip 1mm \else\relax\fi}
%
% The redefinition of \@maketitle includes 
% the ON-OFF settings of \ifintitle 
\let\OLD@maketitle\@maketitle
\def\@maketitle{\intitletrue\OLD@maketitle\intitlefalse}
%
% The redefinition of maketitle  rebuilds  
% \and    to be a generic separator 
% \thanks  to do nothing (but it must have an argument)
\global\let\OLDmaketitle\maketitle
\gdef\maketitle{\OLDmaketitle
\gdef\and{\unskip,\ } 
\gdef\thanks##1{\relax}} 
%
% the new command  \SaveTopMatter saves the contents of \@title and 
% \@author in \SavedTitle and \SavedAuthor respectively, so that they 
% can be re-used anywhere in the document.
\newcommand{\SaveTopMatter}{
\global\let\SavedTitle\@title
\global\let\SavedAuthor\@author}
%
%
%  end  end  end
