[Tex/LaTex] Blank bibliography page getting created


I am writing an article in Lyx using a latex template. For some reason, I am getting a blank bibliography page (in addition to the actual bibliography) when I compile it. I deleted everything in the article except the bibliography part and I am still getting the extra page. Of course, I could just remove it after compiling, but it's annoying to have to do it for every draft.

I am able to reproduce the error with a bib file that contains the following text only:


Author = {David Eisenbud},

Publisher = {Spring-Verlag},

Title = {Commutative Algebra with a view towards Algebraic Geometry},

Year = {1995}}

The following is the code.



\numberwithin{theorem}{chapter}        % Numbers theorems "x.y" where x
                                        % is the section number, y is the
                                        % theorem number


%\makeatletter                          % This sequence of commands will
%\let\c@equation\c@theorem              % incorporate equation numbering
%\makeatother                           % into the theorem numbering scheme




%This command creates a box marked ``To Do'' around text.
%To use type \todo{  insert text here  }.

\newcommand{\todo}[1]{\vspace{5 mm}\par \noindent
\framebox{\begin{minipage}[c]{0.95 \textwidth}
\tt #1 \end{minipage}}\vspace{5 mm}\par}









Best Answer

From the code you posted, it can be inferred that you are using a document class that uses chapters. Normally, \chapter and \chapter* internally issue a \cleardoublepage command to ensure that every chapter starts on an odd numbered page. If the last page before the bibliography was odd numbered, then the \chapter* used to typeset the bibliography heading will produce a blank page. To avoid this, you can locally redefine \cleardoublepage to behave as \clearpage, by using


If you want to allow all chapters starting in any new page (whether it is odd or even), you can use the openany class option. Assuming the book class is used, then you can say: