I recently tried to recompile my thesis that I wrote 5 years ago, but my figures and some biblatex prevent it. Here is an MWE for one of them:
\documentclass{standalone}
\usepackage{tikz,ifthen,xcomment,amsmath,amsfonts}
\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,arrows,automata,patterns,positioning}
\newcommand{\NN}{\mathbb{N}}
\begin{document}
\begin{align*}
Y &= X\\
X &= \left\{
\tikz[scale=0.3,baseline={([yshift=-3pt]current bounding box.center)}]{
\draw[color=gray!30,fill=green](0,0) rectangle +(1,1);
},
\right\}\cup\bigcup_{n\in\NN}\left\{
\tikz[scale=0.3,baseline={([yshift=1pt]current bounding box.center)}]{
\draw[color=gray!30,fill=green] (0,0) rectangle (1,1);
\draw[decorate,decoration={brace}] (4,0) -- (1,0) node[midway,below=2pt] {$n$};
},
\right\}
\end{align*}
\end{document}
The error I get is the following:
! Missing \endgroup inserted.
<inserted text>
\endgroup
l.18 \end{align*}
I managed to make a lot of other figures compile by adding [tikz] to the standalone class, but for this one which is sort of a hybrid it does not work.
Lastly, my version of texlive is 2017 and I'm pretty sure things were ok with 2015.