forked from teobucci/mida
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.tex
316 lines (267 loc) · 10.7 KB
/
style.tex
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Template Dispense
% Autore: Teo Bucci
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% FONTS AND LANGUAGE
%----------------------------------------------------------------------------------------
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[english]{babel} % Italian language/hyphenation
%----------------------------------------------------------------------------------------
% PACKAGES
%----------------------------------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm} % amssymb carica anche amsfonts
\usepackage{dsfont} % per funzione indicatrice
\newcommand{\Ind}{\mathds{1}}
%\usepackage{tikz-among-us}
\usepackage{booktabs}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.misc,intersections,shapes.symbols}
\usepackage{mathdots}
\usepackage{cancel}
\usepackage{color}
\usepackage{siunitx}
\usepackage{array}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{tabularx}
%\usepackage{booktabs}
\usepackage{caption}\captionsetup{belowskip=12pt,aboveskip=4pt}
\usepackage{subcaption}
\usepackage{placeins} % The placeins package gives the command \FloatBarrier, which will make sure any floats will be put in before this point
\usepackage{flafter} % The flafter package ensures that floats don't appear until after they appear in the code.
\usepackage{import}
\usepackage{pdfpages}
\usepackage{transparent}
\usepackage{xcolor}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\usepackage{float}
\usepackage[italian]{varioref}
\newcommand{\fg}[3][\relax]{%
\begin{figure}[H]%[htp]%
\centering
\captionsetup{width=0.7\textwidth}
\includegraphics[width = #2\textwidth]{#3}%
\ifx\relax#1\else\caption{#1}\fi
\label{#3}
\end{figure}%
\FloatBarrier%
}
%----------------------------------------------------------------------------------------
% PARAGRAFI, INTERLINEA E MARGINE
%----------------------------------------------------------------------------------------
\usepackage[none]{hyphenat} % Per non far andare a capo le parole con il trattino
\emergencystretch 3em % Per evitare che il testo vada oltre i margini
% \parindent 0ex % Toglie intendamento paragrafi, e' incluso nel pacchetto \parskip
% \setlength{\parindent}{4em} % Variante di quello sopra
% \setlength{\parskip}{\baselineskip} % Cambia spazio tra paragrafi (posso mettere anche 1em) inclusa la table of contents, pertanto uso il comando che segue
\usepackage[skip=0.2\baselineskip+2pt]{parskip}
% \renewcommand{\baselinestretch}{1.5} % Cambia interlinea
%----------------------------------------------------------------------------------------
% HEADERS AND FOOTERS
%----------------------------------------------------------------------------------------
\usepackage{fancyhdr}
\fancypagestyle{toc}{%
\fancyhf{}%
\fancyfoot[C]{\thepage}%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}
}
\fancypagestyle{fancy}{%
\fancyhf{}%
\fancyhead[RE]{\nouppercase{\leftmark}}%
\fancyhead[LO]{\nouppercase{\rightmark}}%
\fancyhead[LE,RO]{\thepage}%
\renewcommand{\footrulewidth}{0pt}%
\renewcommand{\headrulewidth}{0.4pt}
}
% Removes the header from odd empty pages at the end of chapters
\makeatletter
\renewcommand{\cleardoublepage}{
\clearpage\ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\thispagestyle{empty}
\newpage
\fi}
%----------------------------------------------------------------------------------------
% COMANDI PERSONALIZZATI
%----------------------------------------------------------------------------------------
\newcommand{\Tau}{\mathcal{T}}
\DeclareMathOperator{\sgn}{sgn}
\newcommand{\degree}{^\circ\text{C}} % SIMBOLO GRADI
\newcommand{\notimplies}{\mathrel{{\ooalign{\hidewidth$\not\phantom{=}$\hidewidth\cr$\implies$}}}}
\renewcommand{\qed}{\tag*{$\blacksquare$}}
\usepackage{xspace}
\newcommand{\latex}{\LaTeX\xspace}
\newcommand{\tex}{\TeX\xspace}
\newcommand{\questeq}{\overset{?}{=}} % è vero che?
\newcommand{\complementary}{^{\mathrm{C}}}
\newcommand{\transpose}{^{\mathrm{T}}}
\renewcommand{\emptyset}{\varnothing} % simbolo insieme vuoto
\newcommand{\Bot}{\perp \!\!\! \perp} % indipendenza
\renewcommand{\tilde}{\widetilde}
\renewcommand{\hat}{\widehat}
\renewcommand{\theta}{\vartheta}
\newcommand{\boxedText}[1]{\noindent\fbox{\parbox{\textwidth-0.5cm}{#1}}}
\usepackage{mathtools} % Serve per i comandi dopo
\DeclarePairedDelimiter{\abs}{\left\lvert}{\right\rvert}
\DeclarePairedDelimiter{\norm}{\left\lVert}{\right\rVert}
\DeclarePairedDelimiter{\sca}{\left\langle}{\right\rangle}
\newcommand{\fou}[1]{\mathcal{F}\left\{#1\right\}}
\newcommand{\ifou}[1]{\mathcal{F}^{-1}\left\{#1\right\}}
\newcommand{\Mc}{\mathcal{M}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
%\DeclarePairedDelimiter{\fou}{\mathcal{F}}{}
%\DeclarePairedDelimiter{\ifou}{\mathcal{F}^{-1}\left\{}{\right\}}
%----------------------------------------------------------------------------------------
% APPENDICE
%----------------------------------------------------------------------------------------
\usepackage[toc,page]{appendix}
%----------------------------------------------------------------------------------------
% SIMBOLI CARTE DA GIOCO
%
% Sono i seguenti:
% \varheartsuit
% \vardiamondsuit
% \clubsuit
% \spadesuit
%----------------------------------------------------------------------------------------
\DeclareSymbolFont{extraup}{U}{zavm}{m}{n}
\DeclareMathSymbol{\varheartsuit}{\mathalpha}{extraup}{86}
\DeclareMathSymbol{\vardiamondsuit}{\mathalpha}{extraup}{87}
%----------------------------------------------------------------------------------------
\definecolor{grey245}{RGB}{245,245,245}
\newtheoremstyle{blacknumbox} % Theorem style name
{0pt}% Space above
{0pt}% Space below
{\normalfont}% Body font
{}% Indent amount
{\bf\scshape}% Theorem head font --- {\small\bf}
{.\;}% Punctuation after theorem head
{0.25em}% Space after theorem head
{\small\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
%{\small\thmname{#1}% Theorem text (e.g. Theorem)
\thmnote{\nobreakspace\the\thm@notefont\normalfont\bfseries---\nobreakspace#3}}% Optional theorem note
% Per gli unnumbered tolgo il \nobreakspace subito dopo {\small\thmname{#1} perché altrimenti c'è uno spazio tra Teorema e il ".", lo spazio lo voglio solo se sono numerati per distanziare Teorema e "(2.1)"
\newtheoremstyle{unnumbered} % Theorem style name
{0pt}% Space above
{0pt}% Space below
{\normalfont}% Body font
{}% Indent amount
{\bf\scshape}% Theorem head font --- {\small\bf}
{.\;}% Punctuation after theorem head
{0.25em}% Space after theorem head
{\small\thmname{#1}\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
%{\small\thmname{#1}% Theorem text (e.g. Theorem)
\thmnote{\nobreakspace\the\thm@notefont\normalfont\bfseries---\nobreakspace#3}}% Optional theorem note
\newcounter{dummy}
\numberwithin{dummy}{chapter}
\theoremstyle{blacknumbox}
\newtheorem{definitionT}[dummy]{Definition}
\newtheorem{theoremT}[dummy]{Theorem}
\theoremstyle{unnumbered}
\newtheorem*{ossT}{Observation}
\newtheorem*{exT}{Example}
\newtheorem*{dimT}{Proof}
\RequirePackage[framemethod=default]{mdframed} % Required for creating the theorem, definition, exercise and corollary boxes
% orange box
\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
linecolor=orange,
backgroundcolor=orange!5,
innerleftmargin=5pt,
innerrightmargin=5pt,
innertopmargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=2pt,
innerbottommargin=5pt]{oBox}
% green box
\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
linecolor=green,
backgroundcolor=green!0,
innerleftmargin=5pt,
innerrightmargin=5pt,
innertopmargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=2pt,
innerbottommargin=5pt]{gBox}
% blue box
\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
linecolor=blue,
backgroundcolor=blue!0,
innerleftmargin=5pt,
innerrightmargin=5pt,
innertopmargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=2pt,
innerbottommargin=5pt]{bBox}
% dim box
\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
linecolor=black,
backgroundcolor=grey245!0,
innerleftmargin=5pt,
innerrightmargin=5pt,
innertopmargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=2pt,
innerbottommargin=5pt]{dimBox}
\newenvironment{theorem}{\begin{gBox}\begin{theoremT}}{\end{theoremT}\end{gBox}}
\newenvironment{definition}{\begin{bBox}\begin{definitionT}}{\end{definitionT}\end{bBox}}
\newenvironment{obs}{\begin{dimBox}\begin{ossT}}{\end{ossT}\end{dimBox}}
\newenvironment{example}{\begin{oBox}\begin{exT}}{\end{exT}\end{oBox}}
\newenvironment{dimostrazione}{\begin{dimBox}\begin{dimT}}{\[\qed\]\end{dimT}\end{dimBox}}
%----------------------------------------------------------------------------------------
% INDICE INIZIALE
%----------------------------------------------------------------------------------------
\setcounter{secnumdepth}{3} % DI DEFAULT LE SUBSUBSECTION NON SONO NUMERATE, COSÌ SÌ
\setcounter{tocdepth}{2} % FISSA LA PROFONDITÀ DELLE COSE MOSTRATE NELL'INDICE
%\usepackage[hidelinks,bookmarksnumbered]{hyperref} % Rende l'indice interattivo e hidelinks nasconde il bordo rosso dai riferimenti
\usepackage{bookmark}% loads hyperref too
\hypersetup{
%pdftitle={Fundamentos de C\'alculo},
%pdfsubject={C\'alculo diferencial},
bookmarksnumbered=true,
bookmarksopen=true,
bookmarksopenlevel=1,
hidelinks,% remove border and color
pdfstartview=Fit, % Fits the page to the window.
pdfpagemode=UseOutlines, %Determines how the file is opening in Acrobat; the possibilities are UseNone, UseThumbs (show thumbnails), UseOutlines (show bookmarks), FullScreen, UseOC (PDF 1.5), and UseAttachments (PDF 1.6). If no mode if explicitly chosen, but the bookmarks option is set, UseOutlines is used.
}
\usepackage{glossaries} % certain packages that must be loaded before glossaries, if they are required: hyperref, babel, polyglossia, inputenc and fontenc
\setacronymstyle{long-short}
% Questo comando e quello dopo servono per avere il comando \tocless da mettere prima di una sezione che non voglio far apparire nell'indice
\newcommand{\nocontentsline}[3]{}
\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}
%\usepackage{showframe}
\usepackage[textsize=tiny, textwidth=1.5cm]{todonotes} %add disable to options to not show in pdf