How to remove the empty page that is placed after the ToC, List of figures and List of tables
In your code are several issues:
- You loaded a lot of packages not related to this issue. I deleted them in the following mwe.
Commands like
\tableofcontents
and\chapter
uses command\cleardoublepage
internally. To get rid of that one possibility is to localy redefinecleardoublepage
. See the following code snippet to do that (please see that I included the first chapter!):{\tableofcontents % <=================================================== \let\cleardoublepage\clearpage % <====================================== \listoffigures \listoftables \chapter{Introduction}} % <=============================================
In your table of contents you get bad numbered sections (because an first chapter is missing!)
0.1 Intro 1
. To get rid of that use\section*{}
instead\section{}
...
Please see the following mwe
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{lipsum}
\pagestyle{fancy}
\fancyhead[ER]{\nouppercase\leftmark}
\fancyhead[OR]{\nouppercase\rightmark}
\fancyhead[ER,OR]{\thepage}
\setcounter{secnumdepth}{4}
%opening
\title{MWE}
\author{A1}
\begin{document}
\maketitle
\section*{intro 1} % <==================================================
\lipsum
\section*{intro 2} % <==================================================
\lipsum
{\tableofcontents % <===================================================
\let\cleardoublepage\clearpage % <======================================
\listoffigures
\listoftables
\chapter{Introduction}} % <=============================================
\section{Introduction}
\subsection{Something1}
\lipsum
\subsection{Motivation}
\lipsum
\subsection{Something 2}
\lipsum
\chapter{Test}
\end{document}
and its result:
and
and
You can switch between openany and openright by setting a boolean:
\documentclass{book}
\setcounter{secnumdepth}{4}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{authblk}
\usepackage{fancyhdr}
\graphicspath{ {figures/} }
\usepackage{array}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tikz}
\usepackage{lipsum}
\pagestyle{fancy}
\fancyhead[ER]{\nouppercase\leftmark}
\fancyhead[OR]{\nouppercase\rightmark}
\fancyhead[ER,OR]{\thepage}
%opening
\title{MWE}
\author{A1}
\begin{document}
\maketitle
\section{intro 1}
\lipsum
\section {intro 2}
\lipsum
\makeatletter\@openrightfalse\makeatother %<-- openany
\tableofcontents
\listoffigures
\listoftables
\makeatletter\@openrighttrue\makeatother %<-- openright
\chapter{Introduction}
\section{Introduction}
\subsection{Something1}
\lipsum
\subsection{Motivation}
\lipsum
\subsection{Something 2}
\lipsum
\end{document}