Debian Codegraph @

texmf-dist/source/latex/bosisio/evenpage.dtx

raw
1 %\iffalse % MetaComment
2 %%
3 %% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
4 %% | Copyright(C) 1997-2010 by F. Bosisio |
5 %% | |
6 %% | This program can be redistributed and/or modified under |
7 %% | the terms of the LaTeX Project Public License, either |
8 %% | version 1.3 of this license or (at your option) any later |
9 %% | version. The latest version of this license is in |
10 %% | http://www.latex-project.org/lppl.txt |
11 %% | and version 1.3 or later is part of all LaTeX distributions |
12 %% | version 2005/12/01 or later. |
13 %% | |
14 %% | This work has the LPPL maintenance status `maintained'. |
15 %% | The Current Maintainer of this work is F. Bosisio. |
16 %% | |
17 %% | This work consists of files evenpage.dtx and evenpage.html |
18 %% | and of the derived files evenpage.sty and evenpage.pdf. |
19 %% | |
20 %% | E-mail: [email protected] |
21 %% | CTAN location: macros/latex/contrib/bosisio/ |
22 %% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
23 %%
24 %% If you make any improvment, find any bug or have
25 %% any suggestion, please let me know about it.
26 %%
27 %<*package,driver>
28 %\fi
29 %
30 \def\FileName{evenpage}
31 %\iffalse % MetaComment
32 %</package,driver>
33 %<*package>
34 %\fi
35 \def\fileversion{1.0}
36 \def\filedate{1998/01/21}
37 \def\docdate{2005/04/09}
38 \def\filedescr{Ensures the number of pages to be even (FB)}
39 %
40 %\iffalse % MetaComment
41 %</package>
42 %<*dtx>
43 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44 % This section is the installation driver
45 %
46 \def\batchfile{\FileName.dtx}
47 %
48 \input docstrip
49 %
50 \keepsilent
51 % \askforoverwritefalse
52 %
53 \generateFile{\FileName.sty}{f}{\from{\FileName.dtx}{package}}
54 %
55 \generateFile{\FileName.drv}{f}{\from{\FileName.dtx}{driver}}
56 %
57 \Msg{******************************************************}
58 \Msg{*}
59 \Msg{* To produce the documentation run the}
60 \Msg{* file `\FileName.drv' through LaTeX.}
61 \Msg{*}
62 \Msg{******************************************************}
63 %
64 %\endbatchfile
65 %
66 % End of the installation driver
67 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
68 %</dtx>
69 %
70 % This section is the documentation driver
71 %
72 %<+driver>\documentclass[12pt,a4paper]{ltxdoc}
73 %<+driver> \EnableCrossrefs
74 %<+driver> \CodelineIndex
75 %<+driver> \RecordChanges
76 %<+driver> %\OnlyDescription % Uncomment not to see the implementation
77 %<+driver>\begin{document}
78 %<+driver> \DocInput{\FileName.dtx}
79 %<+driver> \PrintIndex
80 %<+driver> \PrintChanges
81 %<+driver>\end{document}
82 %
83 % End of the documentation driver
84 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
85 %<*package>
86 %\fi
87 %
88 % \changes{v0.1}{21 January 1998}{First release}
89 % \changes{v0.1}{9 April 2005}{Added copyright notice and changed addresses}
90 %
91 % \title{Package \texttt{\FileName}\thanks{This is version \fileversion,
92 % last revised \filedate; documentation date \docdate}}
93 % \author{F. Bosisio\\\normalsize E-mail: \texttt{[email protected]}}
94 % \date{\filedate}
95 % \maketitle
96 %
97 % \begin{abstract}
98 % Documentation for the package \texttt{\FileName}.
99 % \end{abstract}
100 %
101 % \section{Introduction}
102 % This package ensures that the number of pages generated by \LaTeX{}
103 % is an even number: if it is odd, an empty page is added at the
104 % end, with nothing on it (neither page number, headers or footers).
105 %
106 % \section{Commands}
107 % No command is provided by this package: just include it in order
108 % to obtain the scope.
109 %
110 % \StopEventually{}
111 %
112 % \newpage
113 % \section{Implementation}
114 %
115 % \begin{macrocode}
116 %%
117 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
118 \ProvidesPackage{\FileName}[\filedate\space v\fileversion\space\filedescr]
119 % \end{macrocode}
120 %
121 % The code simply checks if the current page number is odd, in
122 % which case a new page is generated with |\clearpage\mbox{}|
123 % (the |\mbox{}| is needed, otherwise the page will be empty
124 % and \TeX{} will remove it).
125 % The use of |\thispagestyle{empty}| ensures that nothing
126 % (headings, page numbers, footers, etc.) will appear on that page.
127 % All this code must be esecuted at the end of the document
128 % (when the last page is being proceddes) and this is provided
129 % by the |\AtEndDocument| command.
130 % \begin{macrocode}
131 %%
132 \AtEndDocument{\ifodd\value{page}\clearpage\mbox{}\thispagestyle{empty}\fi}
133 %%
134 % \end{macrocode}
135 %
136 % \CheckSum{15}
137 % \Finale
138 %
139 %\iffalse % MetaComment
140 %<*package>
141 %\fi
142 %
143 \endinput