blob: b39c48d4b71093e3dab3cb014a776b59575eb9f5 [file] [log] [blame]
Adrià Vilanova Martínez24d87012022-06-16 00:29:59 +02001% !TEX root = main.tex
2\usepackage[utf8]{inputenc}
3\usepackage[catalan]{babel}
4\usepackage{fancyhdr}
5\usepackage{graphicx}
6\usepackage[labelfont=bf, font=small]{caption}
7\usepackage{siunitx}
8\usepackage{geometry}
9\geometry{
10 margin=20mm,
11 heightrounded
12}
13\usepackage{amsmath}
14\usepackage{amsfonts}
15\usepackage{booktabs}
16\usepackage{chemformula}
17\usepackage{hyperref}
18\usepackage[style=english]{csquotes}
19\usepackage{biblatex}
20\usepackage{pgfplotstable}
21\usepackage{adjustbox}
22\usepackage{array}
23\usepackage{float}
24\usepackage{stackengine}
25\usepackage{titling}
26\usepackage{algpseudocode}
27\usepackage{xcolor}
28
29\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
30\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
31\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
32
33\pgfplotsset{compat=1.16}
34\pgfplotstableset{
35 empty cells with={--}, % replace empty cells with ’--’
36 every head row/.style={before row=\toprule,after row=\midrule},
37 every last row/.style={after row=\bottomrule},
38 set thousands separator={\,}%,
39}
40\sisetup{separate-uncertainty=true}
41\setlength{\parskip}{1em}
42\pagestyle{fancy}
43\fancyhf{}
44
45% Plantilles del notate
46\def\myupbracefill#1{\rotatebox{90}{\stretchto{\{}{#1}}}
47\def\rlwd{.5pt}
48\newcommand\notate[4][B]{%
49 \if B#1\else\def\myupbracefill##1{}\fi%
50 \def\useanchorwidth{T}%
51 \setbox0=\hbox{$\displaystyle#2$}%
52 \def\stackalignment{c}\stackunder[-6pt]{%
53 \def\stackalignment{c}\stackunder[-1.5pt]{%
54 \stackunder[2pt]{\strut $\displaystyle#2$}{\myupbracefill{\wd0}}}{%
55 \rule{\rlwd}{#3\baselineskip}}}{%
56 \strut\kern9pt$\rightarrow$\smash{\rlap{$~#4$}}}%
57}
58\newcommand\lnotate[4][B]{%
59 \if B#1\else\def\myupbracefill##1{}\fi%
60 \def\useanchorwidth{T}%
61 \setbox0=\hbox{$\displaystyle#2$}%
62 \def\stackalignment{c}\stackunder[-6pt]{%
63 \def\stackalignment{c}\stackunder[-1.5pt]{%
64 \stackunder[2pt]{\strut $\displaystyle#2$}{\myupbracefill{\wd0}}}{%
65 \rule{\rlwd}{#3\baselineskip}}}{%
66 \strut\kern-9pt$\leftarrow$\smash{\llap{$~#4\quad\;\,$}}}%
67}
68
69\newcommand{\Ham}{\mathcal{H}}
70
71\definecolor{CommentGray}{gray}{0.5}
72\algrenewcommand\algorithmiccomment[1]{{\color{CommentGray} \hfill\(\triangleright\) #1}}%
73
74% To prevent underfull/overfull messages in bibliography
75\usepackage{etoolbox}
76\apptocmd{\sloppy}{\hbadness 10000\relax}{}{}
77
78\usepackage{enumitem}
79\setlist{nolistsep}