-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpreamble.sty
More file actions
146 lines (114 loc) · 4.24 KB
/
Copy pathpreamble.sty
File metadata and controls
146 lines (114 loc) · 4.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{preamble}[Preamble to the thesis, package
requirements and general settings]
% General font and typesetting packages
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{geometry}
\RequirePackage{tabu}
\RequirePackage[pdfa,hidelinks]{hyperref}
\RequirePackage{graphicx}
\RequirePackage{longtable}
\RequirePackage{wrapfig}
\RequirePackage{rotating}
\RequirePackage[normalem]{ulem}
\RequirePackage{capt-of} % Captions on more than floats
%%%%%%% MATH SYMBOLS %%%%%%%
\RequirePackage{proof} % proof environment
\RequirePackage{stmaryrd} % St Mary Road symbols for theoretical
% computer science
\RequirePackage{amssymb} % math symbols
\RequirePackage{amsfonts} % ams math fonts
\RequirePackage{amsthm} % theorem environments
\RequirePackage{amsmath} % ams math symbols
\RequirePackage{mathtools} % to introduce additional mathematical
% symbols
\RequirePackage{algorithm} % to treat algorithms as figures
\RequirePackage{algpseudocode} % to write algorithmic prseudocode
\RequirePackage{dsfont} % for math specific monospaced fonts
%%%%%%%% UTILITIES %%%%%%%%
\RequirePackage{multicol} % Multicolumn environment when needed
\RequirePackage{tikz} % to build images
\RequirePackage{enumitem} % for bettere enumerations (with
% custom labels)
\RequirePackage[
hyperref, % use hyperref in the pdf
style=alphabetic, % [Na98] style for references
backref=true, % to introduce backreferences in
% the bibliography
]{biblatex} % bibliography
\bibliography{references} % Bibliography is in the `references.bib` file
\RequirePackage{xcolor} % for colors
\RequirePackage{emptypage} % to introduce unnumbered but
% counted empty pages
\RequirePackage[size=tiny]{todonotes} % todo annotations
\RequirePackage{import} % for import structure, as explained in src/chapters
%%%% DATA AND COMMANDS %%%%
% \RequirePackage{data} % Thesis data, if needed
\RequirePackage{commands} % Thesis custom commands
%%%%%%%%%% CONFIG %%%%%%%%%%
\definecolor{unipdred}{RGB}{155,0,20}
\geometry{
top=25mm,
bottom=40mm,
left=30mm,
right=30mm
}
\usetikzlibrary{positioning}
%% TIKZ config for arrow stars
\usepgflibrary{plotmarks}
\tikzset{
to*/.style={
shorten >=.25em,#1-to,
to path={-- node[inner sep=0pt,at end,sloped] {${}^*$} (\tikztotarget) \tikztonodes}
},
to*/.default=
}
\makeatletter
\pgfarrowsdeclare{to*}{to*}
{
\pgfutil@tempdima=-0.84pt%
\advance\pgfutil@tempdima by-1.3\pgflinewidth%
\pgfutil@tempdimb=0.21pt%
\advance\pgfutil@tempdimb by.625\pgflinewidth%
\advance\pgfutil@tempdimb by2.5pt%
\pgfarrowsleftextend{+\pgfutil@tempdima}
\pgfarrowsrightextend{+\pgfutil@tempdimb}
}
{
\pgfutil@tempdima=0.28pt%
\advance\pgfutil@tempdima by.3\pgflinewidth%
\pgfsetlinewidth{0.8\pgflinewidth}
\pgfsetdash{}{+0pt}
\pgfsetroundcap
\pgfsetroundjoin
\pgfpathmoveto{\pgfqpoint{-3\pgfutil@tempdima}{4\pgfutil@tempdima}}
\pgfpathcurveto
{\pgfqpoint{-2.75\pgfutil@tempdima}{2.5\pgfutil@tempdima}}
{\pgfqpoint{0pt}{0.25\pgfutil@tempdima}}
{\pgfqpoint{0.75\pgfutil@tempdima}{0pt}}
\pgfpathcurveto
{\pgfqpoint{0pt}{-0.25\pgfutil@tempdima}}
{\pgfqpoint{-2.75\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}
{\pgfqpoint{-3\pgfutil@tempdima}{-4\pgfutil@tempdima}}
\pgfusepathqstroke
\begingroup
\pgftransformxshift{2.5pt}
\pgftransformyshift{2pt}
\pgftransformscale{.7}
\pgfuseplotmark{asterisk}
\endgroup
% \pgftext[left,y=2pt]{$\scriptstyle *$}
}
\makeatother
% double angle parenthesis with \lla and \rra
\makeatletter
\newsavebox{\@brx}
\newcommand{\lla}[1][]{\savebox{\@brx}{\(\m@th{#1\langle}\)}%
\mathopen{\copy\@brx\kern-0.5\wd\@brx\usebox{\@brx}}}
\newcommand{\rra}[1][]{\savebox{\@brx}{\(\m@th{#1\rangle}\)}%
\mathclose{\copy\@brx\kern-0.5\wd\@brx\usebox{\@brx}}}
\makeatother
% PDFa-2b standard, required for the thesis
\RequirePackage[a-2b,mathxmp]{pdfx}
%% \linespread{2}