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