Avances
diff --git a/apuntsfme.dtx b/apuntsfme.dtx
index 7fa777f..d103a9a 100644
--- a/apuntsfme.dtx
+++ b/apuntsfme.dtx
@@ -36,6 +36,8 @@
 \usepackage{apuntsfme}
 \usepackage{hyperref}
 \usepackage{csquotes}
+\usepackage{booktabs}
+\usepackage{longtable}
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
@@ -45,7 +47,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{175}
+% \CheckSum{0}
 %
 % \CharacterTable
 %   {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -66,7 +68,6 @@
 % \changes{v1.0}{2019/07/14}{Initial version}
 %
 % \GetFileInfo{apuntsfme.sty}
-% \GetFileInfo{apuntsfme.dtx}
 %
 %
 % \title{The \textsf{ApuntsFME} package\thanks{This document
@@ -80,7 +81,75 @@
 %   A package that aims to make taking notes in math class in \LaTeX\ easy.
 % \end{abstract}
 %
-% TODO hacer la documentacion
+% The goal of this package is make taking notes on class easy. It includes a lot of packages and shortcuts
+% that aim to make it easy to remember and easy to type. Note that this package is not meant to set a
+% reference in how \LaTeX\ should be writter nor it's meant to be a guideline of any kind.
+%
+% \section{The ApuntsFME package}
+% The ApuntsFME package has the purpose of providing the shortcuts and
+% environments used for short typing.
+%
+% \subsection{Packages imported}
+% As mentioned, this package collects a lot of other packages all very common to math typing. Here's a
+% table with all of them and the use that they provide.
+%
+% \begin{longtable}{p{.2\textwidth}p{.6\textwidth}}
+%     Package & Usage \\ \toprule \toprule
+%     \endhead
+%     \bottomrule \multicolumn{2}{c}{{Continued on next page}} \\
+%     \endfoot
+%     \bottomrule
+%     \endlastfoot
+%     inputenc & loaded with the \texttt{utf-8} option, used so the characters
+%     are interpreted as unicode text \\ \midrule
+%     fontenc & loaded with the \texttt{T1} option. It's used so, in the output
+%     PDF, you can search for accented words \\ \midrule
+%     lmodern & To have the fonts have high quality \\ \midrule
+%     hyperref & To have clickable links and urls \\ \midrule
+%     enumitem & loaded with \texttt{shortlabels}. Used to control enumerates \\
+%     \midrule
+%     amsmath & The American Mathematical Society \LaTeX\ package. Loads common
+%     math utilities \\ \midrule
+%     amsthm & The American Mathematical Society package used to typeset
+%     theorems, propositions, \dots \\ \midrule
+%     amssymb & The American Mathematical Society pacakgae that defines a lot of
+%     ``common'' symbols \\ \midrule
+%     graphicx & A lot of support for graphics inside the document \\ \midrule
+%     mathtools & A set of mathematical tools. \\ \midrule
+%     tikz & A package to create graphics inside \LaTeX. \\ \midrule
+%     makeidx & This is what creates the glossary with the definitions. \\
+%     \midrule
+%     cancel & This package allows to cancel things in equations by marking them
+%     with a line (just as you would do in a paper) \\ \midrule
+%     pgf & Is the backend of \texttt{pgfplots} \\ \midrule
+%     pgfplots & This is used with \texttt{tikz} to make axis plots \\ \midrule
+%     mathrsfs & Support for using RSFS fonts in maths \\ \midrule
+%     thmtools & This is used to furder customize the \texttt{amsthm}
+%     environments \\ \midrule
+%     tikz-cd & An extension of \texttt{tikz} to create commutative diagrams \\
+%     \midrule
+%     faktor & Used to typeset quotient structures \\ \midrule
+%     physics & More macros for maths \\ \midrule
+%     float & Let's you controll the figures position \\ \midrule
+% \end{longtable}
+%
+% It's interesting to note that we load TiKz and PGF because we bet for making
+% the figures inside \LaTeX\ and not with another external tool. However, this
+% has a drawback and is that it reduces compilation times by quite a lot. To
+% mitigate that effect we also use \texttt{external} with TiKz. This library,
+% makes the first computation very very slow and creates a directory with all
+% the figures generated from the code. Then, the rest of the compilations just
+% need to import that precomputed figure so they are a lot faster. This
+% behaviour can be turned off by the \texttt{noexternal} option.
+%
+% You also can controll the output folder of these figures with the option
+% \texttt{externalfolder}. Here's an example in how to put the figures in the
+% folder myfigures. But remember that this option will be ignored if you use 
+% \texttt{noexternal}.
+%
+% \begin{verbatim}
+% \usepackage[externalfolder=myfigures]{apuntsfme}
+% \end{verbatim}
 %
 % \StopEventually{}
 %
@@ -101,25 +170,9 @@
 \RequirePackage[shortlabels]{enumitem}
 \RequirePackage{amsmath,amsthm,amssymb,graphicx,mathtools,tikz,makeidx}
 \RequirePackage{cancel,pgf,pgfplots,mathrsfs,thmtools,tikz-cd,faktor}
-\RequirePackage{physics}
-
-\usetikzlibrary{positioning,arrows, calc, babel}
-\usetikzlibrary{external}
-\tikzexternalize[prefix=figures/]
-\pgfplotsset{compat=1.11}
+\RequirePackage{physics,float}
 %    \end{macrocode}
 %
-% And some style definitions, just because we can.
-%    \begin{macrocode}
-\let\emptyset\varnothing
-\setcounter{secnumdepth}{4}
-\def\mydate{\today}
-\hypersetup{
-    colorlinks,
-    linkcolor=blue
-}
-%    \end{macrocode} 
-%
 % Then we have lots of packages that we want to remove but have some documents that use them
 % so we don't remove them because laziness.
 %    \begin{macrocode}
@@ -130,11 +183,22 @@
 \RequirePackage{xcolor} % Aixo potser es d'un document concret
 \RequirePackage{needspace} %No se si es gaire util, compila sense incloure'l
 \RequirePackage{commath} % Aquest implement els \dif, cal canviar tot el codi per ferho amb physics
-\RequirePackage{float} % No se que fa pero compila si el trec
 \RequirePackage{dsfont} % No se que fa, compila si el trec
 \RequirePackage{mdframed,cleveref,stackengine,stmaryrd,multirow}
 %    \end{macrocode}
 %
+%
+% And some style definitions, just because we can.
+%    \begin{macrocode}
+\let\emptyset\varnothing
+\setcounter{secnumdepth}{4}
+\def\mydate{\today}
+\hypersetup{
+    colorlinks,
+    linkcolor=blue
+}
+%    \end{macrocode} 
+%
 % \subsection{Useful commands}
 % In this section we provide some useful commands.
 %
@@ -422,7 +486,25 @@
     \gdef\@babelopt{spanish,es-lcroman,es-nolists}
     \@babellang=2
 }
+% Then, we need to configure TiKz and PGF
+%    \begin{macrocode}
+\usetikzlibrary{positioning,arrows, calc, babel}
+
+\newif\if@external\@externaltrue
+\DeclareOption{noexternal}{
+    \@externalfalse
+}
+\def\apunts@folder{figures/}
+
+\pgfplotsset{compat=1.11}
+%    \end{macrocode}
 \ProcessOptions\relax
+
+\if@external
+    \usetikzlibrary{external}
+    \tikzexternalize[prefix=\apunts@folder]
+\fi
+
 \if@babel
     \PassOptionsToPackage{\@babelopt}{babel}
     \RequirePackage{babel}