lualatexでtikz externalizeを実行できませんが、以前は動作していました

lualatexでtikz externalizeを実行できませんが、以前は動作していました

私は、さまざまなニーズのため、lualatex を使用して TikZ 外部化ライブラリを使用しようとしています。以前は問題なく動作していましたが (約 1.5 年前)、現在はアップグレードしています。Debian テストを使用しているため、TeX Live 2016 を使用しています。luatex は、「これは LuaTeX、バージョン 1.0.0 (TeX Live 2016/Debian) (format=lualatex 2017.3.20) 20 APR 2017 20:31 です」とアナウンスします。私は、TikZ 外部化ドキュメント ライブラリから取得した最初の例である、この最も単純なファイルを試しました。

\documentclass{article}
% main document, called main.tex
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize % activate!
\begin{document}
\loggingall
\begin{tikzpicture}
  \node {root}
    child {node {left}}
    child {node {right}
      child {node {child}}
      child {node {child}}
    };
\end{tikzpicture}

A simple image is \tikz \fill (0,0) circle(5pt);.
\end{document}

「pdflatex --shell-escape main」を実行すると正常に動作しますが、pdflatex を lualatex に置き換えると、次のエラーが発生します。

! Package tikz Error: Sorry, the system call 'lualatex -shell-escape -halt-on-e
rror -interaction=batchmode -jobname "main-figure1" "\def\tikzexternalrealjob{m
ain}\input{main}"' did NOT result in a usable output file 'main-figure1' (expec
ted one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system c
alls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also name
d 'write 18' or something like that. Or maybe the command simply failed? Error 
messages can be found in 'main-figure1.log'. If you continue now, I'll try to t
ypeset the picture.

ここで何が間違っているのか、誰か分かるでしょうか? 「lualatex --shell-escape」自体は問題なく動作します (簡単なファイルで試してみました)。また、コマンド ラインから直接「lualatex -shell-escape -halt-on-error -interaction=batchmode -jobname "main-figure1" "\def\tikzexternalrealjob{main}\input{main}"」を実行すると、問題なく動作するようです。

ありがとう!

答え1

shellescパッケージが必要です

\documentclass{article}
\usepackage{shellesc}
% main document, called main.tex
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize % activate!
\begin{document}
\loggingall
\begin{tikzpicture}
  \node {root}
    child {node {left}}
    child {node {right}
      child {node {child}}
      child {node {child}}
    };
\end{tikzpicture}

A simple image is \tikz \fill (0,0) circle(5pt);.
\end{document}

関連情報