blob: 75a52d4008606807684f376ddf947f83b1964dea [file] [log] [blame]
avm99963b52713b2021-05-19 17:58:12 +02001\usepackage[catalan]{babel}
2\usepackage{lmodern}
3\usepackage{amsmath}
4\usepackage{amsfonts}
5\usepackage{amssymb}
6\usepackage{mathtools}
7\usepackage{parskip}
8\usepackage{xcolor}
9\usepackage{tcolorbox}
10%\usepackage{hyperref}
11\usepackage{geometry}
12\usepackage{physics}
13\usepackage{systeme,mathtools}
14\usepackage[usestackEOL]{stackengine}
15\usepackage{scalerel}
16\usepackage{graphicx}
17\usepackage{enumerate}
18\usepackage{tikz}
19\usepackage[labelfont=bf]{caption}
20\usepackage{siunitx}
21\usepackage{cancel}
22\usepackage{fbox}
23\usepackage{multicol}
24\usepackage{amsthm}
25\usepackage[shortlabels]{enumitem}
26\usepackage{float}
27\usetikzlibrary{positioning}
28\geometry{top=25mm}
29
30% Plantilla per l'interior d'un conjunt
31\newcommand{\interior}[1]{%
32 {\kern0pt#1}^{\mathrm{o}}%
33}
34
35% Plantilles del notate
36\def\myupbracefill#1{\rotatebox{90}{\stretchto{\{}{#1}}}
37\def\rlwd{.5pt}
38\newcommand\notate[4][B]{%
39 \if B#1\else\def\myupbracefill##1{}\fi%
40 \def\useanchorwidth{T}%
41 \setbox0=\hbox{$\displaystyle#2$}%
42 \def\stackalignment{c}\stackunder[-6pt]{%
43 \def\stackalignment{c}\stackunder[-1.5pt]{%
44 \stackunder[2pt]{\strut $\displaystyle#2$}{\myupbracefill{\wd0}}}{%
45 \rule{\rlwd}{#3\baselineskip}}}{%
46 \strut\kern9pt$\rightarrow$\smash{\rlap{$~#4$}}}%
47}
48\newcommand\lnotate[4][B]{%
49 \if B#1\else\def\myupbracefill##1{}\fi%
50 \def\useanchorwidth{T}%
51 \setbox0=\hbox{$\displaystyle#2$}%
52 \def\stackalignment{c}\stackunder[-6pt]{%
53 \def\stackalignment{c}\stackunder[-1.5pt]{%
54 \stackunder[2pt]{\strut $\displaystyle#2$}{\myupbracefill{\wd0}}}{%
55 \rule{\rlwd}{#3\baselineskip}}}{%
56 \strut\kern-9pt$\leftarrow$\smash{\llap{$~#4\quad\;\,$}}}%
57}
58
59% Plantilles dels boxes
60%%%% START DEFINING LBOXED, RBOXED %%%%
61\newcommand{\lboxed}[1]{\fbox[blt]{\mathsurround=0pt$\displaystyle#1$}}
62\newcommand{\rboxed}[1]{\fbox[brt]{\mathsurround=0pt$\displaystyle#1$}}
63
64% Plantilles pels problemes
65\newcounter{problem}
66\newcounter{solution}
67
68\newcommand{\green}[1]{\textbf{\color{ForestGreen} #1}}
69
70\newcommand{\separator}{\noindent\hfil\rule{0.75\textwidth}{0.4pt}\hfil}
71
72\newenvironment{Problem}{%
73 \stepcounter{problem}%
74 \begin{tcolorbox}[colback=cyan!10!white,parbox=false]
75 \textbf{Problema \theproblem.}~%
76 \setcounter{solution}{0}}{%
77 \end{tcolorbox}
78}
79
80\newenvironment{FreeProblem}{%
81 \begin{tcolorbox}[colback=cyan!10!white,parbox=false]
82 \setcounter{solution}{0}}{%
83 \end{tcolorbox}
84}
85
86\newcommand\Solution{%
87 \textbf{Solució:}\\%
88}
89
90\newcommand\Context{%
91 \textbf{Context:}\\%
92}
93
94\newcommand\Lema{%
95 \textbf{Lema:} %
96}
97
98\newcommand\Proposition{%
99 \textbf{Proposició:} %
100}
101
102\newcommand\Theorem{%
103 \textbf{Teorema:} %
104}
105
106\newcommand\Proof{%
107 \textbf{Demostració:}\\%
108}
109
110\newcommand\QED{\square}
111
112\newcommand\ASolution{%
113 \stepcounter{solution}%
114 \textbf{Solució \thesolution:}\\%
115}
116
117
118\newcommand{\asection}[2]{
119\setcounter{section}{#1}
120\addtocounter{section}{-1}
121\section{#2}
122}
123
124% Tensor commands:
125\newcommand*{\TT}[1]{\bar{\bar{#1}}}
126\newcommand*{\dev}[0]{\text{dev}\,}