summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/rectopma
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/rectopma')
-rw-r--r--macros/latex/contrib/rectopma/TestTitle.pdfbin0 -> 114178 bytes
-rw-r--r--macros/latex/contrib/rectopma/TestTitle.tex56
-rw-r--r--macros/latex/contrib/rectopma/rectopma.sty88
3 files changed, 144 insertions, 0 deletions
diff --git a/macros/latex/contrib/rectopma/TestTitle.pdf b/macros/latex/contrib/rectopma/TestTitle.pdf
new file mode 100644
index 0000000000..55cd5861cd
--- /dev/null
+++ b/macros/latex/contrib/rectopma/TestTitle.pdf
Binary files differ
diff --git a/macros/latex/contrib/rectopma/TestTitle.tex b/macros/latex/contrib/rectopma/TestTitle.tex
new file mode 100644
index 0000000000..9ec54d5bf8
--- /dev/null
+++ b/macros/latex/contrib/rectopma/TestTitle.tex
@@ -0,0 +1,56 @@
+% THIS IS BOTH A MINIMAL USER-MANUAL
+% OF THE PACKAGE rectopma.sty
+% AND AN EXAMPLE OF ITS USE
+%
+% File : TestTitle.tex
+% Author: Battista Benciolini
+% E-mail: <Battista.Benciolini@ing.unitn.it>
+% Date : January 2002
+% See file rectopma.sty for more information
+%
+\documentclass[a4paper,10pt]{article}
+\usepackage{rectopma}
+%
+\date{ }
+\title{Test of the package \texttt{rectopma} \intitlebreak and
+suggestions for its use \intitlebreakvs (I need a long title)\thanks{
+Comments are welcome !}}
+\author{B.Benciolini\thanks{e-mail: battista.benciolini@ing.uitn.it}
+\and No Second Author\thanks{No-Where Institute}}
+%
+\SaveTopMatter
+%
+\begin{document}
+\maketitle
+%
+\section{Introduction}
+The package \verb+rectopma+ makes it possible to reuse the main
+content of \verb+\title+ and \verb+\author+ in different parts of a
+document.
+It is also possible to force linebreaks in the title with a command
+that is only active inside the top-matter, not when the title is
+re-printed elsewhere.
+%
+\section{Instruction}
+The new commands \verb+\intitlebreak+ and \verb+\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.
+The content of \verb+\title+ and \verb+\author+ must be saved with the
+command \verb+\SaveTopMatter+ before the action of \verb+\maketitle+
+and can be reprinted with the new commands \verb+\SavedAuthor+
+and \verb+\SavedTitle+. When they are reprinted the names of the
+various authors are simply separated by commas and the content of
+\verb+\thanks+ is ignored.
+%
+\section{Examples}
+The authors of this paper are listed here after: \SavedAuthor. This
+is obtained with \verb+\SavedAuthor+. It is also possible to reprint
+the title, by means of \verb+\SavedTitle+, and the result is:
+\SavedTitle. The title can be printed with a different style, as in:
+\textbf{\SavedTitle}, obtained with \verb+\textbf{\SavedTitle}+.
+%
+\end{document}
+\endinput
+%
+% End of file TestPaper.tex
diff --git a/macros/latex/contrib/rectopma/rectopma.sty b/macros/latex/contrib/rectopma/rectopma.sty
new file mode 100644
index 0000000000..ec5fd8593a
--- /dev/null
+++ b/macros/latex/contrib/rectopma/rectopma.sty
@@ -0,0 +1,88 @@
+\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