This question is a build-up on the "classical" Problem with babel and tikz using \draw; it is known that the babel package, in some language, make ><' actives and wreak havoc with tikzpicture environment.
The new (3.0+) tikz has a solution as a package named babel; it works a treat almost everytime --- unless you use it in this MNWE:
\documentclass[]{article}
\usepackage[spanish]{babel}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{babel} % this works most of the time, but not in
% an \ifthenelse
\newboolean{solution} \setboolean{solution}{true}
\begin{document}
\ifthenelse{\boolean{solution}}{
\begin{tikzpicture}[]
\draw [thin, ->] (-1,0) -- (0,0);
\end{tikzpicture}
}% end \ifthenelse{\boolean{solution}}{
{
% not solution here
}
\end{document}
which will fail with the infamous
Paragraph ended before \language@active@arg> was complete.
Now, the classical solution of avoid active characters in babel will work (and it is arguably the right one, thanks to unicode and utf-8 ubiquity), so just using
\usepackage[spanish,es-noquoting]{babel}
will solve the thing. Anyway, is this an expected behavior? Is it possible fix \usetikzlibrary{babel} to work around this problem? And if not, is there a macro to obtain the same effect of the es-noquoting option after the fact, so I can correct a previous call of babel in a random class/package?
\deactivatequotinganywhere in you preamble or document, to turn off the special meaning of<and>. – JLDiaz Jun 15 '16 at 13:52babelonly sets a couple of tikz which instruct tikz to deal appropiately with special chars in the context of tikz nodes and paths, but probablyifthenpackage contains some kind ofscantokenswhich reads the argument when the special chars are still active, so tikz has no chance to apply its wizardry – JLDiaz Jun 15 '16 at 14:04