Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have enabled write18 by telling TeXlipse to call pdfLaTeX using the --enable-write18 option. However, this does not seem to work properly. The code

\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}

produces the output

\ifeof18: flase, \pdfshellescape: true

so write18 seems to indeed be enabled, however instead of producing plots it gives me the errors

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.

What did I do wrong and how can I fix this?


PS: gnuplot is installed and calling it from the command line works fine.


Edit:

I found the following occurences of runsystem in the log file:

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

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

runsystem(gnuplot document.pgf-plot.gnuplot)...executed.
share|improve this question
    
What TeX distribution are you running? Try --shell-escape instead of --enable-write-18 that's specific of MiKTeX, while the other one should work on every system. –  egreg May 30 at 16:18
    
@egreg: I am using MiKTeX and thus switching to --shell-escape didn't do anything. However, I noticed that \ifeof18 is false even without --shell-escape (or --enable-write18) whereas pdfshellescape changes as expected. –  schtandard May 30 at 16:24
    
You need to pass the option miktex: \usepackage[miktex]{gnuplottex} –  Ulrike Fischer May 30 at 16:26
    
\ifeof18 is false because the restricted shell escape is active. You should report what's near runsystem in the log file. But Ulrike's suggestion seems good. –  egreg May 30 at 16:28
    
@Ulrike: That didn't change anything. @egreg: I added the occurences of runsystem in the log file to my question. –  schtandard May 30 at 16:42

1 Answer 1

up vote 2 down vote accepted

For the shell-excape test you need to pass the option miktex to gnuplottex:

\usepackage[miktex]{gnuplottex}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.