From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/bosisio/evenpage.dtx | 143 ++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 macros/latex/contrib/bosisio/evenpage.dtx (limited to 'macros/latex/contrib/bosisio/evenpage.dtx') diff --git a/macros/latex/contrib/bosisio/evenpage.dtx b/macros/latex/contrib/bosisio/evenpage.dtx new file mode 100644 index 0000000000..9beb363f3b --- /dev/null +++ b/macros/latex/contrib/bosisio/evenpage.dtx @@ -0,0 +1,143 @@ +%\iffalse % MetaComment +%% +%% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +%% | Copyright(C) 1997-2010 by F. Bosisio | +%% | | +%% | This program can be redistributed and/or modified under | +%% | the terms of the LaTeX Project Public License, either | +%% | version 1.3 of this license or (at your option) any later | +%% | version. The latest version of this license is in | +%% | http://www.latex-project.org/lppl.txt | +%% | and version 1.3 or later is part of all LaTeX distributions | +%% | version 2005/12/01 or later. | +%% | | +%% | This work has the LPPL maintenance status `maintained'. | +%% | The Current Maintainer of this work is F. Bosisio. | +%% | | +%% | This work consists of files evenpage.dtx and evenpage.html | +%% | and of the derived files evenpage.sty and evenpage.pdf. | +%% | | +%% | E-mail: fbosisio@bigfoot.com | +%% | CTAN location: macros/latex/contrib/bosisio/ | +%% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +%% +%% If you make any improvment, find any bug or have +%% any suggestion, please let me know about it. +%% +%<*package,driver> +%\fi +% +\def\FileName{evenpage} +%\iffalse % MetaComment +% +%<*package> +%\fi +\def\fileversion{1.0} +\def\filedate{1998/01/21} +\def\docdate{2005/04/09} +\def\filedescr{Ensures the number of pages to be even (FB)} +% +%\iffalse % MetaComment +% +%<*dtx> +%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% This section is the installation driver +% +\def\batchfile{\FileName.dtx} +% +\input docstrip +% +\keepsilent +% \askforoverwritefalse +% +\generateFile{\FileName.sty}{f}{\from{\FileName.dtx}{package}} +% +\generateFile{\FileName.drv}{f}{\from{\FileName.dtx}{driver}} +% +\Msg{******************************************************} +\Msg{*} +\Msg{* To produce the documentation run the} +\Msg{* file `\FileName.drv' through LaTeX.} +\Msg{*} +\Msg{******************************************************} +% +%\endbatchfile +% +% End of the installation driver +%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% +% +% This section is the documentation driver +% +%<+driver>\documentclass[12pt,a4paper]{ltxdoc} +%<+driver> \EnableCrossrefs +%<+driver> \CodelineIndex +%<+driver> \RecordChanges +%<+driver> %\OnlyDescription % Uncomment not to see the implementation +%<+driver>\begin{document} +%<+driver> \DocInput{\FileName.dtx} +%<+driver> \PrintIndex +%<+driver> \PrintChanges +%<+driver>\end{document} +% +% End of the documentation driver +%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +%<*package> +%\fi +% +% \changes{v0.1}{21 January 1998}{First release} +% \changes{v0.1}{9 April 2005}{Added copyright notice and changed addresses} +% +% \title{Package \texttt{\FileName}\thanks{This is version \fileversion, +% last revised \filedate; documentation date \docdate}} +% \author{F. Bosisio\\\normalsize E-mail: \texttt{fbosisio@bigfoot.com}} +% \date{\filedate} +% \maketitle +% +% \begin{abstract} +% Documentation for the package \texttt{\FileName}. +% \end{abstract} +% +% \section{Introduction} +% This package ensures that the number of pages generated by \LaTeX{} +% is an even number: if it is odd, an empty page is added at the +% end, with nothing on it (neither page number, headers or footers). +% +% \section{Commands} +% No command is provided by this package: just include it in order +% to obtain the scope. +% +% \StopEventually{} +% +% \newpage +% \section{Implementation} +% +% \begin{macrocode} +%% +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{\FileName}[\filedate\space v\fileversion\space\filedescr] +% \end{macrocode} +% +% The code simply checks if the current page number is odd, in +% which case a new page is generated with |\clearpage\mbox{}| +% (the |\mbox{}| is needed, otherwise the page will be empty +% and \TeX{} will remove it). +% The use of |\thispagestyle{empty}| ensures that nothing +% (headings, page numbers, footers, etc.) will appear on that page. +% All this code must be esecuted at the end of the document +% (when the last page is being proceddes) and this is provided +% by the |\AtEndDocument| command. +% \begin{macrocode} +%% +\AtEndDocument{\ifodd\value{page}\clearpage\mbox{}\thispagestyle{empty}\fi} +%% +% \end{macrocode} +% +% \CheckSum{15} +% \Finale +% +%\iffalse % MetaComment +%<*package> +%\fi +% +\endinput -- cgit v1.2.3