在 Miktex 2.9 中使用 tikz 创建 eps 文件

在 Miktex 2.9 中使用 tikz 创建 eps 文件

嗨,我正在尝试使用 tikz 包输出 eps 文件,在 Windows 7 操作系统中使用 miktex 2.9。在此之前,我非常感谢您的帮助!!!我收到的系统消息是:

! Package tikz Error: 

Sorry, the system call 'latex -halt-on-error -interaction
=batchmode -jobname "fig_profits_dmr_melitz-figure0" "\def\tikzexternalrealjob{
fig_profits_dmr_melitz}\input{fig_profits_dmr_melitz}" && dvips -o "fig_profits
_dmr_melitz-figure0".ps "fig_profits_dmr_melitz-figure0".dvi && ps2eps "fig_pro
fits_dmr_melitz-figure0.ps"' did NOT result in a usable output file 'fig_profit
s_dmr_melitz-figure0' (expected one of .epsi:.eps:.ps:). Please verify that you
 have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Som
etimes it is also named 'write 18' or something like that. Or maybe the command
 simply failed? Error messages can be found in 'fig_profits_dmr_melitz-figure0.
log'. If you continue now, I'll try to typeset the picture.

See the tikz package documentation for explanation.
Type  H <return>  for immediate help.

我正在运行的代码如下:

\documentclass{article}
\usepackage{tikz}

% set up externalization
\usetikzlibrary{external}
\tikzexternalize[shell escape=-enable-write18] % MikTeX uses a -enable-write18 instead of --shell-escape.

\tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error
-interaction=batchmode -jobname "\image" "\texsource" &&
dvips -o "\image".ps "\image".dvi &&
ps2eps "\image.ps"}}


\begin{document}
\begin{tikzpicture}[xscale=4,yscale=0.8]
\draw [<->](0,-3.5) -- (0,6) node[above left]{$\Pi (\varphi)$} ;
\draw [->] (0,0) -- (3,0) node[below right]{$\varphi^{\sigma-1}$};
\node [above] at (.52999999,0) {$\varphi$};
\draw [blue] (0,-.59049) -- (3,2.7519063);
\node [below] at (.62,0) {$\varphi^{M}$};
\draw [dashed,red] (0,-.59049) -- (3,2.2667197);
\node [above] at (1.1,0) {$\varphi^{x,M}$};
\draw [dashed,red] ((0,-3.1757969) -- (3,5.4854674);
\node [below] at (1.17,0) {$\varphi^{x}$};
\draw [blue] ((0,-3.1757969) -- (3,4.967272);
\end{tikzpicture}
\end{document}

相关内容