[Tex/LaTex] Blank pages after \include in LaTeX report class

blank-pageincludeinput

I'm writing my thesis as several separate chapters and incorporating them into one .tex file.

Some of the chapters are pdfs of articles, and they are simply added to my master.tex using \input.

However, 2 chapters are 'traditionally' written (not published articles) and include a bibliography at the end of each chapter. For this reason, I use chapterbib with [sectionbib] enabled. And in order for the separate bibliographies to appear, I have to \include these chapters, rather than \input.

\documentclass[a4paper,12pt,openany]{report}
\usepackage{pdfpages}
\usepackage[top=1.5in, bottom=1.5in, left=1.57in, right=1in]{geometry}
\usepackage[sectionbib]{natbib}
\usepackage[sectionbib]{chapterbib}
\bibliographystyle{apalike}

\begin{document}

\input{frontpage}
\input{abstracts}
\input{declarationandcopyright}
\input{acknowledgementsanddedictation}
\include{chapter1}
\input{chapter2}
\input{chapter3}
\input{chapter4}
\include{chapter5}
\input{chapter6}

\end{document}

The problem: I'm getting two additional blank pages before the start of chapter 1, one extra blank page before the start of chapter 2, but no extra blank pages in between chapters 2-3 or 3-4 etc.

An example of one of my \include chapters:

\chapter{Introduction}

\addcontentsline{lof}{chapter}{Introduction}
\addcontentsline{lot}{chapter}{Introduction}
\section{A subtitle}
Some text here
\newpage
\bibliographystyle{apalike}
\bibliography{library}

An example of one of my \input chapters:

\chapter{chapter3}
\includepdf[pages=-, scale=0.9, offset=30 1]{paper2.pdf}

I have to compile each \include chapter individually in BibTeX, then run PDFLaTeX twice on my master.tex.

I assumed it was a problem with LaTeX trying to keep the first page of each chapter on an odd numbered page. But actually it's putting them on odd or even. So perhaps it's something to do with the bibliographies?

Any suggestions about how I can get rid of all these blank pages? Much appreciated.

Best Answer

The following answer is basically a copy of Will Robertson's answer on stackoverflow. It seems that it doesn't actually have an answer on TeX.SX, so I thought that I would post it here, too.

\include issues a \clearpage before and after the content that is included. There are two ways around this.

The first way is to use \input instead of \include (cf., When should I use \input vs. \include?).

However, since the OP is after a method that functions as \include does, the second option, then, is to utilize the package newclude which provides the command \include*. This command does not issue the \clearpage at the beginning and at the end of the \included content.


See also:

(Though none of the answers to these questions mention the answer provided by Will Robertson on stackoverflow.)

Related Question