lualatex를 사용하여 tikz externalize를 실행할 수 없지만 이전에는 작동했습니다.

lualatex를 사용하여 tikz externalize를 실행할 수 없지만 이전에는 작동했습니다.

(다양한 요구 때문에) lualatex를 사용하여 TikZ 외부화 라이브러리를 사용하려고 합니다. 예전에는 문제 없이 작동했지만(약 1.5년 전) 이제는 업그레이드했습니다. 데비안 테스트 중이므로 TeX Live 2016이 있고 luatex는 "이것은 LuaTeX, 버전 1.0.0(TeX)입니다. Live 2016/Debian) (형식=lualatex 2017.3.20) 2017년 4월 20일 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}

관련 정보