Having recently discovered the use of the tikzexternalize library, I decided to multithread the compilation of my tikz images using the method suggested in this thread: 1.
However, I am having issues when doing this when loading certain other packages such as microtype, algorithm2e, etc. Review of the log file during the tikz externalization process shows that *.sty files are missing and the required modules cannot be found.
MWE is as follows:
\documentclass{article}
\usepackage{microtype}
\usepackage{todonotes}
\usepackage{pgfplots} %use tikz based pgfplots
\usepgfplotslibrary{external}
\tikzset{external/disable dependency files}
\tikzexternalize[mode=list and make, prefix=tikz/]
\tikzset{external/system call={lualatex \tikzexternalcheckshellescape
-halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}
} % to let pdflatex work
%% compile picture: pdflatex --shell-escape xxxxxxx.tex
\makeatletter
\renewcommand{\todo}[2][]{\tikzexternaldisable\@todo[#1]{#2}\tikzexternalenable}
\makeatother
\begin{document}
some text
\begin{tikzpicture}
\begin{axis}[ xlabel=$x$, ylabel={$f(x) = x^2 - x +4$} ]
\addplot {x^2 - x +4};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{loglogaxis}[xlabel=Cost,ylabel=Gain]
\addplot[color=red,mark=x] coordinates
{ (10,100) (20,150) (40,225) (80,340) (160,510) (320,765) (640,1150) };
\end{loglogaxis}
\end{tikzpicture}
\end{document}
Setup is Win 7 (x64) + TeXlive 2014 + Texmaker + Cygwin (make)