# 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:

@book{Eisenbud,

Author = {David Eisenbud},

Publisher = {Spring-Verlag},

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

Year = {1995}}

The following is the code.

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{example}[theorem]{Example}
\newtheorem{introduction}[theorem]{Introduction}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

%\renewcommand{\thetheorem}{\arabic{chapter}.\arabic{theorem}}

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

%\renewcommand{\theenumi}{(\roman{enumi})}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%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
\marginpar{\textsc{ToDo}}
\framebox{\begin{minipage}[c]{0.95 \textwidth}
\tt #1 \end{minipage}}\vspace{5 mm}\par}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\makeatother

\usepackage{babel}

\begin{document}

\bibliographystyle{amsalpha}

\bibliography{thesisref}

\end{document}
-
I’m not sure if i understand what you mean. Do you get an empty bibliography (no entries) or do you get the desired bibliography but an additional blank page at it’s end? –  Tobi Sep 26 '11 at 15:50
@Tobi: I get the desired bibiliography with the desired entried. However, there is a page before the actual bibliography with the word "Bibliography" in the center of the page and nothing else. –  B.M. Sep 26 '11 at 15:53
OK. Then it would be great if you provide a minimal working example (MWE) (please include a sample bib via filecontens). In your above code I can’t finde the cause (btw. the \makeatother before loading babel can’t be right in this place since it should be used together with \makeatother …). –  Tobi Sep 26 '11 at 16:22
@Tobi: Thanks for your help. I am not sure what "filecontens". I could not find it mentioned in the question you link either. As for the code, I haven't written it myself. I wrote the document in Lyx and exported it to latex, so I am not sure \makeatother does here. I have included a sample .bib file in my question above. –  B.M. Sep 26 '11 at 16:34
Here you can find something about filecontents (it’s the third link in the above mentioned answer …). As Gonzalo said it’s nearly not possible to find the error with the given scrap of code. –  Tobi Sep 26 '11 at 17:40

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

\begingroup
\let\cleardoublepage\clearpage
\bibliographystyle{amsalpha}
\bibliography{thesisref}
\endgroup

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:

\documentclass[openany]{book}
-
Thank you for the answer, Gonzalo. I made both changes, both one at a time and together and I am still getting the blank page. –  B.M. Sep 26 '11 at 17:25
@B.M.: then we'll need a complete sample of your code. The document class used is missing in the code you posted. –  Gonzalo Medina Sep 26 '11 at 17:28
I have the same problem with the article class :( and don't know how to solve it either. It seems there are more people with the same problem: latex-community.org/forum/viewtopic.php?f=5&t=317 –  Álvaro Aug 17 '13 at 16:49