1

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)

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – cfr Sep 21 '14 at 0:56
  • I have edited your English a little to help make your question clearer. Please feel free to undo anything which you feel misrepresents your intended meaning. (I tried to be quite conservative but I also tried to rewrite things which didn't really make sense.) – cfr Sep 21 '14 at 1:01
1

I would guess that this is due to your Windows/cygwin setup: perhaps the search paths are set up incorrectly or the latex installation gets confused.

In fact, missing .sty files should be entirely unrelated to external. The fact that you still see such messages indicate a severe project setup problem. I would bet that the file does not compile even if you disable external altogether.

Perhaps you have compiled the main file from within your Windows TeX installation and the make invocation uses the linux / cygwin TeX installation? Perhaps the cygwin TeX installation does not have microtype.

Since this is just a (hopefully) good guess, my answer would be to verify your setup; in particular with regard to the question "Which TeX installation is being used".

If this answer turns out to be a dead-end, I would like to ask you to give more detail on how you compile, optimally with the cygwin search path environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.