# standalone does not create a pdf (build new option)

i'm using the standalone package within my main file and i want to input a lot of tikz pictures generated with matlab2tikz. Within the documentation of standalone i read that the build new option creates a pdf of the figure which can be used for faster compilations after the first compilation. So i equipped my example file with the necessary options - but there is no pdf generated for the figure that is included in the main file.

So, i found a similar post here but i didn't find a solution for me - and i'm not allowed to comment...

So this is my main.tex:

\documentclass{article}
\usepackage[mode=buildnew]{standalone}
\usepackage{pgfplots}
\pgfplotsset{/pgf/number format/use comma}
\usepackage{tikz}
%
%
\begin{document}
%
\begin{figure}
\centering
\includestandalone[width=0.8\linewidth]{fig_01}
\caption{mycaption}
\label{fig:01}
\end{figure}
%
\end{document}


While this in the content of the fig_01.tex:

\documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\usepackage{grffile}
\usetikzlibrary{plotmarks}
\usepgfplotslibrary{patchplots}
\usepackage{amsmath}

\begin{document}
%
\begin{tikzpicture}
\draw (2,2) ellipse (3cm and 1cm);
\end{tikzpicture}%
\end{document}


Using this produces a pdf for the whole document including the figure itself. But there is no extra pdf generated for the file fig_01.tex. So can you help me to get this done and fastening the compilation process?

I'm using "pdflatex" with the option -synctex=1 -interaction=nonstopmode. I already tried to add the option -shell-escape and --shell-escape for the pdflatex command but then i receive the following log: sh: pdflatex: command not found and Graphic 'fig_01.pdf' could not be build while no extra pdf is generated.

I just found the answer to my question using this thread. While pdflatex including the option -shell-escape couldn't be found during former compilations, everything works fine now. Changing the folder for the commands to /Library/TeX/texbin/... and adding the same into the Build->Commands (\$PATH) in the settings did what i was looking for.