我已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}
产生输出
所以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}