-
Notifications
You must be signed in to change notification settings - Fork 4
/
unibs-analisi2.sty
191 lines (169 loc) · 6.84 KB
/
unibs-analisi2.sty
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
\ProvidesPackage{unibs-analisi2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mostly standard LaTeX packages %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[left = 2cm, right = 2cm, bottom = 3cm]{geometry}
\usepackage{babel}
\usepackage[babel,italian=quotes]{csquotes} % Change quotation marks to italian ones
\usepackage[toc,page]{appendix}
\usepackage{epigraph}
\usepackage{enumitem}
\usepackage{amsthm,amssymb}
\usepackage{imakeidx}
\makeindex % makeindex has to be here as it conflicts with tikz externalization and must be issued before tikz extern lib is loaded
\usepackage[makeroom]{cancel} % Used for cancelled math formulas
\usepackage{xcolor}
\usepackage{mathtools,thmtools}
\usepackage{shellesc} % Used to embed TikZ external with LuaLaTeX
\usepackage{tikz}
\usetikzlibrary{external,matrix,fit,quotes,babel,angles} % external requires --shell-escape LaTeX compiler switch
\tikzexternalize[prefix=build/]
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usepgfplotslibrary{fillbetween}
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage{float} % Used for precise placement of floating figures
\usepackage{subcaption} % Used to put multiple subfigures inside the same figure env
\captionsetup[subfigure]{justification=centering}
\usepackage{accents}
\usepackage{luatex85} % These bindings are needed for the changebar package
\usepackage[xcolor, outerbars]{changebar}
\usepackage[type={CC},modifier={by-nc-sa},version={4.0}]{doclicense}
\usepackage[stretch=10]{microtype} % Better impagination due to micro font shrinking and stretching
\usepackage[pdfencoding=auto]{hyperref} % Hyperref has to be the latest loaded package
\usepackage[capitalise]{cleveref} % Except for cleverref, which requires hyperref
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Content formatting and theorem numbering rules %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\counterwithout{section}{chapter}
\newtheoremstyle{break}% Custom theorem style to put thesis on a new line after the title.
{}% Space above, empty = `usual value'
{}% Space below
{}% Body font
{}% Indent amount (empty = no indent, \parindent = para indent)
{\bfseries}% Thm head font
{}% Punctuation after thm head
{\newline}% Space after thm head: \newline = linebreak
{}% Thm head spec
\theoremstyle{break}
\newtheorem{theorem}{Teorema}[section]
\newtheorem{definition}[theorem]{Definizione}
\newtheorem{proposition}[theorem]{Proposizione}
\newtheorem{observation}[theorem]{Osservazione}
\newtheorem{corollary}[theorem]{Corollario}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{example}[theorem]{Esempio}
\newtheorem{exercise}[theorem]{Esercizio}
\numberwithin{equation}{theorem}
\numberwithin{figure}{section}
\newtheoremstyle{note}
{ } % space above note
{ } % space below note
{\normalfont\small\addtolength{\leftskip}{1em}} % body font and position
{ } % space to indent the head
{\itshape\bfseries\color{orange}} % head font
{.} % punctuation between head and body
{ } % space after theorem head; " " = normal interword space
{ } % Manually specify head
\theoremstyle{note}
\newtheorem*{note}{Nota}
% Trick the following paragraph into believing it follows a heading, thus not adding pars or indentation
% Thanks to cgnieder from https://tex.stackexchange.com/a/126487/206062
\AfterEndEnvironment{note}{\@afterindentfalse\@afterheading}
\newenvironment{solution}
{
\renewcommand\qedsymbol{$\blacksquare$}
\begin{proof}[Soluzione]
}{
\end{proof}
}
\definecolor{not_explained_section_color}{HTML}{007002}
\cbcolor{not_explained_section_color}
\setlength{\changebarsep}{15pt}
\setlength{\changebarwidth}{10pt}
% Automatic conversion of double quotes to `` " with csquotes package.
% No need for inner quotes since there are no uses in this document.
\MakeOuterQuote{"}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Commands %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\norm}[1] {\left\|#1\right\|}
\newcommand{\abs}[1] {\left|#1\right|}
\newcommand{\brackets}[1] {\left\{#1\right\}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\integrald}[1]{\,\mathrm{d}{#1}}
\newcommand{\cntclass}[1] {\mathbf{C^{#1}}} % Continuity classes formalism
\newcommand{\intervalopen}[2] {\left]#1,#2\right[}
\newcommand{\intervalclose}[2] {\left[#1,#2\right]}
\newcommand{\intervalclop}[2] {\left[#1,#2\right[}
\newcommand{\intervalopcl}[2] {\left]#1,#2\right]}
\newcommand{\trigonpol}[3] {\frac{a_0}{2}+\sum\limits_{#1=#2}^{#3}a_{#1}cos(#1x)+b_{#1}sin(#1x)}
\newcommand{\bydef}{\rightleftharpoons}
\newcommand{\rvect}[1]{\begin{bmatrix} #1 \end{bmatrix}}
\newcommand{\circdot}[1]{\accentset{\circ}{#1}}
\newcommand*{\uconvarrow}{\overset{\text{u}}{\to}}
\newcommand*{\pconvarrow}{\overset{\text{p}}{\to}}
% Thanks to Werner from https://tex.stackexchange.com/a/47091/206062
\newcommand{\notimplies}{\mathrel{{\ooalign{\hidewidth$\not\phantom{=}$\hidewidth\cr$\implies$}}}}
\DeclareMathOperator{\diam}{diam}
\DeclareMathOperator{\grad}{grad}
\DeclareMathOperator{\mat}{Mat}
\DeclareMathOperator{\dom}{Dom}
\DeclareMathOperator{\id}{Id}
\DeclareMathOperator{\rank}{rank}
% Append the following to an equation in align* blocks to allow tagging single eq.
\newcommand*{\tageq}{\refstepcounter{equation}\tag{\theequation}}
% Use the following to reference stuff with its name appended.
\makeatletter
\newcommand{\fullref}{\@ifstar\fullrefStar\fullrefNoStar}
\makeatother
% Thanks to Oberdiek from https://tex.stackexchange.com/a/66096/206062
% Text only version
\newcommand*{\fullrefStar}[1]{%
\autoref*{#1}%
\if\vcenter\getrefbykeydefault{#1}{name}{}\vcenter
\else
~(\nameref*{#1})%
\fi
}
% Text with link
\newcommand*{\fullrefNoStar}[1]{%
\hyperref[{#1}]{%
\autoref*{#1}%
\if\vcenter\getrefbykeydefault{#1}{name}{}\vcenter
\else
~(\nameref*{#1})%
\fi
}%
}
% Same as the above command, but "Inverted"
% Will yield something like: Funzione Continua (Definizione 1.1)
\newcommand*{\reffull}[1]{%
\hyperref[{#1}]{%
\if\vcenter\getrefbykeydefault{#1}{name}{}\vcenter
\else
\nameref*{#1}%
\fi
~(\autoref*{#1})%
}%
}
% This command is a helper to formally declare functions
\newcommand{\funcdef}[5]{%
\begin{array}{ccccc}
{#1} & : & {#2} & \to & {#3} \\
& & {#4} & \mapsto & {#5} \\
\end{array}
}
% Display text "Nota" as in note environment heading
\newcommand*{\notestyle}{{\itshape\bfseries Nota}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Translation settings %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addto{\captionsitalian}{\renewcommand{\appendixpagename}{Appendici}}
\addto{\captionsitalian}{\renewcommand{\appendixtocname}{Appendici}}
% Due to the above renews, autoref looks for
% \Appendiceautorefname instead of \Appendixautorefname
\newcommand*{\Appendiceautorefname}{Appendice}