1
0

Improve on default template with better colors and styles

This commit is contained in:
2026-07-17 13:00:39 +02:00
parent a9819b9335
commit a2ed6f1e09
+116 -84
View File
@@ -1,6 +1,4 @@
% Elaborato della prova finale per il conseguimento della laurea triennale in Ingegneria Informatica presso il dipartimento di Ingegneria "Enzo Ferrari" dell'università di Modena e Reggio Emilia % font size
% Carattere dimensione 12
\documentclass[12pt]{report} \documentclass[12pt]{report}
% Margini (2.5cm su tutti i lati) % Margini (2.5cm su tutti i lati)
@@ -8,91 +6,129 @@
% Interlinea % Interlinea
\linespread{1.5} \linespread{1.5}
\usepackage[italian]{babel} % applicazione regole di scrittura per la lingua italiana
\usepackage[utf8]{inputenc} % codifica UTF-8 % Lingua e codifica
\usepackage{scrlayer-scrpage} % stili pagina per il frontespizio \usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% Stile ClassicThesis
\usepackage{newpxtext, newpxmath}
\usepackage{microtype}
\usepackage{parskip} % no indent
% Pagina e intestazioni
\usepackage{scrlayer-scrpage}
\ifoot[]{} \ifoot[]{}
\cfoot[]{} \cfoot[]{}
\ofoot[\pagemark]{\pagemark} \ofoot[\pagemark]{\pagemark}
\pagestyle{scrplain} \pagestyle{scrplain}
\usepackage[hidelinks]{hyperref} % pacchetto per l'utilizzo dei link
\usepackage[T1]{fontenc}
\usepackage{inconsolata}
\usepackage{newtxtext,newtxmath} % font Times New Roman (simile)
\usepackage{graphicx} % inserimento di immagini
\usepackage{csquotes} % per le citazioni "in blocco"
\usepackage{booktabs}
\usepackage{adjustbox}
\usepackage{filehook}
\usepackage{makecell}
\usepackage{pifont}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage{graphicx} % inserimento di immagini
\usepackage{subcaption} % per le sottofigure
\usepackage[bottom]{footmisc}
\usepackage[backend=biber, sorting=nty, defernumbers=true]{biblatex} % bibliografia con pacchetto biblatex
\usepackage{verbatim} % per usare \begin{comment} \end{comment}
\usepackage{multirow}
\appto{\bibsetup}{\raggedright}
\addbibresource{bibliography.bib} % Collega il file della bibliografia
\usepackage{titlesec} % per la formattazione dei titoli delle sezioni, capitoli etc. % Colori generali
\usepackage{float} % per il posizionamento delle immagini \usepackage{xcolor}
\definecolor{unimorered}{RGB}{237, 77, 45}
\definecolor{unimoregrey}{RGB}{84, 84, 84}
\definecolor{unimoreblack}{RGB}{0, 0, 0}
\definecolor{unimorewhite}{RGB}{255, 255, 255}
\definecolor{urlblue}{RGB}{0, 0, 238}
\usepackage{listings} % per il codice di programmazione % Colori codice
\usepackage{color}
\usepackage{xurl}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{booktabs} % for \toprule, \midrule, \bottomrule in tables
\usepackage{algorithm}
\usepackage{algpseudocode}
% Definizione dei colori per il codice
\definecolor{lightgray}{rgb}{.9,.9,.9} \definecolor{lightgray}{rgb}{.9,.9,.9}
\definecolor{darkgray}{rgb}{.4,.4,.4} \definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82} \definecolor{purple}{rgb}{0.65, 0.12, 0.82}
\definecolor{mygreen}{rgb}{0,0.6,0} \definecolor{green}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5} \definecolor{grey}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82} \definecolor{mauve}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92} \definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\usepackage[hidelinks]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=unimoreblack,
filecolor=unimoreblack,
citecolor=unimoreblack,
urlcolor=urlblue,
}
% 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\huge\bfseries\color{unimoreblack}}
{\chaptertitlename\ \thechapter}
{20pt}
{\Huge\color{unimoreblack}}
\titlespacing*{\chapter}{0pt}{-20pt}{40pt}
\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{inconsolata}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{xurl}
% Utility
\usepackage{verbatim}
\usepackage{filehook}
\usepackage{pifont}
\usepackage[bottom]{footmisc}
\usepackage{enumitem}
\usepackage{tikz}
\usetikzlibrary{calc}
% Stili per i linguaggi di programmazione % Stili per i linguaggi di programmazione
\lstdefinelanguage{JavaScript}{ \lstdefinelanguage{MyPython}{
keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, let, const, if, in, while, do, else, case, break}, language=Python,
keywordstyle=\color{blue}\bfseries, morekeywords={with, as},
ndkeywords={class, export, boolean, throw, implements, import, this}, keywordstyle=\bfseries\color{blue},
ndkeywordstyle=\color{darkgray}\bfseries, commentstyle=\color{green},
identifierstyle=\color{black}, stringstyle=\color{mauve},
sensitive=false,
comment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]',
morestring=[b]",
commentstyle=\color{mygreen}\ttfamily,
stringstyle=\color{mymauve}\ttfamily,
backgroundcolor=\color{backcolour}, backgroundcolor=\color{backcolour},
basicstyle=\footnotesize\ttfamily, basicstyle=\footnotesize\ttfamily,
showstringspaces=false, showstringspaces=false,
extendedchars=true,
showspaces=false,
numbers=left, numbers=left,
numberstyle=\footnotesize, numberstyle=\footnotesize,
numbersep=9pt, numbersep=9pt,
tabsize=2, tabsize=2,
breaklines=true, breaklines=true,
showtabs=false, showtabs=false,
captionpos=b captionpos=t
} }
\lstdefinelanguage{MyPython}{ \lstdefinelanguage{C}{
language=Python, language=C,
morekeywords={with, as}, morekeywords={with, as},
keywordstyle=\bfseries\color{blue}, keywordstyle=\bfseries\color{blue},
commentstyle=\color{mygreen}, commentstyle=\color{green},
stringstyle=\color{mymauve}, stringstyle=\color{mauve},
backgroundcolor=\color{backcolour}, backgroundcolor=\color{backcolour},
basicstyle=\footnotesize\ttfamily, basicstyle=\footnotesize\ttfamily,
showstringspaces=false, showstringspaces=false,
@@ -137,47 +173,43 @@
keepspaces=true, keepspaces=true,
} }
% Formato delle intestazioni
\titleformat{\chapter}[block]
{\normalfont\LARGE\bfseries}{\thechapter.}{0.5em}{\LARGE}
\titlespacing*{\chapter}{0pt}{-20pt}{25pt}
\usepackage{enumitem} \usepackage{enumitem}
\begin{document} \begin{document}
\begin{titlepage} \begin{titlepage}
% UniMore color accent line
{\color{unimorered}\rule{\textwidth}{2pt}}
\begin{center} \begin{center}
\includegraphics[width=8cm]{assets/images/unimore/Sigillo2015.png} \includegraphics[width=8cm]{assets/images/unimore/Sigillo2015.png}
\vspace{1cm} \vspace{1cm}
{\LARGE{ UNIVERSITÀ DEGLI STUDI DI MODENA \\E REGGIO EMILIA \\}} {\LARGE\color{unimoregrey}{ UNIVERSITÀ DEGLI STUDI DI MODENA \\E REGGIO EMILIA \\}}
{\large{ Dipartimento di Ingegneria "Enzo Ferrari" \\}} {\large\color{unimoregrey}{ Dipartimento di Ingegneria "Enzo Ferrari" \\}}
{\large{ Corso di Laurea Triennale in Ingegneria del Veicolo (L-??) \\}} {\large\color{unimoregrey}{ Corso di Laurea Triennale in Ingegneria del Veicolo (L-??) \\}}
\vspace{3cm} \vspace{3cm}
{\Large { \textbf{<Titolo dell'Elaborato>} }}\\ {\Large\color{unimoreblack}{ \textbf{<Titolo dell'Elaborato>} }}\\
\vspace{3cm} \vspace{3cm}
\end{center} \end{center}
\begin{minipage}[t]{0.47\textwidth} \begin{minipage}[t]{0.47\textwidth}
{\large{\bf Tutor:}\\} {\large\color{unimoregrey}{\bf Tutor:}\\}
{\large Prof. <Nome Cognome>} {\large\color{unimoreblack}{Prof. <Nome Cognome>}}
\end{minipage}\hfill\begin{minipage}[t]{0.47\textwidth}\raggedleft \end{minipage}\hfill\begin{minipage}[t]{0.47\textwidth}\raggedleft
{\large{\bf Candidato:}\\} {\large\color{unimoregrey}{\bf Candidato:}\\}
{\large <Nome Cognome>}\\ {\large\color{unimoreblack}{<Nome Cognome>}\\}
{\large Matricola <matricola>} {\large\color{unimoreblack}{Matricola <matricola>}}
\end{minipage} \end{minipage}
\vfill \vfill
{\color{unimorered}\rule{\textwidth}{1pt}}
\hrulefill\\ \hrulefill\\
\centering{\large{\bf ANNO ACCADEMICO 20XX/20XX }} \centering{\large\color{unimoregrey}{\bf ANNO ACCADEMICO 20XX/20XX }}
\end{titlepage} \end{titlepage}
\pagestyle{empty}
\clearpage \clearpage
\pagenumbering{roman}
\tableofcontents % Genera l'Indice \tableofcontents % Genera l'Indice
\renewcommand{\listfigurename}{Elenco delle Figure} \renewcommand{\listfigurename}{Elenco delle Figure}
@@ -188,8 +220,8 @@
\lstlistoflistings % Genera la Lista dei Codici \lstlistoflistings % Genera la Lista dei Codici
\clearpage \clearpage
\pagestyle{scrplain} % Ripristina lo stile di pagina normale (con numero di pagina) \pagestyle{scrplain}
\setcounter{page}{1} % Fa ripartire la numerazione da 1 \pagenumbering{arabic}
% Aggiungi qui i capitoli % Aggiungi qui i capitoli
\input{chapters/01_introduction.tex} \input{chapters/01_introduction.tex}
@@ -209,4 +241,4 @@
\nocite{*} \nocite{*}
\end{document} \end{document}