Files
tesi_triennale/tesi.ltx
2024-07-30 15:01:18 +02:00

244 lines
6.2 KiB
TeX

\documentclass[12pt, oneside]{article}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
%% Load Packages %%
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\usepackage[
top=2.5cm,
bottom=2.5cm,
left=4cm,
right=2.5cm,
headheight=22pt,
centering
]{geometry}
\geometry{a4paper}
\usepackage[utf8]{inputenc} %% use UTF-8, maybe not needed since 2018
\usepackage[english,main=italian]{babel} %% language
\pagestyle{headings}
\usepackage{scrlayer-scrpage}
\usepackage{csquotes} %% correct language also for citations
\ifoot[]{}
\cfoot[]{}
\ofoot[\pagemark]{\pagemark}
\pagestyle{scrplain}
\usepackage[
backend=biber,
style=numeric,
sorting=ynt
]{biblatex} %% for citations
\addbibresource{tesi.bib}
\usepackage{import} %% specify path for import
%% math packages
\usepackage{graphicx} %% for pictures
\usepackage{float}
\usepackage{amssymb} %% math symbols
\usepackage{amsmath} %% math matrix etc
\usepackage{listings} %% code block
\usepackage{tabularray} %% better tables
\usepackage{booktabs} %% rules for tables
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{algorithm} %% for algorithms
\usepackage{algpseudocode} %% loads algorithmicx
\usepackage{amsthm}
\usepackage{thmtools} %% theorems
%% plot packages
\usepackage{pgfplots} %% plots used with \begin{tikzpicture}
\usepackage{tikz} %% for pictures
\usetikzlibrary{trees}
\pgfplotsset{width=10cm,compat=newest}
%% design packages
\usepackage{enumitem} %% for lists and enumerating
\usepackage{color}
\usepackage{xcolor,colortbl} % xcolor for defining colors, colortbl for table colors
\usepackage{makecell} %% for multiple lines in cell of table
\usepackage{cancel}
\usepackage{pgfornament} %% ornaments
%% load last
\usepackage[hidelinks]{hyperref} %% links for table of contents, load last
\usepackage{bookmark} %% for better table of contents
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
%% Configuration of the packages %%
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\linespread{1.5}
\raggedbottom %% spaces if page is empty % chktex 1
%% set max table of contents recursion to subsection (3->subsubsecition)
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
%% use bar instead of arrow for vectors
\renewcommand{\vec}[1]{\bar{#1}}
%% easy norm
\newcommand{\norm}[1]{\left\lvert#1\right\rvert}
%% itemize use less vertical space (use olditemize for default behaviour)
\let\olditemize=\itemize%% old itemize
\let\endolditemize=\enditemize%% old end itemize
\renewenvironment{itemize}{\olditemize\itemsep-0.2em}{\endolditemize}
%% items in itemize emph+box
%% usage: \ieb{Class:} for simple item
%% \ieb[4cm]{Class:} for specific size of box
\newcommand{\ieb}[2][2cm]{
\makebox[#1][l]{\emph{#2}}
} %% TODO: replace with description environment (? maybe)
% less vertical space around align & align*
\newcommand{\zerodisplayskips}{
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
}
% make dotfill use all the space available
\renewcommand{\dotfill}{
\leavevmode\cleaders\hbox to 1.00em{\hss .\hss }\hfill\kern0pt } % chktex 1 chktex 26
\setlength{\fboxsep}{-\fboxrule} % for debugging
%% PACKAGE algorithm
\floatname{algorithm}{Algoritmo}
%% PACKAGE tabularray
\UseTblrLibrary{amsmath}
%% PACKAGE color
\definecolor{red}{rgb}{1, 0.1, 0.1}
\definecolor{lightgreen}{rgb}{0.55, 0.87, 0.47}
\definecolor{gray}{rgb}{0.3, 0.3, 0.3}
\newcommand{\lgt}{\cellcolor{lightgreen}} %% light green in tables
\newcommand{\gry}{\textcolor{gray}} %% gray text
%% PACKAGE minipage
\newcommand{\thend}[1]{\begin{center}
\begin{minipage}[c][1em][c]{#1}
\dotfill{}
\end{minipage}
\end{center}}
%% PACKAGE thmtools
\declaretheoremstyle[
headfont=\normalfont\bfseries,
notefont=\mdseries,
bodyfont=\normalfont,
qed=\qedsymbol % chktex 1
]{steo}
\declaretheorem[numbered=no, style=steo]{teorema}
% \declaretheorem[thmbox=S]{teorema}
\declaretheoremstyle[
headfont=\normalfont\bfseries,
notefont=\mdseries,
bodyfont=\normalfont,
]{sdef}
\declaretheorem[numbered=no, style=sdef]{definizione}
\declaretheoremstyle[
spaceabove=-6pt,
spacebelow=6pt,
headfont=\normalfont\bfseries,
bodyfont=\normalfont,
postheadspace=1em,
qed=$\blacksquare$,
headpunct={:}
]{sprf}
\declaretheorem[name={Dimostrazione}, style=sprf, numbered=no]{dimostrazione}
%% PACKAGE
\lstset{
language=C,
showspaces=false,
basicstyle=\small\ttfamily,
numbers=left,
numberstyle=\tiny,
breaklines=true,
postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
backgroundcolor = \color{lightgray},
}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\title{Tesi}
\author{
Elvis Rossi
Matricola 561394
}
\date{\today}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\begin{document}
\pagenumbering{roman}
\input{titlepage.ltx}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\newpage
\null % chktex 1
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
\color{black!30}\pgfornament[width=2cm]{123}
\end{center}
\newpage
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\tableofcontents
\newpage
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\pagenumbering{arabic}
\setcounter{page}{1}
% \newgeometry{top=2.5cm,
% bottom=2.5cm,
% left=2.5cm,
% right=4cm,
% headheight=22pt,
% centering} %% flip the inner and outer pages because we reset page counter
% %% and the last page was odd
\input{introduzione.ltx}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\input{definizioni.ltx}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\input{applicazioni.ltx}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\input{conclusioni.ltx}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\printbibliography{}
\end{document}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%