101

I am using report document class. When I create a new chapter, it starts it on a new blank page in which only the chapter name appears.

I want to be able to start new chapters on the same page as the old chapter ends. Is there any way to do it?

3 Answers 3

89

The \chapter command internally uses \cleardoublepage and \clearpage to add page breaks. Use the etoolbox package to selectively change the definition of \chapter.

\documentclass{book}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother

\begin{document}

\chapter{foo}

Some text.

\chapter{bar}

Some text.

\end{document}

Note: This etoolbox hack also works for the report class.

For KOMA-Script scrbook from version 3.19a (and most likely for other KOMA-Script classes, too), you need to patch \scr@startchapter instead of chapter:

\usepackage{etoolbox}
\makeatletter
\patchcmd{\scr@startchapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
15
  • It is working only for the first chapter. Is it because, I have something like, \chapter{Introduction} \include{text/intro} . Is it because of the include block ? Sorry for the bad formatting
    – prakashkut
    Commented Jul 25, 2011 at 17:47
  • 1
    @Prakashkumar: Indeed. \include adds page breaks before and after it.
    – lockstep
    Commented Jul 25, 2011 at 17:49
  • Is there any way to remove page breaks before and after \include because, I have separated my document into almost 30 LATEX files and I include all of them inside the parent LATEX file.
    – prakashkut
    Commented Jul 25, 2011 at 17:52
  • 5
    Try to use \input instead. See When should I use \input vs \include? for details.
    – lockstep
    Commented Jul 25, 2011 at 17:56
  • 1
    @Prakashkumar: I'm not sure what you mean with "do not come in the new line". Please edit your question and add a compilable example that shows the problem like I did in my answer. (You may have to register at tex.sx in order to edit your question.)
    – lockstep
    Commented Jul 25, 2011 at 18:16
81
\documentclass{report}
\begin{document}

\chapter{foo}

{\let\clearpage\relax \chapter{bar}}
\chapter{baz}
\end{document}

use \cleardoublepage instead of \clearpage for a two sided document

4
  • 1
    This worked with KOMA-Script scrbook, too.
    – Kubo
    Commented Jul 8, 2018 at 13:08
  • This might not work with \part in scrbook (as for me)
    – NCH32
    Commented Jul 15, 2020 at 8:07
  • This only affects a single chapter, right? So it would fit better to this question: tex.stackexchange.com/questions/131460/…
    – xeruf
    Commented Jun 17, 2021 at 9:22
  • I was specially struggling to put an abstract at the bottom of the first page of my report, and this did the job \vspace*{\fill} {\let\clearpage\relax\chapter*{Abstract}}
    – Naghi
    Commented Dec 18, 2021 at 9:40
20

I have used this whenever I needed to add one chapter to the previous page:

\begingroup
\let\clearpage\relax
\chapter{My Chapter}
\endgroup

It doesn't change the rest of the chapters, or anything else in the document.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .