%%
%% 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
