% ============================================================
% UniBA COLLAB Thesis Template
% Versione 1.3.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]{babel}
\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}
% Etichette
\newcommand{\thesisdepartment}{DIPARTIMENTO DI INFORMATICA}
\newcommand{\thesisheading}{TESI DI LAUREA\\IN}
\newcommand{\thesiscandidatelabel}{LAUREANDO:}
\newcommand{\thesisyearlabel}{ANNO ACCADEMICO}
% Numeri dichiarati in config.tex: 0, 1, 2, ...
\newcommand{\thesisadvisorlabel}{%
\ifnum\thesisadvisorcount=1 RELATORE:\else RELATORI:\fi}
\newcommand{\thesiscoadvisorlabel}{%
\ifnum\thesiscoadvisorcount=1 CORRELATORE:\else CORRELATORI:\fi}
% 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}
% ============================================================
% 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 \thesisdepartment};
\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 \thesisheading\\\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{\thesisadvisorlabel}};
\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{\thesiscoadvisorlabel}};
\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{\thesiscandidatelabel}};
\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\thesisyearlabel\ \thesisyear};
\end{tikzpicture}
\end{titlepage}
% ============================================================
% PAGINE PRELIMINARI
% ============================================================
\cleardoublepage
\include{dedica}
\cleardoublepage
\pagenumbering{roman}
\include{note}
\cleardoublepage
\tableofcontents
\cleardoublepage
% ============================================================
% CORPO DELLA TESI
% ============================================================
\pagenumbering{arabic}
\setcounter{page}{1}
\addcontentsline{toc}{chapter}{Introduzione}
\include{introduzione}
\include{capitolo1}
\include{capitolo2}
\include{capitolo3}
\include{capitolo4}
\include{conclusioni}
% Bibliografia e ringraziamenti
\bibliographystyle{plain}
\bibliography{bibliografia}
\include{ringraziamenti}
\end{document}