Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Jubobs Aug 19 '13 at 19:03
2  
Related: When should I use \input vs. \include? –  Werner Aug 19 '13 at 19:04
3  
\include does a \clearpage before and after the content that is included; see this answer. If you need to use \include with no page breaks, then see this answer. –  Adam Liter Aug 19 '13 at 19:04
    
Okay, my solution. Using \let\clearpage\relax does work (gets rid of blank space between chapters), however I have some landscape-orientated tables in my document, and they went horrible wrong when I did this. So I used the 'newclude' package (ctan.org/tex-archive/macros/latex/contrib/frankenstein) alongside \include*(mychapter) and it worked a treat. –  user2697265 Aug 20 '13 at 9:53

1 Answer 1

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.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.