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}
\include{header}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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}
\addcontentsline{toc}{chapter}{\bibname}\nocite{*}
\bibliography{thesisref}
\end{document}
```

## 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 usingIf you want to allow

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