尽管已启用 write18,但还是出现“Shell escape not enabled”错误

尽管已启用 write18,但还是出现“Shell escape not enabled”错误

我已write18通过告诉 TeXlipsepdfLaTeX使用该--enable-write18选项来启用它。但是,这似乎无法正常工作。代码

\documentclass{scrartcl}

\usepackage{tikz}
\usepackage{gnuplottex}

\begin{document}

\verb|\ifeof18|: 
\ifeof18
    true
\else
    false
\fi

\verb|\pdfshellescape|:
\ifnum\pdfshellescape=1
    true
\else
    false
\fi

\begin{gnuplot}
    plot sin(x), cos(x)
\end{gnuplot}

\begin{tikzpicture}
    \draw[domain = -pi : pi] plot function{sin(x)};
\end{tikzpicture}

\end{document}

产生输出

\ifeof18: flase,\pdfshellescape: true

所以write18似乎确实启用了,但是它没有生成图表,而是给出了错误

pdflatex.exe> Package pgf Warning: Plot data file `document.pgf-plot.table' not found.

pdflatex.exe> Package gnuplottex Warning: Shell escape not enabled.
pdflatex.exe> (gnuplottex)                You'll need to convert the graphs yourself..

pdflatex.exe> Package gnuplottex Warning: Please convert document-gnuplottex-fig1.gnuplot manually.

我做错了什么?我该如何解决这个问题?


PS:gnuplot 已安装并且从命令行调用它工作正常。


编辑:

runsystem我在日志文件中发现了以下情况:

runsystem(touch w18-test-20145301175.tex)...executed.

runsystem(rm -f w18-test-20145301175.tex)...executed.

runsystem(gnuplot document.pgf-plot.gnuplot)...executed.

答案1

对于 shell-excape 测试,您需要将选项传递miktex给 gnuplottex:

\usepackage[miktex]{gnuplottex}

相关内容