-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstile-generale.sty
More file actions
executable file
·218 lines (183 loc) · 5.34 KB
/
Copy pathstile-generale.sty
File metadata and controls
executable file
·218 lines (183 loc) · 5.34 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
% !TEX root = ./main.tex
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{stile-generale}[2025/05/21 Stile base generale]
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[english]{babel}
\RequirePackage{graphicx}
\RequirePackage{microtype}
\RequirePackage{subfiles}
\RequirePackage{enumitem} % per personalizzare gli elenchi
\RequirePackage{pgfplots} % per grafici
\pgfplotsset{compat=1.18} % per grafici
\RequirePackage{csquotes}
\RequirePackage{lmodern} %font
\RequirePackage{lipsum} % Pacchetto per testo Lorem Ipsum
\RequirePackage{amsmath,amssymb}
\RequirePackage{fontawesome5} % metadati, mail, GitHub, ORCID e sito!!!!
\RequirePackage{setspace} % per interlinea
\RequirePackage{ragged2e}
%----------------------------
\RequirePackage{geometry}
\geometry{margin=3.75cm}
%-------fancyhdr---------
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
% \fancyhead[LE,RO]{\thepage}
% \fancyhead[RE]{\leftmark}
% \fancyhead[LO]{\rightmark}
% Fix for fancyhdr headheight warning
\setlength{\headheight}{14.5pt}
\addtolength{\topmargin}{-2.5pt}
%--------------biblatex-------------------
\RequirePackage[backend=biber,style=apa]{biblatex}
% --- Traccia le voci citate in una categoria ---
\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}
%---------------------------------
% senza queste righe i capitoli iniziano sempre su pagina dispari
\makeatletter
\renewcommand{\cleardoublepage}{\clearpage}
\makeatother
%---------------------------------
\RequirePackage{hyperref}
\hypersetup{
colorlinks=false,
pdftitle={Literature Review},
pdfpagemode=FullScreen,
}
%------IMMAGINI----
\RequirePackage{caption}
\captionsetup[figure]{
font=small,
labelfont=bf,
labelsep=colon,
justification=centering,
name=Figura
}
\newcommand{\immagine}[3][0.8\textwidth]{%
\begin{figure}[ht]
\centering
\includegraphics[width=#1]{#2}
\caption{#3}
\end{figure}
}
%--------TABELLE-----
\RequirePackage{booktabs}
\RequirePackage{array}
\captionsetup[table]{
font=small,
labelfont=bf,
labelsep=colon,
justification=centering,
name=Tabella
}
\newcommand{\tabelladuecolonne}[4]{%
\begin{table}[ht]
\centering
\begin{tabular}{#1}
\toprule
#2 \\ \midrule
#3 \\
\bottomrule
\end{tabular}
\caption{#4}
\end{table}
}
\newcommand{\tabellacsv}[2][]{%
\begin{table}[ht]
\centering
\pgfplotstabletypeset[
col sep=comma,
string type,
header=true,
columns/.style={every column/.style={
column type={>{\raggedright\arraybackslash}p{3cm}}
}},
#1
]{#2}
\caption{Tabella da CSV}
\end{table}
}
% --- Sottotitolo con titling ---
\RequirePackage{titling}
\makeatletter
\newcommand{\subtitle}[1]{\gdef\@subtitle{#1}} % memorizza il sottotitolo
\newcommand{\@subtitle}{} % inizializza vuoto
\renewcommand{\maketitlehookb}{% stampa dopo il titolo, prima degli autori
\ifx\@subtitle\@empty\else
\par\medskip
\begin{center}\large\itshape\@subtitle\end{center}
\fi}
\makeatother
% --- Metadati + comandi link (mail/GitHub/ORCID/sito) ----
% di default sono vuoti: i valori veri li metti nel main ---
\providecommand{\Uni}{}
\providecommand{\Dept}{}
\providecommand{\Course}{}
\providecommand{\Instructor}{}
\providecommand{\AuthorName}{}
\providecommand{\AuthorID}{}
\providecommand{\AuthorEmailAddr}{}
\providecommand{\GitUser}{}
\providecommand{\GitRepo}{}
\providecommand{\ORCIDid}{}
\providecommand{\WebsiteURL}{}
\providecommand{\DocVersion}{}
\providecommand{\LastUpdated}{}
\providecommand{\Keywords}{}
\providecommand{\JEL}{}
% --- Comandi formattati ---
\newcommand{\Email}{\href{mailto:\AuthorEmailAddr}{\faEnvelope\ \AuthorEmailAddr}}
\newcommand{\GitHubProfile}{\href{https://github.com/\GitUser}{\faGithub\ \texttt{\GitUser}}}
\newcommand{\GitHubRepo}{\href{https://github.com/\GitUser/\GitRepo}{\faCodeBranch\ \texttt{\GitUser/\GitRepo}}}
\newcommand{\ORCID}{\href{https://orcid.org/\ORCIDid}{\faOrcid\ \ORCIDid}}
\newcommand{\Website}{\href{\WebsiteURL}{\faGlobe\ \WebsiteURL}}
\newcommand{\CCBY}{\href{https://creativecommons.org/licenses/by/4.0/}{CC BY 4.0}}
% --- Helper per repo (se GitRepo è vuoto, link al profilo) ---
\makeatletter
\newcommand{\PrintRepoLink}{%
\ifx\GitRepo\@empty
\href{https://github.com/\GitUser}{github.com/\GitUser}%
\else
\GitHubRepo%
\fi
}
\makeatother
% --- Macro per Titlepage (titolo e data li passi dal main) ---
\newcommand{\CustomTitlePage}[2]{%
\begin{titlepage}
\thispagestyle{empty}
\begin{center}
\vspace*{1.4cm}
{\LARGE \textbf{#1}\par}
\vspace{0.45cm}
{\large \Uni \quad\textbar\quad \Dept\par}
\vspace{0.45cm}
{\Course \par}
\vspace{0.45cm}
{\textbf{\AuthorName\ \small{\AuthorID}} \par}
\vspace{0.45cm}
{\small \Email \quad\textbar\quad \GitHubProfile \quad\textbar \par}
\vspace{0.2cm}
{\small \ORCID \quad\textbar \par}
\vspace{0.45cm}
{\small \textbf{\LaTeX\ sources:}\; \PrintRepoLink\par}
\vspace{0.45cm}
{\small \textbf{Version:} \DocVersion \quad\textbar\quad
\textbf{Last updated:} \LastUpdated\par}
% \vspace{0.45cm}
% {\small \textbf{Keywords:} \Keywords\par}
% \vspace{0.45cm}
% {\small \textbf{JEL:} \JEL\par}
\vspace{0.45cm}
{\small \textbf{Prepared for:} \Course, taught by \Instructor\par}
\vspace{0.45cm}
{\small \textbf{License:} \CCBY\par}
\vfill
{\small #2\par}
\end{center}
\end{titlepage}
}
% ------------ END ---------------