summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/emptypage/emptypage.sty
blob: 52206054a48b228796d4cefba54d5f2451e9917b (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
%%
%% emptypage.sty (K. Wette, 2008/12/20)
%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{emptypage}[2008/12/20 Suppress page numbers and headings on empty pages]

\makeatletter

\def\emptypage@emptypage{
    \hbox{}
    \thispagestyle{empty}
    \newpage
    \if@twocolumn
        \hbox{}
        \newpage
    \fi
}

\DeclareOption{odd}{
    \def\cleardoublepage{
        \clearpage
        \if@twoside
            \ifodd\c@page
                % do nothing
            \else
                \emptypage@emptypage
            \fi
        \fi
    }
}

\DeclareOption{even}{
    \def\cleardoublepage{
        \clearpage
        \if@twoside
            \ifodd\c@page
                \emptypage@emptypage
            \else
                % do nothing
            \fi
        \fi
    }
}

\ExecuteOptions{odd}

\ProcessOptions

\makeatother