1

First of all, my problem is not that at the end of a chapter, i.e. before the chapter heading, a page is empty (e.g. problems like https://stackoverflow.com/questions/1358694/latex-remove-blank-page-after-a-part-or-chapter) caused by the 'twoside' option. I've tested my problem with the 'oneside' option and it still persists.


So my actual problem is that in my document (a custom template I am required to use, based on the KOMA-Script class scrbook. I've checked the class file but couldn't find anything.) at some point, the remainder of the page is empty after a chapter heading, and the text only starts at the next (even numbered) page. The peculiar thing is that this behaviour is not consistent over all chapters, but rather starts after chapter 3. I've tested my code with only 'lipsum' segments to ensure that no odd figure or table is the culprit, but this didn't solve the problem.

\documentclass[
  a4paper,            % paper size (a4paper, a5paper)
  english,            % define the document language (english, german)
  twoside,            % use onesided or twosided layout (oneside, twoside)
]{tumbook}            % document class I have to use
\begin{document}

\frontmatter
\maketitle
\chapter{Abstract}
\input{chapters/abstract.tex}
\tableofcontents

\mainmatter
\chapter{Introduction}
\input{chapters/intro.tex}

\chapter{Theory}
\input{chapters/theory.tex}

\chapter{Data Sample}
\input{chapters/datasample.tex}

\chapter{Methods}                       % The problem starts here
\include{chapters/methods.tex}

\chapter{Results}
\include{chapters/results.tex}

\appendix
\chapter{Appendix}
\include{chapters/appendix.tex}

\backmatter

\printbibliography

\end{document}

The individual files included were all tested with dummy content of the form

\lipsum[1]

\section{A section}
\lipsum[2]

\section{Another section}
\lipsum[3]

I don't expect anyone to have the finished solution since the problem most likely lies with the custom document class, but I was wondering if someone could give me some pointers as to where the problem might come from.

3
  • Yes, the empty page before the chapter pages is the intended behaviour, as well as chapters starting on odd pages. The problem is that after some (!) chapter headings, the remainder of the page will be left empty. It is this inconsistent behaviour that troubles me.
    – AlexH9
    Jun 24, 2021 at 16:32
  • You might want to provide the source of the class file perhaps?
    – SolidMark
    Jun 24, 2021 at 16:37
  • 1
    I deleted my comment as Peter spotted the issue. Always put the \chapter in the file being included not before the \include Jun 24, 2021 at 16:47

1 Answer 1

2

For the first three chapters you \input the text. For the remainders you \include the text. \include always starts a new page. Just use \input all the time.

4
  • @M.A.Bromuela That is weird. Jun 24, 2021 at 17:52
  • I wanted to make a correction to my previous comment. Actually the file you include should have \endinput at the end of file. This may or may not be necessary depending on the context. I found more on this here tex.stackexchange.com/questions/23102/endinput-what-is-it-for
    – SolidMark
    Jun 24, 2021 at 17:56
  • This solved the problem indeed. Thanks for the hint!
    – AlexH9
    Jun 25, 2021 at 7:36
  • @M.A.Bromuela You never need \endinput only if you want to put some non-tex commenst at the end of the file. It would have no effect on the problem in the question. Jun 25, 2021 at 18:20

You must log in to answer this question.

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