121

Is there a way to remove blank pages appearing between two chapters, in Appendix?

durron597
  • 31,968
  • 17
  • 99
  • 158
tksy
  • 3,429
  • 17
  • 56
  • 61

8 Answers8

164

Your problem is that all chapters, whether they're in the appendix or not, default to starting on an odd-numbered page when you're in two-sided layout mode. A few possible solutions:

The simplest solution is to use the openany option to your document class, which makes chapters start on the next page, irrespective of whether it's an odd or even numbered page. This is supported in the standard book documentclass, eg \documentclass[openany]{book}. (memoir also supports using this as a declaration \openany which can be used in the middle of a document to change the behavior for subsequent pages.)

Another option is to try the \let\cleardoublepage\clearpage command before your appendices to avoid the behavior.

Or, if you don't care using a two-sided layout, using the option oneside to your documentclass (eg \documentclass[oneside]{book}) will switch to using a one-sided layout.

Noah
  • 21,451
  • 8
  • 63
  • 71
  • 7
    Your definition would remove ALL page breaks. \let\cleardoublepage\clearpage would probably be more on target. – David Hanak Jan 29 '09 at 15:53
  • 1
    What documentclass are you using? – Noah Jan 31 '09 at 16:32
  • I tried with `book` and `scrbook`, but it works only if you put the command in the preamble. – lumbric May 09 '12 at 07:35
  • I put \let\cleardoublepage\clearpage after \appendix and it works perfectly with book as documentclass. Thanks! – user1736049 Jan 31 '17 at 15:02
  • 2
    I need the twoside layout for my setup, but I dont want all the blank pages. The openany approach worked like a charm. Thank you :) – OptimusCrime Mar 14 '17 at 13:40
  • Same as @OptimusCrime here, `openany` was the perfect solution for a thesis (document class that is based on "report" style). – shiri Jul 05 '17 at 15:30
98

it is very easy:

add \documentclass[oneside]{book} and youre fine ;)

frederic snyers
  • 999
  • 6
  • 2
  • @frederic: Truly Brilliant Solution. Thanks a lot ! – Sandeep Singh Aug 25 '12 at 14:56
  • 14
    Note that this method make the margins of all the pages the same. In twoside, the margins are different for the odd and the even pages. – amit kumar Jan 20 '13 at 12:29
  • 7
    As phaedrus mentioned, if you're printing a thesis, you usually need different left/right margins, for which you need to use the twosided option. – kufudo Mar 03 '13 at 02:43
  • 2
    thanks, in my case replacing `\documentclass[report,12pt]{memoir}` with `\documentclass[oneside,12pt]{memoir}` helped – olha Dec 05 '15 at 17:33
  • In addition to issue mentioned by phaedrus, ``oneside`` option also causes ``fancyhdr`` to ignore setup for even pages resulting in errors like this: ``Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is useless on input line 6791``. So ``openany`` option is much better in this case as it only affects location of each new chapter, instead of affecting margins and alternating headers/footers. – Rafal Jan 11 '16 at 08:54
  • AWESOME! was looking for it – Michael Mark Sep 08 '16 at 09:48
29

I tried Noah's suggestion which leads to the best solution up to now.

Just insert \let\cleardoublepage\clearpage before all the parts with the blank pages Especially when you use \documentclass[12pt,a4paper]{book}

frederic snyers's advice \documentclass[oneside]{book} is also very good and solves the problem, but if we just want to use the book.cls or article.cls, the one would make a big difference presenting your particles.

Hence, Big support to \let\cleardoublepage\clearpage for the people who will ask the same question in the future.

KLJ
  • 131
  • 1
  • 10
Mike22LFC
  • 987
  • 9
  • 15
  • where should I insert \let\cleardoublepage\clearpage? for example befor the \include{chapter2} in main.tex? – AshKan Dec 20 '14 at 14:25
  • just put into the space where you want to delete the blank page, for instance, the blank page in certain chapter, you could try to put after \begin{document} – Mike22LFC Feb 04 '15 at 22:31
  • It worked perfectly for me inside \begin{document} and just before \tableofcontents. Thanks. – OSXMonk Apr 16 '19 at 00:37
16

If you specify the option 'openany' in the \documentclass declaration each chapter in the book (I'm guessing you're using the book class as chapters open on the next page in reports and articles don't have chapters) will open on a new page, not necessarily the next odd-numbered page.

Of course, that's not quite what you want. I think you want to set openany for chapters in the appendix. 'fraid I don't know how to do that, I suspect that you need to roll up your sleeves and wrestle with TeX itself

High Performance Mark
  • 77,191
  • 7
  • 105
  • 161
4

In my case, I still wanted the open on odd pages option but this would produce a blank page with the chapter name in the header. I didn't want the header. And so to avoid this I used this at the end of the chapter:

\clearpage

\thispagestyle{plain}

This let's you keep the blank page on the last even page of the chapter but without the header.

Xpleria
  • 5,472
  • 5
  • 52
  • 66
3

I put the \let\cleardoublepage\clearpage before \makeindex. Else, your content page will display page number based on the page number before you clear the blank page.

Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
Faiz
  • 31
  • 1
3

One thing I discovered is that using the \include command will often insert and extra blank page. Riffing on the previous trick with the \let command, I inserted \let\include\input near the beginning of the document, and that got rid of most of the excessive blank pages.

  • 3
    Thanks a lot for your answer. None of the previous methods worked for me. I replaced \include with \input , and it worked for me! – Sali Hoo Mar 27 '17 at 18:30
  • This worked for me also - using a slightly modified Koma Script report class. Any idea why \include does this? How to debug the precise issue? – SACHIN GARG Jun 28 '17 at 04:42
  • 1
    -1 I'd think it might make the most sense to just use `\input` if that's what you need, rather than redefining `\include` to be it. I think https://tex.stackexchange.com/questions/246/when-should-i-use-input-vs-include#250 explains why this happens. It's because `\include` is intended to do more than just copy-paste text into the document. – andyg0808 Nov 10 '17 at 12:57
2

You can also use \openany, \openright and \openleft commands:

\documentclass{memoir}
\begin{document}

\openany
\appendix

\openright
\appendixpage
This is the appendix.

\end{document}
Evandro Coan
  • 8,560
  • 11
  • 83
  • 144