Page LayoutHow to remove empty page after appendix in scrbook

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Georg

How to remove empty page after appendix in scrbook

Post by Georg »

Hi Stefan,
I used all your advises, but unfortunately the problem is still not solved. I think we need to write a command before or after \chapter ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

How to remove empty page after appendix in scrbook

Post by Stefan Kottwitz »

You don't need to write another command there.

Can you post your document preamble? That's the stuff before \begin{document}.

Stefan
LaTeX.org admin
Georg

How to remove empty page after appendix in scrbook

Post by Georg »

Here is code:
\usepackage[titletoc]{appendix}
\makeatletter
\g@addto@macro\appendix{%
\renewcommand*{\chapterformat}{%
{\chapapp\nobreakspace\thechapter\autodot\enskip}%
}
\renewcommand*{\chaptermarkformat}{%
{\chapapp\nobreakspace\thechapter\autodot\enskip}%
}
\let\oldaddcontentsline\addcontentsline
\newcommand\hackedaddcontentsline[3]{\oldaddcontentsline{#1}{#2}{\chapapp\nobreakspace#3}}
\let\oldchapter\chapter
\renewcommand*\chapter[1]{%
\let\addcontentsline\hackedaddcontentsline%
\oldchapter{#1}%
\let\addcontentsline\oldaddcontentsline%
}
}
\makeatother
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

How to remove empty page after appendix in scrbook

Post by Stefan Kottwitz »

That's not the complete preamble. I don't see an issue in this part of the code regarding the page break. Can you post the complete preamble?

Stefan
LaTeX.org admin
Georg

How to remove empty page after appendix in scrbook

Post by Georg »

Here is code:
\documentclass[enabledeprecatedfontcommands,
a4paper, oneside, onecolumn,
openany, parskip=full*,
toc=flat, table,
]{scrbook}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[english]{babel}
\usepackage[a4paper,left=20mm,right=10mm,top=20mm,bottom=10mm,includeheadfoot]{geometry}
\usepackage{url}
\let\OLDthebibliography\thebibliography
\renewcommand\thebibliography[1]{
\OLDthebibliography{#1}
\setlength{\parskip}{0pt}
}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage[Glenn]{fncychap}
\usepackage{fix-cm}
\ChTitleVar{\large\bfseries\selectfont}
\ChNameVar{\normalsize\bfseries\selectfont}
\ChNumVar{\fontsize{35}{10}\bfseries\selectfont}

\usepackage[titletoc]{appendix}
\makeatletter
\g@addto@macro\appendix{%
\renewcommand*{\chapterformat}{%
{\chapapp\nobreakspace\thechapter\autodot\enskip}%
}
\renewcommand*{\chaptermarkformat}{%
{\chapapp\nobreakspace\thechapter\autodot\enskip}%
}
\let\oldaddcontentsline\addcontentsline
\newcommand\hackedaddcontentsline[3]{\oldaddcontentsline{#1}{#2}{\chapapp\nobreakspace#3}}
\let\oldchapter\chapter
\renewcommand*\chapter[1]{%
\let\addcontentsline\hackedaddcontentsline%
\oldchapter{#1}%
\let\addcontentsline\oldaddcontentsline%
}
}
\makeatother
\begin{document}
\appendix
\include{Appendices}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

How to remove empty page after appendix in scrbook

Post by Stefan Kottwitz »

Hi Georg,

this preamble is missing at least:

Code: Select all

\usepackage{float}% for the H option
\usepackage{graphicx}% for \includegraphics
\usepackage{natbib}% for \citet
I hope you understand that it's hard to verify the issue when information is missing, code is missing, cannot be tested. That's why I asked for complete code to check the issue.

In the partial code above I see you use fncychap. I think that doesn't respect the standard openany option, so it inserts an empty page so that the next (appendix) chapter starts at a right hand page. Check it by commenting it out, also the \Ch commands:

Code: Select all

%\usepackage[Glenn]{fncychap}
%\ChTitleVar{\large\bfseries\selectfont}
%\ChNameVar{\normalsize\bfseries\selectfont}
%\ChNumVar{\fontsize{35}{10}\bfseries\selectfont}
Stefan
LaTeX.org admin
Georg

How to remove empty page after appendix in scrbook

Post by Georg »

Dear Stefan,
That is why there should be a command to add before or after those chapters to stop creating new pages. Can you please suggest any that works in our case? Or to do something :) Thank you.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

How to remove empty page after appendix in scrbook

Post by Stefan Kottwitz »

I think it's clear now. Your image is simply too high with the setting height=0.7\textheight, make it smaller. It happens when fncychap is used, as I noticed, not with the standard chapter headings, but that's because with fncychap the chapter heading is bigger and needs more space, so the image cannot be as large as 0.7\textheight. Try a bit smaller. Otherwise the page is too full and it's moved to the next page.

Stefan
LaTeX.org admin
Georg

How to remove empty page after appendix in scrbook

Post by Georg »

Hi Stefan,
Actually I tried your advice before writing you. It was not working. But now I made too small and it works now.
The interesting fact is that in one chapter it accepts height=0.68 and in the other it accepts only height=0.4. Why is it distinctive? It should be the same size for each page, or?
Another linked question is on this picture:
1.jpg
1.jpg (22.52 KiB) Viewed 6417 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

How to remove empty page after appendix in scrbook

Post by Stefan Kottwitz »

It should be the same, but I guess your chapter header size (or page header) is different. Check or let me see the code.

Same for the page header, the code above doesn't have header entries. Can you show your header settings?

Stefan
LaTeX.org admin
Post Reply