I reopen this post, which was started some time ago but didn't came with a solution. I don't really remember what was the exact problem with this (well, of course, gnuplot
didn't work correctly). So I write here my actual problem, which is the same as before.
Problem
I reinstalled the operating system (Mac OS X 10.8.2), installed MacTeX (the last one), installed MacPorts and gnuplot
through it (in an administrator account). In this account, the command port
works correctly from terminal (which let mi install gnuplot
), and also does gnuplot
app (from terminal). Then created a new (non-admin) account, and then neither port
nor gnuplot
worked. After little hacking (here it is more info), I solved it.
Now port
and gnuplot
work both from terminal in both accounts.
But here is the problem. I use TextMate to compile my documents, which compiles everything perfectly. But if I use some code which needs of gnuplot
it isn't able to call it. See at the bottom for some examples.
On the contrary, if I call the file from the terminal with pdflatex --shell-escape file.tex
then it compiles perfect.
Question
What happens? Is it a PATH problem? How can I solve it? (I don't really understand what is a PATH, therefore I can't try/imagine by myself)
Code and Logs
Example 1:
\documentclass{scrartcl}
\usepackage{gnuplottex}
\begin{document}
\begin{gnuplot}
plot sin(x)
\end{gnuplot}
\end{document}
Part of the .log file
\openout3 = `Ejercicio1-gnuplottex-fig1.gnuplot'. Opening gnuplot stream Ejercicio1-gnuplottex-fig1.gnuplot runsystem(gnuplot Ejercicio1-gnuplottex-fig1.gnuplot)...executed. Package gnuplottex Warning: Conversion of Ejercicio1-gnuplottex-fig1.gnuplot fa iled. Package gnuplottex Warning: Please convert Ejercicio1-gnuplottex-fig1.gnuplot m anually.
And from the terminal no error at all.
Example 2:
\documentclass{scrartcl}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot gnuplot {sin(x)};
\end{axis}
\end{tikzpicture}
\end{document}
The .log problems from TextMate:
Latex Error: ./Ejercicio1.tex:6 Package pgfplots Error: Sorry, the gnuplot-result file 'Ejercicio1.pgf-plot.table' could not be found. Maybe you need to enable the shell-escape feature? For pdflatex, this is '>> pdflatex -shell-escape'. You can also invoke '>> gnuplot .gnuplot' manually on the respective gnuplot file..
! Package pgfplots Warning: You have an axis with empty range. Replacing it with a default range and clearing all plots.
And no errors from terminal with pdflatex --shell-escape file.tex
.
-shell-escape
option to be turned off. Recheck this option under Preferences in your LaTeX bundle. See How and Why to use TextMate for LaTeX (starting from Setup). Since I don't have TextMate nor a Mac, I'm unable to test this myself.pdflatex
?pdflatex --shell-escape
on the command line?