-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpreamble.tex
executable file
·95 lines (84 loc) · 2.24 KB
/
preamble.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
\usepackage[a4paper,includeheadfoot,left=3cm, right=3cm, top=3cm, bottom=3cm]{geometry} % margin settings
\usepackage{booktabs}
\usepackage{makecell} % for tables
\usepackage{amsthm}
\makeatletter
\def\thm@space@setup{%
\thm@preskip=8pt plus 2pt minus 4pt
\thm@postskip=\thm@preskip
}
\makeatother
\usepackage{hyperref}
%---- define infoboxes ----%
\usepackage{tcolorbox}
\usepackage{xcolor}
% colors
\definecolor{background}{HTML}{fcfcfc}
\definecolor{tip-text}{HTML}{e7b002}
\definecolor{tip-line}{HTML}{fdce38}
\definecolor{warning-text}{HTML}{b06336}
\definecolor{warning-line}{HTML}{c97d50}
\definecolor{deffun-text}{HTML}{0b797e}
\definecolor{deffun-line}{HTML}{6CC2C9}
\definecolor{design-text}{HTML}{7c972e}
\definecolor{design-line}{HTML}{a7c84a}
\definecolor{trick-text}{HTML}{8c3031}
\definecolor{trick-line}{HTML}{A3595A}
\tcbuselibrary{breakable}
\newtcolorbox{mybox}[1][black]{
breakable,
colback=background,
coltext=black,
colframe=#1,
boxsep=5pt,
arc=4pt}
% tip
\newenvironment{tip}[1][Title]
{
\setlength{\fboxsep}{1em}
\begin{mybox}[tip-line]
\raisebox{-.2\height}{\includegraphics[height=.6cm]{images/lightbulb.png}} \large \textcolor{tip-text}{Tip-Box: #1}\\
}
{
\end{mybox}
}
% warning
\newenvironment{warning}[1][Title]
{
\setlength{\fboxsep}{1em}
\begin{mybox}[warning-line]
\raisebox{-.2\height}{\includegraphics[height=.6cm]{images/gotcha.png}} \large \textcolor{warning-text}{Warning-Box: #1}\\
}
{
\end{mybox}
}
% deffun
\newenvironment{deffun}[1][Title]
{
\setlength{\fboxsep}{1em}
\begin{mybox}[deffun-line]
\raisebox{-.2\height}{\includegraphics[height=.6cm]{images/gears.png}} \large \textcolor{deffun-text}{Definition-Box: #1}\\
}
{
\end{mybox}
}
% design
\newenvironment{design}[1][Title]
{
\setlength{\fboxsep}{1em}
\begin{mybox}[design-line]
\raisebox{-.2\height}{\includegraphics[height=.6cm]{images/design.png}} \large \textcolor{design-text}{Approfondimento: #1}\\
}
{
\end{mybox}
}
% trick
\newenvironment{trick}[1][Title]
{
\setlength{\fboxsep}{1em}
\begin{mybox}[trick-line]
\raisebox{-.2\height}{\includegraphics[height=.6cm]{images/hat.png}} \large \textcolor{trick-text}{Trick-Box: #1}\\
}
{
\end{mybox}
}