# tikz picture not created when compiling larger document with luatex and \tikzexternalize

When compiling a large document using luatex and scrbook, I get the following error:

! Package tikz Error: Sorry, the system call 'lualatex -shell-escape -halt-on-error -interaction=batchmode -jobname tikz/Doc-figure22" "\def\tikzexternalrealjob{Doc}\input{Doc}"' did NOT result in a usable output file 'tikz/Doc-figure22' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in 'tikz/Doc-figure22.log'. If you continue now, I'll try to typeset the picture. See the tikz package documentation for explanation.

Within the log-file of the picture the last line is:

! ==> Fatal error occurred, no output PDF file produced!

Beside that I can't find the reason within the log file. However, I'm an amateur.

When I compile the picture alone or when I remove some other pictures in the document, the error is absent. So it is hard to localize the reason. However, wihtout \usetikzlibrary{external} \tikzexternalize the error does not occur. The package \usepackage{shellesc} is loaded as mentioned here. The option -shell-escape is set as mentioned here.

Has anybody an idea in which direction I can search? Shall I upload the log-file of the figure or something else to provide more information?

• Create a small but complete example that demonstrates the error and can be used for tests and show it along with the log-file. – Ulrike Fischer Jan 8 at 15:57
• The problem is, that in small examples the error does not occure, anymore. I didn't found a reproducible reduction, yet. The error disappears, when I remove only a few pictures, but not a special picture. – Richard Jan 8 at 17:28
• Without an example it is not possible to debug this. Check the Doc-figure22.log mentioned in the error message for a clue. – Ulrike Fischer Jan 8 at 17:34

A longer time ago I had a similar problem with \usetikzlibrary{external} \tikzexternalize, when I added too much pictures ad once (at least this was my assumption). However this time the change from unsuccessful to successful compilation changed whithout removing a tikz picture. I just removed tables.