I've run into a compilation error for the externalized option with tikz. Up to a couple months ago it all worked fine. Now I am getting this error

! Package tikz Error: Sorry, the system call 'pdflatex -enable-write18 -halt-on
-error -interaction=batchmode -jobname "tikz/Master-figure0" "\def\tikzexternal
realjob{Master}\input{Master}"' did NOT result in a usable output file 'tikz/Ma
ster-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you h
ave enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Somet
imes it is also named 'write 18' or something like that. Or maybe the command s
imply failed? Error messages can be found in 'tikz/Master-figure0.log'. If you
continue now, I'll try to typeset the picture.

These lines appear to be the culprit. If I run the whole thing without externalizing, it works fine.

\tikzexternalize[prefix=tikz/,shell escape=-enable-write18]

Interestingly, the plots are still generated like they are supposed to and appear in the output pdf. But there is no separate pdf output for the single plots like usual for the externalize option.

Here is a snipped from the log file

This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.1) (preloaded format=pdflatex 2022.3.12)  19 OCT 2022 00:15
entering extended mode
 \write18 enabled.
 %&-line parsing enabled.
! Undefined control sequence.
<argument>  \visibility 
                        {cite} \keypart { \namepart [use=true]{prefix} \name...
l.262 }

It appears that the \visibility{cite} is the faulty part, even though the figure does not contain any kind of citation or biblatex interaction. I had the same error couple weeks back compiling the main file. Solution here was easy, just update all packages. The old miktex wasn't compatible with my newer biblatex. Just updating does not solve anything here though. These are my biblatex settings if it is relevant:

\usepackage[backend=biber, style=apa, natbib=true]{biblatex}

Thanks for the help!

  • I don't think there's a conflict between Tikz/external and biblatex. This seems like two different problems. (Or are you using \cite inside of one TikZ picture?) Can you run pdflatex -enable-write18 -halt-on-error -interaction=batchmode -jobname "tikz/Master-figure0" "\def\tikzexternalrealjob{Master}\input{Master}" manually? Oct 18, 2022 at 23:15
  • Running that command separately works for me. With that I found the issue. So I am running everything as portable version to work across different PCs. tikzexternalize automatically calls all commands (pdflatex, biblatex, etc. ) from my default local directory instead from the portable version. My default local directory wasn't updated because normally it isn't used. Adding the correct path to \tikzset{external/system call="myPath/pdflatex"} solved the problem for me
    – Timo
    Oct 19, 2022 at 7:40

1 Answer 1


The problem was the not correctly set up path to my portable version. Adding the correct path to \tikzset{external/system call="myPath/pdflatex.exe"} solved it

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .