0

I've got a problem with the formatting of the following MWI. I would like to have:

  1. Page: Abstract with header and title -> done
  2. Page: completely blank -> not done, header still visible
  3. Page: Second abstract with header and title -> done
  4. Page: completely blank -> not done, header still visible
  5. Page - end: full header, titles, texts -> done

So I think it might be a problem that I have redefined the pagestyle plain, but this was necessary to obtain the header on the first chapter pages...

\documentclass[12pt,a4paper,twoside]{report}

%Layout
\usepackage[top=2.5cm, bottom=3cm, left=2.5cm, right=2.5cm,paper=a4paper]{geometry}

%Header
\usepackage{fancyhdr}

%Chapter adjustments
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\fontsize{16pt}{0}\bfseries}{\thechapter.}{9pt}{}
\titlespacing*{\chapter}{0pt}{0pt}{16pt}
\usepackage{blindtext}

%Formatting the header
\pagestyle{fancy}
\fancyhf{}
\fancyhead[EL,OR]{\fontsize{8}{5} \selectfont \thepage}
\fancyhead[ER,OL]{\fontsize{8}{5} \selectfont \leftmark}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}

\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[EL,OR]{\fontsize{8}{5} \selectfont \thepage}
\fancyhead[ER,OL]{\fontsize{8}{5} \selectfont \leftmark}
}

%Abstracttexts
\newcommand{\FirstAbstract}{This is Abstract 1.}
\newcommand{\SecondAbstract}{This is Abstract 2.}


\begin{document}
\pagenumbering{Roman}

%Abstract 1
{\fontsize{16pt}{0} \selectfont {\bf Abstract 1}}
\newline \vspace{-2mm} \\
\FirstAbstract
\markboth{First Abstract}{}
\cleardoublepage

%Abstract 2
\newpage 
{\fontsize{16pt}{0} \selectfont {\bf Abstract 2}}
\newline \vspace{-2mm} \\
\SecondAbstract
\markboth{Second Abstract}{}
\cleardoublepage

\newpage
\pagenumbering{arabic}

\chapter{Chapter 1}
\blindtext \blindtext \blindtext \blindtext \blindtext

\chapter{Chapter 2}
\blindtext
\newpage

\section{First Section}
\blindtext
\newpage

\end{document}

2 Answers2

2

You want to load emptypage.

I also suggest some fixes: use \chapter*{Abstract 1} instead of manually emulating the typesetting of a chapter header. I also fixed the parameters to \fontsize: if you use \fontsize{8}{5} for the header, there will be no gap between the header and the rule.

\RequirePackage{fix-cm}
\documentclass[12pt,a4paper,twoside]{report}

%Layout
\usepackage[top=2.5cm, bottom=3cm, left=2.5cm, right=2.5cm,paper=a4paper]{geometry}

%Header
\usepackage{fancyhdr}
\usepackage{emptypage}

%Chapter adjustments
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\fontsize{16}{20}\bfseries}{\thechapter.}{9pt}{}
\titlespacing*{\chapter}{0pt}{0pt}{16pt}
\usepackage{blindtext}

%Formatting the header
\pagestyle{fancy}
\fancyhf{}
\fancyhead[EL,OR]{\fontsize{8}{10}\selectfont \thepage}
\fancyhead[ER,OL]{\fontsize{8}{10}\selectfont \leftmark}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}

\fancypagestyle{plain}{%
  \fancyhf{}%
  \fancyhead[EL,OR]{\fontsize{8}{10}\selectfont \thepage}%
  \fancyhead[ER,OL]{\fontsize{8}{10}\selectfont \leftmark}%
}

%Abstracttexts
\newcommand{\FirstAbstract}{This is Abstract 1.}
\newcommand{\SecondAbstract}{This is Abstract 2.}


\begin{document}
\pagenumbering{Roman}

%Abstract 1
\chapter*{Abstract 1}%
\chaptermark{First Abstract}

\FirstAbstract

\cleardoublepage

%Abstract 2
\chapter*{Abstract 2}%
\chaptermark{Second Abstract}

\SecondAbstract

\cleardoublepage

\pagenumbering{arabic}

\chapter{Chapter 1}
\blindtext \blindtext \blindtext \blindtext \blindtext

\chapter{Chapter 2}
\blindtext
\newpage

\section{First Section}
\blindtext
\newpage

\end{document}

enter image description here

egreg
  • 1,121,712
1

EDIT : Bernard's solution works just fine, that is replacing \usepackage{titlesec} by \usepackage[clearempty]{titlesec}


You could use Martigan's solution in this thread to create a new command for a completely blank page. To do this, add

%blank page
\usepackage{afterpage}
\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \newpage}

to your preamble.


Now replace \cleardoublepage by the newly defined command : \afterpage{\blankpage}.

For example, for the first Abstract :

%Abstract 1
{\fontsize{16pt}{0} \selectfont {\bf Abstract 1}}
\newline \vspace{-2mm} \\
\FirstAbstract
\markboth{First Abstract}{}
\afterpage{\blankpage}
Sileo
  • 307