![PGFPLOT 외부화가 작동하지 않음](https://rvso.com/image/286973/PGFPLOT%20%EC%99%B8%EB%B6%80%ED%99%94%EA%B0%80%20%EC%9E%91%EB%8F%99%ED%95%98%EC%A7%80%20%EC%95%8A%EC%9D%8C%20.png)
라텍스를 사용하고 쉘 이스케이프를 활성화하여 EPS 파일로 저장되도록 PGF 플롯을 외부화하려고 합니다.
\documentclass[a4paper]{article}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize%[prefix=fig/]
\tikzset{external/system call={latex -shell-escape -interaction=nonstopmode -jobname="\image" "\texsource" ; dvips -o "\image".ps "\image".dvi ; ps2eps -f "\image".ps && mv "\image".eps "\image"}}
\pgfplotsset{ compat=1.8, tick label style={font=\small}, label style={font=\small}, legend style={font=\footnotesize}}
\tikzexternalize[prefix=fig/]
\title{\LaTeX\ plots with \texttt{tikz} and \texttt{pgfplots}}
\author{Roel Van Beeumen}
\date{April 17, 2012}
\begin{document}
%\tikzsetnextfilename{filename}
\tikzset{external/force remake}
\maketitle
% == A first plot ======================================== %
\section{A first plot}
\lipsum[1]
\begin{figure}[h]
\centering
% -------------------------------------------------------- %
\begin{tikzpicture}
\begin{axis}[xlabel=$x$,ylabel=$\sqrt{|x|}$, axis x line=bottom,axis y line=left, ymax=2.1,xmax=4.4]
\addplot[blue,mark=none,domain=-4:4,samples=201] {sqrt(abs(x))};
\end{axis}
\end{tikzpicture}
% -------------------------------------------------------- %
\end{figure}
\lipsum[2]
% == A second plot ======================================= %
\section{A second plot}
\lipsum[3]
\begin{figure}[h]
\centering
% -------------------------------------------------------- %
\begin{tikzpicture}
\begin{loglogaxis}[xlabel=Dof,ylabel=Error,width=\textwidth]
\addplot file{datafile1a.dat};
\addplot file{datafile1b.dat};
\legend{Case 1,Case 2}
\end{loglogaxis}
\end{tikzpicture}
% -------------------------------------------------------- %
\end{figure}
\lipsum[4-5]
% == A third plot ======================================== %
\section{A third plot}
\lipsum[6]
\begin{figure}[hbtp]
\centering
% -------------------------------------------------------- %
\begin{tikzpicture}
\begin{loglogaxis}[xlabel=Dof,ylabel=Error,width=\textwidth]
\addplot table[x=dof1,y=error1] {datafile2.dat};
\addplot table[x=dof2,y=error2] {datafile2.dat};
\legend{Case 1,Case 2}
\end{loglogaxis}
\end{tikzpicture}
% -------------------------------------------------------- %
\end{figure}
\lipsum[7]
\end{document}
그러나 TeX Live 2013이 설치된 Linux Mint 16에서 latex -shell-escape로 이를 실행하면 각 플롯에 대해 다음 오류가 발생합니다.
! 패키지 tikz 오류: 죄송합니다. 시스템 호출 'latex -shell-escape -interaction= nonstopmode -jobname="untitled-1-Figure2" "\def\tikzexternalrealjob{untitled-1} \input{untitled-1}" ; dvips -o "제목 없음-1-그림2".ps "제목 없음-1-그림2".dvi ; ps2eps -f "untitled-1-Figure2".ps && mv "untitled-1-Figure2".eps "untitled-1 -Figure2"'로 인해 사용 가능한 출력 파일 'untitled-1-Figure2'가 생성되지 않았습니다(예상 하나 엡시:eps:ps). 시스템 호출을 활성화했는지 확인하십시오. pd flatex의 경우 'pdflatex -shell-escape'입니다. 때로는 'write 18' 또는 이와 유사한 이름으로도 지정됩니다. 아니면 단순히 명령이 실패했을 수도 있나요? 오류 메시지는 'untitled-1-Figure2.log'에서 확인할 수 있습니다. 지금 계속하시면 제가 그림을 조판해 보겠습니다.
하지만 그냥 누르면반품키를 누르면 EPS 파일이 성공적으로 생성됩니다. 나는 많은 시도를 시도했지만 운이 없었습니다. 도와주세요.