blob: 44e88e27703bba4334d5620a18d1fe4d744ea780 [file] [log] [blame]
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{parskip}
\usepackage[dvipsnames]{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{fancybox}
\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}\,}
% Corrections:
\newif\ifshowcorrections
\newcommand{\correction}[1]{%
\ifshowcorrections%
{\color{red} #1}%
\else%
#1%
\fi%
}%
\newcommand{\formulacorrection}[1]{%
\ifshowcorrections%
\textcolor{red}{#1}%
\else%
#1%
\fi%
}%