% ============================================================
% UniBA COLLAB Thesis Template
% Versione 1.6.0
%
% Ideato, sviluppato e mantenuto da Giulio Mallardi
% COLLAB – Collaborative Development Group
% Dipartimento di Informatica
% Università degli Studi di Bari Aldo Moro
% https://collab.di.uniba.it/
%
% Copyright © 2025–2026 Giulio Mallardi
%
% Utilizzo e modifica consentiti secondo i termini contenuti
% nel file LICENSE.txt. È obbligatorio mantenere i crediti nei
% sorgenti e l'attribuzione visibile nel documento finale.
% ============================================================
\PassOptionsToPackage{table,dvipsnames}{xcolor}
\documentclass[a4paper,twoside,12pt]{toptesi}
% Informazioni compilate dallo studente
\input{config.tex}
% Pacchetti
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian,english]{babel}
\usepackage{etoolbox}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage[newfloat]{minted}
\usepackage[font=small,skip=1pt]{caption}
\captionsetup[listing]{position=top}
\usepackage{subcaption}
\usepackage{fancyhdr}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
allcolors=black,
pdftitle={\thesistitle},
pdfauthor={\thesisauthor},
pdfsubject={\thesissubject},
pdfkeywords={Tesi; Università di Bari; COLLAB}
}
\linespread{1.25}
% Compatibilità con il precedente template
\let\savedlisting\listing
\AtBeginDocument{\let\listing\savedlisting}
% Dati istituzionali e dizionario delle etichette
\input{programmes.tex}
\input{languages.tex}
% Pagina bianca senza intestazioni nei documenti fronte-retro
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside\ifodd\c@page\else
\hbox{}\vspace*{\fill}\vspace{\fill}\thispagestyle{empty}%
\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
\begin{document}
\selectlanguage{\thesiseffectivelanguage}
% ============================================================
% FRONTESPIZIO
% ============================================================
\begin{titlepage}
\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-6cm] (logo) at (current page.north)
{\includegraphics[width=0.75\linewidth]{images/uniba.pdf}};
\node[text width=50em,yshift=0.25cm,align=center,below=of logo]
(dipartimento) {\Large \lblDepartment};
\node[text width=40em,align=center,yshift=.55cm,below=of dipartimento]
(course) {\normalsize \thesiscourse};
\node[text width=35em,align=center,yshift=1.2cm,below=of course]
(line) {\par\noindent\rule{\textwidth}{0.4pt}};
\node[text width=40em,align=center,yshift=.55cm,below=of line]
(lia) {\normalsize \lblThesisHeading\\\thesissubject};
\node[text width=40em,align=center,yshift=-0.5cm,below=of lia]
(title) {\bfseries\parbox{12cm}{%
\fontsize{21pt}{24pt}\selectfont\centering\thesistitle\par}};
\node[text width=35em,align=left,yshift=-1cm,below=of title]
(relatoretit) {\normalsize\textbf{\lblCurrentSupervisors}};
\node[text width=35em,align=left,yshift=1cm,below=of relatoretit]
(relatore) {\large\thesisadvisors};
\ifnum\thesiscoadvisorcount>0
\node[text width=35em,align=left,yshift=0.5cm,below=of relatore]
(correlatoretit) {\normalsize\textbf{\lblCurrentCoSupervisors}};
\node[text width=35em,align=left,yshift=1cm,below=of correlatoretit]
(correlatore) {\large\thesiscoadvisors};
\fi
\node[text width=35em,align=right,yshift=-1cm,below=of title]
(candidatetit) {\normalsize\textbf{\lblCandidate}};
\node[text width=35em,align=right,yshift=1cm,below=of candidatetit]
(candidate) {\large\thesisauthor};
\node[text width=35em,align=center,yshift=-3cm,below=of candidate]
(line2) {\par\noindent\rule{\textwidth}{0.4pt}};
\node[text width=50em,align=center,yshift=0.5cm,below=of line2]
(year) {\large\lblAcademicYear\ \thesisyear};
\node[anchor=south,align=center,text width=0.85\paperwidth]
at ([yshift=7mm]current page.south)
{\tiny };
\end{tikzpicture}
\end{titlepage}
% ============================================================
% PAGINE PRELIMINARI
% ============================================================
\cleardoublepage
\include{dedication}
\cleardoublepage
\pagenumbering{roman}
\include{notes}
\cleardoublepage
\tableofcontents
\cleardoublepage
% ============================================================
% CORPO DELLA TESI
% ============================================================
\pagenumbering{arabic}
\setcounter{page}{1}
\addcontentsline{toc}{chapter}{\lblIntroduction}
\include{introduction}
\include{chapter1}
\include{chapter2}
\include{chapter3}
\include{chapter4}
\include{conclusions}
% Bibliografia e ringraziamenti
\bibliographystyle{plain}
\bibliography{references}
\include{acknowledgements}
\end{document}