It seems that whenever I use \usetikzlibrary in the context of \begin{figure}, the library is not loaded. I often put the content of my figures in separate files, and I'd like to place the library usage in the same file, but right now it seems I have to put \usetikzlibrary outsid the figure in another file. Is there any way to get the library to load from within a figure environment?
Asked
Active
Viewed 71 times
0
-
1Why are you not loading it in the preamble of the main file? – Sigur May 05 '15 at 15:45
-
Hi and welcome to TeX.SX. It is quite possible that the loading of libraries is restricted to the preamble. Jusst like you cannot load packages within the document. – Johannes_B May 05 '15 at 15:46
-
Does Is it possible to load a TikZ library locally? help? – Claudio Fiandrino May 05 '15 at 15:50
-
It works in the body of the document, but not inside a figure environment. If putting it into the preamble is best practice, though, then that's what I'll do. – Jonathan Schuster May 05 '15 at 17:31
-
It is indeed the best practice. – percusse May 05 '15 at 20:25