1
0
Files
bachelor-thesis/thesis.tex
T

267 lines
6.6 KiB
TeX

% font size
\documentclass[12pt]{report}
% Margini
\usepackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm, head=21.75pt, centering]{geometry}
% Interlinea
\linespread{1.5}
% Lingua e codifica
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% Font TeX Gyre
\usepackage{tgpagella} % Serif
\usepackage{newpxmath} % Matematica
\usepackage[scale=0.9]{tgheros} % Sans-serif
\usepackage{tgcursor} % Monospace
\usepackage{microtype}
\usepackage{parskip} % no indent
% Penalties
\widowpenalty=10000
\clubpenalty=10000
\displaywidowpenalty=10000
\usepackage{newfloat}
\DeclareFloatingEnvironment[fileext=lof2, listname={Grafici}, name=Grafico]{graph}
% Acronimi
\usepackage{acro}
\DeclareAcronym{can}{short = CAN, long = Controller Area Network}
\DeclareAcronym{ecu}{short = ECU, long = Electronic Control Unit}
\DeclareAcronym{dtc}{short = DTC, long = Diagnostic Trouble Code}
\DeclareAcronym{pgn}{short = PGN, long = Parameter Group Number}
% Didascalie
\usepackage{caption}
\captionsetup{
font={small, it},
labelfont={bf, color=unimoreblack},
labelsep=quad,
margin=10pt,
singlelinecheck=false,
justification=centering
}
\captionsetup[table]{font={small}, labelfont={bf, color=unimorered}}
% Pagina e intestazioni
\usepackage{scrlayer-scrpage}
\ifoot[]{}
\cfoot[]{}
\ofoot[\pagemark]{\pagemark}
\pagestyle{scrplain}
% Colori generali
\usepackage{xcolor}
\definecolor{unimorered}{RGB}{240, 73, 38}
\definecolor{unimoregrey}{RGB}{84, 84, 84}
\definecolor{unimoreblack}{RGB}{0, 0, 0}
\definecolor{unimorewhite}{RGB}{255, 255, 255}
\definecolor{urlblue}{RGB}{0, 0, 238}
% Colori codice
\definecolor{lightgray}{rgb}{.9,.9,.9}
\definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82}
\definecolor{green}{rgb}{0,0.6,0}
\definecolor{grey}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\usepackage[hidelinks]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=unimoreblack,
filecolor=unimoreblack,
citecolor=unimoreblack,
urlcolor=unimoregrey,
pdfborder={0 0 0.5},
}
% Immagini e tabelle
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{adjustbox}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{multirow}
\usepackage{float}
% Formattazione titoli
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\sffamily\bfseries}
{\huge\chaptertitlename\ \thechapter}
{10pt}
{\Huge}
[\vspace{1ex}{\color{unimorered}\titlerule[1.5pt]}]
\titleformat{\section}
{\normalfont\Large\bfseries\color{unimoreblack}}
{\thesection}
{1em}
{}
\titlespacing*{\section}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titleformat{\subsection}
{\normalfont\large\bfseries\color{unimoreblack}}
{\thesubsection}
{1em}
{}
\titlespacing*{\subsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
% Citazioni e bibliografia
\usepackage{csquotes}
\usepackage[backend=biber, sorting=nty, defernumbers=true]{biblatex}
\appto{\bibsetup}{\raggedright}
\addbibresource{bibliography.bib}
% Codice e algoritmi
\usepackage{listings}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{xurl}
% Utility
\usepackage{verbatim}
\usepackage{filehook}
\usepackage{pifont}
\usepackage[bottom]{footmisc}
\usepackage{tikz}
\usetikzlibrary{calc}
% Stili per i linguaggi di programmazione
\usepackage{minted}
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted, skins}
\newtcblisting{codice}[1][]{
minted language=c,
minted options={
fontsize=\footnotesize,
breaklines,
autogobble,
linenos,
numbersep=5pt
},
colback=backcolour,
colframe=unimoregrey!30,
arc=4mm,
boxrule=0.5pt,
left=6pt, right=6pt, top=6pt, bottom=6pt,
#1
}
\usepackage{enumitem}
\setlist[itemize]{
label=\textcolor{unimorered}{\textbullet},
leftmargin=*,
itemsep=0.5ex,
topsep=1ex
}
\setlist[enumerate]{
label=\textcolor{unimorered}{\arabic*.},
leftmargin=*,
itemsep=0.5ex,
topsep=1ex
}
\begin{document}
\begin{titlepage}
\begin{tikzpicture}[remember picture, overlay]
\fill[unimorered] (current page.north west) rectangle
([xshift=1.5cm]current page.south west);
\end{tikzpicture}
\begin{center}
\includegraphics[width=8cm]{assets/images/unimore/Sigillo2015.png}
\vspace{1cm}
{\LARGE\color{unimoreblack} UNIVERSITÀ DEGLI STUDI DI MODENA \\E REGGIO EMILIA \\}
{\large\color{unimoregrey} Dipartimento di Ingegneria "Enzo Ferrari" \\}
{\large\color{unimoregrey} Corso di Laurea Triennale in Ingegneria del Veicolo (L-9) \\}
\vspace{3cm}
{\Large\color{unimoreblack} \textbf{ Reverse engineering del protocollo CAN bus di un escavatore Komatsu PC210 NLC-8 } }\\
\vspace{3cm}
\end{center}
\noindent
\begin{minipage}[t]{0.47\textwidth}
\raggedright
{\large\color{unimoregrey}\bfseries Relatore:}\\[0.3ex]
{\large\color{unimoreblack}Prof. Carlo Augusto Grazia}
\end{minipage}\hfill
\begin{minipage}[t]{0.47\textwidth}
\raggedleft
{\large\color{unimoregrey}\bfseries Candidato:}\\[0.3ex]
{\large\color{unimoreblack}Erick Ahmed}
\end{minipage}
\vfill
{\color{unimorered}\rule{\textwidth}{1pt}}
\hrulefill\\
\centering{\large\color{unimoregrey}\bfseries ANNO ACCADEMICO 2025/2026 }
\end{titlepage}
\clearpage
\pagenumbering{roman}
% indice
\tableofcontents
\addcontentsline{toc}{chapter}{\contentsname}
% figure
\cleardoublepage
\phantomsection
\renewcommand{\listfigurename}{Figure}
\listoffigures
\addcontentsline{toc}{chapter}{\listfigurename}
% grafico
\cleardoublepage
\phantomsection
\listofgraphs
\addcontentsline{toc}{chapter}{Grafici}
% codice
\cleardoublepage
\phantomsection
\renewcommand{\lstlistingname}{Codice}
\renewcommand{\lstlistlistingname}{Codice}
\lstlistoflistings
\addcontentsline{toc}{chapter}{\lstlistlistingname}
% acronimi
\cleardoublepage
\phantomsection
\chapter*{Acronimi}
\addcontentsline{toc}{chapter}{Acronimi}
\printacronyms[heading=none]
\clearpage
\pagestyle{scrplain}
\pagenumbering{arabic}
\clearpage
\pagestyle{scrplain}
\pagenumbering{arabic}
% Aggiungi qui i capitoli
\input{chapters/00_abstract.tex}
\input{chapters/01_introduction.tex}
\input{chapters/05_conclusions.tex}
\clearpage
\addcontentsline{toc}{chapter}{Bibliografia}
\printbibliography[heading=bibliography, title=Bibliografia]
\nocite{*}
\end{document}