![PGFPLOT 外部化が機能しない](https://rvso.com/image/286973/PGFPLOT%20%E5%A4%96%E9%83%A8%E5%8C%96%E3%81%8C%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%AA%E3%81%84%20.png)
私は、LaTeX を使用して PGF プロットを外部化し、シェル エスケープを有効にして EPS ファイルとして保存しようとしています。
\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 "untitled-1-figure2".ps "untitled-1-figure2".dvi ; ps2eps -f "untitled-1-figure2".ps && mv "untitled-1-figure2".eps "untitled-1 -figure2"' は、使用可能な出力ファイル 'untitled-1-figure2' を生成しませんでした (epsi:eps:ps のいずれかが期待されます)。システム コールが有効になっていることを確認してください。pd flatex の場合、これは 'pdflatex -shell-escape' です。'write 18' などの名前になることもあります。あるいは、コマンドが単に失敗しただけでしょうか? エラー メッセージは 'untitled-1-figure2.log' にあります。このまま続行すると、画像のタイプセットを試みます。
しかし、押すだけで戻るキーを入力すると、EPS ファイルが正常に生成されます。 いろいろ試してみましたが、うまくいきませんでした。 助けてください。