\documentclass[12pt,a4paper,twoside,openright]{report}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{subfigure}
\usepackage{afterpage}
\usepackage{amsmath,amssymb}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage[skins]{tcolorbox}
\usepackage{rotating}
\usepackage{mathtools}
%\newcommand\floor[1]{\lfloor#1\rfloor}
\usepackage[section]{placeins}
\usepackage{fancyhdr}
\usepackage[scriptsize]{caption}
\usepackage{tabu}
\usepackage{todonotes}
\usepackage[setpagesize=false]{hyperref}
\hyphenation{a-gen-tiz-za-zio-ne}
\setlength{\paperwidth}{21cm}
\setlength{\paperheight}{29.7cm}
\setlength{\oddsidemargin} {2. cm}
\setlength{\evensidemargin} {2. cm}
\addtolength{\oddsidemargin} {-0.4 cm}
\addtolength{\evensidemargin} {-0.4 cm}
\setlength{\parindent}{2em}
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.5}
\linespread{1.1}
\usepackage[italian,english]{babel}
\usepackage[latin1,utf8]{inputenc}
\renewcommand{\captionfont}{\normalfont \sffamily \itshape \small}
%---throrem
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\pagestyle{empty}
\begin{document}
\include{cover}
\thispagestyle{empty} \normalfont \cleardoublepage
\pagenumbering{arabic}
\include{abstract}
\thispagestyle{empty} \vspace*{.75truecm} \cleardoublepage
\include{thanks}
\thispagestyle{empty} \vspace*{.75truecm} \normalfont \cleardoublepage
\pagestyle{plain}\renewcommand{\chaptermark}[1]{\markboth{\chaptername\
\thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[RE]{\bfseries\leftmark}
\fancyhead[LO]{\bfseries\rightmark}
\renewcommand{\headrulewidth}{0.3pt}
\tableofcontents
\listoffigures
\listoftables
\include{chapter1}
\include{chapter2}
\include{chapter3}
\include{chapter4}
\include{chapter5}
\include{chapter6}
\cleardoublepage
% ---- Bibliography ----
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{ieeetr}
\bibliography{biblio}
%\nocite{*}
\appendix
\pagestyle{fancy}
\fancyfoot{}
\renewcommand{\chaptermark}[1]{\markboth{\appendixname\ \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[RE]{\bfseries\leftmark}
\fancyhead[LO]{\bfseries\rightmark}
\renewcommand{\headrulewidth}{0.3pt}
\end{document}
- 3
-
Your exemple, while it compiles with latex, doesn't help: we don't have access to the \include'd files so can't see the problem you see – remco Mar 29 '18 at 13:12
1 Answers
I suspect this behavior is caused by the combination of the openright option and the \cleardoublepage.
It is hard to verify without the actual sources, but does chapter six end on an even numbered page and the other chapters on odd numbered pages?
The openright option ensures that every chapter start on a right (odd numbered) page.
The command \doublepage has the following behavior (emphasis mine):
The
\cleardoublepagecommand ends the current page and causes all figures and tables that have so far appeared in the input to be printed. In a two-sided printing style, it also makes the next page a right-hand (odd-numbered) page, producing a blank page if necessary.
E.g. the \doublepage only creates a blank page when necessary.
When I compiled your sources with some random input for the chapters this was the behavior I saw and is the intended behavior of the openright option.
If you would really like to insert an empty page you could look here.
- 41