%Università di Napoli Federico II
%PhD Program in Information Technology and Electrical Engineering
%ITEE PhD THESIS TEMPLATE  
%Version: Cycle XXXIX - v.1 2 July 2026 - by prof. Stefano Russo

\documentclass [pdftex,b5paper,11pt,titlepage,twoside]{book}

\usepackage[b5paper,verbose]{geometry}
\usepackage[Lenny]{fncychap}
\makeatletter
%MODIFICATIONS TO LENNY FNCYCHAP
%redefine color for chapter heading of the Lenny style
%  \ChNameVar{\Large\rm\color{darkblue}}
%  \renewcommand{\DOCH}{%
%  \setlength{\fboxrule}{\RW} % Let fbox lines be controlled by \ChRuleWidth
%  \fbox{\CNV\FmN{\@chapapp}\space \CNoV\thechapter}\par\nobreak 
%  \vskip 20\p@}
%reduce space before and after the title to 20pt
  \renewcommand{\DOTI}[1]{% 
    \CTV\FmTi{#1}\par\nobreak 
    \vskip 20\p@}
  \renewcommand{\DOTIS}[1]{% 
    \CTV\FmTi{#1}\par\nobreak 
    \vskip 20\p@}
\makeatother

% PACKAGES FOR TITLES
\usepackage{titlesec}
\titlespacing*{\paragraph} {0pt}{1\baselineskip}{1\baselineskip}
  
% GRAPHIC AND IMAGES PACKAGES
\usepackage{graphicx}
\usepackage[subrefformat=parens,labelformat=parens]{subfig}
\usepackage[labelsep=period]{caption}
\DeclareGraphicsExtensions{.pdf,.png,.jpeg,.mps,.bmp,.eps, .gif}
\usepackage{pdfpages}
\usepackage{psfig}
\usepackage{epsfig}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{picinpar}
\usepackage{bmpsize}
\usepackage{textcomp} 
\usetikzlibrary{trees} 
\usepackage[most]{tcolorbox}

%FONT, INDENT, SPACES, RAGGED TEXT, ... PACKAGES
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{newlfont}
\usepackage{verbatim}
\usepackage{indentfirst}
\usepackage{ragged2e}
\usepackage{setspace}
\usepackage{chngpage}
\usepackage{url}
\usepackage{ifoddpage}
\usepackage{textcomp}
\usepackage{calligra}
\usepackage{hyperref} %cross-referencing commands to produce hypertext links 
\DeclareUrlCommand\uri{}
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\usepackage{threeparttable}
\usepackage[margin=6pt, font=small, labelfont=bf]{caption}
\hypersetup{
 pdftitle={},%
 pdfauthor={},%
 pdfsubject={},%
 pdfkeywords={},%
 colorlinks=true,%
 linkcolor=blue,%
 linktocpage=true,%
 pageanchor=true,
 citecolor=blue
 }
\usepackage{lipsum}  % this package is for creating filler text
\usepackage{blindtext}
\renewcommand{\baselinestretch}{1.1}
\newlength{\defbaselineskip}
\setlength{\defbaselineskip}{\baselineskip}

\newcommand{\setlinespacing}[1]%
           {\setlength{\baselineskip}{#1 \defbaselineskip}}
           
% MATH PACKAGES
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{calc} 
\usepackage{calrsfs}
\usepackage{siunitx}
\usepackage{bigints} % big integrals
\usepackage{framed}

% PACKAGES FOR TABLES
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{xcolor,colortbl}
\usepackage{array}
\usepackage{booktabs} % To thicken table lines
\usepackage{multirow}
\usepackage{rotating}
\usepackage{supertabular}

% PACKAGES FOR ALGORITHMS
\usepackage{algorithmic}
\usepackage{algorithm}
\renewcommand{\algorithmiccomment}[1]{#1}

%ACRONYMS, NOMENCLATURE, EPIGRAPH, INDEX, ... PACKAGES
\usepackage{acronym}
\usepackage{epigraph} %for citations at the beginning of chapters
\usepackage{nomencl}
%IF YOU WISH, YOU MAY COMMENT THE LINE BELOW TO AVOID RENAMING "NOMENCLATURE" INTO "LIST OF SYMBOLS"
\renewcommand{\nomname}{List of Symbols}
\renewcommand{\nompreamble}{The following symbols are used within the thesis}
\makenomenclature
\usepackage{makeidx}

% correct bad hyphenation here; some examples:
\hyphenation{op-tical net-works semi-conduc-tor software-im-ple-ment-ed para-virtualization}

%CUSTOM COLORS
\definecolor{black}{rgb}{0, 0, 0}
\definecolor{cobalt}{rgb}{0.0, 0.28, 0.67}
\definecolor{darkblue}{rgb}{0.0, 0.0, 0.55}

\usepackage{fancyhdr}
%Dedication environment
\newenvironment{dedication}
{
  \phantom{.}
  \vspace{13cm}
  \begin{quote} \begin{flushright}}
{\end{flushright} \end{quote}}

%PAGE RUNNING HEADS
\usepackage{etoolbox}
\makeatletter
\patchcmd{\footrule}
  {\if@fancyplain}
  {\color{darkblue}\if@fancyplain}
  {}
\makeatother
\pagestyle{fancy}\addtolength{\headwidth}{20pt}
\fancyhf{}
\fancyhead[LE,RO]{\scshape\textcolor{darkblue}{\thepage}}
\fancyhead[LO]{\scshape\scriptsize\nouppercase{\textcolor{darkblue}{\rightmark}}} 
\fancyhead[RE]{\scshape\scriptsize\nouppercase{\textcolor{darkblue}{\leftmark}}}
\renewcommand{\headrulewidth}{0.2pt}
\renewcommand{\footrulewidth}{0.1pt}
\addtolength{\headheight}{1.6pt}
\onehalfspacing

\usepackage{enumitem}


%SET HERE COMMANDS FOR PHD COURSE, PHD URL, CYCLE, CHAIRMAN, AUTHOR, TITLE, ...
\input{0.settings.tex}

%DOCUMENT START
\begin{document}

\frontmatter

%COVER PAGE
\input{1.coverpage.tex}
\newpage

%DEDICATION PAGE
\input{2.dedicationpage.tex}
\cleardoublepage
 
%INTERNAL FRONT PAGE
\input{3.frontpage.tex}
\normalsize

%AUTHOR DECLARATION
\input{4.declarationpage.tex}
\clearpage

%FRONT MATTER PAGES NUMBERED ROMAN
\pagenumbering{roman}

%ABSTRACT IN ENGLISH
\section*{Abstract}
\thispagestyle{empty} 
\setlength{\parindent}{1em}
\justifying
\addcontentsline{toc}{section}{Abstract}
\input{5.abstract.tex}
\cleardoublepage

%ABSTRACT IN ITALIAN
\section*{Sintesi in lingua italiana}
\thispagestyle{empty} 
\setlength{\parindent}{1em}
\justifying
\addcontentsline{toc}{section}{Sintesi in lingua italiana}
\input{6.abstract_IT.tex}
\cleardoublepage

%ACKNOWLEDGEMENTS
\pagestyle{plain}
\input{7.acknowledgements.tex}
\addcontentsline{toc}{section}{Acknowledgements}
\cleardoublepage

%TOC
\pagestyle{plain}
\tableofcontents
\clearpage

%ACRONYMS LIST
\chapter*{List of Acronyms}
The following acronyms are used throughout the thesis.
\addcontentsline{toc}{section}{List of Acronyms}
\input{8.acronyms.tex}

%FIGURES LIST
\phantomsection
\listoffigures
\addcontentsline{toc}{section}{\listfigurename}

%TABLES LIST
\phantomsection
\listoftables
\addcontentsline{toc}{section}{\listtablename}
\cleardoublepage

%NOMENCLATURE (SYMBOLS)
%Remember to run:
% makeindex MyITEEphdThesis.nlo -s nomencl.ist -o MyITEEphdThesis.nls
\thispagestyle{empty} 
\nomenclature{\(c\)}{Speed of light in a vacuum}
\nomenclature{\(h\)}{Planck constant}
\printnomenclature
\addcontentsline{toc}{section}{\nomname}
\cleardoublepage

%MAIN MATTER PAGES NUMBERED ROMAN

%CHAPTERS
\pagestyle{fancy}
\pagenumbering{arabic}
\mainmatter
\setlength{\parindent}{1em}
\justifying
\singlespacing

\chapter{Introduction}
\thispagestyle{empty} 
\label{Introduction}
\input{chapter1.tex}

\chapter{Title, e.g.: Background and related work}
\thispagestyle{empty} 
\label{Chapter2}
\input{chapter2.tex}

\chapter{Title of chapter 3}
\thispagestyle{empty} 
\label{Chapter3}
\input{chapter3.tex}

\chapter{Title of chapter 4}
\thispagestyle{empty} 
\label{Chapter4}
\input{chapter4.tex}

\chapter{Conclusions}
\thispagestyle{empty} 
\label{Conclusions}
\input{conclusions.tex}
\cleardoublepage

%APPENDIXES
%To be commented out if you have no appendixes
%\appendix % to tell LaTeX that the following chapters are appendices
%\thispagestyle{empty} 
%\input{appendix.tex}
\cleardoublepage

%BIBLIOGRAPHY
\small
\bibliographystyle{plain}
\singlespacing
\setlength{\parskip}{0.2em}
\thispagestyle{empty} 
\addcontentsline{toc}{chapter}{Bibliography}
\bibliography{thesis_references}
\cleardoublepage

%LIST OF AUTHOR'S PUBLICATIONS
\chapter*{Author's publications}
\addcontentsline{toc}{chapter}{Author's publications}
\thispagestyle{empty} 
\input{publications.tex}
\cleardoublepage

\end{document}