diff options
Diffstat (limited to 'macros/latex/contrib/rectopma')
-rw-r--r-- | macros/latex/contrib/rectopma/README.txt | 29 | ||||
-rw-r--r-- | macros/latex/contrib/rectopma/TestTitle.pdf | bin | 114178 -> 101830 bytes | |||
-rw-r--r-- | macros/latex/contrib/rectopma/TestTitle.tex | 56 | ||||
-rw-r--r-- | macros/latex/contrib/rectopma/rectopma.dtx | 219 | ||||
-rw-r--r-- | macros/latex/contrib/rectopma/rectopma.pdf | bin | 0 -> 141599 bytes | |||
-rw-r--r-- | macros/latex/contrib/rectopma/rectopma.sty | 88 |
6 files changed, 248 insertions, 144 deletions
diff --git a/macros/latex/contrib/rectopma/README.txt b/macros/latex/contrib/rectopma/README.txt new file mode 100644 index 0000000000..7fe99006d6 --- /dev/null +++ b/macros/latex/contrib/rectopma/README.txt @@ -0,0 +1,29 @@ + + +This file is README.txt for the rectopma package. +Current version : [2024/04/04] +Author: Battista Benciolini <benciolinibattista at gmail dot com> + + +The distribution includes: + + README.txt this file + rectopma.dtx a self extracting and self documenting file + rectopma.sty the package + rectopma.pdf the complete and formatted documentation + TestTitle.tex a minimal example of the usage of the package (source) + TestTitle.pdf a minimal example of the usage of the package (formatted) + + +pdflatex rectopma.dtx creates rectopma.pdf, rectopma.sty and TestTitle.tex +pdflatex TestTitle creates TestTitle.pdf + +tested with TeX-live 2024 + +This program may be used, distributed and modified under +the conditions of the LaTeX Project Public License +see:http://www.latex-project.org/lppl.txt + + +===================== END of README file ====================== + diff --git a/macros/latex/contrib/rectopma/TestTitle.pdf b/macros/latex/contrib/rectopma/TestTitle.pdf Binary files differindex 55cd5861cd..ba73f8c96b 100644 --- a/macros/latex/contrib/rectopma/TestTitle.pdf +++ b/macros/latex/contrib/rectopma/TestTitle.pdf diff --git a/macros/latex/contrib/rectopma/TestTitle.tex b/macros/latex/contrib/rectopma/TestTitle.tex deleted file mode 100644 index 9ec54d5bf8..0000000000 --- a/macros/latex/contrib/rectopma/TestTitle.tex +++ /dev/null @@ -1,56 +0,0 @@ -% 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.dtx b/macros/latex/contrib/rectopma/rectopma.dtx new file mode 100644 index 0000000000..aadfbe1da6 --- /dev/null +++ b/macros/latex/contrib/rectopma/rectopma.dtx @@ -0,0 +1,219 @@ +%\iffalse +% file: rectopma.dtx +% author: Battista Benciolini +% contact: benciolinibattista at gmail dot com +% date: 2024-04-04 +%\fi +%\iffalse +%<*ins> +\begingroup +\input docstrip.tex +\keepsilent +\preamble +---------------------------------------------------------------- +This file is part of the distribution of rectopma [2024-04-04] +The author of rectopma is Battista Benciolini +<benciolinibattista at gmail dot com > +---------------------------------------------------------------- +This program may be used, distributed and modified under +the conditions of the LaTeX Project Public License. +(see: http://www.latex-project.org/lppl.txt) +---------------------------------------------------------------- +\endpreamble +\askforoverwritefalse +\generate{\file{rectopma.sty}{\from{rectopma.dtx}{package}}} +\generate{\file{TestTitle.tex}{\from{rectopma.dtx}{example}}} +\endgroup +%</ins> +%\fi +%\iffalse +%<*driver> +\documentclass[a4paper,10pt]{ltxdoc} +\title{The \texttt{rectopma} package: +\\ recicle top matter, i.e. +\\ reuse the title and author(s)} +\author{Battista Benciolini +\thanks{e-mail: benciolinibattista at gmail dot com}} +\begin{document} +\maketitle +\DocInput{rectopma.dtx} +\end{document} +%</driver> +%\fi +% +%\section{Introduction} +% The package |rectopma| makes it possible to reuse the main +% content of |\title| and |\author| in different parts of a +% document. It is also possible to force linebreaks in the title with +% a command that has no effect +% when the title is re-printed. +% The file |TestTitle.tex| is an example of the use +% of the functions made available by the package. +% +% +%\iffalse +%<*example> +%\fi +%\section{Suggestions for the use and an example} +% +% I first present the suggestions for the use of |rectopma.sty| +% and the example that will be available in |TestTitle.tex| +% The example must obviously start loading the class (I use article) +% and the package rectopma +% \begin{macrocode} +\documentclass{article} +\usepackage{rectopma} +% \end{macrocode} +% +% In the preamble I define the title and the authors. +% The authors must be separated by |\and|. Title and authors +% can have a note using |\thanks|, and the note will disappear when +% the title and the author will be reused. +% When a long title is present it is +% \DescribeMacro{\intitlebreak} +% \DescribeMacro{\intitlebreakvs} +% perhaps useful to force linebreaks in some special position. +% The new commands |\intitlebreak| and |\intitlebreakvs| +% (vs= vertical skip) are used for this purpose, and their effect +% will disappears when the title itself is re-used in the document. +% \begin{macrocode} +\title{Test of the package \texttt{rectopma} +\intitlebreak and suggestions for its use +\intitlebreakvs (I need a long title)% +\thanks{Comments are welcome !}} +\author{Battista Benciolini% +\thanks{e-mail: benciolinibattista at gmail dot com}% +\and No Second Author\thanks{No-Where Institute}}% +% \end{macrocode} +% +%\par +% The main part of the document starts as usual. +% The command \DescribeMacro{\SaveTopMatter} |\SaveTopMatter| +% must be used before |maketitle| to save the title and the author(s). +% +% \begin{macrocode} +\begin{document} +\SaveTopMatter +\maketitle +% \end{macrocode} +% +% The title and the authors can be reprinted with the commands +% \DescribeMacro{\SavedTitle} \DescribeMacro{\SavedAuthor} +%|\SavedTitle| and |\SavedAuthor|. When they are +% reprinted the names of the various authors are simply separated +% by commas and the content of |\thanks| is ignored. +% +% \begin{macrocode} +The authors 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. +% \end{macrocode} +% +% And this is the end of the example. +% \begin{macrocode} +\end{document} +% \end{macrocode} +% +%\iffalse +%</example> +%<*package> +%\fi +%\section{Code of the package} +% +% \begin{macrocode} +\ProvidesPackage{rectopma}[2024/04/04] +% \end{macrocode}% +% +% \begin{macro}{\declarecommand} +% I need |\declarecommand| ! +% The definition is due to egreg in +% a comment to question 128797 in |tex.stackexchange.com|. +% \begin{macrocode} +\newcommand\declarecommand[1]{\providecommand{#1}{}\renewcommand{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\intitlebreak} +% The command |\intitlebreak| is used to force a line break in the title. +% \begin{macrocode} +\newcommand{\intitlebreak}{\\} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\intitlebreakvs} +% The comman |\intitlebreakvs| (vs= vertical skip) +% produces a line break and a vertical skip. +% \begin{macrocode} +\newcommand{\intitlebreakvs}{\\ \vskip 4mm } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@outsidetitle} +% The commands |\intitlebreak|, |\intitlebreakvs|, +% |\and| and |\thanks| need a redefinition for the +% correct output of title and authors in a generic +% position in the document. +% The redefinition is operated by the command |\@outsidetitle|. +% (I follow the old tradition of inserting a |@| in the +% commands that are of internal use, not available to the user.) +% \begin{macrocode} +\newcommand{\@outsidetitle}{% +\renewcommand{\intitlebreak}{\relax}% +\renewcommand{\intitlebreakvs}{\relax}% +\declarecommand{\thanks}[1]{\relax}% +\declarecommand{\and}{\unskip,\ }}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\SaveTopMatter} +% 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. +% \begin{macrocode} +\newcommand{\SaveTopMatter}{% +\global\let\@SavedTitle\@title% +\global\let\@SavedAuthor\@author} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\SavedTitle} +% The command |\SavedTitle| +% actually prints the title. +% \begin{macrocode} +\newcommand{\SavedTitle}{\@outsidetitle\@SavedTitle} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\SavedAuthor} +% The command |\SavedAuthor| +% actually prints the authors. +% \begin{macrocode} +\newcommand{\SavedAuthor}{\@outsidetitle\@SavedAuthor} +% \end{macrocode} +% \end{macro} +% +% The package is now complete. +% +%\iffalse +%</package> +%\fi +%\section{History} +%\begin{description} +%\item[2002] first release in CTAN, +%\item[2024] second release in CTAN, +% complete re-coding of |rectopma.sty|, +% some changes in |TestTitle.sty|, +% new documentation, +% all stuff collected in |rectopma.dtx|. +%\end{description} +%\section{Recommendation} +% I recommend all the users of |rectopma|, and all the +% persons that by chance encounter it, +% to send me any comment about it. +% \vfill\centerline{\Large ***}\vfill +% +%\iffalse +% END OF FILE rectopma.dtx +%\fi diff --git a/macros/latex/contrib/rectopma/rectopma.pdf b/macros/latex/contrib/rectopma/rectopma.pdf Binary files differnew file mode 100644 index 0000000000..b1a89c3382 --- /dev/null +++ b/macros/latex/contrib/rectopma/rectopma.pdf diff --git a/macros/latex/contrib/rectopma/rectopma.sty b/macros/latex/contrib/rectopma/rectopma.sty deleted file mode 100644 index ec5fd8593a..0000000000 --- a/macros/latex/contrib/rectopma/rectopma.sty +++ /dev/null @@ -1,88 +0,0 @@ -\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 |