blob: 75a52d4008606807684f376ddf947f83b1964dea [file] [log] [blame]
\usepackage[catalan]{babel}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{parskip}
\usepackage{xcolor}
\usepackage{tcolorbox}
%\usepackage{hyperref}
\usepackage{geometry}
\usepackage{physics}
\usepackage{systeme,mathtools}
\usepackage[usestackEOL]{stackengine}
\usepackage{scalerel}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage[labelfont=bf]{caption}
\usepackage{siunitx}
\usepackage{cancel}
\usepackage{fbox}
\usepackage{multicol}
\usepackage{amsthm}
\usepackage[shortlabels]{enumitem}
\usepackage{float}
\usetikzlibrary{positioning}
\geometry{top=25mm}
% Plantilla per l'interior d'un conjunt
\newcommand{\interior}[1]{%
{\kern0pt#1}^{\mathrm{o}}%
}
% Plantilles del notate
\def\myupbracefill#1{\rotatebox{90}{\stretchto{\{}{#1}}}
\def\rlwd{.5pt}
\newcommand\notate[4][B]{%
\if B#1\else\def\myupbracefill##1{}\fi%
\def\useanchorwidth{T}%
\setbox0=\hbox{$\displaystyle#2$}%
\def\stackalignment{c}\stackunder[-6pt]{%
\def\stackalignment{c}\stackunder[-1.5pt]{%
\stackunder[2pt]{\strut $\displaystyle#2$}{\myupbracefill{\wd0}}}{%
\rule{\rlwd}{#3\baselineskip}}}{%
\strut\kern9pt$\rightarrow$\smash{\rlap{$~#4$}}}%
}
\newcommand\lnotate[4][B]{%
\if B#1\else\def\myupbracefill##1{}\fi%
\def\useanchorwidth{T}%
\setbox0=\hbox{$\displaystyle#2$}%
\def\stackalignment{c}\stackunder[-6pt]{%
\def\stackalignment{c}\stackunder[-1.5pt]{%
\stackunder[2pt]{\strut $\displaystyle#2$}{\myupbracefill{\wd0}}}{%
\rule{\rlwd}{#3\baselineskip}}}{%
\strut\kern-9pt$\leftarrow$\smash{\llap{$~#4\quad\;\,$}}}%
}
% Plantilles dels boxes
%%%% START DEFINING LBOXED, RBOXED %%%%
\newcommand{\lboxed}[1]{\fbox[blt]{\mathsurround=0pt$\displaystyle#1$}}
\newcommand{\rboxed}[1]{\fbox[brt]{\mathsurround=0pt$\displaystyle#1$}}
% Plantilles pels problemes
\newcounter{problem}
\newcounter{solution}
\newcommand{\green}[1]{\textbf{\color{ForestGreen} #1}}
\newcommand{\separator}{\noindent\hfil\rule{0.75\textwidth}{0.4pt}\hfil}
\newenvironment{Problem}{%
\stepcounter{problem}%
\begin{tcolorbox}[colback=cyan!10!white,parbox=false]
\textbf{Problema \theproblem.}~%
\setcounter{solution}{0}}{%
\end{tcolorbox}
}
\newenvironment{FreeProblem}{%
\begin{tcolorbox}[colback=cyan!10!white,parbox=false]
\setcounter{solution}{0}}{%
\end{tcolorbox}
}
\newcommand\Solution{%
\textbf{Solució:}\\%
}
\newcommand\Context{%
\textbf{Context:}\\%
}
\newcommand\Lema{%
\textbf{Lema:} %
}
\newcommand\Proposition{%
\textbf{Proposició:} %
}
\newcommand\Theorem{%
\textbf{Teorema:} %
}
\newcommand\Proof{%
\textbf{Demostració:}\\%
}
\newcommand\QED{\square}
\newcommand\ASolution{%
\stepcounter{solution}%
\textbf{Solució \thesolution:}\\%
}
\newcommand{\asection}[2]{
\setcounter{section}{#1}
\addtocounter{section}{-1}
\section{#2}
}
% Tensor commands:
\newcommand*{\TT}[1]{\bar{\bar{#1}}}
\newcommand*{\dev}[0]{\text{dev}\,}