summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bosisio/evenpage.dtx
blob: 9beb363f3b96397444e6a550263d74a4e53f223c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
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,driver>
%<*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
%</package>
%<*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
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%</dtx>
%
%		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